Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an LC-3 program to accomplish the following: Assume Num1 is located at location x3020, Num2 is located at location x3021 and Num3 is located

Write an LC-3 program to accomplish the following: Assume Num1 is located at location x3020, Num2 is located at location x3021 and Num3 is located at x3022. At the beginnning of your program, you should load R0 with Num1, R1 with Num2 and R2 with Num3. At the end of your program, you should store R0 at Mem[x3020], R1 at Mem[x3021] and R2 at Mem[x3022] //Load registers here If (R0 + R1 > R2) Then { R0=R0+2 R1=R1+3 } Else { R0=R0-1 R1=R1-2 } Endif R2=3 //Save registers here 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 (HALT occurs after registers are saved to memory). Multiple HALTs or breakpoints have not correctly implemented above. Please load your program into the simulator , and take a screen shot. Submit a jpeg screen shot of the simulator AND a text file of the hex code. Make sure the first line of the text file is 3000 (no X in front of numbers)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago