Answered step by step
Verified Expert Solution
Question
1 Approved Answer
undefined The program should start at memory address x3000. 0011 0000 0000 0000 ; bprogramo.bits adds two numbers Use the following procedure to construct the
undefined
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 03010, 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 address op code 15 14 13 12 11 10 x3000 x3000 File: bprogram.bits arguments 7 6 5 4 3 2 1 0 9 8 x3001 x3001 x3002 X3002 x3003 X3003 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 03010, 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 address op code 15 14 13 12 11 10 x3000 x3000 File: bprogram.bits arguments 7 6 5 4 3 2 1 0 9 8 x3001 x3001 x3002 X3002 x3003 X3003Step 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