;*************************************************************************
;
;  Quick binary file loader for the Processor Technology 3P+S board
;
;  	Using the front panel or a ROM monitor, enter the bytes of this
;	program into memory at address zero. Run the program from
;	address zero and then send the file PC2FLOP.COM (8-bit binary)
;	through the serial port. Nothing is displayed while the file
;	loads. After the file transfer is complete, reset the machine
;	and run PC2FLOP from address 0100h.
;
;************************************************************************

; Serial port on 3P+S board

CSRA	equ	00h		;serial port ontrol/status register
DRA	equ	01h		;serial port data register

RDRF	equ	40h		;receive data bit mask
TDRE	equ	80h		;transmit ready bit mask

LOADADR	equ	0100h		;address of program being loaded

	org	0
	lxi	h,LOADADR	;HL->starting address for program

loop	in	CSRA		;wait for a character
	ani	RDRF
	jz	loop

	in	DRA		;get the character
	mov	m,a		;store it
	inx	h		;move to next location
	jmp	loop

	end
