Calculating "FIBONACCI Numbers" on 80x86


As we all know, "Fibonacci Numbers" are the ones resulting from a sequence in which every new term is derived from the addition of the two last old ones in this fashion:

F(X)=F(X-1)+F(X-2)

where 'F(X)' is a new "Fibonacci term".
The sequence yields 1,1,2,3,5,8,13... and so on.

The sequence is named after Leonardo Pisano, an italian mathematician born in Italy and nicknamed "Fibonacci" (or "Bigollo" as he sometimes liked to call himself). The famous sequence resulted from a problem involving rabbits which he presented in his book "Liber abaci" (published around the year 1200).

The two examples shown next were prepared as a test after reading a fine program to calculate the series presented by Mr. Ed Beroset.

** Attempt 1:F7.ASM - Not as fast, not as elegant, but does the trick. Much room for improvement here. 207 bytes.
** Attempt 2:F8.ASM - Faster than F7.ASM (much faster) but larger, '286 bytes.




<-