CS 207: Computer Organization and Architecture

Getting to know the PDP8/E

First, read the PDP-8/E Operating Notes.

Next, load the following program into the PDP8/E and run it. The program starts at address 0200, and expects the switch register to contain some number N at the time execution begins. The program computes some number, depending on the value of N, and puts the computed number into the accumulator before halting.

Your assignment is (1) to figure out what this program does, and (2) to comment the code. Your comments should identify the main conceptual blocks of the code and describe what those blocks do. You should also explain the overall result this program computes.

I recommend that you run the program a few times with a variety of small values of N. You should start to recognize a pattern.

Feel free to work with a partner.


Addr      Instruction

0200      7301          CLA CLL IAC
0201      3224          DCA B
0202      3223          DCA A
0203      7404          OSR
0204      7550          SPA SNA
0205      5220          JMP END
0206      7041          CMA IAC
0207      3225          DCA C

0210      1223   LOOP,  TAD A
0211      1224          TAD B
0212      3223          DCA A
0213      7005          IAC RAL
0214      1224          TAD B
0215      3224          DCA B
0216      2225          ISZ C
0217      5210          JMP LOOP

0220      7200   END,   CLA
0221      1223          TAD A
0222      7402          HLT

0223      0000   A,     0000
0224      0000   B,     0000
0225      0000   C,     0000