Google

Dec 8, 2008

program to perform fibonacci series

following program is perform fibonacci series

In order to perform the fibonacci series, that is 1,1,2,3,5,8,13 .....
We initalize SI to 2000 and CX to 0, then we initilaize AX and BX registers. Then we increment SI Register by 1 and we move the contents of AL into SI register. Then we decrement cs by one and move the contents of BL o that of si and decrement CS. Then we add al and the bl registers.

Move al with contents of si +01 and move si with BL, then we increment si by one and repeat until cx=0 and we halt the program

CODE:

MOV SI,2000
MOV CX,0000
MOV CL,[SI]
MOV AX,0000
MOV BX,00
INC SI
MOV [SI], AL
DEC CX
INC SI
MOV [SI],BL
DEC CX
AGAIN ADD AL,BL
MOV [SI+01],AL
MOV BL,[SI]
INC SI
LOOP AGAIN
INT A5

----
code ends

3 comments:

Null said...

Hello.
I was wondering if you have the assembly code for a first degree equation solver.
Please let me know.

Thank you.

Pradip Yadav said...

Get 80 programs of 8085 @

www.pradipyadav.com

Kamalesh said...

Excellent data with lots of information. I have bookmarked this page for my future reference. Do share more updates.
Full Stack Developer Course in Chennai
Full Stack Developer Training in Chennai
Full Stack Developer Online Course