;Fibonacci program for Z80 ;M. Eric Carr / Drexel University ;Setup: ;------ ;Load 0x01 into A register 0000 3E ;\ 0001 01 ;/ MVI 0x01 ;Copy 0x01 into B register 0002 47 ;MOV B,A ;Main loop: ;---------- ;Add B to A 0003 80 ;ADD B ;copy A into C (temp) 0004 4F ;MOV C,A ;Copy B into A 0005 78 ;MOV A,B ;Copy C into B 0006 41 ;MOV B,C ;Store the result at 0x1234 0007 32 ;\ 0008 34 ; STA 0x1234 0009 12 ;/ ;Jump back to continue the loop 000A C3 ;\ 000B 03 ; JMP 0x0003 000C 00 ;/