	.DISABLE LOWERCASE
	.ENABLE SUBSTITUTION
;
;	Generate/Modify the RMS/Pascal interface library
;
	.IFNINS LBR .SETF LBRINS
	.IFINS LBR .SETT LBRINS
	.IFF LBRINS INS $LBR
	.SETF PASERR
	.SETT CLO
	.SETT CON
	.SETT CRE
	.SETT DEL
	.SETT DIS
	.SETT FIN
	.SETT FLU
	.SETT FRE
	.SETT GET
	.SETT INI
	.SETT OPE
	.SETT PUT
	.SETT REA
	.SETT REW
	.SETT UPD
	.SETT WRI
	.SETT PCLO
	.SETT PCRE
	.SETT PDEL
	.SETT PFRE
	.SETT PKEY
	.SETT POPE
	.SETT PRET
	.SETT PSTO
	.ASK LST Pascal listing(s)
	.ASK MAC Macro listing(s)
	.ASK ALL Regenerate all RMS Modules
	.IFT ALL .GOTO REGEN
	.ASK PRM Regenerate all PRM Modules
	.IFT PRM .GOTO GENPRM
	.SETS TEMP "EXIT"
.MODNAM:.ASKS [4:7] MOD Module name or EXIT
	.IF MOD = TEMP .GOTO DONE
	.GOSUB COMPIL
	.GOTO MODNAM
.COMPIL:
	.IFNINS LBR .SETF LBRINS
	.IFINS LBR .SETT LBRINS
	.IFNINS SLP .SETF SLPINS
	.IFINS SLP .SETT SLPINS
	.IFF SLPINS INS $SLP
	SLP @'MOD'.SRC
	.IFF SLPINS REM SLP
	.IFT LST .SETS L ",'MOD'"
	.IFF LST .SETS L ""
	.IFT MAC .SETS SW "/S"
	.IFF MAC .SETS SW ""
	.SETF PASERR
	PAS 'MOD''L'='MOD''SW'
	.IF <EXSTAT> > 1 .SETT PASERR
	.IFT PASERR .GOTO ENDB
	.XQT PIP 'MOD'.PAS;*/DE
	.IFT LST .XQT PRI 'MOD'.LST
	.IFT MAC .SETS L ",'MOD'/-sp"
	.IFF MAC .SETS L ""
	MAC 'MOD''L'=[300,45]RMSMAC/ML,SY:'<UIC>''MOD'
	.WAIT PIP
	PIP 'MOD'.MAC;*/DE
	.IFF LBRINS INS $LBR
	LBR EL:'<UIC>'RMSPAS/RP='MOD'
	.IFF LBRINS REM LBR
	PIP 'MOD'.OBJ;*/DE
	.GOTO GOBAC
.ENDB:	.ASK XXX Pascal error, c/r to continue.
.GOBAC:	.RETURN

.REGEN:
	PIP EL:RMSPAS.OLB;0/DE
	LBR EL:RMSPAS.OLB/CR
	.IFF LBRINS REM LBR
	.IFT CLO .SETS MOD "RMSCLO"
	.IFT CLO .GOSUB COMPIL
	.IFT CON .SETS MOD "RMSCON"
	.IFT CON .GOSUB COMPIL
	.IFT CRE .SETS MOD "RMSCRE"
	.IFT CRE .GOSUB COMPIL
	.IFT DEL .SETS MOD "RMSDEL"
	.IFT DEL .GOSUB COMPIL
	.IFT DIS .SETS MOD "RMSDIS"
	.IFT DIS .GOSUB COMPIL
	.IFT FIN .SETS MOD "RMSFIN"
	.IFT FIN .GOSUB COMPIL
	.IFT FLU .SETS MOD "RMSFLU"
	.IFT FLU .GOSUB COMPIL
	.IFT FRE .SETS MOD "RMSFRE"
	.IFT FRE .GOSUB COMPIL
	.IFT GET .SETS MOD "RMSGET"
	.IFT GET .GOSUB COMPIL
	.IFT INI .SETS MOD "RMSINI"
	.IFT INI .GOSUB COMPIL
	.IFT OPE .SETS MOD "RMSOPE"
	.IFT OPE .GOSUB COMPIL
	.IFT PUT .SETS MOD "RMSPUT"
	.IFT PUT .GOSUB COMPIL
	.IFT REA .SETS MOD "RMSREA"
	.IFT REA .GOSUB COMPIL
	.IFT REW .SETS MOD "RMSREW"
	.IFT REW .GOSUB COMPIL
	.IFT UPD .SETS MOD "RMSUPD"
	.IFT UPD .GOSUB COMPIL
	.IFT WRI .SETS MOD "RMSWRI"
	.IFT WRI .GOSUB COMPIL
	.GOTO DONE
.GENPRM:
	.IFT PCLO .SETS MOD "PRMCLO"
	.IFT PCLO .GOSUB COMPIL
	.IFT PCRE .SETS MOD "PRMCRE"
	.IFT PCRE .GOSUB COMPIL
	.IFT PDEL .SETS MOD "PRMDEL"
	.IFT PDEL .GOSUB COMPIL
	.IFT PFRE .SETS MOD "PRMFRE"
	.IFT PFRE .GOSUB COMPIL
	.IFT PKEY .SETS MOD "PRMKEY"
	.IFT PKEY .GOSUB COMPIL
	.IFT POPE .SETS MOD "PRMOPE"
	.IFT POPE .GOSUB COMPIL
	.IFT PRET .SETS MOD "PRMRET"
	.IFT PRET .GOSUB COMPIL
	.IFT PSTO .SETS MOD "PRMSTO"
	.IFT PSTO .GOSUB COMPIL
.DONE:
	.IFF LBRINS INS $LBR
	.IFF PASERR LBR EL:RMSPAS/FU
	.IFF LBRINS REM LBR
