Brian Shelburne's PDP-8 Home Page
Because the PDP-8 architecture is simple, clean and elegant, I've written a PDP-8 simulator for use in my computer organization course at Wittenberg.
The PDP-8 Emulator Program allows a user to write, edit, assemble, debug, trace, and execute PDP-8 machine code and PDP-8 assembler language programs. With it a user can get a feel for programming the PDP-8. The PDP-8 Emulator Program includes a simple built-in text editor which is used to write and edit PDP-8 Assembler Language (PAL) programs, an assembler to translate these programs into PDP-8 machine code and a virtual PDP-8 engine upon which to execute the code. PDP-8 code can be executed from a debug screen display that allows the user to observe the contents of registers and memory as the code executes or code can be executed using an I/O interface that requires user-written PDP-8 I/O routines.
The PDP-8 Emulator Program will run in any Command window on any Windows machine.
Click here to down a zipped version of the PDP-8 Emulator Program (pdp8main.exe) along with a seven chapter document titled The PDP-8 Emulator Program User's Manual (pdf format). The manual gives a complete description of the PDP-8 Emulator Program along with how to write, debug and execute PDP-8 machine code and assembler programs using the emulator program.
This is a shot of the Debugger Screen display from the PDP-8 Emulator Program. Registers are displayed on the upper left and one 128-word page of memory is displayed on the upper right ( page 1 - addresses 0200o through 0377o). The high-lighted memory location (the white 7300 on a blue background) is the memory cursor. Using arrow keys the user can move it through memory to deposit values or trace code. The current code in memory adds 2 + 3. It was assembled from the PAL code given below
*0200
/ code starts at 0200o
Main, cla cll / clear AC and Link
tad a
/ load a
tad b
/ add b
dca c
/ deposit at c
hlt
/ halt
jmp Main / goto
main on continue
*0300
/ data starts at 0300o
a, 2
b, 3
c, 0
$Main
/ end of program; entry point
Using the PDP-8 Emulator Program to Teach Computer Organization
Because the PDP-8 has a simple architecture I use the PDP-8 Emulator Program as a gentle introduction to computer organization for my COMP 255 - Principles of Computer Organization course at Wittenberg. This 15 week course meets for three one-hour lectures and one two-hour lab per week. In the course I make use of four different architectures to demonstrate various features of computer architectures: the PDP-8, the ARC computer (a RISC like architecture patterned after the SPARC architectures which is discussed in Computer Architecture and Organization: an Integrated Approach by Murdocca & Heuring), a self-designed Java Byte Code "engine" that executes a subset of Java Byte code, and the Intel 80x86. A quarter of the labs and programming assignments make use of the PDP-8 Emulator Program while half of the labs and assignments are based on the Intel 80x86 (the other quarter covers the ARC and Java Byte code) The custom published PDP-8 Emulator Program User's Manual is used as a supplementary text for the course.
I have provided a link to a zip file containing Word documents of four PDP-8 labs and four PDP-8 programming assignments. Lab #1 does some PDP-8 machine coding (I like to give my students the experience of doing machine coding with the hope that they will appreciate assembler!). Assignment #1 has them machine code a division algorithm for the PDP-8 using repeated subtraction. Lab #2 introduces PDP-8 Assembler Language (pal) programming and Assignment #2 has them implement the Euclidean Algorithm in assembler. Lab #3 which does arrays using indirect addressing contains material I usually add on to the end of Lab #2 or do in class. Lab #4 does subroutines, PDP-8 I/O, and indirect addressing. Assignment #3 does simple character I/O and Assignment #4 extends this to cover the reading and writing of strings.
Later on in the course when I introduce the Intel 80x86 architecture, I will make comparisons with the PDP-8. For example, conditional branches on the Intel 80x86 are done by testing condition flags which were set/cleared by previous operations whereas conditional branches on the PDP-8 test the accumulator. I compare subroutines calls and returns as implemented on each architecture (explaining why recursion is not possible on the PDP-8). Because the PDP-8 is so simple, little time is needed to introduce and make use of it; a material on a second architecture can be easily introduced.
References
BELL, G. GORDON AND NEWELL, ALLEN 1971. Computer Structures: Readings and Examples, McGraw Hill, New York, N.Y. A classic text!
BELL, C. GORDON MUDGE, J CRAIG, AND McNAMARA, JOHN E. 1978. Computer Engineering A DEC View of Hardware systems Design, Digital Press, Bedford, M.A.
BLAAUW, G. A. AND BROOKS, F. P. 1997. Computer Architecture Concepts and Evolution, Addison-Wesley Longman, Reading M.A.