Question: Write an LC-3 program to accomplish the following ( Your program should contain only 1 HALT ): If (A + B > C) Then {

Write an LC-3 program to accomplish the following

(Your program should contain only 1 HALT):

If (A + B > C) Then { A=A+2 B=B+3 } Else { A=A-1 B=B-2 } Endif D=3

Note that the variables mentioned in the program will reside at the following memory locations:

A : x3020 B: x3021 C: x3022 D: x3023

Your program should make sue of the appropriate LOADs and STOREs.

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. Multiple HALTs or breakpoints have not correctly implemented above.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!