.;+ MAINTSYS - BUILD STAND ALONE TAPE BOOTABLE MAINTENANCE SYSTEM
.;	REF: MULTITASKER VOL 13, NO 5, PAGE 219
.;
	.ENABLE SUBSTITUTION
;
; BEGIN STAND ALONE MAINTENANCE SYSTEM BUILD
;
	.SETS UIC <UIC>
	SET /UIC='<SYSUIC>'
	.ASKS[2:2] DISK Enter Disk type [DP,DB...]
	.ASKS[2:2] TAPE Enter Tape type [MT,MM...]
	.ASKN[0:7] TAPENO Enter tape unit number for BOOTable system
	.ASKN MAXTT Enter Max Terminal Unit Number
.;
	PIP MAINT.SYS/CO/NV/BL:498.=RSX11M.TSK
	PIP MAINT.STB/NV=RSX11M.STB
	.OPEN MAINTVMR.CMD
	.ENABLE DATA
MAINT
TIME	'<DATE>' '<TIME>'
SET /UIC='<SYSUIC>'
SET /POOL=1000
SET /MAIN=TTPAR:*:200:TASK
LOAD TT:
SET /MAIN=DRVPAR:*:*:SYS
LOAD 'DISK':
LOAD 'TAPE':
.DISABLE DATA
.DEVLOP:
	.ASKS DEV Enter any other Devices (<CR> when done)
	.IFT <DEFAUL> .GOTO NOMORE
	.IF <STRLEN> EQ 2 .DATA LOAD 'DEV':
	.IF <STRLEN> EQ 3 .DATA LOAD 'DEV'
	.GOTO DEVLOP
.NOMORE:
.ENABLE DATA
SET /TOP=DRVPAR:-*
! HERE WE MUST USE THE RESIDENT OVERLAY FILE SYSTEM
SET /MAIN=FCPPAR:*:*
INS FCPRO1/CKP=NO/INC=0
SET /TOP=FCPPAR:-*
SET /MAIN=GEN:*:*:SYS
! COMMAND HANDLER STARTS UP TASKS NAMED ...XXX
INS COMAND/TASK=MCR.../CKP=NO
FIX MCR...
RUN MCR.../RSI=1S
! HERE WE INSTALL UTILITIES. WE CAN USER ANYTHING THAT IS NOT OVERLAYED.
!
! BACKUP UTILITY
INS BRU/CKP=NO
FIX ...BRU
! DISK MOUNTER
INS MOU/CKP=NO/INC=0
FIX ...MOU
! DISK DEMOUNTER
INS DMO/CKP=NO/INC=0
FIX ...DMO
! BAD BLOCK CHECKER
INS BAD/CKP=NO
FIX ...BAD
! DISK FILE BOOTER
INS BOO/CKP=NO/INC=0
FIX ...BOO
! SET ALL TERMINALS SLAVE FOR THIS
SET /NOCRT=TT0:
SET /LOWER=TT0:
.DISABLE DATA
	.SETN N 0
.TTLOOP:
	.DATA SET /SLAVE=TT'N':
	.INC N
	.IF N LE MAXTT .GOTO TTLOOP:
.ENABLE DATA
!
PAR
TAS
CLQ
!
SAVE 'TAPE''TAPENO':MAINT
!
.DISABLE DATA
.CLOSE
.IFNINS VMR INS $VMR
PIP TI:=MAINTVMR.CMD
VMR @MAINTVMR
SET /UIC='UIC'
;
; END OF STAND ALONE BRU BUILD
;

