Page 1 of 1

Write a recursive assembly subroutine that calculates the following Fibonnaci number: 𝑓(𝑛) = { 0 1 &#119

Posted: Fri Apr 29, 2022 8:03 am
by answerhappygod
Write a recursive assembly subroutine that calculates the
following Fibonnaci number: ๐‘“(๐‘›) = { 0 1 ๐‘“(๐‘› โˆ’ 1) + ๐‘“(๐‘› โˆ’ 2) ๐‘–๐‘“ ๐‘› =
0 ๐‘–๐‘“ ๐‘› = 1 ๐‘œ๐‘กโ„Ž๐‘’๐‘Ÿ๐‘ค๐‘–๐‘ ๐‘’ Please test the subroutine by passing the
value of n equals 6. The result should equal 8. If n equals 4, the
result is 3. Do you use local variables, how do you manage them?
How do you pass the parameter n to the subroutine and how does the
subroutine return the result?