Question: MIPS For this homework, you should write such a solution in MIPS assembly. That is, you must write a MIPS assembly program which asks the

MIPS
For this homework, you should write such a solution in MIPS assembly. That is, you must write a MIPS assembly program which asks the user to enter a numberi and subsequently uses a recursive procedure to compute Fi by computing F- and Fi-2. This procedure must use the stack correctly; in particular, it should use local storage in the frame to preserve necessary data across calls and should correctly maintain the stack (including the frame pointer) in the prologue and epilogue. In addition, your program should define a global variable CALLS which contains the number of recursive calls that were made. The program will also display this information to the user. Sample Runs: Enter a positive integer: 8 The 8th Fibonacci number is 21 Computing this took 67 calls. Enter a positive integer: 1 The 1th Fibonacci number is 1 Computing this took 1 calls. Enter a positive integer 20 The 20th Fibonacci number is 6765 Computing this took 21891 calls
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
