Pascal for the AIM 65


Instant Pascal manual

ROM R32P2
ROM R32P3
ROM R32P4
ROM R32P5
ROM R32P6
Instant Pascal, an interactive Pascal variant “INSTANT PASCAL(TM) (C)1981 MELVIN E. CONWAY”
5 ROMS, available in hex format. See the manual how to install, it needs an external expansion adapter, see the Other hardware page

Background of Instant Pascal

By Mel Conway http://heed.melconway.com/HEED/History.html

I proposed to Rockwell to build an “Instant Pascal” trainer to run on the AIM-65, and the proposal was accepted. The AIM-65 was a single-board computer with an 8-bit Rockwell 6502 (the processor used in the Apple II), 4K bytes (that’s right, 4096 bytes) of internal “random-access” memory (RAM), up to 20K bytes of on-board “read-only” memory (ROM), and various byte-at-a-time input-output possibilities. The user interface consisted of a teletype-like keyboard, a single-line 20-position LED alphanumeric display, and a thermal strip printer with 20 characters per line. (The only widely used external storage was an audio cassette recorder.) The intention was that the user would get Instant Pascal in the form of a set of ROMs. You plug these ROMs into the AIM-65 and you have a Pascal trainer.

The AIM-65 had multiple hardware limitations. The major one, of course, was the 4K RAM. But the single-line display wasn’t helpful. Clearly, any Pascal editor would have to be a “line” editor, not a “screen” editor. The traditional solution would have been to prepare a program in four steps: (1) the entry step, in which you prepare a source tape; (2) the edit step, in which you modify your source program by doing tape-to-tape copies under control of the keyboard and display; (3) the compile step, in which you read a source tape and write an object tape; and (4) the run step, in which you load the object tape and execute it. Debugging is clearly a problem because you have to have both the source program in view (so you can find and fix your mistakes) and the object program in memory (so the program can run). How can you do that in 4K of memory? And how are you going to do all four (or five, if there is a separate debugger) steps under control of 20K of ROM? I had no intention of building a language trainer that way.

There was an alternative: to store the Pascal source code in the 4K RAM and interpret it directly. Waterloo Pascal1 did that. They had the right idea, but directly interpreting source code made it really slow compared to BASIC, which was the alternative at the time. I was, frankly, relieved to discover how slow Waterloo Pascal was, because I already had the outline of another approach.

The Approach

As with Waterloo Pascal, my solution to eliminating the build-run dissonance was a single internal representation of the program that stayed in RAM. It had to be compact, efficiently interpretable, and readily translatable back to Pascal source so that no source program needed to be stored. The approach I took is today called a “tokenized” representation of the Pascal program. The internal representation of the Pascal program was syntactically correct Pascal: I specified the token language using the formal Pascal syntax. This assured syntactic similarity between external and internal representations of a program. I put one constraint on the user: text had to be entered in “prettyprint” form (no indenting necessary), one line per prettyprint line. Fortunately, this was not a source of complaint, because entering code this way was considered to be good practice; thus this most serious limitation was reframed as a feature. The prettyprint input constraint permitted line-by-line translation into token form (and local syntax checking, with immediate feedback), and there was no need to store more than one line of Pascal text internally.

The parts of the program consisted of (1) a single-line source-code tokenizer/syntax checker (“forward translator” from keyboard to RAM); (2) its reverse, a single-line token-to-source “backward translator” from RAM to printer; and (3) a token interpreter that executed the program. There was a fourth component, a “binder,” that scanned the tokenized program after you entered the “run” command, and established (and checked) those syntactic connections that spanned multiple lines. The binder had very little to do, and its execution time was typically imperceptible. Source-code debugging fell out of this design: any line being executed by the interpreter can at the same time be output as Pascal source by the backward translator. During debugging the system could appear to execute at the source level, stop on lines with breakpoints, and evaluate source-level “watch” expressions.

The Lesson

The result of this design was the illusion of executing Pascal source language, but at the speeds of typical BASIC programs. In fact, maintaining the illusion of a single program representation became the principal user-interface design goal. It is this illusion of always dealing with your program at the source-code level that resolves the build/run dissonance and that obviates the need for a separate debugger.

The design was successful and next found itself inside Macintosh Pascal in 1984. But the resolution of the dissonance wasn’t complete. Instant Pascal was a trainer, not a construction tool. As compiler writers know, you don’t have a real production tool until you can build the tool using itself, and this could not be done.

post

Rockwell AIM 65 books

Microprocessor Systems Engineering
R.C. Camp, T.A. Smay, C.J. Triska
AIM 65 System 65 parts
AIM 65 Laboratory Manual And Study Guide, Leo Scanlon
Microcomputer experimentation with the AIM 65
Best of MICRO 3, AIM 65 SYM-1 KIM-1 part June 1979 May 1980
Rockwell Produktübersicht in deutsch
Rockwell Microelectronic Data Devices Catalog 1979
1981 Rockwell Electronic Devices Division Data Book
1984 Rockwell Data Book
1985 Rockwell Data Book
1987 Rockwell Controller Products Databook
post

