CS208: PDP8/E emulator documentation
Doug Jones, professor of computer science at the University of Iowa,
has written many PDP8-related programs, including a PDP8 emulator.
His version runs in text mode or with
an X-Windows front end. A few years ago, Lauren Jantz '97, working
for our department during the summer, wrote a front end for Jones'
emulator that provides an ASCII-graphical user interface that
can be run in a terminal window, and that is especially
suited to how we use our PDP8/E in CS208.
The tools available to you while doing your PDP8 programming are:
- The PAL assembler (pal), written by Jones. This program
translates your PDP8 program, stored as a ".pal" file, into either
"RIM" or "BIN" format. We'll use the RIM format in this class.
- The core maker (coremake), also written by Jones,
takes a RIM format program and generates a core image file, a complete
picture of the contents of the PDP8's memory with the program loaded
into its proper place.
- The PDP8/E emulator (pdp8e), written mostly by Jones
and supplemented by Jantz. You'll use this program to test your
PAL programs.
All three of these programs are available as commands
on the Math/CS Linux machines.
To get you started, I have written mult1.pal,
a simple-minded multiplication subroutine
and the main program that tests it (do not expect optimized or
especially good code--I've done much better in mult2.pal, I assure you).
Here's what you should do to test mult1.pal.
- Use some combination of cutting, pasting, and editing
to save mult1.pal as a straight text file in your account. Note
that the ".pal" suffix is required.
- In a terminal window, go to the directory in which you saved
mult1.pal, and type "pal -r mult1.pal".
This will create the files mult1.lst and mult1.rim.
- Type "coremake mult1.core < mult1.rim".
This will create mult1.core.
- Run "pdp8e mult1.core".
- The emulator is now running. Type "g", and then enter the
starting address of mult1.pal (0200).
- Type "r" and the program should run, halting with the PC pointing
just past a HLT (7402) instruction. The AC should contain twelve (0014),
since mult1.pal's test consists of multiplying 3 by 4.
- Type "?" to learn more about the emulator's capabilities.
Notes
- The emulator will look best if you use a terminal window
80 columns by 24 lines.
- The assembler "pal" does not produce error messages. Its
typical response to a syntax error is to hang.