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

  1. You will implement two functions:

Y = A x B

Z = A / B = Quotient + Remainder

  1. 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.
  • When using the LC-3 simulator to test your program, you should manually load test values into these memory locations before running your program.
  • Your program should be written in the LC3 Assembly language.
    • 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

    1 Expert Approved Answer
    Step: 1 Unlock blur-text-image
    Question Has Been Solved by an Expert!

    Get step-by-step solutions from verified subject matter experts

    Step: 2 Unlock
    Step: 3 Unlock

    Students Have Also Explored These Related Programming Questions!