Question: Write a MIPSzy subroutine, power, that accepts 2 arguments x and y and computes x y . You can assume that x and y are
Write a MIPSzy subroutine, power, that accepts 2 arguments x and y and computes x y . You can assume that x and y are both larger than 0. The main program passes the two parameters and receives the return value through the program stack.
Test subroutine with the following
(show comments also)

addi Sto, $zero, 5100 top lw St1, 0(Sto) beq t1, $zero, done addi $sp, $sp, -4 sw $t1, 0(Ssp) addi $t2, Szero,4 addi $sp, $sp, -4 sw St2, 0(Ssp) addi $sp, $sp, -4 jal power sw $t3, 0(Sto) addi $sp, $sp,12 addi tO, St0, 4 j top power: Put your subroutine here done: nd memory configuration: 5100 5104 2 5108 3 5112 5 5116 2 5120 1 5124 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
