
- PC points initial location x30F6. PC = 30F6
- 1110 = LEA, LEA R1, #-3
- Add incremented PC and offset
- R1 = 30F7 + FFFD(-3) = 30F4
- R1 = 30F4, PC = 30F7
- 0001 = ADD, ADD R2, R1, #14
- R1 = 30F4, R2 = 30F4 + 000E = 3012
- PC = 30F8(increment), R2 = 3012, R1 = 30F4
- 0011 = ST, ST R2, #-5
- stores the contents of R2 at PC -5
- PC = 30F9, address = 30F9 - #5 = 30F4
- Content at Mem(30F4) = 3012(value of R2), PC = 30F9
- 0101 = AND, AND R2, R2, #0
- R2 = 0, PC = 30FA
- 0001 = ADD, ADD R2, R2, #5
- PC = 30FB
- R2 = 0
- R2 = R2 + 5 = 0 + 5 = 5
- 0111 = STR, STR R2, R1, 14
- PC = 30FC
- R1 = 30F4, Address = 30F4 + #14 = 3102
- Content at 3102 = 5
- R2 = 5
- 1010 = LDI, LDI R3, #-9
- PC = 30FD + #-9 = 30F4
- Content at 30F4 = 3102, 3102 is the operand address
- Content at 3012 = 5, R3 = 5, PC = 30FD