include	clib.inc
include	conio.inc
include	errno.inc

	extrn	IDD_DriveNotReady:DWORD

PPROC	_disk_retry, disk:word
	invoke	rsopen, IDD_DriveNotReady
	jz	@F
	push	dx
	push	ax
	mov	bx,ax
	push	es:[bx+4]
	invoke	dlshow, dx::ax
	pop	bx
	add	bl,25
	add	bh,2
	mov	cx,1
	mov	ax,disk
	add	al,'A'
	call	@scputc
	sub	bl,22
	add	bh,2
	mov	dx,bx
	mov	cx,29
	mov	bx,errno
	shl	bx,(DPTRZ/2)
	add	bx,offset sys_errlist
	mov	ax,[bx]
	mov	bx,dx
	call	@scputds
	call	dlmodal
	test	ax,ax
    @@:
	ret
PEND	_disk_retry

	END
