Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedundefined

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 X3003

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

Step: 3

blur-text-image

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 Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

Briefly explain how equivalent units are calculated.

Answered: 1 week ago

Question

Compare the types of managed care organizations (MCOs).

Answered: 1 week ago

Question

1. What are the major sources of stress in your life?

Answered: 1 week ago