Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an LC-3 program to accomplish the following: Assume Numl is located at location x3020, Num2 is located at location x3021 and Num3 is located
Write an LC-3 program to accomplish the following: Assume Numl is located at location x3020, Num2 is located at location x3021 and Num3 is located at X3022. At the beginnning of your program, you should load RO with Numl, R1 with Num2 and R2 with Num3. At the end of your program, you should store RO at Mem[x3020), R1 at Mem[X3021] and R2 at Mem[x3022] //Load registers here If (RO+R1 > R2) Then { RO=R0+2 Ri=R1+3 } Else { RO=R0-1 Rl=R1-2 } } Endif R2=3 // Save registers here Your program should begin at location x3000. I will test your program several times. I want to see if your program successfully executes the if part, and then I will test the else part. Your program should contain only 1 HALT instruction which should also correspond to the breakpoint in the program (HALT occurs after registers are saved to memory). Multiple HALTs or breakpoints have not correctly implemented above. Write an LC-3 program to accomplish the following: Assume Numl is located at location x3020, Num2 is located at location x3021 and Num3 is located at X3022. At the beginnning of your program, you should load RO with Numl, R1 with Num2 and R2 with Num3. At the end of your program, you should store RO at Mem[x3020), R1 at Mem[X3021] and R2 at Mem[x3022] //Load registers here If (RO+R1 > R2) Then { RO=R0+2 Ri=R1+3 } Else { RO=R0-1 Rl=R1-2 } } Endif R2=3 // Save registers here Your program should begin at location x3000. I will test your program several times. I want to see if your program successfully executes the if part, and then I will test the else part. Your program should contain only 1 HALT instruction which should also correspond to the breakpoint in the program (HALT occurs after registers are saved to memory). Multiple HALTs or breakpoints have not correctly implemented above
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started