MVI A, 00H
STA 8000H
MVI A, 01H
STA 8001H
MVI B, 08H
LXI H, 8000H
BACK:
MOV A, M
INX H
ADD M
INX H
MOV M, A
DCR B
DCX H
JNZ BACK
HLT
MVI A, 00H
STA 8000H
MVI A, 01H
STA 8001H
MVI B, 08H
LXI H, 8000H
BACK:
MOV A, M
INX H
ADD M
INX H
MOV M, A
DCR B
DCX H
JNZ BACK
HLT
18 comments:
thnx. bro......
Thanks bro....
Thanks bro....
baba thanks..
I guess DCR B would come after DCX H
This version of the program uses the DAA instruction which gives you binary coded decimals instead of the hex-values.
LXI H,2050
MVI M,01 // stores 1 since fibonacci series starts at 1
MVI E,09 //counter i.e.. it runs 9 times after the initial 1 & 1
INX H
MVI M,01
MOV A,M
KK: DCX H
ADD M
DAA
INX H
INX H
MOV M,A
DCR E
JNZ KK
HLT
There is an error in the logic. If you give 08 as number of terms it will actually print 10 terms. The first 2 terms are not counted.
not running at all...
Wrong Program....
Close your site.....
>_<
program to generate fibo sequence for 10 no.
#source code
lxi H,300h
mvi a,00h
mov m,a
mvi b,01h
inx H
mov m,b
mvi c,10h
L: add b --L is used as label
inx H
mov m,a
mov a,b
mov b,m
dcr c
jnz L
hlt
the value will be stored fro mem. loc. 3000h onwards.
check this out
easy to understand and run
LXI H 8061h
MOV D M
MVI C 01h
L1: ADD B
MOV B C
MOV C A
INX H
MOV M A
DCR D
JNZ L1
HLT
It wouldn't matter because DCX does not affect any flags.
Great bro
write a program to generate the fibonacci sequence number generate 14 numbers of sequence and stored if in memory
8085 processor?
Fast
i need a 8085 program that can calculate the LCM of more than 2 numbers...
can any one help me...
DCR B should come after DCX H. Also DCX does not set or reset zero flag.
Las Vegas - Casino in NV at Mapyro
Search for the best 원주 출장샵 casinos in Las Vegas, NV. 상주 출장샵 전라북도 출장안마 We have 광양 출장샵 a map for casinos, hotels, restaurants and hotels in 안동 출장샵 Las Vegas.
Post a Comment