Question: Consider the following LC-3 program. .ORIG x3000 LEA R1, LABEL LDR RO, R1, #231 LDI R1, LOCAL AND R3, R3, #0 LOOP AND R2,

Consider the following LC-3 program. .ORIG x3000 LEA R1, LABEL LDR RO,

Consider the following LC-3 program. .ORIG x3000 LEA R1, LABEL LDR RO, R1, #231 LDI R1, LOCAL AND R3, R3, #0 LOOP AND R2, RO, R1 BRZ SHIFT ADD R3, R3, #1 SHIFT ADD R1, R1, R1 BRnp LOOP HALT LABEL .FILL #1 TEST .FILL XOA LOCAL .FILL X300A .END GIVE ALL ANSWERS IN HEX (INCLUDING THE x) What value will be contained in R3 after the program runs to completion? After the instruction at x3000 is executed, what is the value in R1? How many times will the instruction at label SHIFT be executed? What is the address of the last memory location specified by the program? After the LDI is executed, what is the value in R1?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Program ORIG x3000 LEA R1 LABEL x3000 R1 x3008 address of LABEL LDR R0 R1 1 x3001 R0 Mx3009 value at ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!