You are on page 1of 1

Program to generate fibonacci number(8085) MVI D, 05 : Initialize counter MVI B, 00 : Initialize variable to store previous number MVI C, 01 : Initialize

variable to store current number MOV A, B :[Add two numbers] BACK: ADD C :[Add two numbers] 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 : if count 0 go to BACK HLT : Stop.

You might also like