PDP-8/E Simulator 2.x Quick Start Tutorial


This is a short tutorial to get started with the PDP-8/E Simulator 2.x. The tutorial begins with running a very simple PDP-8/E program, advances to more complicated things and ends with a PDP-8/E running the ETOS time sharing operating system.
  1. Configure the emulated hardware

    Run the PDP-8/E Simulator with all available plug-ins, including the “ASR 33 Auxiliary Teletype” and the “MemoryContent” plug-in from the “PDP-8/E Simulator PlugIns” folder. Open the “Preferences” dialog (from the “PDP-8/E Simulator” menu). In the various panels, set the following options:

    In the TSC8-75 Board window, set “ESME is currently enabled”.

  2. Run the “Welcome!” program

    From the “File” menu, select “Load Paper Tape…” and open “welcome.rim”. The program is loaded into the PDP-8/E memory. To set the program counter to 0200, edit the “PC” input field in the PDP-8/E CPU window. Now klick the “Go“ button in the toolbar or choose “Go” from the “Simulator” menu. Switch the ASR 33 Console Teletype window to the front (by selecting from the Windows menu). Watch the teletype output and listen to its sound.

  3. Load the BIN loader from the paper tape

    Start the simulator, scroll the CPU window memory display to location 7756 and double click in the “Opcode” column to switch to edit mode. Type in the following program (the RIM loader) at locations 7756–7777. You can type in the octal code (second column in the following listing) or the the symbolic assembler code. To enter the next cell, type “Return”; to go back to the previous cell, use “Shift-Tab”. Try to input invalid opcodes or assembler instructions to see the error handling.

    07756  6032  KCC
    07757  6031  KSF
    07760  5357  JMP .-1
    07761  6036  KRB
    07762  7106  CLL RTL
    07763  7006  RTL
    07764  7510  SPA
    07765  5357  JMP 7757
    07766  7006  RTL
    07767  6031  KSF
    07770  5367  JMP .-1
    07771  6034  KRS
    07772  7420  SNL
    07773  3776  DCA I 7776
    07774  3376  DCA 7776
    07775  5356  JMP 7756
    07776  0000  AND 0
    07777  5301  JMP 7701
    

    Then set PC to 7756, either by typing this address into the PC field, by a double click in the PC column, by dragging the PC arrow or by using the context menu in the memory content area of the CPU window.

    There is also a shortcut for loading the RIM loader: open the “Bootstrap Loader” toolbox (from the Simulator menu), select “Low Speed Reader RIM Loader” and click “Load”. To load the selected loader again, use “Load Bootstrap Loader” from the Simulator menu or type Command-B.

    Now switch to the ASR 33 Console Teletype window. Make sure that the teletype is online (click the “Online” switch), click the “Load” button, select the file “BIN Loader.rim” (you also can drag the file from the Finder to the “Load” button to load it) and turn the reader on by clicking the “On” switch. Then select “Go” (from the Simulator menu) to start the PDP-8/E. The tape reads in — watch the progress bar in the teletype window. When it disappears, the tape is completely read in. Select “Stop” (from the Simulator menu) to halt the PDP-8/E.

    The “Bootstrap Loader” toolbox provides a shortcut for loading the BIN loader, so later you don't need to load it from the paper tape again.

  4. Load FOCAL-8

    Load the BIN loader (see above) and set PC to 7777. Go to the PC8-E Paper Tape & Punch window, click the “Load” button and select the file “FOCAL-8.bn” or drag the file from the Finder to the “Load” button. Then start the PDP-8/E. The tape reads in — watch the progress bar in the PC8-E window and inspect the Memory Content window to see how the PDP-8/E memory is filled with the FOCAL code. When the PDP-8/E halts, the program is read in. The tape is not unloaded automatically because the BIN loader does not read the trailer.

    There is also a shortcut for loading RIM or BIN paper tapes directly into the PDP-8/E memory: select “Load Paper Tape...” from the File menu and choose the tape file you want to load.

    Now set PC to 0200 and click in the “Go” icon in the toolbar of the CPU window. The PDP-8/E starts running FOCAL-8. Look at the message in the teletype window and answer two the questions with “NO”.

  5. Load the “Towers of Hanoi” FOCAL source code into the FOCAL interpreter

    Run FOCAL-8 (see above). Go to the ASR 33 Console Teletype window and load the file “Towers of Hanoi (FOCAL-8).pt” into the teletype reader. Turn the reader on. The source code of the Towers of Hanoi program is read in and typed on the teletype. Sooner or later the output will become confused and you get the FOCAL-8 error message ?11.35 which means that the FOCAL-8 input buffer overflowed.

    This seems to be a typical FOCAL-8 problem. It occurs because the interpreter uses interrupt driven I/O but is not prepared to handle such situations. (From the German FOCAL-8 manual: “Der Hinweis ist angebracht, daß hier kein Gerätefehler vorliegt, sondern rein von der Programmierung her eine zusätzliche Prüfroutine vermieden wurde, um dem Anwender den größtmöglichen Speicherplatz zur Verfügung zu stellen.”)

    To avoid this problem, you can modify the FOCAL interpreter so that it does not use interrupts. To do this, first turn off the paper tape reader and unload the tape. Then type the return key and the command “ERASE ALL” to erase the FOCAL program store. Halt the PDP-8/E. Now go to the CPU window and modify the following memory locations:

     Address   Old Content   New Content 
    00063 2676 1354
    00064 2666 2414
    02732 6001 5336
    02762 6046 7000

    Set the PC to 0200 and clear the interrupt enable flag (by clicking the “Enable” button in the Interrupt Control area of the CPU window). Then you can restart the PDP-8/E; FOCAL now runs without using interrupts. (If you like, you now can make the teletype run as fast as possible in the Preferences dialog on the ASR 33 pane. Because the I/O is no longer interrupt driven, the hardware timing is no longer critical.)

    Go back to the teletype window, type the return key three or four times, load the file “Towers of Hanoi (FOCAL-8).pt” into the reader and turn the reader on again. The tape reads in without problems now. When the tape is loaded completely (the progress bar and the file name disappears), type “GO” at the FOCAL prompt to start the Towers of Hanoi program.

    After answering the questions of the Towers of Hanoi program, the PDP-8/E starts shifting the towers. When you set the PDP-8/E “Go” speed and the ASR 33 speed to “as fast as possible” (in the Preferences dialog), you can see that an up-to-date Mac can run the emulated PDP-8/E much faster than a hardware PDP-8/E runs.

  6. Boot OS/8

    Halt the PDP-8/E, reset the simulator (select “Reset” from the Simulator menu) and open the “Bootstrap Loader” toolbox, check “RK8-E Boot Code” and click OK. Now go to the RK8-E Disk Cartridge System window and click the mount button of RK05 drive 0. Select the file “OS/8 System Disk.rk05”. (You can drag the file from the Finder to the mount button, too.) Then start the PDP-8/E.

    The OS/8 prompt (a single dot) appears in the console teletype window, and now you can run OS/8 commands, for example:

  7. Run the Pascal-S Benchmark

    Verify that the PDP-8/E has at least 28K words of memory (see step 1) and boot OS/8 (see step 6), then halt the PDP-8/E. Go to the RK8-E window and mount the DECpack “Pascal-S Disk.rk05” to drive 1. Start the PDP-8/E again.

    Assign a logical name (e. g. B:) to drive 1 by typing the OS/8 command “ASSIGN RKA1: B:”. Type “RUN B:PASCAL” to start the Pascal-S system. When the command decoder prompt appears (a single asterisk), type the name of the file containing the Pascal program you want to run, in this case “B:BENCH.PS”. The compiler compiles and runs the program.

  8. Play music with the PDP-8/E

    Assure that the Music Player plug-in is loaded. This is the case when the Help menu has a “Music Player” item. Assure that the PDP-8/E runs with real time speed and has at least 12K words of memory (see step 1) and boot OS/8 (see step 6). The PDP-8 Music Playing Program (DECUS 8-804) is available on the OS/8 System Disk and music files are stored on the second partition of this disk, so assign a logical name (e. g. A:) to this partition by typing the OS/8 command “ASSIGN RKB0: A:”. Type “DIR A:*.MU” to list the available music files.

    Then type “R MUSIC” to start the music program. At the command decoder prompt (a single asterisk) type a music title of your choice, e. g. “A:MAPLE” (the suffix .MU may be omitted). Listen to the music. The Switch Register of the KC8-EA Programmer’s Console provides some options:

    Note that a hardware PDP-8/E requires an AM radio in the near of the computer to receive the sound by electromagnetic interference.

  9. Play Spacewar with the PDP-8/E

    Run the PDP-8/E Simulator with the VC8-E Point Plot Display System plug-in. Configure the simulator as described in step 1 and additionally, on the “RTC” preferences pane, add a DK8-EC Crystal Clock with 50 Hz to the simulator’s configuration. Then boot OS/8 as described in step 6.

    The OS/8 System Disk contains the Spacewar source file SPCWR3.PA from the DECtape JBYOS8.TU56. The file SPCCFG.PA contains defines for SPCWR3.PA to use the VC8-E and a DK8-EA style clock.

    Assemble the game with the command “PAL8 SPCWR3.BN<SPCCFG.PA,SPCWR3.PA”. You can ignore the eight errors report by PAL. You also can skip this step because the binary file SPCWR3.BN is already present on the disk.

    Now run the Spacewar program with the command “LOAD SPCWR3.BN=200/G”. In the VC8-E window, you will see the initial graphics with two UFOs and a group of stars in the middle of the screen. Type “O” in the Console Teletype to see the options of the game. Use the Switch Register of the KC8-EA Programmer’s Console to pilot the space ships. SR(0-3) controls the first ship and SR(8-11) controls the second ship.

    To quit the game, simply press “Ctrl-C” in the Console Teletype.

  10. Run EduSystem 25

    Halt the PDP-8/E, reset the simulator (select “Reset” from the File menu) and verify that the emulated machine has 32K words of memory (see step 1). Open the “Bootstrap Loader” dialog box (from the Simulator menu), check “DECtape Boot Loader” and click OK. In the TC08 DECtape System window mount the DECtape “EduSystem25.tu55” (based on Martin Eberhard’s DECtape) to TU55 DECtape Transport 0. Then start the PDP-8/E with PC=0200. The OS/8 prompt (a single dot) appears in the console teletype window. Type “R EDU25F” to start EduSystem 25. Answer the EduSystem 25 startup questions as follows:

    After the final output “END OF DIALOGUE” in both teletype windows the prompt “READY” appears. In both windows, type “OLD” to load an existing BASIC file. Type the filename “WELCOME”. The TC08 starts to load the file. When the “READY” prompt reappears, type “RUN” and watch the output.

  11. Boot ETOS

    Halt the PDP-8/E, reset the simulator (select “Reset” from the File menu) and verify that the emulated machine has 32K words of memory (see step 1). Open the “Bootstrap Loader” dialog box (from the Simulator menu), check “RK8-E Boot Code” and click OK. Now go to the RK8-E window, unmount all drives and mount the ETOS demo disk “etosv5b-demo.rk05” to drive 0. Then start the PDP-8/E.

    The OS/8 prompt (a single dot) appears in the console teletype window. Type “R ETOS” to start ETOS. Hit the return key when the “OPTION?” prompt appears. Now type “LOGIN” and hit return. Answer the question “ACCOUNT?” with “0,4”. At the “PASSWORD?“ prompt, type “USER1”. ETOS now prints its welcome message and an OS/8 prompt. Now you can run your virtual OS/8 session in the console terminal.

    To get a feeling of the multi user capabilities of ETOS, start a long-running command in the console, e. g. “HELP” and switch to the auxiliary teletype to log in to a second ETOS session. To do so, type “LOGIN” and use the account “0,5” with the password “USER2”. Now two ETOS sessions are active.

    For more informations about ETOS, visit the links on the TSC8-75 page.