Question: IN MARS MIPS ASSEMBLY: The Algorithm for your program is as follows: Ask the user for a first number Get that number Store that number

IN MARS MIPS ASSEMBLY:

The Algorithm for your program is as follows:

  1. Ask the user for a first number
  2. Get that number
  3. Store that number to val1 in Data Storage
  4. Ask the user for a second number
  5. Get that number
  6. Store that number to val2 in Data Storage
  7. Ask the user for a third number
  8. Get that number
  9. Store that number to val3 in Data Storage
  10. Load val1, val2 and val3 into $s0, $s1 and $s2
  11. Set $s3 to $s0 + $s1 - $s2
  12. Store $s3 into results
  13. Print the final answer. This could be tricky
  14. Exit cleanly as always.

Your output should look as follows (Example User Input is shown in bold):

Please enter the first number: 12 Please enter the second number: 13 Please enter the third number: 14 Result: 12 + 13 14 = 11

---------------------------------------

Hint: The operators are strings

Make sure to follow standard formatting and documentation standards. Upload the resulting .asm file.

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!