.ENABLE SUBSTITUTION
.ENABLE GLOBAL
.IFT <MAPPED> .SETS MAP "/MM"
.IFF <MAPPED> .SETS MAP "/-MM"
;
;		RMDEMO.CMD
;
; THIS COMMAND FILE WILL BUILD SEVERAL FLAVORS OF THE OLD VERSION OF
; RMDEMO.  THIS VERSION OF RMDEMO IS NOT THE NEW, TABLE DRIVEN VERSION
; SUPPLIED WITH RSX11M V3.2, BUT RATHER THE LAST RELEASE OF THE OLD 
; RMDEMO WHICH WAS SUPPLIED WITH THE FIELD TEST OF V3.2.  DEC HAS GRANTED
; PERMISSION FOR THIS VERSION TO BE RELEASED TO THE COMMUNITY.
;
; THIS VERSION HAS BEEN MODIFIED SO THAT IT WILL RUN CORRECTLY ON VT100
; TERMINALS IN ANSI MODE.  IT WILL REDISPLAY A SCREEN IF 'R' IS TYPED,
; AND EXIT IF 'X' IS TYPED.  IT HAS NO HELP PAGE.  WHEN IT EXITS IT ERASES
; THE SCREEN AND RETURNS IT TO ANSI MODE.  WHILE IT IS RUNNING A VT100
; TERMINAL IS IN VT52 COMPATABILITY MODE.  FOR THE 'R' COMMAND TO WORK,
; IT IS NECESSARY THAT THE SPAWN DIRECTIVE BE SYSGENED INTO YOUR SYSTEM.
;
; THIS COMMAND FILE CAN CREATE 4 FLAVORS OF RMDEMO
;
;	1.  RUNS ON A VT100
;	2.  RUNS ON A VT52
;	3.  PRINTS OUT ONE PAGE TO A LA36 TYPE TERMINAL
;	4.  PRINTS OUT ONCE AND WRITE ONCE TO A FILE LS:RMDLOG.LST
;	5.  RUNS USING A M7142 SERIAO VIDEO MODULE
;
.ASKN [1.:5.] N WHICH VERSION OF RMDEMO DO YOU WISH TO BUILD
.ASKS RSXUIC ON WHAT UIC IS RSXMC.MAC [GGG,MMM]
.IF N EQ 1 .SETS NAME "100"
.IF N EQ 2 .SETS NAME "52"
.IF N EQ 3 .SETS NAME "PRT"
.IF N EQ 4 .SETS NAME "LST"
.IF N EQ 5 .SETS NAME "VID"
;
; RMDEMO CAN BE CONVIGURED TO EITHER:
;
;      1.  Display system UPTIME
;      2.  Display system % utilization if KMS System Accounting is active
;
.ASKN [1:2]  OPT Which option would you like RMDEMO to support
.OPEN PRERMD.MAC;1
.IF N EQ 1 .DATA VT100=0
.IF N LE 2 .OR .IF N EQ 5 .DATA VT52=0
.IF N GE 3 .AND .IF N LE 4 .DATA B$$SCR=0
.IF N EQ 4 .DATA P$$RNT=0
.IF N EQ 5 .DATA V$IDEO=0
.DATA BL27=0
.IF OPT EQ 1 .DATA UPTIME=0
.IF OPT EQ 2 .DATA UTLIZ=0
.CLOSE
MAC RMD'NAME'.OBJ;1=LB:[1,1]EXEMC/ML,'RSXUIC'RSXMC/PA:1,SY:'<UIC>'PRERMD,RMDEMO
PIP PRERMD.MAC;1/DE
.OPEN RMD'NAME'BLD.CMD;1
.ENABLE DATA
RMD'NAME'.TSK;1/PR'MAP'/CP/-FP=RMD'NAME'
DM1:[1,24]MCR/LB:LKLST
LB:[1,1]EXELIB/LB
LB:[1,54]RSX11M.STB/SS
/
PAR=GEN
PRI=225
TASK=RMD'NAME'
EXTTSK=512
STACK=64
GBLDEF=F$LNUM:0
ASG=TI:1,TI:2
UNITS=2
//
.DISABLE DATA
.CLOSE
TKB @RMD'NAME'BLD
.IF N NE 5 .GOTO XIT
;
;     In order to use RMDVID with the M7412 Serial Video Module,
; you will need to do the folowing.  Assume that the video module is
; attached to terminal TTX:.
;
;		SET /SLAVE=TTX
;		INS RMDVID
;		REA RMDVID 1 TTX:
;		REA RMDVID 2 TTX:
;		RUN RMDVID
;
.XIT:
