Question: In this exercise, I can use an lc-3 simulator but I'm just lost on how to do this exercise, here is the table my teacher
In this exercise, I can use an lc-3 simulator but I'm just lost on how to do this exercise, here is the table my teacher told me to use


Binary Program Two: Subtraction Here is the header: 0011000000000000 ; bprogram2.bits calculates number1 - number2 FL Choose registers in order from the list R1, R2, R3, .., R6. - Problem: Subtract one integer from another given that the two numbers are in two memory cells and write the difference to a third cell. - Assume: The first number is in cell x300A, and the second in cell 300B. The difference should be placed in cell x300C. - Solution: (1) Read the first number, then the second number, into registers. (2) Use two instructions to find the negative of the second number, using no new registers, and put the result in the second number's register. (3) Add numbers and write the result to a third register. (4) Write the difference to the third memory cell listed above (x300c). (5) Conclude with the HaLT instruction xF025. (6) Your program should consist of seven instructions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
