;*************************************************************************
;
;  Quick .bin loader
;  	Type this program into memory at zero using the P (program)
;	command of the monitor. Run at zero, then send PCGET.COM
;	using 8N1 into serial port at 4/5 (Bitstreamer II port B or
;	ZCB port A). Finally, reset the computer, boot CP/M, then
;	immediately execute SAVE 4 PCGET.COM.
;
;************************************************************************
sioCtl	equ	5		;serial port control register
sioDat	equ	4		;serial port data register
sioRdrf	equ	2		;mask to test for receive data

	org	0
	
	lxi	h,0100h		;load at 0100h
	in	sioDat		;clear possible garbage
	in	sioDat

loop	in	sioCtl		;wait for a character
	ani	sioRdrf	
	jz	loop

	in	sioDat		;get the character
	mov	m,a		;store it
	inx	h		;move to next location
	jmp	loop

	end
