Starting from:

$30

CSCI231-Lab 7-Solved


1. Implement a recursive procedure pow in MIPS assembly language that takes two integers, base and exponent, and returns baseexponent.

Your program should prompt the user for two integers, base and exponent, and print out the result returned from the procedure. You should pass base and exponent in $a0 and $a1, respectively, and return the result in $v0. Note that your procedure must be recursive.

The signature of this procedure in C/Java would look like this: int pow(int x, int y).

More products