Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in assembly language! 5. Fibonacci Numbers Write a program that uses a loop to calculate the first seven values of the Fibonacci number sequence, described

image text in transcribed
image text in transcribed
in assembly language!
5. Fibonacci Numbers Write a program that uses a loop to calculate the first seven values of the Fibonacci number sequence, described by the following formula: Fib(1)=1,Fib(2)=1,Fib(n)=Fib(n1)+Fib(n2). Write a program, similar to the one described in Exercise 5 on page 138, that generates a Fibonacci-like series of integers. Instead of 1 and 1 , make your series start with the values 1 and 4 ; then let each successive number be the sum of the two previous numbers. Modify the original directions as follows: generate the first thirty (rather than seven) numbers in the series; also define an uninitialized array of 30 doublewords in memory and fill it with the 32 -bit values in the series as you compute them. Call Irvine's 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 Irvine's DumpMem procedure to display the final contents of the 30 doubleword values in your array. (See pages 159-160 for descriptions of these two procedures and how to call them.) 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 4 as the first and second values, the 30 th value in the series is 2,374,727 decimal or 00243C47h ). 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Database And Knowledge Base Systems

Authors: S Krishna

1st Edition

9810206208, 978-9810206208

More Books

Students also viewed these Databases questions