Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The program should start at memory address x3000. 0011 0000 0000 0000 ; bprogramo.bits adds two numbers Use the following procedure to construct the program.
The program should start at memory address x3000. 0011 0000 0000 0000 ; bprogramo.bits adds two numbers Use the following procedure to construct the program. The binary-program tem- plate below may help to organize the bits. Test your program by running it on the LC-3 with the numbers to be added manually entered. Choose registers in order from the list R1, R2, R3, ..., R6. Because RO and R7 are special we avoid them as general purpose registers. The RiggX grader assumes these choices. Problem: Add two integers, which are stored in two memory cells, and write the sum to a third memory cell. Assume that the first number is in memory cell x3010, and the second in memory cell x3011, and that the sum should be placed in memory cell x3012. Read the first number into a register. Read the second number into a register Add the numbers in the two registers, writing the result to a third register. Write the sum to memory cell x3012. Your program should consist of four instructions. Program Construction Table File: bprogramo.bits address op code arguments 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 x3000 x3000 X3001 x3001 X3002 x3002 x3003 X3003
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started