.key english/A,check/A,asn/A
.bra {
.ket }

; :ts=3
; DiskMount - Ask user for a diskette.
;
; Asks the user to put a given diskette into df0:, and then gives it
; a name which won't conflict with any standard assignments.
;
; Inputs:
;	english  What to ask the user for
;	check		The volume name the diskette must have
;	asn      The Assign name to give it

; If we already know how to find the requested disk, don't specifically
; ask for it again in df0:.
; Use ASSIGN EXISTS because we only care whether the name is known, not
; whether the diskette is accessible at the moment (if it isn't a DOS
; requester will remedy the situation).

ASSIGN >NIL: {asn} exists
if NOT WARN
	SKIP havedisk
ENDIF

LAB volagain

ECHO "Please insert the Professional Page *E[;1m{english}*E[m disk " NOLINE
ECHO "into *E[;1mdrive 0*E[m.*NHit RETURN when ready, or N to abort:  " NOLINE
INSTUTIL ask ""
IF WARN
	SKIP wrapup
ENDIF

ASSIGN PPageInstVCheck: ""
CD df0:
CD >RAM:PPageInstall/VolumeCheck
CD PPageInstVCheck:
ASSIGN PPageInstVCheck:

C:SETENV >NIL: <RAM:PPageInstall/VolumeCheck PPageInstVC ?
IF NOT $PPageInstVC eq {check}
	ECHO "*NWrong disk.  Try again."
	SKIP BACK volagain
ENDIF

ASSIGN {asn} df0:		; Hook we can use when disk has been removed

LAB havedisk
