answersLogoWhite

0

this is a Fibonacci program for 8 bit numbes:

E <CR> ;working in expanded mode in 8086 microprocessor

A1000:1000 <CR>;address location where program is to b stored

;<CR> is nothing but an enter keystroke!

MOV AX,1010

MOV DS,AX

MOV SI,2000

MOV CX,[SI] ;number of terms for Fibonacci sereis one wants

INC SI

INC SI

MOV BX,0000

MOV AX,0001

MOV [SI],BX ;moving first terms of Fibonacci sereis to memory

MOV [SI],AX

INC SI : LABEL1

INC SI

ADD AX,BX ;0+1+1+2+3+....

MOV [SI],AX

INC SI

INC SI

MOV [SI],BX

MOV BX,AX

LOOP LABEL1

INT A5

it may be wrong somewhere....corrections are most welcome....

:)

User Avatar

Wiki User

14y ago

What else can I help you with?