Question
ARM assembly programming language: In this assignment, you will program a simple calculator for the Raspbian OS using ARM assembly. Your program, at a minimum,
ARM assembly programming 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.
MAX: Compares registers R1 and R2, returning the maximum of the two values in R0.
Your main function will contain a loop that continuously checks for keyboard input in the following pattern:
Where
Below are some example use cases: 5 100 5 50 + M * - 15 200 20 20 20 <- result 200 100 30
1. Main function correctly retrieves 3 input parameters, prints result in a continuous loop (20 points)
2. SUM, DIFFERENCE, PRODUCT, MAX procedures implemented (10 points each)
3. SUM, DIFFERENCE, PRODUCT, MAX procedures return correct values on all test cases (10 points each).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started