.ENABLE SUBSTITUTION
.DISABLE LOWERCASE
.SETF ALL
.IF P1 <> "HELP" .IF P1 <> "?" .GOTO START
; Run as @PPP {<file list>} {<command>}
; Where:
; <command> blank	causes task to be build on completion
; <command> /		causes no task build
; <command> -		repromts for a new list of files
; <command> *		compresses library
; and
; <file list> blank	prompts for list/<command>
; <file list> ALL	recompiles all modules and builds a new library
;	Append /LI to filename or ALL to assemble and list on printer.
;	Append /LO to list only
;
.GOTO MORE
.DOALL0: .SETS P1 P0
.START: .TESTFILE TK:[0,0]INDEXF.SYS
.IF <FILERR> = 1 .GOTO TESTMP
.ASKS DISK Task device (ddu:)
ASN 'DISK'=TK:
.GOTO START
.TESTMP: .TESTFILE MP:[0,0]INDEXF.SYS
.IF <FILERR> = 1 .GOTO MPOK
.ASKS DISK Map device (ddu:)
ASN 'DISK'=MP:
.GOTO TESTMP
.MPOK: .IF P1 = "ALL" .GOTO DOALL
.IF P1 = "ALL/LI" .GOTO DOALL
.IF P1 = "ALL/LO" .GOTO DOALLO
.GET: .IF P1 <> "" .GOTO GOT
.MORE:
.ASKS P0 Modules
.IF P0 = "" .GOTO BUILD
.IF P0 = "ALL" .GOTO DOALL0
.IF P0 = "ALL/LI" .GOTO DOALL0
.IF P0 = "ALL/LO" .GOTO DOALL0
.SETN N 1.
.CLEAR:
.SETS P'N' ""
.INC N
.IF N <> 10. .GOTO CLEAR
.PARSE P0 "          " P1 P2 P3 P4 P5 P6 P7 P8 P9
.GOT: .SETN N 1.
.LOOP:
.IF P'N' = "" .GOTO BUILD
.SETS P1 P'N'
.IF P1 = "-" .GOTO MORE
.IF P1 = "/" .EXIT
.IF P1 = "*" .GOTO NEWLIB
.GOSUB ASSEM
.INC N
.IF N = 10. .GOTO MORE
.GOTO LOOP
.DOALL: LBR PPP/CR:5:256.:128.:OBJ
.DOALLO: .SETT ALL
.GOSUB ASSEM
LBR PPP,LP/LI/LE/FU
.GOTO BUILD
.NEWLIB: LBR PPP/CO:5:256.:128.=PPP
.IF <EXSTAT> <> 1 .GOTO BUILD
PIP PPP.OLB/PU
.BUILD: PIP TK:PPP.TSK;*/DE/NM,MP:PPP.MAP;*,PPP.STB;*
.IFINS PPP0 QUE PP:/UNSPOOL
.IFINS PPP0 REM PPP0
TKB @PPPBLD
.IF <EXSTAT> <> 1 .GOTO FINISH
.;SET /HOLD=TI:
.;PIP TI:=MP:PPP.MAP
.;SET /NOHOLD=TI:
.SETS TINO <FILSPC>[5:6]
INS TK:PPP/TASK=PPP0
.TESTFILE TI:
REA PPP0 2 '<FILSPC>'
.;REA PPP0 3 '<FILSPC>'
.;REA PPP0 4 '<FILSPC>'
.;REA PPP0 5 '<FILSPC>'
QUEUE PP:/SPOOL/FLAG:1
.;.XQT RUN PPP0
.FINISH: .ENABLE QUIET
.EXIT
.;
.; Search for module matching MODULE to find which command line to use.
.; Unless ALL is true, exit once a match is found.
.;
.ASSEM:
.PARSE P1 "/" P1 LIST
.SETS OUT "PPP"
.IF LIST = "LO" .SETS OUT ""
.IF LIST <> "" .SETS LIST ",LP/SP"
.SETF DONE
.SETS PREFIX ""
.IF P1 = "PPP" .SETS P1 ""
.SETS MODULE ""
.GOSUB ASM
.IFT DONE .RETURN
.SETS MODULE "ASCII"
.GOSUB ASM
.IFT DONE .RETURN
.SETS MODULE "BINARY"
.GOSUB ASM
.IFT DONE .RETURN
.SETS MODULE "CARIAG"
.GOSUB ASM
.SETS MODULE "CONTIN"
.GOSUB ASM
.IFT DONE .RETURN
.SETS MODULE "DATA"
.GOSUB ASM1
.IFT DONE .RETURN
.SETS MODULE "DUMQMG"
.GOSUB CLD
.IFT DONE .RETURN
.SETS MODULE "ENDJOB"
.GOSUB ASM1
.IFT DONE .RETURN
.SETS MODULE "ERROR"
.GOSUB ASM2
.IFT DONE .RETURN
.SETS MODULE "MURRAY"
.GOSUB ASM
.IFT DONE .RETURN
.SETS MODULE "PROCES"
.GOSUB ASM1
.IFT DONE .RETURN
.SETS MODULE "PUNFLG"
.GOSUB ASM1
.IFT DONE .RETURN
.SETS MODULE "READAC"
.GOSUB ASM
.IFT DONE .RETURN
.SETS MODULE "SETDEF"
.GOSUB ASM
.IFT DONE .RETURN
.SETS MODULE "SETFLG"
.GOSUB ASM
.IFT DONE .RETURN
.SETS MODULE "START"
.GOSUB ASM1
.IFT DONE .RETURN
.SETS MODULE "STJOB"
.GOSUB ASM1
.IFT DONE .RETURN
.SETS MODULE "UPCSUM"
.GOSUB ASM
.IFT DONE .RETURN
.IFT ALL .RETURN
; PPP -- MODULE 'P1' NOT KNOWN
.RETURN
.; Assemble with RUNMAC
.ASM1:
.SETS PREFIX "LB:[1,1]RUNMAC/ML,SY:'<UIC>'"
.GOTO ASM
.; Assemble with RUNMAC and EXEMC
.ASM2:
.SETS PREFIX "LB:[1,1]RUNMAC/ML,EXEMC/ML,SY:'<UIC>'"
.; Assemble with set PREFIX (default no prefix files).
.ASM:
.IFF ALL .IF P1 <> MODULE .GOTO EXASM
.IF OUT <> "" .SETS OUT "PPP"+MODULE
MAC 'OUT''LIST'='PREFIX'PPP'MODULE'
.IF <EXSTAT> = 1 .GOTO ASMOK
.ASK ED Edit
.IFF ED .GOTO EXASM
EDI PPP'MODULE'.MAC
.GOTO ASM
.CLD:
.; Build dummy queue manager
.IFF ALL .IF P1 <> MODULE .RETURN
.IF OUT <> "" .SETS OUT MODULE
F4P 'OUT''LIST'='MODULE'
.IF <EXSTAT> = 1 .GOTO F4POK
.ASK ED Edit
.IFF ED .RETURN
EDI DUMQMG.FTN
.GOTO CLD
.F4POK:
PIP DUMQMG.FTN/TR
PIP DUMQMG.OBJ/PU
REM DUMQMG
PIP DUMQMG.TSK;*/DE/NM
FTB DUMQMG=DUMQMG
.IF <EXSTAT> = 1 INS DUMQMG
.IFF ALL .SETT DONE
.RETURN
.ASMOK:
.SETS PREFIX ""
.IFF ALL .SETT DONE
.IF OUT = "" .GOTO EXASM
LBR PPP/RP='OUT'
PIP 'OUT'.OBJ;*/DE
PIP 'OUT'.MAC/TR
.EXASM:
.SETS PREFIX ""
.RETURN
