Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Rewrite the table shown below, filling in any missing parts indicated by ques

ID: 3704362 • Letter: 1

Question

1. Rewrite the table shown below, filling in any missing parts indicated by question marks The comment for x7FFF shows the level of comment needed (you can write in more detail if you like). Note the values at x800B, x800C, and x800D will change; show this in their comment fields Add x7FFF LD RO,9 x8000 LD R1,9 x8001 LDR R2,R1,0 x8002 LEA R4,8 x8003 STR R2,R4,0 ? x8004 AND R3,R3, R3+ 0 x8005 STR R3,R4,1? x8006 ADD R5,RO,RO x8007 STI R5,2 x8008 TRAP x25 x8009 .FILL 12 x800A .FILL x800D X800B ·FILL 0 x800C .FILL -1 x800D.FILL 18 X800E ·FILL 0 r Assembler Action/Comment RO +-MIX8009] = 12 HALT

Explanation / Answer

x7FFF LD R0,9 Ro <- M[x8009] = 12

x8000 LD R1,9 R1 <- M[x800A] = x800D

x8001 LDR R2,R1,0 R2 <- M[R1+0] <- M[x800D] = 18

x8002 LEA R4,8 R4 <- x800B

x8003 STR R2,R4,0 M[R4+0] <- R2 = M[x800B] <- 18

x8004 AND R3,R3,0 R3 <- 0

x8005 STR R3,R4,1 M[R4+1] <- R3 = M[x800C] <- 0

x8006 ADD R5,R0,R0 R5 <- 24

x8007 STI R5,2

x8008 TRAP x25 HALT

x8009 .FILL 12 12

x800A .FILL x800D

x800B 18

x800C 0

x800D

x800E .FILL 0