System software on Leo III was written in Intercode. This is a machine-level language for a fictitious machine which resembles a Leo III, but which has a more extensive order code. Some Leo III systems software has been rescued from line-printer listings. It can be browsed on-line and also executed in emulation.
The sofware that we have so far rescued is all written in Intercode and consists of:
When the ZIP file is unzipped, it produces a directory LeoIIIdemo which includes the source text of the emulator program, leo3.c. A binary program for MS Windows can be downloaded from here. It was developed using gcc, but this is compiled using Microsoft software courtesy of Bill Gallagher. There is a BAT for Windows. To run the demo on a Windows system, open a command window, cd to the LeoIIIdemo directory, ant type go.
To run the demo on UNIX-like systems, your first need to compile leo3.c, and then follow the steps in go.bat. There are detailed differences depending on the choice of shell, but there is a file go.sh which will probably work on any UNIX-like system. Another way to proceed is to cat go.bat and then copy and paste the commands one by one, editing as necessary. This demo has run successfully on GNU/Linux on Intel (ubuntu), FreeBSD on Intel, GNU/Linux on ARM (Raspberry Pi), Solaris on SPARC (where the cc compiler produces a crop of warnings), and OSX on a MacBook.
The source text of the emulator starts with 100+ lines of comment describing its action.
The demonstration in is 2 phases, the second of which is the main demonstraton and consists of the running of all the software under the Leo III Master Routine. It is only the last command in go.bat. It is driven by input to the emulator from the file cct.txt.
The first phase is concerned with generating the files which emulate the magnetic tapes needed for the main demonstration. The format of these files is architecture-dependent, so they need to be generated on the same type of system as runs the main demonstration
Several files are produced including t.htm which shows the Leo III typewriter output interspersed with output from the emulator. Anything including lower case characters is output from the emulator. The green text is keyboard input. Leo III key settings are shown as 3 numbers separated by slashes.
The comment at the head source text of leo3.c includes information about the different modes of the emulator. In the first phase the emulator is called repeatedly and excutes in “Intercode mode”, until the very end of the Master Routine generator (08004) which ends by turning itself into the Master Routine that it has just generated. The second (and final) phase runs the real Master Routine generated in the first phase and operates entirely in “master mode”. It re-runs all the operations of the first phase, but now with system calls properly handled by the Master Routine.
The only way to turn off the emulator when running the Master Routine is by typing in the operator abort command, so the demonstration ends successfully with the message “Illegal: Operator abort”, which is oddly reminiscent of the way that the Intercode Translator announces a successful translation with an ALARM *06.