Computer Science, asked by vishnunair4662, 1 year ago

Assembly language program for fibonacci series in 8086

Answers

Answered by khursheedahmad
8
brainliest answer mark me pls

34 lines (26 sloc) 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Raw Blame History
;#############################################
;# 8086 Program to generate Fibonacci Series #
;# Author: kingspp #
;#############################################
;Declaration Part
.MODEL SMALL
.DATA
RES DB ?
CNT DB 0AH ; Initialize the counter for the no of Fibonacci No needed
.CODE
START: MOV AX, @DATA
MOV DS, AX
LEA SI, RES
MOV CL, CNT ; Load the count value for CL for looping
MOV AX, 00H ; Default No
MOV BX, 01H ; Default No
;Fibonacci Part
L1: ADD AX ,BX
DAA ; Used to Present the value in Decimal Form
MOV [SI ], AX
MOV AX, BX
MOV BX,[ SI]
INC SI
LOOP L1
INT 3H ; Terminate the Program
END START
Similar questions