The APS assembler

Assembly Programming System - APS

In order to help with the testing of the simulator, I was writing more and more binary code. The next logical step was to create an APS assembler. The assembler takes code written with mnemonics and simple arithmetic phrases and converts it to the binary code that will run on the machine (simulator).

Of course, every new idea introduced challenges the framework and assumptions of the simulator. On the real computer, you would boot the DOS operating system from a simple load card, and then DOS would take over. DOS included the BIOS (Basic Input Output System) and the mechanism for loading system programs. APS was a system program which processed a text file, normally on punch cards. APS would produce a work file in the "free space" of the system disk. This was a convention share by all of the compilers. Then, you would "insert" the program into the program file on the system disk using a command API (Assembled Program Insert). Only then could you run your program by invoking PRL (Program Load) which would take a program from the program file and load it into main memory and transfer control to the new program. Afterwards, you needed to remove the program from the program file using a command called SDS (System Disk Strip), or you would soon run out of space in the program file.

When I worked for the London Board of Education in 1974, I create a new system program called EXE, short for execute. It replaced the joint API and PRL functions by loading directly from the free space into memory and executing the program. This worked much more efficiently in an education environment where you are running lots of new programs all the time. It also eliminated the problem of collecting old programs in the program file which were not deleted when they should have been. So, the EXE program replaced API, PRL and SDS. I am very proud of the work I did on this. Honeywell provided me with the program listings for API and PRL so that I could understand the formatting of the data in the free space and the nuances of loading the final program. I wish I still had those program listing now!!

This was a lot to implement in one go, so I took some shortcuts in the simulator to assist. I created some fake opcodes to do things in the simulator outside the context of the actual machine instructions. For example, I did not have either DOS or the BIOS to work with, so I created two enabling instructions called LBSS and DOS. I do not know what LBSS stands for, but I believe it is Italian. It handles unit record I/O such as card reading, card punching and line printing. I think, but am not certain, that it also handled disk reads and writes. LBSS in the real computer was a call to the BIOS which included a pointer to a control record which told LBSS what to do. I only scarcely remember the structure of such a thing, but began with the print function.

The new DOS instruction handed control over to a routine that reads cards and looks for system instructions. There are only three system instruction implemented so far: APS, EXE and LOA. LOA is for LOAD, which is used to load an object deck from cards. The LOAD program was not part of the original system software .. I made it up for the simulator so that I could make a human readable load file and get it into memory.

This required that I had to rethink how the simulator would hand off between running in DOS mode (hunting for and executings comands) and  running in emulation mode (executing individual binary instructions one by one). I think that the mechanism I settled on will work, but there is always more testing to do!

For now, there is no support for emulating the disk system, so I created an object in the simulator called FreeSpace, which is simply a load file in card image form. APS fills up the object and EXE loads it into memory and makes the magic happen.

It is entirely possible that no other human on the planet cares about this. I am okay with that, and enjoying every minute I spend on the Computer Room project.

Jim

Comments

Popular posts from this blog

How it got started

The Student Computer Operator

So much has happened