Question: Basic Assembly Program - MIPS Print out an introduction that includes: Your name, a title, and a brief description of this program. Prompt the user

Basic Assembly Program - MIPS

  1. Print out an introduction that includes: Your name, a title, and a brief description of this program.
  2. Prompt the user for two numbers and save them in two registers.
  3. Make sure the numbers are positive. Stop the program if either number is below the number 1 and print out a message.
  4. Print out in order:
    1. The equation and Sum of the two numbers
    2. The equation and Difference of the two numbers
    3. The equation and Product of the two numbers
    4. The equation and integer quotient and remainder of the division of the two numbers. You may assume that an attempt to divide by zero will not be made.
    5. The results of shifting the first number left by 1 binary digit.
    6. The results of shifting the second number right by 2 binary digits
    7. Format the output as shown in the example below.
    8. Print out a concluding message.

Sample Output:

Name and Title

Add, Subtract, Multiply and Divide two numbers

Enter the first number: 20

Enter the second number: 5

20 + 5=25

20 5=15

20 * 5=100

20 / 5=4 rem 0

Shift Left 1<< 10

Shift Right 2 >> 1

The program has stopped.. may the force be with you.

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!