Question
Write a program that uses a loop to calculate the rst seven values of the Fibonacci number sequence, described by the following formula: Fib(1) =
Write a program that uses a loop to calculate the rst seven values of the Fibonacci number sequence, described by the following formula: Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n 1) + Fib(n 2).
Make your series start with the values 1 and 1; then let each successive number be the sum of the two previous numbers. Modify the original directions as follows: generate the first thirty-two (rather than seven) numbers in the series; also define an uninitialized array of 32 doublewords in memory and fill it with the 32-bit values in the series as you compute them. Call Irvines DumpRegs procedure after each value is generated so the registers will be displayed to the screen; in addition, after the last number is generated, call Irvines DumpMem procedure to display the final contents of the thirty-two doubleword values in your array. Use MAKE16, MAKE32, or a Visual Studio project as appropriate to assemble your program and link its object code to the Irvine library procedures. Run your program and test it to make sure it generates correct output (hint: counting 1 and 1 as the first and second values, the 32nd value in the series is 2,178,309 decimal or 00213D05h). Capture and print out a screen shot(s) showing the results of the program (you may have to scroll up/down to see all the output).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started