.ENABLE SUBSTITUTION
.; DECUS C AS assembler V02.13 build command file for native RSX-11M.
.; By
.;	Bob Denny
.;	17-Oct-82
.;
.; Modified for use under RSX-11M-Plus V4.0 
.; by Volker Huck, 24-Aug-1988
.;
;
; MMAKAS.CMD
;
; Make the AS assembler, RSX-style.
;
.SETS SYSTYP "RSX-11M"
.IF <SYTYP> EQ "RSX-11M" .GOTO SYSOK
.IF <SYTYP> EQ "RSX-11M-PLUS" .GOTO SYSOK
.IF <SYTYP> EQ "MICRO-RSX" .GOTO SYSOK
;
;	You may not use SYSTEM '<SYTYP>' to build DECUS-C assembler for
;	native RSX. If you want to build DECUS-C assembler AS under
;	VAX-11 RSX, use VMAKAS.COM instead.
;
.EXIT -1
;
.SYSOK:
.SETS TPR ""
.;.ASK V32 Are you running on RSX-11M V3.2
.;.IFT V32 .SETS TPR "BIG"
.IF <VERSN> = "3.2" .SETS TPR "BIG"
.SETS MCR ""
.IF <CLI> EQ "MCR" .GOTO 90
.IF <CLI> EQ "DCL" .SETS MCR "MCR "
.IF <CLI> EQ "DCL" .GOTO 90
;
; This command file must be run under MCR or DCL.  Since "AT" will give
; confusing restart instructions (will be for '<CLI>'), MMAKAS will
; now exit.  Type "@MMAKAS" when you have changed CLI's to MCR.
;
.EXIT -1
.90:
; Note that the Library OB:XCOMLB.OLB must have already been built
; by executing the compiler build procedure. RSX.MAC must have already
; been edited for your system, per the compiler build procedure.
;
.;.ASK OK Have you completed the compiler build yet?
.;.IFF OK .EXIT
.TESTFILE OB:XCOMLB.OLB
.IF <FILERR> EQ 346 .EXIT -1
.;
.; You must override the assignments in this file if you want the following
.; logical devices to be assigned to other than SY:
.;
.;	SR:	Source and command files must be on this device.
.;	LS:	Listings go to this device.
.;	OB:	Objects go to this device.
.;	MP:	Maps go to this device.
.;	OU:	Task images go to this device.
.;
.TRANSLATE SR
.IF <EXSTRI> EQ "" 'mcr'ASN SY:=SR:
.TRANSLATE LS
.IF <EXSTRI> EQ "" 'mcr'ASN NL:=LS:
.TRANSLATE OB
.IF <EXSTRI> EQ "" 'mcr'ASN SY:=OB:
.TRANSLATE MP
.IF <EXSTRI> EQ "" 'mcr'ASN SY:=MP:
.TRANSLATE OU
.IF <EXSTRI> EQ "" 'mcr'ASN SY:=OU:
.;
.;.ASK OK Are the above assignments OK?
.;.IFT OK .GOTO 100
.;;
.;; We will now pause so that you may change assignment(s)...
.;.PAUSE
.;.100:
;
; You may alter the default p-section maximum and/or branch table
; size. The default values represent a good compromise between task
; size and capability. They allow for 10 p-sections and 250 branch
; table entries. To choose the default, answer with a carriage return.
;
.;.ASKN [::10.] PSIZE Maximum number of p-sections
.;.ASKN [::250.] FSIZE Branch table size
.SETN	PSIZE	10.
.SETN	FSIZE	250.
.OPEN SR:ASMPAR.MAC
.ENABLE DATA
;    This assembly created from MMAKAS.CMD.
;
;    *** SET ASSEMBLER TABLE SIZES ***
;	'<DATE>'	'<TIME>'
;    *********************************
;
	PSIZE = 'PSIZE'.
	FSIZE = 'FSIZE'.
