Compute the fibonacci sequence - assembly program, Assembly Language

Compute the Fibonacci sequence - assembly program:

Problem: Fibonacci
 
In this problem you will write a program that will compute the first 20 numbers in the Fibonacci sequence. (You can refer to Wikipedia for more information on the Fibonacci sequence). Here is the pseudo-code for the procedure:
 
F_0 = 0
F_1 = 1;
 
i = 2;
While (i < 20) {
  F_i = F_(i-1) + F_(i-2);  
  i = i+1
}
 
More specifically your program should write the first 20 Fibonacci numbers into memory starting at address x4000. At the end of your program the addresses x4000 through x4013 will contain the first 20 Fibonacci numbers starting at 0. You may find the list instruction in PennSim useful for examining the contents of memory.

You can look at the sum_numbers.asm program for an example of a program that accesses data memory.
 
Big Hint. You will probably find it convenient to maintain a variable that points to the address in memory you are going to write to next and update this on each iteration. You may also find it useful to use the offset field in the LDR instructions to read values that are near to the current store address.

For this part you should turn in two files: fibonacci.asm and fibonacci_script.txt

Posted Date: 2/11/2013 2:49:24 AM | Location : United States







Related Discussions:- Compute the fibonacci sequence - assembly program, Assignment Help, Ask Question on Compute the fibonacci sequence - assembly program, Get Answer, Expert's Help, Compute the fibonacci sequence - assembly program Discussions

Write discussion on Compute the fibonacci sequence - assembly program
Your posts are moderated
Related Questions
General Data Registers Given figure indicate the register organization of 8086. The registers DX, CX, BX and AX are the general purpose 16-bit registers. AX is behaved as 16-bi

Architecture Of 8088 The register set of 8088 is accurately the same as in to 8086. The architecture of 8088 is also same to 8086 except for 2 changes; a) 8088 has 4-byte instr

Introduction to Microprocessor: Microprocessor works like a CPU in a microcomputer. It's present as a single IC chip in a microcomputer. Microprocessor is the soul of the machi

Using the following table as a guide, write a program that asks the user to enter an integer test score between 0 and 100. The program should display the appropriate letter grade.

8255 Programmable Peripheral Interface Intel's 8255 A programmable peripheral interface provides a nice instance of a parallel  interface. As shown the interface have a control

Write an assembly language program that defines symbolic constants for all seven days of the week

Cache Memory Caching is a technology based on the memory subsystem of any computer. The majoraim of a cache is to accelerate the computer while keeping the cost of the computer

The 486 Introduced in the year 1989 the 80486 did not feature any radically new processor technology. Instead, it joints a 386 processor, a cache memory controller and a math c

Explain the basic method for implementing paging

You have to write a subroutine (assembly language code using NASM) for the following equation.