9) The table below shows a snapshot of the Program Counter the 8 registers, and
ID: 3682209 • Letter: 9
Question
9) The table below shows a snapshot of the Program Counter the 8 registers, and the condition codes (CC) of the LC-3 at six different times during the execution of a program: before the program executes, after the execution of instruction 1 after the execution of instruction 2, after the execution of instruction 3 after the execution o instruction 4 and after the execution of instruction 5 Fill in the missing values in the table as well as the missing parts of instructions 1, 4, and 5. Initial After 1st After 2nd After 3rd After 4th After 5th PC x0000 0000 R0 0000 x11 11 x11 11 x11 11 x11 111 x11 111 x1 111 R1 x2222 x2222 2222 2222 x2222 2222 R2. x 3308 x3308 x3308 x 3308 x3333 x3333 R3 x9FFF x9FFF x4 444 x 4 444 x 4 444 R4 5555 x5555 x5555 5555 5555 x5555 R5 x6666 x6666 x 6666 6666 x 6666 x 6666 R6 xFEF0 x FEF0 xFEF0 xFEFE Instruction 1 AND Instruction 2 LEA R3, 6 Instruction 3 LEA. 0 Instruction 4 LD 0 Instruction 5Explanation / Answer
Instruction 1: AND R7, R7, #-16
Instruction 4: LD R4, #0
Instruction 5: NOT R7, R7
Coming to the misssing values:
CC Z N P P N P PC x3300 x3301 x3302 x3303 x3304 x3305 R0 x0000 x0000 x0000 x0000 x0000 x0000 R4 x4444 x4444 x4444 x3303 x9FFF x9FFF R7 xFEFE xFEF0 xFEF0 xFEF0 xFEF0 x010FRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.