;
;
.DISABLE DATA
.CLOSE
;
;
.SETS PAR "GEN"
.;.ASK UMAP Will the compiler be running on an unmapped system
.;.IFF UMAP .GOTO 120
.SETF UMAP
.;
.;.ASKS PAR Enter partition parameters TKB style [name:base:size]
.120:
.;.ASK FCSRES Task build with FCSRES shared library
;
;Take a break.
;
'mcr'TIM
; Assemble the assembler
;
.IFNINS ...MAC 'mcr'INS $'TPR'MAC
'mcr'MAC OB:AS0,LS:AS0/-SP=SR:RSX,SR:AS0
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'MAC OB:AS1,LS:AS1/-SP=SR:RSX,SR:AS1
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'MAC OB:AS2,LS:AS2/-SP=SR:RSX,SR:AS2
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'MAC OB:AS3A,LS:AS3A/-SP=SR:RSX,SR:AS3A
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'MAC OB:AS3B,LS:AS3B/-SP=SR:RSX,SR:AS3B
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'MAC OB:AS3C,LS:AS3C/-SP=SR:RSX,SR:AS3C
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'MAC OB:AS3D,LS:AS3D/-SP=SR:RSX,SR:AS3D
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'MAC OB:AS3E,LS:AS3E/-SP=SR:RSX,SR:AS3E
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'MAC OB:AS3F,LS:AS3F/-SP=SR:RSX,SR:ASMPAR,SR:AS3F
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'MAC OB:AS3G,LS:AS3G/-SP=SR:RSX,SR:AS3G
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'MAC OB:AS3H,LS:AS3H/-SP=SR:RSX,SR:AS3H
.IF <EXSTAT> NE 1 .GOTO 700
;
TIM
;               
.;
.; Test for different versions of FCS Library and set variables
.; FCSRES and FCSFSL to correct value.
.;
.;
.; Volker Huck
.; 25-Aug-1988
.;
 	.SETF fcsfsl				! Assume FSL false
 	.SETF fcsres				! Assume RES false

.TSTFSL:
 	.TESTFILE lb:[1,1]fcsfsl.tsk		! Look for the FSL Library
	.IF <FILERR> NE 1 .GOTO tstres		! Not present, can''t use it
	.TESTFILE lb:[1,1]fcsfsl.stb		! Look for the symbol table
	.IF <FILERR> NE 1 .GOTO tstres		! Not present, can''t use it
	.SETT fcsfsl				! Now we have all needed for
.;						! supervisor mode FCS support
;
; Task will be linked to Supervisor Mode FCS Library
;
	.GOTO DOIT

.TSTRES:
	.TESTFILE lb:[1,1]fcsres.tsk		! Look for the RES Library
	.IF <FILERR> NE 1 .GOTO nores		! Not present, can''t use it
	.TESTFILE lb:[1,1]fcsres.stb		! Look for the symbol table
	.IF <FILERR> NE 1 .GOTO nores		! Not present, can''t use it
	.SETT fcsres				! Now we have all needed for
.;						! resident FCS support
;
; Task will be linked to resident FCS-Library
;
	.GOTO DOIT

.NORES:
;
; Task will be linked to normal FCS-Library
;
.DOIT:
;
; Task Build the assembler
;
.OPEN SR:MASBLD.TKB
.IFF UMAP .DATA OU:AS/CP/MM,MP:AS/NOSP=SR:XASBLD/MP
.IFT UMAP .DATA OU:AS/CP/-MM,MP:AS/NOSP=SR:XASBLD/MP
.ENABLE DATA
ASG=TI:1,SY:2:3:4
UNITS=4
TASK=...XAS
.DISABLE DATA
.IFT FCSFSL .DATA SUPLIB=FCSFSL:SV
.IFT FCSRES .DATA LIBR=FCSRES:RO
.IFT UMAP .DATA PAR='PAR'
.CLOSE
;
;
.IFNINS ...TKB 'mcr'INS $'TPR'TKB
'mcr'TKB @SR:MASBLD.TKB
.IF <EXSTAT> NE 1 .GOTO 700
'mcr'PIP SR:MASBLD.TKB;*/DE,ASMPAR.MAC;*
'MCR'PIP OB:*.OBJ;*/DE/NM,*.OB;*
;
;
TIM
; Assembler build complete
;
;
.EXIT <SUCCES>
.700:
; There has been an error. Please re-read the AS manual. This assembler has
; been successfully built on an unmapped 11/05 and a mapped 11/34.
;
.EXIT -1