AIM 65 clones


AIM 65 hardware

Datasheet AIM 65 A65-100 A65-400
Hardware Manual
User Manual
User’s Guide corrections

Circuit diagrams

Large format scan of Circuit diagram AIM 65 Poster

AIM 65 Schematic Poster revision 4
Circuit diagram PDF format Revision 0
Circuit diagram PDF format Revision 1
Circuit diagram PDF format Revision 2
Circuit diagram PDF format Revision 3
Circuit diagram PDF format Revision 4
Circuit diagram PDF format Revision 5

Dynatem took over AIM 65 production via a license from Rockwell after 1986.
Here a document describing revisions of the board.

AIM 65 Software

Math Package A65-040 D000, floating point words

Monitor program listing in PDF format
Monitor program listing in text format

Monitor ROM R3222 
Monitor ROM R3223-11 
Assembler ROM R3224 
Assembler ROM R3224 alternative version for location B000 

Assembler ROM R3224 source from pagetable github
Monitor ROM Dynatem Only change is copyright string Rockwell to Dynatem
Monitor ROM Dynatem identical to R3233
Monitor source in AIM 65 assembler format
Monitor V1.1 source in TASM format

The last number in the ROM file is the location of the ROM in the board, see photo.

AIM 65 BASIC program for PROM ROM
AIM 65 Program Timer

AIM 65

Technical specifications
– Built-in full sized QWERTY keyboard
– 20 character alphanumeric LED display (16 segments)
– Integrated 20 character thermal printer
– 20mA current-loop serial interface (can be adapted to RS232)
– Expansion connector (KIM-1 compatible)
– Application connector with 6522 VIA chip
– 4 KB RAM
– 5 sockets for 4 KB ROM/EPROM chips

Repackaged as OEM product by Siemens as PC100, with German documentation. Hardware identical.

The AIM memory map is:
$0000-$9FFF: RAM (early Rockwell versions only had $0000-$0FFF on board).
$A000-$AFFF: I/O scratchpad memory; some areas can be made available for more RAM.
$B000-$CFFF: Optional Language ROMs (BASIC, Forth, PL/65, Pascal).
$D000-$DFFF: Optional Assembler or Mathpack
$E000-$FFFF: Firmware and monitor program

Rockwell produced the AIM 65 until 1985, and manufactured by Dynatem under license in early 1986 after Rockwell had ceased production. Though the Revision 4 AIM 65 is quite similar to earlier iterations, the subsequent Revision 5 hardware features a redesigned clock generator and support for newer RAM and ROM IC types which became available over the production lifespan of the AIM 65. Relative to Rockwell-manufactured examples, the Dynatem AIM 65 is quite rare. See the Manuals and Software page for circuit diagrams revisions.

Hardware bug on pin Z

There is a hardware bug in early AIM-65 boards. The problem was in rev 1 and rev 0 AIM boards, and it was definitely fixed on rev 4 boards Basically the RAM_R/W signal (pin Z on the Expansion connector) had the inverted Phase 2 clock NAND’ed with R/W. The SYM and AIM were both supposed to follow the KIM standard, but Rockwell got this one signal wrong.
Please note that this has to be solved in e.g. RAM expansion boards by generating this signal the correct way.

See the articles on the MC-65, a AIM 65 compatible system by the German magazine MC Die Microcomputer-zeitschrift

Seawell

Seawell produced many KIM-1/SYM-1/SIM 65 boards. Here some advertisements frion the 6502 User notes.




post

Brutech BEM

A Dutch company, producer of many 6502 and more industrial hardware, BEM was the name one of their product lines.

Brutech Electronics Microsytems – B.E.M

Gebroeders Bruyn, Vinkeveen. Small company, custom made electronics and standard microprocessor boards and systems aimed at industry and hobbyist.
During my years with Radio Bulletin we often worked with Brutech, and I visisted their office/manufacturing plant in Vinkeveen several times. The BEM-bus became the standard bus for expansion at Radio Bulletin after the first BEM-1 card was connected to the KIM-1 by Dick de Boer. Brutech specialized in the beginning on the KIM-1/VIM/SYM-1 expansion cards, later on they made their own CPU cards and besides the 6502 CPUs like the 6809 were available.

