Imagine in the PennSim simulator line 3 (address 0x321F) was…

Imagine in the PennSim simulator line 3 (address 0x321F) was highlighted yellow (line of code to be executed next). If we hit:    Step the next line highlighted would be [1]    If instead we hit Next the next line highlighted would be [2] If the current highlighted line was line 7 (address 0x3222) and we hit Next the next line highlighted would be [3]

Implement in optimal manner TEST               [1] R1, [2]  …

Implement in optimal manner TEST               [1] R1, [2]                            [3] [4] R0_IS_-5 ; code if R0 = -5                           …                            [5][6] R0_ISNT_-5        ;  code if R0 ≠ -5                            …                           [7] MORECODE                           ; executes after joining                           ; for both cases  

The state of an LC-3 is shown including the contents of the…

The state of an LC-3 is shown including the contents of the instruction register.  The PC has already been incremented. With the condition codes (NZP) as shown the next instruction to be executed would be at address [1] If the bits in the instruction specifying the condition codes to test were 001 the next instruction to be executed would be at address [2]