First is the most simple version, just stuff two values into `R0` and `R1`, then put `ADD R0 R1` into RAM at address `01000` and execute it. Below is a session from the PDP-11 simulator in that VirtualBox VM. Note that I include a `HALT` instruction at address `01002` and after halting you can see that the destination register, `R1`, contains the expected value. ataylor@pdp11-dev:~ % pdp11 PDP-11 simulator V3.9-0 sim> d r0 042 sim> d r1 07777 sim> d 1000 060001 sim> d 1002 00 sim> g 1000 HALT instruction, PC: 001004 (HALT) sim> e r1 R1: 010041 sim> We could do the same thing using RAM for our data storage and putting pointers in the registers. You'll see a lot of this, so it's worth mentioning. Here, I use RAM addresses `03000` and `03002` to hold the data, then reference them via `R0` and `R1`. The instruction changes from `ADD R0 R1` into `ADD (R0) (R1)` and the result ends up stored at RAM address `03002` instead of register `R1`. ataylor@pdp11-dev:~ % pdp11 PDP-11 simulator V3.9-0 sim> d r0 03000 sim> d r1 03002 sim> d 1000 061011 sim> d 1002 00 sim> d 3000 042 sim> d 3002 07777 sim> g 1000 HALT instruction, PC: 001004 (HALT) sim> e 3002 3002: 010041 ================================================================================ Just to show what would happen if we pass this through a C compiler, here is some example C code that expresses the same intent as our second example above, the one where we use two memory addresses to store the data. void examination_room(void) { *(uint16_t *) 03000 = 042; *(uint16_t *) 03002 = 0777; *(uint16_t *) 03004 = 00; *(uint16_t *) 03004 = *(uint16_t *) 03000 + *(uint16_t *) 03002; } If we compile that code and disassemble the resulting binary (output quoted below) using the `make examine` target, we find instructions 2-16 setup the data in memory as defined in the first three lines of the function. Then, instruction 18-24 retrieve the data from memory and get it setup in registers. Finally, instructions 28-2A perform the addition (and then move the data where it should be since it's not quite 'automatic' like in our hand-coded example). examroom.o: file format a.out-pdp11 Disassembly of section .text: 00000000 <_examination_room>: 0: 10a6 mov r2, -(sp) 2: 15c0 0600 mov $3000, r0 6: 15c8 0022 mov $42, (r0) a: 15c0 0602 mov $3002, r0 e: 15c8 01ff mov $777, (r0) 12: 15c0 0604 mov $3004, r0 16: 0a08 clr (r0) 18: 15c0 0600 mov $3000, r0 1c: 1202 mov (r0), r2 1e: 15c0 0602 mov $3002, r0 22: 1201 mov (r0), r1 24: 15c0 0604 mov $3004, r0 28: 6081 add r2, r1 2a: 1048 mov r1, (r0) 2c: 00a0 nop 2e: 1582 mov (sp)+, r2