;*************************************************************************
;
;  Quick .bin loader
;  	Load this program through the front panel switches to read in
;	a .bin file through 2SIO port 1 (I/O address 010h) at 8N1.
;	
;       As written, the program loads at zero and loads the .bin
;	file at location 0100h.
;
;************************************************************************
sio1Ctl	equ	010h		;1st port on 2SIO board
sio1Dat	equ	011h
sioRst	equ	003h		;code to reset the ACIA
sio8N1	equ	015h		;select 8N1

loadAdr	equ	0100h		;address of program being loaded

	org	0

	mvi	a,sioRst	;reset 2SIO port 1
	out	sio1Ctl
	mvi	a,sio8N1	;set for 8N1
	out	sio1Ctl	
	lxi	h,loadAdr	;hl->starting address for program
loop	in	sio1Ctl		;wait for a character
	rrc
	jnc	loop
	in	sio1Dat		;get the character
	mov	m,a		;store it
	inx	h		;move to next location
	jmp	loop

	end
