is to write two assembly language programs, each with different subprograms that both compute the Fibonacci function. The first program/subprogram is to be recursive, following the definition of the Fibonacci number. The second is to be iterative, avoiding recursion entirely by using a loop. For each subprogram, I decided to use the size of the stack frame only the room for the registers. I slided down registers for the subroutine and passed input arguments to subroutines using output registers.
The program with recursive subroutine uses the size of room for registers. Caller's output registers will become callee's input registers. The callee will store the caller's return address at %fp and store the output in output registers. Recursive subroutine calling will keep sliding down register windows and use same strategy as the first caller. The last callee will return the result in %o1 and all higher level of callee from the last callee will return the result in %o1.
As the project asks, I use only one stack frame for its invocation. Main function will pass the input arguments using output registers and subroutine will take the input arguments that are stored in input registers. The subroutine returns the result just moving the result into callee's input register.