Question
1. Write a MIPS subprogram called addtwo which takes two integer arguments and adds their values. Then write a main program that uses this subprogram
1. Write a MIPS subprogram called addtwo which takes two integer arguments and adds their values. Then write a main program that uses this subprogram to add the values in $t0 and $t1 and print out the sum. Set the value of $t0 to 5 and $t1 to 9.
2. Write a MIPS subprogram called gthan which takes two integer arguments and determines the greater of the two integers. Then write a main program that uses the subprogram to determine if $t0 or $t1 has the greater number. If $t0 is greater than $t1, print 0 else print 1. Set the value of $t0 to 7 and $t1 to 15.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started