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

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!