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

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!