Question: write an lc-3 program. Num1 is located at location x3020 , num2 is at x3021 and num3 is at x3022. load r0 with num1, r1

write an lc-3 program. Num1 is located at location x3020 , num2 is at x3021 and num3 is at x3022. load r0 with num1, r1 with num2,r2 with num3 . if r0 + r2 is greater than r2 addd r0 + 2 and store in r0 and also add r1 + 3 and store in r1. if r2 isnt greater subtract 1 from r0 and store in r0 and also subtract 2 from r1 and store at r1. The program should end if R2 = 3. store r0 at location 3020 , r1 at 3021 and r2 at 3022. the program should only include 1 halt/breakpoint and should run on the lc-3 no matter which branch was taken.

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!