BEM-1 card, as used in the KIM memory expansion article November 1977
The BEM bus
Brutech sold the VIM-1 and SYM-1, with their cards as expansions.
Review in Radio Bulletin November 1978
Brutech sold also the PC100, the Siemens OEM version of the AIM 65. Again the expansions could be used, same bus.
Review in Radio Bulletin August 1980
The AIM 65 and KTM-2 packaged as the Samson system,. the BEM-4 memory card, the SYMP universal programmer.
Review in Radio Bulletin November 1980
BEM RTC1 card, advert in the RB CB Special 1980
BEM-Impact 1000, a BEM-bus based development system, review in Radio Bulletin Oktober 1980
BEM Eurocard system, article by C.J. Bruyn, on the BEM bus, BEM-MON-1 (a TIM 6530 004 system!) and other cards

Micro-gebeuren november 1977, BEM-1, other BEM cards
Micro-gebeuren April 1980, BEM-PSIO-1 USART card, BEM-AD3, BEM-AD4
Micro-gebeuren Mei 1980, BEM-6 16/32K EPROM card
B.E.M. SBC4D(2) 6809 based CPU card on the BEM bus


MAiS, a system for airtraffic control, developed around the BEM SBCD4 and a custom card.


As editors of the magazine Radio Bulletin we had many conversations with them and wrote articles about their products.

For the KIM-1 and SYM-1 they had many products, some based on the so called BEM bus (DIN 31 pin connector), some as addons to the 22/44 edge connector of the KIM-1.
I stilll own this 4K RAM card:




BEM SBC4 in MAIS box
An example of a 6809 CPU board in a custom industrial application. Bought front eh HCC Forth UG in 2004.


post

HDE card cage, floppy drive

Hudson Digital Electronics Inc

Known by advertisments in the KIM-1/User Notes.


post

Books for the 6502: KIM-1 and more

KIM-1, AIM-65, SYM-1 and other 6502/65C02/65C816 related books.

A mix of English, German and Dutch books.

On my bookshelf I have quite a collection of books on the 6502 family.

Note that manuals and books that come with systems are shown on the pages of the corresponding system!

Microprocessor Systems Engineering
R.C. Camp, T.A. Smay, C.J. Triska
AIM 65 System 65 parts
6502 Software Gourmet Guide and Cookbook
6502 Users Manual
AIM 65 Laboratory Manual And Study Guide
Anwendunsgbeispiele fûr den Microprozessor 6502
Microprocessor_Fundamentals KIM-1
Best of Micro Volume 1 1978
Best of Micro Volume 2 1979
Best of MICRO 3, AIM 65 SYM-1 KIM-1 part June 1979 May 1980
Compute’s Machine Language for Beginners
Compute’s The Second Book of Machine Language
Programming a Microcomputer 6502
Programmieren von Mikrocomputern CPU 6502 (Skriptum)
How to Build a Microcomputer .. and really Understand It!
Mikrocomputer ohne Ballast
Micro Principles KIM-1 user guide chapter 8
Digitaalschakelen met de KIM-1
6502 Assembly Language Programming
6502 Programmieren in ASSEMBLER
Microcomputer Experimentation with the MOS Technology KIM-1
6502 Machinetaal Subroutines
6502 Assembly Language Subroutines
Microcomputer experimentation with the AIM 65
Machine Language Programming Cookbook part 1
Machine Code for Beginners
Microcomputer Systems Principles Featuring the 6502 KIM
Beyond Games: System Software for your 6502 Personal Computer
Assembly Language Programming
Using 6502 Assembly Language
6502 Machine Code for Humans
Programming the 65816 including the 6502, 65C02 and the 65802
Programming the 65816 including the 6502, 65C02 and the 65802
Forth Programming
Programming the 65816
Programming and Interfacing the 6502 with Experiments
Synertek 1981-1982 Data Catalog
Synertek DataBook 1983
Third Book of OSI
TSC 6502 Games Package 1
TV Typewriter Cookbook
Zaks 6502 Anwendungen
6502 Games
6502 Applications
Advanced 6502 Programming
Fortgeschrittene 6502 Programmierung
Programmierung des 6502
Programming the 6502
6502 Applications book
Programmeren van de 6502
Microprocessor Interfacing Techniques
Microprocessor Concepts and Applications
Publisher: Lab-Volt
6502 Assembler-Kurs für Beginner
6502 Machine Code For Beginners
A low-lvel language for use on the MOS 6502 Microcomputer
6502 Microcomputer Programmierung
Programmieren in Maschinensprache 6502
The Giant Handbook of Computer Projects
First Book of KIM
The First Book of KIM-1 in PDF format
The First Book of KIM-1, part in text format
The First Book of KIM-1 in HTML format
Sources of The First Book of KIM-1 in source and papertape format, Jeff Tranter
First Book of KIM-1 for SYM-1
Rockwell Produktübersicht in deutsch
Rockwell Microelectronic Data Devices Catalog 1979
1981 Rockwell Electronic Devices Division Data Book
1984 Rockwell Data Book
1985 Rockwell Data Book
1987 Rockwell Controller Products Databook