Question: Write this in *MACHINE CODE* not in assembly. Please!!! Programming Assignment #1 Write an LC-3 program to accomplish the following: If (A + B >
Write this in *MACHINE CODE* not in assembly. Please!!!
Programming Assignment #1
Write an LC-3 program to accomplish the following:
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.
When testing your program, I will manually put values into memory locations x3020,x3021,x3022,x3023 . I will run your program to test various parts of the if....then....else.......endif statement.
What to submit: a text file that I may load into the simulator and run. You should test that your text file runs before submitting.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
