I have problem with Fibonacci code in assembly (intel 8085)
I'm stuck at, can someone give help me with this.
lda 8000 //take the number
cpi 02 // n>2
jc small
mov l,a
mov d,l
MVI B, 00 //Initialize variable to store previous number
MVI c, 01 //Initialize variable to store current number
MOV A, B
add c
back:
MOV B, C //Current number is now previous number
MOV C, A //Save result as a new current number
DCR D //Decrement count
jnz back
sta 8001 //Save result to this address
HLT
small:
sta 8001
hlt
I take the number from 8000 address and I want the result to go to 8001 address



