public empffile




empffile:
	mov	e,m		;address of pb
	inx	h
	mov	d,m
	xchg			;address of buffer
	lxi	d,129		;length of buffer
empf1:
	call 	empf
	mov	m,a		;store one byte
	inx	h
	dcx	d
	mov	a,d
	ora	e
	jnz	empf1		;jump if not at the end
	ret
empf:
	in	0c2h
	ani	020h
	jz	empf		;wait for ready
	in	0c0h
	ret	
end
