{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Program2 - More Fibs

Program2 - More Fibs - Fibs dd 0 1 SOMENUMBERHERE DUP Your...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC 322 Program 2: More Fibonacci Numbers Due Monday, October 3, 2011 You are to write an assembly language program that will calculate and store all Fibonacci numbers that can be stored in a 32-bit location. Recall that the Fibonacci sequence starts out with zero followed by one. Each number of the rest of the sequence is the sum of the two preceding numbers in the sequence. Therefore the first sixteen Fibonacci numbers are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610. You should create the following data segment with only the first two Fibonacci values initialized – the rest set to zero: .data
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Fibs dd 0, 1, SOMENUMBERHERE DUP (?) Your program should then proceed to loop through some code that builds and stores the next Fib in the sequence until you detect that the largest unsigned Fibonacci number has been reached. Your code does not have to detect this max, you can determine the loop count by trial and error. Like Program 1, your code should dump out the Fibs array before and after it gets filled with values. For credit, you should email your .asm file as an attachment to [email protected] by class time on the due date. Make sure your code has appropriate comments. Enjoy!!!...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online