CS 3503 Computer Organization and ArchitectureThis is for MARIE ASSEMBLY LANGUAGE . 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 (or input mode) to “Dec” (i.e., decimal), by using the drop-down menu associated with the input window of the simulator.The input should follow the format below:a. Addition: 10 num1 num2Here, “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 num2c. Multiplication: 12 num1 num2d. Division: 13 num1 num2The calculator program always shows immediately the input value it receives in the output window 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 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.example:14100When 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.//—–Sample of the beginning of the Code—-//ORG 100INPUTSTORE OPERATOROUTPUTIF LOAD OPERATORSUBT FOURTEENSKIPCOND 000JUMP ENDIF1LOAD OPERATORSUBT NINESKIPCOND 000JUMP ENDIF1THEN INPUT …….///——–End of Sample of the Beginning of Code—////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.//——Ex4_4.mas———//ORG 100Load X / Load the first number to be doubled.Store Temp / Use Temp as a parameter to pass value to Subr.JnS Subr / Store the return address, and jump to the procedure.Store X / Store the first number, doubledLoad Y / Load the second number to be doubled.Store TempJnS Subr / Store the return address and jump to the procedure.Loop, Store Y / Store the second number doubled.Halt / End program.X, DEC 20Y, DEC 48Temp, DEC 0Subr, HEX 0 / Store return address here.Load Temp / Actual subroutine to double numbers.Add Temp / AC now holds double the value of Temp.JumpI Subr / Return to calling code.END//——End of Ex4_4.mas———//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 calculator won’t stop by itself. You can exit the program by stopping running the program in the simulator or closing the simulator.——————————————————————-END OF DOCUMENT——————————————————–This is what I have so far BELOW, but don’t know how to join the subr with loops and jumps, or if the code for the math is right at all for the quotient and remainder. If you could PLEASE help me I really would appreciate it. I have been at this for 4 days straight and can’t get it. If what i have so far isn’t right then I dont mind it being scrapped for something better. Please answer fully. This is the last time i’ll be able to take this class, or I flunk out as a senior in College, which i desperately dont want. The requirements are in the document above the dotted line.What I have so farORG 100INPUTSTORE aIF, LOAD asubt fourteenSKIPCOND 000 // skip next line if a < 0JUMP ENDIF1InputSTORE bInputSTORE loc // locationJUMPI loc//—-addition—–JNS addLOAD aADD bOUTPUTHALT//—subtraction—JNS SubrLOAD aSUBT bOUTPUTHALT//—-multiplication—JNS MultiINPUTSTORE aINPUTSTORE bloop, LOAD aADD multiplySTORE multiplyLOAD bSUBT oneSTORE bSKIPCOND 400JUMP loopLOAD multiplyOUTPUTHALT//—Division—JnS DivideLoopD, Load 0Store sumNum1, Load aSubt bSkipCond 000Jump Num2Add bLoad aJnS DivideNum2, Store aLoad sumAdd oneStore sumJump Num1 /repeat iterationHalt///variablesa, DEC 0b, DEC 0x, DEC 100 // error code for input, a > 13one, DEC 1sum, DEC 0multiply, Dec 0loc, DEC 0add, DEC 10Subr, DEC 11Divide, DEC 12Multi, DEC 13fourteen, DEC 14

Get Professional Assignment Help Cheaply

Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?

Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.

Our essay writers are graduates with diplomas, bachelor’s, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.

Why Choose Our Academic Writing Service?

 

Plagiarism free papers
Timely delivery
Any deadline
Skilled, Experienced Native English Writers
Subject-relevant academic writer
Adherence to paper instructions
Ability to tackle bulk assignments
Reasonable prices
24/7 Customer Support
Get superb grades consistently

How It Works

1.      Place an order

You fill all the paper instructions in the order form. Make sure you include all the helpful materials so that our academic writers can deliver the perfect paper. It will also help to eliminate unnecessary revisions.

2.      Pay for the order

Proceed to pay for the paper so that it can be assigned to one of our expert academic writers. The paper subject is matched with the writer’s area of specialization.

3.      Track the progress

You communicate with the writer and know about the progress of the paper. The client can ask the writer for drafts of the paper. The client can upload extra material and include additional instructions from the lecturer. Receive a paper.

4.      Download the paper

The paper is sent to your email and uploaded to your personal account. You also get a plagiarism report attached to your paper.

Get Professional Assignment Help Cheaply
Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?
Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.
Our essay writers are graduates with diplomas, bachelor’s, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.
Why Choose Our Academic Writing Service?

Plagiarism free papers
Timely delivery
Any deadline
Skilled, Experienced Native English Writers
Subject-relevant academic writer
Adherence to paper instructions
Ability to tackle bulk assignments
Reasonable prices
24/7 Customer Support
Get superb grades consistently

How It Works
1.      Place an order
You fill all the paper instructions in the order form. Make sure you include all the helpful materials so that our academic writers can deliver the perfect paper. It will also help to eliminate unnecessary revisions.
2.      Pay for the order
Proceed to pay for the paper so that it can be assigned to one of our expert academic writers. The paper subject is matched with the writer’s area of specialization.
3.      Track the progress
You communicate with the writer and know about the progress of the paper. The client can ask the writer for drafts of the paper. The client can upload extra material and include additional instructions from the lecturer. Receive a paper.
4.      Download the paper
The paper is sent to your email and uploaded to your personal account. You also get a plagiarism report attached to your paper.

 

PLACE THIS ORDER OR A SIMILAR ORDER WITH Essay fount TODAY AND GET AN AMAZING DISCOUNT

The post Computer Organization and Architecture appeared first on Essay fount.


What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but you proved you are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 11***| Rating: ⭐⭐⭐⭐⭐
"This company is the best there is. They saved me so many times, I cannot even keep count. Now I recommend it to all my friends, and none of them have complained about it. The writers here are excellent."


"Order a custom Paper on Similar Assignment at essayfount.com! No Plagiarism! Enjoy 20% Discount!"