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

Port Mapped I/O or I/O Mapped I/O I/O devices are mapped into a separate address space. This is generally accomplished by having a different set of signal lines to denote a mem

need some project ideas

Hello, I just want to know how much would it cost for you to develop , debug and test a program in matlab to solve a system of equations with gauss elimination with partial pivotin

You have to write a subroutine (assembly language code using NASM) for the following equation. Dx= ax2+(ax-1)+2*(ax+2)/2

Code for Reading Flow & Generating LED Output The code starts with the scanning of the PORT 3, for reading the flow status to check for various flow conditions and compare to

Cache controller The cache controller is the mind of the cache.  Its responsibilities include:  performing the  snarfs and snoops, updating the  TRAM  and SRAM and implementing

;StrNCpyAsm - copy zero terminated string2 to zero terminated string1, ; but copy no more than count (parameter) characters ; or the length of string2, whi

INT N : Interrupt Type N:- In the interrupt structure of 8086/8088, 256 interrupts are distinct equivalent to the types from OOH to FFH. When an instruction INT N is executed,

Ask 2. Exchange higher byte of AX and higher byte of BX registers by using memory location 0160 in between the transfer. Then stores AX and BX registers onto memory location 0174 o