Translate the following c program to mips assembly


Translate the following C program to MIPS assembly.
?
int fib(int n)
{
if (n == 0) {
return 0;
} else if (n == 1) { return 1;
} else {
return fib(n - 1) + fib(n - 2);
} }
void main() {
int result = fib(8);
}
?
?Objective:
-define a recursive procedure and call it.
-Implement a MIPS assembly language program that defines "main", and "fib" procedures
-The function "fib" is recursive.
-The final "result" is stored in $s2 

Request for Solution File

Ask an Expert for Answer!!
Assembly Language: Translate the following c program to mips assembly
Reference No:- TGS097181

Expected delivery within 24 Hours