	ORG     0100h

SBOOT:	MVI     A,3	        ;CLEAR M6850 UART
	OUT     12h
	MVI     A,15h	        ;8 DATA, 1 STOP, NO PARITY
	OUT     12h

ABOOT:	LXI	H,0		;[H,L]=>LOAD ADDRESS
	MVI	C,80h		;[C]=LOAD COUNTER

APEIN:	IN	12h		;CHARACTER FROM APE?
	RRC	
	JNC	APEIN

 	IN	13h		;YES - SAVE IT
	MOV	M,A
 	INX	H		;INCREMENT LOAD ADDRESS
 	DCR	C		;DECREMENT LOAD COUNT
 	JNZ	APEIN		;DONE?  NO - CONTINUE

 	JMP	0		;START COLD BOOT LOADER AT 0

	END
