Professional Documents
Culture Documents
Fibonacci Series Program: Hitesh Vadgama 1712061 Rishi Molia 1712063
Fibonacci Series Program: Hitesh Vadgama 1712061 Rishi Molia 1712063
.model small
.data
0000 07 cnt db 07
0001 0008[ res db 8 dup(0)
00
]
.code
0000 B8 ---- R start: mov ax,@data //initialize DS
0003 8E D8 mov ds,ax //move ax contents to dx
0005 8A 0E 0000 R mov cl,cnt // move count to CL register
0009 BE 0500 mov SI ,500h // Set SI to 500H
000C B0 00 mov al,0 // reset AL to 0
000E 88 04 mov[si],al //Move AL to address of SI
0010 46 inc si // increment SI by 1
0011 B3 01 mov bl,01 // Move 01 to BL
0013 88 1C mov [SI],bl // Move BL to address of SI
0015 83 E9 02 sub cx,0002 // subtract 0002 from CX
0018 8A 44 FF up: mov al,[si-1] // move operand in address
SI-1 to AL
001B 02 04 add al,[si] // add operand stored in
address SI to AL
001D 46 inc si // increment SI by 1
001E 88 04 mov [si],al //move AL to Address of SI
0020 E2 F6 loop up
0022 B4 4C mov ah,4ch /* DOS BOX TERMINATION
0024 CD 21 int 21h COMMAND/*
end
Symbols-1
DGROUP . . . . . . . . . . . . . GROUP
_DATA . . . . . . . . . . . . 0009 WORD PUBLIC 'DATA'
_TEXT . . . . . . . . . . . . . 0026 WORD PUBLIC 'CODE'
Symbols:
23 Source Lines
23 Total Lines
20 Symbols
0 Warning Errors
0 Severe Errors
OUTPUT: