Contains files for the Program1 Assignment
Instructions:
There are three tasks that you will need to complete to be eligible for full points on this assignment. Read the instructions carefully and think critically about the information and components you have and need, and why you are using them. Each task has their own requirements that need to be fulfilled. Use any additional instructions and registers as necessary.
In this task, you will practice getting user input, moving them to registers, and printing them back to the user. Below are the specific requirements for this task:
Use "main: " label for this task Get 2 int values from the user The two user values should be held in registers $s0 and $s1, respectively Output the user inputs in the "Run I/O" section in MARS environment back to the user
Using the user input values in registers $s0 and $s1, write MIPS Assembly code to complete the arithmetic operations below:
add two values (use instruction "add") subtract two values (use instruction "sub") multiply two values (use instruction "mul") divide two values (use instruction "div") Output the arithmetic results in the "Run I/O" section in MARS environment back to the user
In this final task, you will practice how to do conditions in Assembly:
If the two user inputs from Task 1 are equal to each other, output "User inputs are the same" If the two user inputs from Task 1 are not equal to each other, output "User inputs are different"