; ; Command file to build the user control routines. ; This command file can either be called from DLV1.CMD with three ; parameters or else several questions will be asked concerning ; the user environment. ; .enable substitution .disable lowercase .gosub setcli .; .if P1 ne "" .goto finctl .start: ; ; To build the correct set of control routines for user programs ; we require certain information concerning the environment in ; which these programs will run. ; .ask MPLUS Will the programs be running in separate I- & D- spaces .ift MPLUS .sets P2 ",RTLC12," .iff MPLUS .sets P2 "," ; .ask TRAP Will the programs use the Trap handler interface .ift TRAP .sets P3 "RTLC13," .iff TRAP .sets P3 "" ; .sets P4 "" .ask REALS Will any of the programs ever use REAL variables .iff REALS .goto noreal ; .ask FPP Will the programs run on systems with FPP co-processors .iff FPP .setf OLDFPP .ift FPP ; .ift FPP .ask OLDFPP Will the programs ever use the old FPP control routines .ift OLDFPP .sets P4 "RTLC14," .ift FPP .setf FIS .iff FPP ; .iff FPP .ask FIS Will the programs run on systems with the FIS .ift FIS ; It is assumed that you will always use the compiler FP (FIS) option .; .noreal: .ift MPLUS .sett EIS .ift MPLUS .sett EISW .ift MPLUS .goto setctr .; .ifndf FPP .goto nofpp .ift FPP .sett EIS .ift FPP .sett EISW .ift FPP ; Systems that have FPP will also have EIS .ift FPP .goto setctr .; .nofpp: ; .ask EIS Will the programs run on systems with the EIS .ift EIS .ask EISW Will you always use the EI switch of the compiler .; .setctr: .ift REALS .goto real .; No reals used .; EIS will not be used .iff EIS .sets P1 "1" .iff EIS .goto finctl .; EIS will be used .iff EISW .sets P1 "2" .ift EISW .sets P1 "3" .goto finctl .; Reals used .real: .; EIS will not be used .iff EIS .sets P1 "4" .iff EIS .and .ift FIS .sets P1 "7" .iff EIS .goto finctl .; EIS will be used .; FPP is available => EI switch used .ift FPP .sets P1 "11" .ift FPP .goto finctl .; FPP is not available - .; FIS available => FP option used .ift FIS .and .ift EISW .sets P1 "9" .ift FIS .and .iff EISW .sets P1 "8" .; FIS not available => FP option not used .; i.e. should always use FP option if FIS available .iff FIS .and .ift EISW .sets P1 "6" .iff FIS .and .iff EISW .sets P1 "5" .finctl: .; .if P1 eq "1" .sets P1 "T1" .if P1 eq "2" .sets P1 "T2" .if P1 eq "3" .sets P1 "T3" .if P1 eq "4" .sets P1 "T4" .if P1 eq "5" .sets P1 "T5" .if P1 eq "6" .sets P1 "T6" .if P1 eq "7" .sets P1 "T7" .if P1 eq "8" .sets P1 "T8" .if P1 eq "9" .sets P1 "T9" .; lbr rtlctl.mac=sourcersx.ulb/ex:rtlctl lbr rtlc'P1'.mac=sourcersx.ulb/ex:rtlc'P1' .if P2 ne "," lbr rtlc12.mac=sourcersx.ulb/ex:rtlc12 .if P3 ne "" lbr rtlc13.mac=sourcersx.ulb/ex:rtlc13 .if P4 ne "" lbr rtlc14.mac=sourcersx.ulb/ex:rtlc14 .; .gosub mac'' .; 'rstcli' .exit 'exst' .; .macmcr: mac rtlctl=rtlc'P1''P2''P3''P4'rtlctl .setn exst .if exst ne 1 .return delete rtlc'p1'.mac;1 delete rtlctl.mac;1 .if P2 ne "," delete rtlc12.mac;1 .if P3 ne "" delete rtlc13.mac;1 .if P4 ne "" delete rtlc14.mac;1 .return .; .macdcl: .if P2 eq "," .sets P2 "+" .if P2 ne "+" .sets P2 "+RTLC12+" .if P3 ne "" .sets P3 "RTLC13+" .if P4 ne "" .sets P4 "RTLC14+" mac rtlc'P1''P2''P3''P4'rtlctl/obj=rtlctl .setn exst .if exst ne 1 .return pip rtlc'p1'.mac;0/de pip rtlctl.mac;0/de .if P2 ne "," pip rtlc12.mac;0/de .if P3 ne "" pip rtlc13.mac;0/de .if P4 ne "" pip rtlc14.mac;0/de .return .; .; Subroutine to determine current CLI; set it to DCL if possible .; .setcli: .sett isdcl .sets rstcli ";" .sets oldcli "''" .if oldcli eq "DCL" .return .if oldcli ne "MCR" .goto lsc1 .ifnins dcl .setf isdcl .iff isdcl .return .sets rstcli "mcr set /mcr=ti:" .lsc1: dcl set /dcl .if rstcli eq ";" .sets rstcli "set term/cli:"+oldcli .return