Program1 - Fibs

# Program1 - Fibs - calculating them from the preceding two...

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

CSC 322 Program 1: Fibonacci Sequence Due Wednesday, September 28, 2011 You are to write an assembly language program that will calculate and store the first 16 numbers in the Fibonacci sequence. 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 values initialized: .data Fibs dw 0, 1, 14 DUP (0) Your code should then proceed to fill in the missing 14 Fibonacci numbers by
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: calculating them from the preceding two already in the sequence. The assembly language instructions that you will need for this assignment include ( mov , add, and call ). Your code should: 1. Dump out Fibs before you calculate the missing 14 numbers (dump exactly 16 words), 2. Calculate the missing 14 fibs and place them in their correct location in Fibs, and lastly 3. Dump out Fibs with all the correct values (dump exactly 16 words). You should email your .asm file to [email protected] by class time on the due date. The assembly code should be commented – including your name, date, assignment and description. Enjoy!!!...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern