questiontranslate the following c program to mips


Question

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!!
Computer Engineering: questiontranslate the following c program to mips
Reference No:- TGS0445016

Expected delivery within 24 Hours