Question: Problem solving using computer involves data processing that includes many types of operations on data stored in computer storages. In this lab, we will perform
Problem solving using computer involves data processing that includes many types of operations on data stored in computer storages. In this lab, we will perform arithmetic operation for multiplication and division.
Procedure:
Integer Multiplication and Division
- You will implement two functions:
Y = A x B
Z = A / B = Quotient + Remainder
- In high level statement above, Y and Z are destinations in memory, and A and B are sources in memory. Recall that the LC-3 is a Load/Store machine. Before operating on the values stored in A and B, we must first load them into registers.
- The source operand 0
- The source operand 0
- The result Y should be stored in location 0x3102.
- The quotient Z should be stored in location 0x3103.
- The remainder R should be stored in location 0x3104.
- Your program should start at location 0x3000.
- Each line contains an LC-3 Assembly instruction followed by a carriage return.
- The first line will give the starting address of the sequence of memory locations containing the program.
- Each line may have a comment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
