;
; This program calculates Fibonacci numbers and stores them in memory.
;
	ORG	0H
	LD	HL,200H		; Load the address of the first number to HL
	LD	A,(HL)		; Load first Fibonacci number to A
	INC	HL		; increment address pointer
	LD	B,(HL)		; load second Fibonacci number to B
	INC	HL		; increment address pointer
LOOP:
	ADD	A,B		; A <-- A + B
	LD	(HL),A		; store the new number to memory
	INC	HL		; increment address pointer
	LD	C,A		; swap A and B
	LD	A,B
	LD	B,C
	JP	LOOP		; repeat process