/ EIDE bootstrap - chd@nktelco.net

WC     = 256.
READ   = 0040
DRQ    = 0010

wdalt  = 014
wddata = 020
wdcom  = 036

/ drive is busy because of bus reset
/ post-reset state is to operate on first sector of disk 0
	reset
	tst	r1
	bne	1f
	mov	$171000,r1
1:
	tstb	wdalt(r1)			/ wait not busy
	bmi	1b
	movb	$READ,wdcom(r1)
1:
	bitb	$DRQ,wdalt(r1)	/ wait drive ready and drq
	beq	1b

	clr	r2
	mov	$WC,r3
1:
	mov	wddata(r1),(r2)+
	sob	r3,1b

	clr	pc
