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

 In this exercise, I can use an lc-3 simulator but I'mjust lost on how to do this exercise, here is the table

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

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!