subject

In this project, you will need to implement a simple calculator using assembly programming with the MARIE architecture model. Please make sure you read through and follow exactly the requirements given below. Requirements
1. The calculator can perform any of the following operations between two integers: addition, subtraction, multiplication and division.
2. To reduce the complexity, assume that both integers are positive and of single digit. So you are only using 1-9 for the calculations.
3. At the beginning, your program should wait for inputs to be provided through the input window/register of the simulator. To do so, you need to use the instruction "Input". To provide the input values, you need to first set your input data format to "Dec" (i. e., decimal), by using the drop-down menu associated with the input window/register of the simulator. The input should follow the format below: a. Addition: 10 num1 num2 Here, "10" tells the program to perform addition, "num1" and "num2" will be the two numbers to be added. The three numbers will be provided through the input window to the program one by one. b. Subtraction: 11 num1 num2 c. Multiplication: 12 num1 num2 d. Division: 13 num1 num2 The calculator program always shows immediately the input value it receives in the output window/register of the simulator. To do so, you need to set your output data format to "Dec" (i. e., decimal), by using the drop-down menu associated with the output window/register of the simulator. If an input number is invalid, in addition to showing the invalid input number, the program should also show a specific number, 100, in the output to indicate the invalidity. When this happens, the program will continue to check the next provided number, till a valid number is identified. To be valid, the first input should be a number in the range of 10-13, and num1 and num2 have to be a number in the range of 1-9.
4. Once the three inputs have all been accepted, the program will perform the specified operation on the provided integers. You need to implement four different subroutines, each for one of the four operations. For a particular operation, your program will need to call the corresponding subroutine to perform the operation. You can use "Ex4_4.mas" in the MARIE simulation package as your reference for implementing a subroutine.
5. You can implement a multiplication using addition. For example, 5 x 3 is equivalent to 5 + 5 + 5.
6. You can implement a division using subtraction. The results should include both the quotient and the remainder. There are three different cases here: a. Case 1: the dividend is smaller than the divisor, where the quotient is 0 and the remainder is the dividend. E. g., 4 / 7 yields: quotient = 0, remainder = 4. b. Case 2: the dividend can be divided exactly by the divisor, where the remainder is 0. E. g., 8 / 4 (which can be implemented as 8 – 4 – 4) yields: quotient = 2, remainder = 0. c. Case 3: the dividend is greater than the divisor, and the dividend cannot be divided exactly by the divisor, where the remainder is non-zero. E. g., 8 / 5 (which can be implemented as 8 – 5) yields: quotient = 1, remainder = 3.
7. Once the calculation is complete, show the result in the output window. For division, show the quotient first, followed by the remainder (even if the remainder is zero). Then the program should go back to its initial state, waiting for inputs for the next round of calculation.
8. The four example programs in the MARIE simulation package are excellent references for your project. If you are not clear about any of the requirements listed here, please check with your instructor.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:00
Which two editions of windows 7 support 64 bit cpus? choose two out of professional, business, starter, or home premium.
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
The idea that, for each pair of devices v and w, there’s a strict dichotomy between being “in range” or “out of range” is a simplified abstraction. more accurately, there’s a power decay function f (·) that specifies, for a pair of devices at distance δ, the signal strength f(δ) that they’ll be able to achieve on their wireless connection. (we’ll assume that f (δ) decreases with increasing δ.) we might want to build this into our notion of back-up sets as follows: among the k devices in the back-up set of v, there should be at least one that can be reached with very high signal strength, at least one other that can be reached with moderately high signal strength, and so forth. more concretely, we have values p1 ≥ p2 ≥ . . ≥ pk, so that if the back-up set for v consists of devices at distances d1≤d2≤≤dk,thenweshouldhavef(dj)≥pj foreachj. give an algorithm that determines whether it is possible to choose a back-up set for each device subject to this more detailed condition, still requiring that no device should appear in the back-up set of more than b other devices. again, the algorithm should output the back-up sets themselves, provided they can be found.\
Answers: 2
question
Computers and Technology, 25.06.2019 07:00
How do the portrait and landscape page orientations in the process of printing a worksheet?
Answers: 1
question
Computers and Technology, 25.06.2019 07:00
Quick styles allow you to format an entire document quickly? t/f
Answers: 1
You know the right answer?
In this project, you will need to implement a simple calculator using assembly programming with the...
Questions
question
Mathematics, 16.04.2020 23:45
question
Mathematics, 16.04.2020 23:46