.ENABLE SUBSTITUTION
.SETS RMX "RMX"
.ASK MPLUS DO YOU WANT TO BUILD RMD FOR A RSX11M-PLUS SYSTEM
.IFF MPLUS .SETS RMX "RMM"
.ASK NET DO YOU WANT TO INCLUDE THE NETWORK PAGES
.IFT NET .ASKN NUIC WHAT IS THE NETWORK UIC
.IFT NET .ASKS NDEV WHAT DEVICE IS THE NETWORK ON
.OPEN RMDBLD.CMD
.ENABLE DATA
RMD/PR,RMD/MA/-SP=RMDBLD/MP
ASG=TI:1:2
EXTSCT=$SCRN:3600
PRI=225
TASK=...RMD
;
; AS THE DEFAULT, THE FOUR FILES-11 DEVICES WHOSE FREE BLOCK COUNTS
; WILL BE DISPLAYED ARE SY0:, DB1:, DB2:, AND DB3:. IF THIS DOES NOT
; REFLECT YOUR SYSTEM, YOU MAY CHANGE THE 4 DEVICES HERE:
;
;	GBLPAT=MDCOM:$MDDEV:DEVICE:UNIT		! FIRST DEVICE
;	GBLPAT=MDCOM:$MDDEV+6:DEVICE:UNIT	! SECOND DEVICE
;	GBLPAT=MDCOM:$MDDEV+14:DEVICE:UNIT	! THIRD DEVICE
;	GBLPAT=MDCOM:$MDDEV+22:DEVICE:UNIT	! FOURTH DEVICE
;
; FOR MORE INFORMATION ON CUSTOMIZING RMD, PLEASE READ THE COMMENTS IN
; MODULES RMDEMO.MAC AND MDCOM.MAC.
GBLPAT=MDCOM:$MDDEV:41104:0
GBLPAT=MDCOM:$MDDEV+14:45527:0
GBLPAT=MDCOM:$MDDEV+22:45527:1
.DISABLE DATA
.IFF NET .GOTO 10
.ENABLE DATA
;
; DEFINE ADDITIONAL LUNS NEEDED FOR NETWORK EXPANSIONS
;
GBLDEF=$SLUN:3
GBLDEF=$MLUN:4
UNITS=4
.DISABLE DATA
.10:
;
; MODIFY PAGE NAME TABLE TO INCLUDE ADDITIONAL PAGES
;
.IFF NET .GOTO 20
.ENABLE DATA
GBLPAT=RMDEMO:$PGTBL+144:46522
GBLPAT=RMDEMO:$PGTBL+130:46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LE DATA
GLOBAL:	.FCTR	(LB:[1,24]RMD/LB:GBINIT,LB:[1,24]RMD/LB:GBPAGE,GBL1)
GBL1:	.FCTR	LB:[1,24]RMD/LB:GBCMD

.DISABLE DATA
.IFT NET .DATA PAGES:	.FCTR	(MD,HL,AT,TH,RM,LL)
.IFF NET .DATA PAGES:	.FCTR	(MD,HL,AT,TH)
.ENABLE DATA
MD:	.FCTR	(LB:[1,24]RMD/LB:MDINIT,LB:[1,24]RMD/LB:MDPAGE,MD1)
MD1:	.FCTR	LB:[1,24]RMD/LB:MDCMD

HL:	.FCTR	('RMX'/LB:HLINIT,LB:[1,24]RMD/LB:HLPAGE)

AT:	.FCTR	('RMX'/LB:ATINIT,'RMX'/LB:ATPAGE,'RMX'/LB:ATCMD)

TH:	.FCTR	('RMX'/LB:THINIT-TH1,'RMX'/LB:THPAGE-TH2-TH1,'RMX'/LB:THCMD)
TH1:	.FCTR	LB:[1,54]RSX11M.STB/SS-LB:[1,1]EXELIB/LB
.DISABLE DATA
.IFF NET .GOTO 35
.ENABLE DATA
TH2:	.FCTR	'RMX'/LB:THF11L-'RMX'/LB:THNSPL-'NDEV':['NUIC',54]CEX.STB/SS
.DISABLE DATA
.GOTO 37
.35:
.DATA TH2:	.FCTR	'RMX'/LB:THF11L
.37:
.IFF NET .GOTO 60
.ENABLE DATA
RM:	.FCTR	('RMX'/LB:RMINIT-RM1,RM2,'RMX'/LB:RMCMD)
RM1:	.FCTR	'NDEV':['NUIC',54]CEX.STB/SS-LB:[1,1]EXELIB/LB
RM2:	.FCTR	'RMX'/LB:RMPAGE-'RMX'/LB:RMFNSP-RM1

LL:	.FCTR	('RMX'/LB:LLINIT-LL1,LL2,'RMX'/LB:LLCMD)
LL1:	.FCTR	'NDEV':['NUIC',54]CEX.STB/SS-LB:[1,1]EXELIB/LB
LL2:	.FCTR	'RMX'/LB:LLPAGE-RM1
.DISABLE DATA
.60:
.ENABLE DATA
	.END
.DISABLE DATA

.CLOSE RMDBLD.ODL
;
; THE FOLLOWING FILES HAVE BEEN CREATED:
;	RMDBLD.CMD, RMDBLD.ODL
; IN ORDER TO BUILD THE NEW VERSION OR RMD
; ENTER THE FOLLOWING COMMAND:
;	TKB @RMDBLD
; 
