In: Computer Science
Hello, I am very new to 64-bit ARM assembly and would like the code to this following question:
The Fibonacci Sequence is a series of integers. The first two numbers in the sequence are both 1; after that, each number is the sum of the preceding two numbers.
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ...
For example, 1+1=2, 1+2=3, 2+3=5, 3+5=8, etc.
The nth Fibonacci number is the nth number in this sequence, so for example fibonacci(1)=1, fibonacci(2)=1, fibonacci(3)=2, fibonacci(4)=3, etc. Do not use zero-based counting; fibonacci(4)is 3, not 5.
Your assignment is to write an ARM assembler code (Fibonacci.s) that prompts the user for the nth term of the fibonacci sequence. The program will then calculate the users selected nth fibonacci term and print it out.
The program should produce this input:
Enter the desired Fibonacci term: 6
The 6th Fibonacci number is: 8
Please include comments about what the functions do in the code, thank you so much! Additionally note, I am compiling this code on a raspberry pi 3. So any additional comments would be most helpful.