Question: I need to do this program using the ARM assembly language. In this assignment, you will program a simple calculator for the Raspbian OS using

I need to do this program using the ARM assembly language. InI need to do this program using the ARM assembly language.

In this assignment, you will program a simple calculator for the Raspbian OS using ARM assembly. Your program, at a minimum, will consist of the following procedure calls: SUM: Adds registers R1 and R2, returning result in register R0. DIFFERENCE: Subtracts register R2 from R1, returning result in register R0. PRODUCT: Multiplies registers R1 and R2, returning the result in register R0. MIN: Compares registers R1 and R2, returning the minimum of the two values in R0. Your main function will contain a loop that continuously checks for keyboard input in the following pattern:

In this assignment, you will program a simple calculator for the Raspbian OS using ARM assembly. Your program, at a minimum, will consist of the following procedure calls: SUM: Adds registers R1 and R2, returning result in register RO. DIFFERENCE: Subtracts register R2 from R1, returning result in register RO PRODUCT: Multiplies registers R1 and R2, returning the result in register R0 MIN: Compares registers R1 and R2, returning the minimum of the two values in RO. Your main function will contain a loop that continuously checks for keyboard input in the following pattern KOPERAND 2> can be any of the four characters {+, -,*, m3. Once the 3 lines of input are acquired, the operands should be loaded into the proper registers and the procedure corresponding to should be called. The procedure should return the result in register RO, and the main function should print the value to the console and skip to a new line. You may ignore overflows, underflows, and improperly formatted input. All input test cases will consist of positive numbers only. Below are some example use cases: 100 50 200 100 20 100 20 30 20

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 Databases Questions!