.ENABLE SUBSTITUTION
.; DECUS C compiler build command file for native RSX-11M.
.; By
.;	Bob Denny
.;	17-Sep-80
.;
.; Edit History
.; 22-Sep-80 MM		Edited for RSTS compatibility
.; 14-Feb-81 RBD	Added messages for RSX if no spawning
.; 28-May-81 RBD	Nullified above
.; 10-Feb-82 MM		Incorporated Unimation changes
.; 05-May-82 RBD	Added FPP floating fold stuff per JR Westmoreland
.; 17-Oct-82 RBD	Add check for CLI not MCR.  Add query as to V3.2
.;			so will use BIGMAC and BIGTKB.
.;
; MMAKCC.CMD
;
; Build Conroy's C compiler -- RSX-11M
.SETS TPR ""
.ASK V32 Are you running on RSX-11M V3.2
.IFT V32 .SETS TPR "BIG"
.IF <CLI> EQ "MCR" .GOTO 90
;
; This command file must be run under MCR.  Since "AT" will give
; confusing restart instructions (will be for '<CLI>'), MMAKCC will
; now exit.  Type "@MMAKCC" when you have changed CLI's to MCR.
;
.EXIT
.90:
;
; 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.
;
ASN SY:=SR:
ASN NL:=LS:
ASN SY:=OB:
ASN SY:=MP:
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:
; Normally, the compiler and assembler make use of the SXT instruction. It
; is present on most PDP-11's. If you have an 11/04, 11/05, 11/20, or
; any other processor that doesn't support SXT, you must edit the
; file RSX.MAC to comment out the following statement:
;	C$$SXT = 1
; so that the SXT is not used.
;
; Normally, the compiler presupposes that floating point constants
; and functions are, by default, double precision.  To make the default
; single precision, you must edit the file RSX.MAC to change the statement
;	C$$FLT = 0 to "C$$FLT = 1"
;
; If your system has FPP, you can enable code in the compiler which
; does extensive floating constant folding, which will result in more
; optimum machine code. To enable this feature, edit RSX.MAC to change
; the statement
;	C$$FPP = 0 to "C$$FPP = 1"
; WARNING: The resulting compiler will NOT run on a non-FPP machine!
;
.ASK OK Do you need to edit RSX.MAC
.IFF OK .GOTO 110
;
; We will now pause so that you may edit RSX.MAC...
.PAUSE
.110:
;
; NOTE: The CC/AS common modules will be saved in a file called
;         OB:XCOMLB.OLB. This file is required for making the AS
;         assembler. Do not delete it until AS is built!
;
;
.SETS PAR "GEN"
.ASK UMAP Will the compiler be running on an unmapped system
.IFF UMAP .GOTO 120
;
.ASKS PAR Enter partition parameters TKB style [name:base:size]
.120:
;
.ASK FCSRES Task build with FCSRES shared library
;
;Take a break.
;
TIM
; Assemble the Compiler
;
.IFNINS MAC INS $'TPR'MAC
MAC OB:CC0HD,LS:CC0HD/-SP=SR:RSX,SR:CC0HD
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC0RT,LS:CC0RT/-SP=SR:RSX,SR:CC0RT
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC0GB,LS:CC0GB/-SP=SR:RSX,SR:CC0GB
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC000,LS:CC000/-SP=SR:RSX,SR:CC000
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC001,LS:CC001/-SP=SR:RSX,SR:CC001
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC002,LS:CC002/-SP=SR:RSX,SR:CC002
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC1GB,LS:CC1GB/-SP=SR:RSX,SR:CC1GB
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC100,LS:CC100/-SP=SR:RSX,SR:CC100
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC101,LS:CC101/-SP=SR:RSX,SR:CC101
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC102,LS:CC102/-SP=SR:RSX,SR:CC102
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC103,LS:CC103/-SP=SR:RSX,SR:CC103
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC104,LS:CC104/-SP=SR:RSX,SR:CC104
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC105,LS:CC105/-SP=SR:RSX,SR:CC105
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC2GB,LS:CC2GB/-SP=SR:RSX,SR:CC2GB
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC200,LS:CC200/-SP=SR:RSX,SR:CC200
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC201,LS:CC201/-SP=SR:RSX,SR:CC201
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC202,LS:CC202/-SP=SR:RSX,SR:CC202
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC202A,LS:CC202A/-SP=SR:RSX,SR:CC202A
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC203,LS:CC203/-SP=SR:RSX,SR:CC203
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC204,LS:CC204/-SP=SR:RSX,SR:CC204
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC205,LS:CC205/-SP=SR:RSX,SR:CC205
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC206,LS:CC206/-SP=SR:RSX,SR:CC206
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC207,LS:CC207/-SP=SR:RSX,SR:CC207
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:CC300,LS:CC300/-SP=SR:RSX,SR:CC300
.IF <EXSTAT> NE 1 .GOTO 700
;
TIM
; Assemble the library
;
MAC OB:LITOC,LS:LITOC/-SP=SR:RSX,SR:LITOC
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LALLOC,LS:LALLOC/-SP=SR:RSX,SR:LALLOC
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LASCR5,LS:LASCR5/-SP=SR:RSX,SR:LASCR5
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LC5TOA,LS:LC5TOA/-SP=SR:RSX,SR:LC5TOA
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LDATE,LS:LDATE/-SP=SR:RSX,SR:LDATE
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LEISBX,LS:LEISBX/-SP=SR:RSX,SR:LEISBX
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LFDBTA,LS:LFDBTA/-SP=SR:RSX,SR:LFDBTA
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LFLUSH,LS:LFLUSH/-SP=SR:RSX,SR:LFLUSH
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LMEMDP,LS:LMEMDP/-SP=SR:RSX,SR:LMEMDP
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LPUTBN,LS:LPUTBN/-SP=SR:RSX,SR:LPUTBN
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LPUTXT,LS:LPUTXT/-SP=SR:RSX,SR:LPUTXT
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LRDLIN,LS:LRDLIN/-SP=SR:RSX,SR:LRDLIN
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LREWND,LS:LREWND/-SP=SR:RSX,SR:LREWND
.IF <EXSTAT> NE 1 .GOTO 700
MAC OB:LSAVRG,LS:LSAVRG/-SP=SR:RSX,SR:LSAVRG
.IF <EXSTAT> NE 1 .GOTO 700
;
TIM
; Create the library
;
.IFNINS LBR INS $LBR
LBR OB:XCOMLB/CR=OB:LITOC,LALLOC,LASCR5,LC5TOA,LDATE,LEISBX
.IF <EXSTAT> NE 1 .GOTO 700
LBR OB:XCOMLB/IN=OB:LFDBTA,LFLUSH,LMEMDP,LPUTBN
.IF <EXSTAT> NE 1 .GOTO 700
LBR OB:XCOMLB/IN=OB:LPUTXT,LRDLIN,LREWND,LSAVRG
.IF <EXSTAT> NE 1 .GOTO 700
;
;
TIM
; Task build the compiler
;
.OPEN SR:MCCBLD.TKB
.IFF UMAP .DATA OU:CC/CP,MP:CC/-SP=SR:XCCBLD/MP
.IFT UMAP .DATA OU:CC/CP/-MM,MP:CC/-SP=SR:XCCBLD/MP
.ENABLE DATA
ASG=TI:1
TASK=...XCC
STACK=512
.DISABLE DATA
.IFT FCSRES .DATA LIBR=FCSRES:RO
.IFT UMAP .DATA PAR='PAR'
;
; Patching SYSINC to change "#include <...>" location, currently C:
; Must be set to LB:[1,1] for RSX-11M. The C: is apparently nice
; for VAX/VMS compatibility mode folks. (wouldn't it be nice ...)
;
.DATA GBLPAT = CC000:SYSINC:41114:55472:26061:56461
.CLOSE
;
.IFNINS TKB INS $'TPR'TKB
;
TKB @SR:MCCBLD.TKB
.IF <EXSTAT> NE 1 .GOTO 700
PIP SR:MCCBLD.TKB;*/DE
TIM
;
; Compiler built successfully.  Delete .obj files at your convenience.
;
ASN =
;
.EXIT
.700:
;
; There has been an error. Please re-read the build instructions in
; the manual.
;
