;
;
;	I N I T I A L . C M D           DISK PACK INITIALIZATION
;
;
.ENABLE SUBSTITUTION
TER /WIDTH:72
.SETS DB0 "DB0:"
;
;	DISK PACK ID AND DRIVE INPUT
;
.50:
.ASKS DRIVE DISK DRIVE (DB1:, DB2:)
.ASKS PACKID PACK ID ('DRIVE')
.IF DB0 EQ DRIVE .GOTO 100
;
;	INITIALIZATION OF 'PACKID' ON 'DRIVE' WILL BE DONE
.ASK DOK IS THIS CORRECT
.IFF DOK .GOTO 50
;
;	MOUNT 'PACKID' ON 'DRIVE' AS A DOUBLECHECK 
MOU 'DRIVE' 'PACKID'
.WAIT MOU
.ASK DOK IS MOUNT SUCCESSFUL
DMO 'DRIVE'
.IFT DOK .GOTO 60
.ASK AGAIN WRONG PACK OR DRIVE, TRY AGAIN
.IFT AGAIN .GOTO 50
.GOTO 200
;
;	MOUNT REMAINING DRIVE WITH READ-ONLY PROTECTION
.60:
INS [350,1]LBN/TASK=...LBN
.WAIT INS
.65:
.SETS DB1 "DB1:"
.SETS DB2 "DB2:"
.IF DB1 EQ DRIVE .ASK HOK HAVE YOU SET HARDWARE PROTECT ON DB2:
.IF DB2 EQ DRIVE .ASK HOK HAVE YOU SET HARDWARE PROTECT ON DB1:
.IFF HOK .GOTO 65
.IF DB1 EQ DRIVE MOU DB2:/OVR/PRO=[R,R,R,R]
.IF DB2 EQ DRIVE MOU DB1:/OVR/PRO=[R,R,R,R]
.WAIT MOU
;
;	ASK IF WISH TO CHANGE PACK ID
.ASK CHANGE DO YOU WISH TO CHANGE PACK ID
.IFF CHANGE .GOTO 80
.70:
.ASK PACKID NEW PACK ID
;
;	DISK PACK ON 'DRIVE' WILL BE RENAMED 'PACKID'
;
.ASK DOK IS THIS CORRECT
.IFF DOK .GOTO 70
;
;	CORRECT PACK AND DISK DRIVE, INITIALLIZE PACK
.80:
INI 'DRIVE' 'PACKID'/LRU=30
MOU 'DRIVE'/OVR
.WAIT MOU
;
;	LBN WILL PROMPT 3 TIMES, ENTER:
;	     @'PACKID'.PAK
;	     YES
;	     'DRIVE'
;
LBN
REM ...LBN
.ASK LBNOK LBN TASK RUN SUCCESSFUL
.IFF LBNOK .GOTO 200
DMO 'DRIVE'
INI 'DRIVE' 'PACKID'/LRU=30/BAD=[AUTO]
;
;	NUMBER OF BLOCKS ON 'DRIVE'[0,0]BADBLK.SYS SHOULD BE ONE
;	MORE THAN NUMBER IN 'PACKID.PAK'
;
MOU 'DRIVE' 'PACKID'
.WAIT MOU
PIP TI:='PACKID'.PAK
PIP 'DRIVE'[0,0]BADBLK.SYS/FU
.GOTO 300
;
;  	BRANCH HERE FOR PACK OR DRIVE ERROR
.100:;	PACK MUST NOT BE MOUNTED ON DB0:
.200:;  INITIALIZATION ABORTED
;
.300:
DMO DB1:
DMO DB2:
;
;	END OF INITIALIZATION PROCEDURE
;
