[Solved] SOLVED:Assembly Language Lab #5 Solution

30 $

File Name: SOLVED:Assembly_Language_Lab_#5_Solution.zip
File Size: 376.8 KB

SKU: [Solved] SOLVED:Assembly Language Lab #5 Solution Category: Tag:

Or Upload Your Assignment Here:


Fibonacci numbers are integers 0, 1, 1, 2, 3, 5, 8, 13, 21 … If function fib(n) represents the n th Fibonacci number, we have fib(n) = fib(n-1) + fib(n-2) for n 2, and fib(1) = 0, fib(2) = 1. Therefore, we can implement the recursive function fib in c++ as follows:int fib(int n){if ((n == 1) || (n == 2))return n – 1;elsereturn fib(n-1) + fib(n-2);}In this lab, we will write an assembly program that computes and displays the nth Fibonacci number for any positive integer n that the user entered. To implementthis program, we need to1) Implement the above fib function in assembly, i.e., translate fib into anequivalent assembly procedure;2) Implement your main procedure which lets the user enter the number n, callsthe procedure fib to get the n th Fibonacci number, and displays this Fibonaccinumber.Please avoid using directives such as IF-ELSE in your assembly code.Requirements:1. Submit your source code (.asm file) which should run correctly.2. Necessary comments are needed in your code.3. Turn in a lab report. The lab report should include three parts: Introduction,Implementation, and Summary. The introduction briefly describes the purposeof this lab. The implementation part gives detailed description on how youimplemented the task, including the runtime screen shots, as well as necessarydiscussions. The summary concludes the lab.Please submit through blackboard system!

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED:Assembly Language Lab #5 Solution
30 $