Question: Write a program called SimpleCalculator.asm . Your program must include your own subroutine, written below the main subroutine, that receives two numbers and returns the
- Write a program called SimpleCalculator.asm .
- Your program must include your own subroutine, written below the main subroutine, that receives two numbers and returns the sum of those two numbers.
- Your main method should look as follows.
- Display a welcome message to the user
Call PromptInt to get the first number Move the results to $t0 Call PromptInt to get the second number Move results to $t1 Move the values in $t0 and $t1 to the appropriate registers for a subroutine call. Call the AddTwo Subroutine Move the results to an appropriate register Call PrintInt to display the results Call PrintNewLine Call Exit
Example of how the program should look
Welcome to the Simple Calculator! Please enter number 1: 12 Please enter number 2: 13 The sum of the numbers is 25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
