Convert the C function below to MIPS assembly language. Just ensure that the assembly language code can
Fantastic news! We've Found the answer you've been seeking!
Question:
Convert the C function below to MIPS assembly language. Just ensure that the assembly language code can be called inside a standard C program.
C code for finding the sum upto n numbers using recursion is shown below
int sum (int n) {
if (n == 0)
return 0;
else
return n + sum(n-1);
}
Related Book For
Digital Design and Computer Architecture
ISBN: 978-0123944245
2nd edition
Authors: David Harris, Sarah Harris
Posted Date: