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 (try N=0 through N=6). You should recognize a pattern.
Feel free to work with a partner.
Addr Octal PAL Instruction 0200 7301 START, CLA CLL IAC 0201 3225 DCA B 0202 3224 DCA A 0203 7404 OSR 0204 7550 SPA SNA 0205 5221 JMP END 0206 7041 CMA IAC 0207 3226 DCA C 0210 1224 LOOP, TAD A 0211 1225 TAD B 0212 3227 DCA D 0213 1225 TAD B 0214 3224 DCA A 0215 1227 TAD D 0216 3225 DCA B 0217 2226 ISZ C 0220 5210 JMP LOOP 0221 7200 END, CLA 0222 1225 TAD B 0223 7402 HLT 0224 0000 A, 0000 0225 0000 B, 0000 0226 0000 C, 0000 0227 0000 D, 0000