*                 CATALOG NO. 704738 - SIGMA 5/7 BPM M:LOADR
TEMPR4   RES      1                 TEMP STORAGE FOR R4
       CSECT       1
         SYSTEM   SIG7FDP
         SYSTEM   BPM
DEBUG    EQU      0
*
*
*        LOAD  CONTROL COMMAND  PROCESSOR
*
*
*
*
         PAGE
BUMP     CNAME
         PROC
LF       LI,AF(2) AF(1)
         MSP,AF(2)  TSTACK
         PEND
PUSH     CNAME    X'9',X'B'
PULL     CNAME    X'8',X'A'
         PROC
         DO       NUM(AF)=1
LF       GEN,1,7,4,3,17 0,NAME(1),AF(1),0,TSTACK
         ELSE
         DO       AF(1)=1
LF       GEN,1,7,4,3,17  0,NAME(1),AF(2),0,TSTACK
         ELSE
         DO       AF(1)=16
LF       LCI      0
         ELSE
LF       LCI      AF(1)
         FIN
         GEN,1,7,4,3,17  0,NAME(2),AF(2),0,TSTACK
         FIN
         FIN
         PEND
         REF      TSTACK
         PAGE
R0       SET      0
R1       EQU      1
R2       EQU      2
R3       EQU      3
R4       EQU      4
R5       EQU      5
R6       EQU      6
R7       EQU      7
SR1      EQU      8
SR2      EQU      9
SR3      EQU      10
SR4      EQU      11
D1       EQU      12
D2       EQU      13
D3       EQU      14
D4       EQU      15
         PAGE
K0       EQU      0
K1       EQU      X'1'
K2       EQU      X'2'
K3       EQU      3
K4       EQU      X'4'
K5       EQU      X'5'
K6       EQU      X'6'
K7       EQU      X'7'
K8       EQU      X'8'
KA       EQU      X'A'
KB       EQU      X'B'
KE       EQU      X'E'
KF       EQU      X'F'
K10      EQU      X'10'
K11      EQU      X'11'
K12      EQU      X'12'
K13      EQU      X'13'
K15      EQU      X'15'
K20      EQU      X'20'
K35      EQU      X'35'
K40      EQU      X'40'
K64      EQU      X'64'
K55      EQU      X'55'
K75      EQU      X'75'
K80      EQU      X'80'
K85      EQU      X'85'
K100     EQU      X'100'
K200     EQU      X'200'
K800     EQU      X'800'
K1000    EQU      X'1000'
K2000    EQU      X'2000'
K4000    EQU      X'4000'
K8000    EQU      X'8000'
K40100   EQU      X'40100'
KN8      EQU      -X'8'
LOCCT    EQU      K0
LDSL     EQU      K1                BA
ROMTAD   EQU      ROMTADR
TREEAD   EQU      TREETADR
SCRDCBAD EQU      K3
LDBIAS   EQU      K4
MMLMTAD  EQU      K5
EXECCT   EQU      KA
RDWTCT   EQU      KB
FCOMAD   EQU      K6
ETSSIZE  EQU      KE
ETBLSIZE EQU      KF
TSSIZE   EQU      K10
UNSATCT  EQU      K11
READCT   EQU      K12
WRITECT  EQU      K13
LMNM     EQU      KA
EXPDTE   EQU      K11
LIBPW    EQU      K13
READAC   EQU      K15
WRITEAC  EQU      K35
UNSATAC  EQU      K55
EXECAC   EQU      K75
EXECVE   EQU      K85
ROMTNM   EQU      KN8
CHARL    EQU      X'D3'
LPAGE    EQU      X'1FF'
KBLANK   EQU      X'40'
KCOMMA   EQU      X'6B'
KLPAREN  EQU      X'4D'
KRPAREN  EQU      X'5D'
KPERIOD  EQU      X'4B'
KEOB     EQU      X'26'
KCRET    EQU      X'15'
         PAGE
         REF      JBUPVP
         REF      ACCN
         REF      ALOCCT
         REF      CSL
         REF      PLB
         REF      ROMTADR
         REF      TREETADR
         REF      COMERCD
         REF      LPERCD
         REF      RPERCD
         REF      TERMERCD
         REF      KWERCD
         REF      ALPHERCD
         REF      HEXERCD
         REF      DUPERCD
         REF      VALERCD
         REF      INSFERCD
         REF      MRWERCD
         REF      X1FF
         REF      X1FFFF
         REF      CALENDTE
         REF      CHARSCAN
         REF      CHSTSHFT
         REF      EOCCSCAN
         REF      NAMSCAN
         REF      QUOTSCAN
         REF      HEXSCAN
         REF      GETACCN
         REF      GETPASSW,SYSID,Y03
         REF      Y000F
         REF          Y4,GETDECVAL
         REF      Y1
         REF      Y2
         REF      Y8
         REF      Y08
         REF      Y0C
         REF      Y001,Y002,Y003,Y004,Y008,Y05,Y06,Y07
         REF      ROMTOVCD
         REF      GETACCN0,GETVAL4,GETLOC20
         REF      CCI50
         REF      SCCLF
         REF      NOPGERR
         REF      MXUNSTCD,MXEXECCD
         REF      RAMR,WAMR
         REF      KEYSCAN1,KEYSCAN2
         DEF      LOADR
         DEF      LDR
         PAGE
LDR      RES      0
         BOUND    8
CSYSLIB  TEXT     ':SYS    '
ZEROL    DATA     0,0
LCTABLE TEXT 'GO  ','EF  ','SYSL','UNSA','LMN ','PERM';
 ,'READ','WRIT','EXPI','SL  ','TSS ','BIAS','NOSY','MAP ','BI  ','M100';
 ,'M10 ','FCOM','STEP','ABS ','RENT','ERTA','ERST','REF ','SEG ';
 ,'BREF','CSEC','NOTC','CORE','PAGE','REL ','LIB ','RDEF','UDEF';
 ,'LDEF','MREF','EXEC','UNDE','MAPO'
LIB      TEXTC    'LIB'
NONE     TEXT     '    ','NONE','ALL '
NAME     TEXTC    'NAME'            *
VALUE    TEXTC    'VALUE'           *
SAVE     TEXT     'SAVE'
PERM     TEXT     'PERM'
BLANKL   EQU      NONE
ALL      EQU      NONE+2
         TITLE    'INTERPRET LOAD CONTROL COMMAND ROUTINE'
         PAGE
***************************************************************
*                                                             *
* ENTER WITH RETURN ADDRESS IN SR4, CURRENT CHARACTER IN SR1, *
*            CHARACTER PARAMETER LIST ADDRESS IN R7 AND JIT   *
*            ADDRESS IN R5.                                   *
*                                                             *
***************************************************************
         SPACE    2
LCNAME   EQU      %
         B        LGO
         B        LEF
         B        LSYSL
         B        LUNSA
         B        LLMN
         B        LPERM
         B        LREAD
         B        LWRIT
         B        LEXPI
         B        LSL
         B        LTSS
         B        LBIAS
         LI,R1    2
         B        LMAP
         B        LBI
         LI,R1    K40
         LI,R1    K20
         LI,R1    K80
         B        LCCFLAG1
         LI,R1    K100
         LI,R1    K1000
         B        LERTA
         B        LERST
         B        OREF
         B        OSEG
         B        LBREF
         LI,R1    K1000
         LI,R1    K2000
         LW,R1    Y2                CORELIB
         LI,R1    K4000             PAGE
         B        LREL              REL
         LI,R1    K10               LIB
         LW,R1    Y008              RDEF
         LI,R1    K1                UDEF
         LI,R1    K8000             LDEF
         B        LMREF             MREF
         B        LEXEC             EXECUTE
         B        LUNDE             UNDER
         LW,R1    Y004              MAPOMLY
KEYCNT   EQU      %-LCNAME
         PAGE
LOADR    EQU      %
         PUSH     SR4
         LI,R4    2
         BAL,SR4  SCCLF             SET LIST FLAG FOR LL DEVICE
         PUSH     3,R6
         LI,R6    1                 GET ONE DYNAMIC PAGE FOR LOCCT
         OR,R6    Y08
         CAL1,8   6
         BCS,8  LERR108           DID NOT GET THEM
         LW,R6    SR2               (R6) = ADDRESS OF LOCCT
         LI,R1    1                 GET 1 COMMON PAGE FOR ROMT
         DO       DEBUG
         OR,R1    Y08               GET DYNAMIC PAGE FOR DEBUG
         ELSE
         OR,R1    Y0C
         FIN
         CAL1,8   1
         BCS,8    LERR108           COULDNT GET ONE
         AI,SR2   K200              (SR2) = ROMT END +1
         STW,SR2  ROMTAD,R6         DEGENERATE ROMT BASE
         STW,SR2  FCOMAD,R6         TEMP STG FOR END OF ROMT +1
         PULL     2,R7
         LI,R1    EXECVE
         AW,R1    R6
         STW,R1   TREEAD,R6         EXEC. VEHICLE OR DEFAULT TREE ADR.
         LI,R1    JBUPVP            (R1)= LOAD BIAS
         SLS,R1    9
         STW,R1   LDBIAS,R6         SET LOAD BIAS = BKGROUND LOWER LIMIT
R0       SET      SR3
         LI,R0    K0                INITIALIZE LOCCT
         STW,R0   MMLMTAD,R6
         LI,R1    K40100            SET DEFAULT FOR LOAD MODULE(ABS)
         STW,R1   LOCCT,R6
         STW,R0   LIBPW,R6
         STW,R0   LIBPW+1,R6
         LI,R1    UNSATCT
         STH,R0   *R6,R1
         LI,R1    READCT
         STH,R0   *R6,R1
         LI,R1    WRITECT
         STH,R0   *R6,R1
         STW,R0   EXPDTE,R6         INIT. EXPDTE WORDS TO 0
         STW,R0   EXPDTE+1,R6
R0       SET      0
         PAGE
***************************************************************
*                                                             *
* (FCOMAD) = LAST ROMT LOC +1, (SCRDCBAD) = NEXT READ/WRITE   *
* ACCT NO. ADDR, AND (MMLMTAD) = TOTAL READ&WRITE COUNT UNTIL *
* ALL KEYWORDS HAVE BEEN OPERATED UPON.                       *
*                                                             *
***************************************************************
         CI,SR1   KBLANK            START INTERPRETATION
         BNE      LOADR4            BRANCH IF NO BLANK TO TERM TESTS
         LI,SR1   K0
         LI,SR2   KLPAREN
         BAL,SR4  CHARSCAN
         BCS,8    LOADR4            BRANCH IF NO KYWDS TO TERM TESTS
LOADR3   EQU      %
         BAL,SR4  LLEGALNM
         BCS,8    LERR100           ERROR IF EXPECTED KEYWORD NOT LEGAL
         BAL,SR4  LKEY                     ALPHANUMERIC NAME
         LI,SR2   KRPAREN           NORMAL RETURN
         BAL,SR4  CHARSCAN
         BCS,8    LERR004           ERROR IF KEYWORD OPERAND NOT
         LI,SR2   KCOMMA                   TERMINATED BY RIGHT PAREN
         BAL,SR4  CHARSCAN
         BCS,8    LOADR4            BRANCH IF NO COMMA TO TERM TESTS
         LI,SR2   KLPAREN
         BAL,SR4  CHARSCAN
         BCS,8    LERR003           ERROR IF NEXT KYWD OPERAND NOT
         B        LOADR3                   PRECEDED BY LEFT PAREN
LOADR4   EQU      %                 TERMINATOR TESTS
         CI,SR1   KPERIOD
         BE       LOADR5
         CI,SR1   KEOB
         BE       LOADR5
         CI,SR1   KCRET
         BNE      LERR005           ERROR IF LOAD CC NOT TERMINATED BY
LOADR5   EQU      %                        '.', 'EOB' OR CARRIAGE RET
         LW,R1    LOCCT,R6
         CW,R1    L(X'80000C00')    CHECK IF BI,EF,GO SPECIFIED
         BANZ     LOADR6            YES
         LI,R1    X'800'            NO, SET  BI  BY
         STS,R1   LOCCT,R6                       DEFAULT
         BAL,SR4  GETROMAD
         LI,D2    'B'
         BAL,SR4  STARNAME
LOADR6   EQU      %
         LW,R1    LOCCT,R6
         CI,R1    2                 CHECK IF 'NOSYSLIB' PARAMETER
         BANZ     LOADR7            YES
         LI,R1    UNSATCT           GET LOC OF NEXT UNSAT ENTRY
         LH,R4    *R6,R1
         SLS,R4   2
         AI,R4    UNSATAC
         AW,R4    R6
         LCI      4                 SYSLIB=:SYS
         LM,R0    CSYSLIB
         STM,R0   0,R4              & PSWD = 0
         MTW,1    8,R6              INCREMENT UNSAT COUNTER
LOADR7   EQU      %
         LW,R2    FCOMAD,R6
         SW,R2    ROMTAD,R6
         SAS,R2   17                BITS 0-14 CONTAIN ROMT SIZE
         AWM,R2   ROMTAD,R6         15-31 CONTAIN ROMT WA
*                 NO SCRATCH DCB
         LD,D3    KEYSCAN1          GET FLAGS INDICATING KEYWORDS SCAN'D
         LI,R2    KA
         CW,D4    Y008
         BANZ     LOADR11
         LI,R1    ETSSIZE
         STH,R2   *R6,R1
LOADR11  EQU      %
         CW,D4    Y004
         BANZ     LOADR12
         LI,R1    ETBLSIZE
         STH,R2   *R6,R1
LOADR12  EQU      %
         CI,D4    K800
         BANZ     LOADR13           STK SIZE SPECIFIED
         LI,R0    X'40'
         LI,R1    TSSIZE                    MEMORY SIZE)
         STH,R0   *R6,R1
LOADR13  EQU      %
         CI,D4    K80               WAS READ ACCT SPEC'D
         BANZ     LOADR14           READ ACCT # SPECD
         LI,R1    READCT
         LI,R2    READAC
         LI,R4    2
         BAL,SR4  STRDFLT           STORE DEFAULTS IN LOCCT
LOADR14  EQU      %
         CI,D4    K100              WAS WRITE ACCT SPEC'D
         BANZ     LOADR15
         LI,R1    WRITECT
         LI,R2    WRITEAC
         LI,R4    1
         BAL,SR4  STRDFLT           STORE DEFAULTS IN LOCCT
LOADR15  EQU      %
         CI,D3    K20               WAS EXECUTE ACCT SPEC'D
         BANZ     LOADR17
         LI,R1    EXECCT
         LI,R2    EXECAC
         BAL,SR4  STRDFLT           STORE DEFAULTS IN LOCCT
LOADR17  EQU      %
         CI,D4    K20
         BANZ     LOADR20           LMN SPECIFIED
         LI,D2    CHARL             GET CHST 'L'
         LI,R4    LMNM
         AW,R4    R6
         BAL,SR4  STARNAME          MONITOR ASSIGNED LM NAME, JOB ACCT #
         LI,R3    K8                       AND ZEROED PSWD INTO LOCCT
         AND,R3   LOCCT,R6
         BNEZ     LERR107           ERROR IF PERM IS SPECIFIED AND LMN
LOADR20  EQU      %
         LI,R3    1                 GET ONE MORE DYN. PAGE
         OR,R3    Y08
         PUSH     SR1               WILL BE CHNGED BY GETPGE CAL
         CAL1,8   R3
         BAL,SR4  RAMR              READ A/M RECORD
         MTW,0    SR3               CHECK FOR A/M READ ERROR
         BNEZ     LCCIND1           ERROR IF SR3 NOT = 0
         LW,R4    SR2
         AI,R4    3                 LM NAME STARTS AT WD3 IN A-M
         LW,R0    R6
         AI,R0    LMNM              GET ADDR OF LMN IN TABLE
         LCI      3
         BAL,SR4  LACCTST1+1        STORE LM NAME IN A-M IMAG
         AI,R4    3                 POSITION ADDR. IN A-M
         AI,R0    5                 POSITION ADDR. IN TABLE
         BAL,SR4  LACCTST1          STORE LM PASSWORD IN A-M IMAGE
         BAL,SR4  WAMR              WRITE A/M RECORD
         MTW,0    SR3               CHECK FOR A/M WRITE ERROR
         BNEZ     LCCIND1           ERROR IF SR3 NOT = 0
*
*   RELEASE THE PAGE HERE
         LW,R3    =X'09000001'
         CAL1,8   R3
*
         PULL     SR1               PULL BACK CURRENT CHRTR
         LW,R2    R6
         LW,R3    X1FFFF
         STS,R2   ALOCCT,R5         STORE LOAD CC TABLE ADDR IN JIT
         LI,R4    K2                SET CC OUT DEVICE FLAG IN JIT
         BAL,SR4  EOCCSCAN
         LI,R0    K3
         B        LCCIND2           BRANCH TO NORMAL END OF LOADR
         SPACE    3
TCOMMA   EQU      %                 TEST FOR CURRENT DELIMETER = COMMA
         PUSH     SR4
         LI,SR2   ','
         BAL,SR4  CHARSCAN
         BCS,8    TCOMMA1
TCOMMA2  EQU      GETACCN0
         B        TCOMMA2
TCOMMA1  EQU      GETVAL4-1
         SPACE    2
GETROMAD EQU      %                 GET LOC OF NEXT ROMT ENTRY,DECREMENT
         LW,R4    ROMTAD,R6                ROMT BASE
         LW,R2    FCOMAD,R6         (R2) = END ADR OF ROMT+1
         AI,R4    ROMTNM
         SW,R2    ROMTAD,R6
         STW,R4   ROMTAD,R6
         BEZ      BISR4
         ANLZ,R1  GETRMAD3          CHECK IF ROMT OVERFLOW
         AND,R1   X1FF              ARE WE OUT OF COMMON?
         BCS,2    GETRMAD2          NO
         PUSH,2   SR1
         LI,R1    1                 YES, GET ANOTHER PAGE
         OR,R1    Y0C
         CAL1,8   1
         BCS,8    LERR108A          DID WE GET ONE
         PULL,2   SR1               YES
GETRMAD2 EQU      %
         LW,R1    -ROMTNM,R4        MOVE ROMT DOWN BY ONE
GETRMAD3 EQU      %
         STW,R1   0,R4                            ROMT ENTRY SIZE
         AI,R4    1
         BDR,R2   GETRMAD2
BISR4    RES      0
         B        *SR4
TOOBIG   LI,SR3   ROMTOVCD
         B        CCI50             REPORT ERROR
         SPACE    2
*LLEGALNM TESTS FOR LEGAL ALPHANUMERIC NAME < OR = 8 BYTES, LLEGALPW
*TESTS FOR LEGAL CHARACTER STRING < OR = 8 BYTES IN LENGTH. ENTER WITH
*CPL ADDRESS IN R7, SR1 SET TO ZERO AND RETURN ADDR IN SR4. CC1 AFFECTED
LLEGALNM EQU      %                 TEST FOR FIELD A LEGAL ALPHANUMERIC
         PUSH     SR4                      NAME AND < OR = 8 CHARACTERS
         BAL,SR4  NAMSCAN                  IN LENGTH, SET CC1
         LI,R1    10                NAMES CAN BE 10 LONG
         B        LLEGAL1
LLEGALPW EQU      %
         PUSH     SR4
         BAL,SR4  GETPASSW          GET PASS WORD
         LI,R1    K8                PASSWORDS CAN BE 8 LONG
LLEGAL1  EQU      %
         BCS,8    LLEGAL2           ERROR, ILLEGAL CHARACTER
         CW,R1    CSL,R7
         BL       LLEGAL2           ERROR, MAX BYTE COUNT EXCEEDED
         B        TCOMMA2
LLEGAL2  EQU      TCOMMA1
         SPACE    2
*CONEBCD CONVERTS A MAXIMUM OF 8 BYTES EBCDIC TO HEXADECIMAL CODE. ENTER
*WITH BUFFER ADDRESS IN R0, BYTE COUNT IN R1 AND RETURN ADDR IN SR4.
*EXIT WITH CONVERTED NUMBER IN R3
CONEBCD  EQU      %
         LI,R3    K0
CONEBCD1 EQU      %
         LI,R4    K4
         LW,R2    *R0               WORD TO BE CONVERTED
CONEBCD2 EQU      %
         LC       R2
         BCS,3    CONEBCD3          BRANCH IF HEX NUMBER 0 THRU 9
         MTB,9    R2                MODIFY IF HEX NUMBER A THRU F
CONEBCD3 EQU      %
         SAS,R2   K4
         SCD,R2   K4
         BDR,R1   CONEBCD4          BRANCH IF BYTE COUNT NOT EQU ZERO
         B        *SR4
CONEBCD4 EQU      %
         BDR,R4   CONEBCD2          BRANCH IF WORD NOT CONVERTED
         AI,R0    K1
         B        CONEBCD1          BRANCH TO LOAD SECOND WORD
         SPACE    2
PLBNMSH  EQU      %
         LI,R2    K1                SHIFT NAME 1 BYTE
         LW,R1    CSL,R7            BYTE COUNT
         LW,R0    R7
         AI,R0    PLB               BUF ADDR
         B        CHSTSHFT          SHIFT NAME IN BUF
         SPACE    2
*STARNAME CONSTRUCTS MONITOR ASSIGNED MODULE NAME, STORES NAME, JOB ACCN
*ZEROED PASSWORD STARTING AT SPECIFIED LOCATION. ENTER WITH DESTINATION
*ADDR IN R4, JIT ADDR IN R5, RETURN ADDR IN SR4 AND APPROPRIATE
*ALPHANUMERIC CHARACTER IN LOW ORDER BYTE OF D2.
STARNAME EQU      %                 STORE MONITOR ASSIGNED NAME AND JOB
         INT,R1   SYSID,R5          CUR SYSTEM ID
         SLS,R1   8
         AW,R1    Y03
         AW,R1    D2                FILNAM SYSIDX=LM NAME
         LW,R3    BLANKL
         STW,R1   0,R4              STORE LM NAME IN ROMT
         STW,R3   1,R4              STORE BLANKS FOR WORD 2
         STW,R3   2,R4              STORE BLANKS FOR WORD 3
STARNM1  EQU      %                 JOB ACCN, ZEROED PSWD STORED AT (R4)
         LCI      2                 STORE JOB ACCT #
         LM,R1    ACCN,R5            IN ACCT # LOC
         STM,R1   3,R4
         AI,R4    3
         B        LACCTST1-2        BLANK PASSWORD
         SPACE    2
         MTW,1    *TSTACK
         PULL     R4
         AI,R4    2
LACCTST  EQU      %                 STORE BUFFER ACCN OR PASSWORD
         LCI      K2
         LM,R1    PLB,R7
LMULTST  RES      0
         STM,R1   0,R4
         B        *SR4
         SPACE    3
         LI,R0    ZEROL
         AI,R4    2
LACCTST1 LCI      2
         LM,R1    *R0
         B        LMULTST
         SPACE    2
* STRDFLT STORES DEFAULT ACCOUNT 'NONE'/'ALL' AND SETS DEFAULT COUNT=1
* IN LOCCT FOR READ,WRITE AND EXECUTE. ENTER WITH ACCOUNT INDEX IN R2,
* COUNT INDEX IN R1, LOCCT ADDR IN R6, DEFAULT INDEX IN R4.
STRDFLT  EQU      %
         LI,R0    K1
         STH,R0   *R6,R1            SET READ/WRITE/EXEC COUNT TO 1
         LW,R3    NONE,R4
         STW,R3   *R6,R2            STORE EBCDIC 'NONE' IN FIRST ACCT IF
         AI,R2    1                 WORD AND BLANKS IN SECOND WORD
         LW,R3    BLANKL
         STW,R3   *R6,R2
         B        *SR4
         SPACE    2
LKEY     EQU      %                 IDENTIFY KEYWORD
         PUSH     SR4
         LI,R1    KEYCNT
         LW,R2    PLB,R7
         CW,R2    SAVE              *
         BNE      LKEY1             *
         LW,R2    PERM              *SAVE=PERM
LKEY1    EQU      %
         CW,R2    LCTABLE-1,R1
         BNE      LKEY2             BRANCH IF KEYWORD NOT IDENTIFIED
         LI,R2    0
         LI,R3    K1
         SLD,R2   0,R1
         CW,R2    KEYSCAN1          CHECK IF KEYWORDS DUPLICATED
         BANZ     B1ER105           ERROR
         CW,R3    KEYSCAN2
         BANZ     B1ER105           ERROR IF KEYWORD DUPLICATED
         OR,R2    KEYSCAN1
         OR,R3    KEYSCAN2
         STD,R2   KEYSCAN1          SAVE KEYWORD FLAGS
         EXU      LCNAME-1,R1
         B        LCCFLAGS          SET FLAGS IN LOCCT.
LKEY2    EQU      %
         BDR,R1   LKEY1
         B        B1ER100
         SPACE    2
LGO      EQU      %                 KEYWORD 'GO' IDENTIFIED
         LI,R1    X'400'
         LI,D2    'G'
LGO1     RES      0
         STS,R1   LOCCT,R6          SET 'GO' ONLY FLAG
         BAL,SR4  GETROMAD          GET NEXT ENTRY IN ROMT
         PULL     SR4
         B        STARNAME
         SPACE    2
LEF      EQU      %                 KEYWORD 'EF' IDENTIFIED
         BAL,SR4  TCOMMA
         BCS,8    B1ER002           ERROR IF MISSING COMMA
         LW,R1    Y8
         STS,R1   LOCCT,R6          SET EF PARM FLAG
LEF1     EQU      %
         LI,SR2   KLPAREN
         BAL,SR4  CHARSCAN
         BCS,8    B1ER003           ERROR IF NAME NOT PRECEDED BY LPAREN
         BAL,SR4  LLEGALNM
         BCS,8    B1ER102           ERROR IF ILLEGAL ALPHA NAME
         BAL,SR4  PLBNMSH
         BAL,SR4  GETROMAD
         STW,R4   TEMPR4            SAVE R4
         LCI      3                 STORE EF NAME
         LM,R1    PLB,R7             IN ROMT
         STM,R1   0,R4
         LI,SR2   ','
         BAL,SR4  CHARSCAN          CHECK FOR COMMA
         BCS,8    LEF2              BRANCH IF NO EF ACCN SPECIFIED
         PUSH     R4
         BAL,SR4  GETACCN
         BCS,8    B2ER106           ERROR IF ILLEGAL ACCN
         BAL,SR4  LACCTST-3         STR EF ACCT IN ROMT
         LI,SR2   ','
         BAL,SR4  CHARSCAN          CHECK FOR COMMA
         BCS,8    LEF3              BRANCH IF NO EF PASS WORD SPECIFIED
         PUSH     R4
         BAL,SR4  LLEGALPW
         BCS,8    B2ER106           ERROR IF ILLEGAL PASSWORD
         BAL,SR4  LACCTST-2         STR EF PSWD IN ROMT
         B        LEF4
LEF2     EQU      %
         LW,R4    TEMPR4            RESTORE R4
         BAL,SR4  STARNM1           STORE JOB ACCN, ZEROED PSWD IN ROMT
         B        LEF4
LEF3     EQU      %
         BAL,SR4  LACCTST1-2        ZERO PSWD IN ROMT
LEF4     EQU      %
         LI,SR2   ')'
         BAL,SR4  CHARSCAN          CHECK FOR RIGHT PAREN
         BCS,8    B1ER004
         LI,SR2   KCOMMA
         BAL,SR4  CHARSCAN
         BCR,8    LEF1              BRANCH IF PRESENCE OF ANOTHER EF
         B        LCCFLAG1
         SPACE    2
LSYSL    EQU      %                 KEYWORD 'SYSLIB' IDENTIFIED
         BAL,SR4  TCOMMA
         BCS,8    B1ER002           ERROR IF MISSING COMMA
LSYSL1   EQU      %
         BAL,SR4  LLEGALNM
         BCS,8    B1ER102           ERROR IF ILLEGAL ALPHA NAME
         BAL,SR4  PLBNMSH
         BAL,SR4  GETROMAD
         LCI      3                 STORE SYSLIB NAME
         LM,R1    PLB,R7             IN ROMT
         STM,R1   0,R4
         LCI      4
         LM,R0    CSYSLIB           SYSLIB ACCT #
         STM,R0   3,R4              ZERO PSWD
         LI,SR2   KCOMMA
         BAL,SR4  CHARSCAN
         BCR,8    LSYSL1            BRANCH IF PRESENCE OF ANOTHER SYSLIB
         B        LCCFLAG1
         SPACE    2
LUNSA    EQU      %                 KEYWORD 'UNSAT' IDENTIFIED
         BAL,SR4  TCOMMA
         BCS,8    B1ER002           ERROR IF MISSING COMMA
LUNSA1   EQU      %
         LI,SR2   KLPAREN
         BAL,SR4  CHARSCAN
         BCS,8    B1ER003           ERROR IF ACCN NOT PRECEDED BY LPAREN
         BAL,SR4  GETACCN
         BCS,8    B1ER106           ERROR IF ILLEGAL ACCN
         LI,R1    UNSATCT           GET LOC OF NEXT UNSAT ENTRY
         LH,R4    *R6,R1
         CI,R4    K8                ERROR, IF UNSAT COUNT EXCEEDS 8
         BE       LERR006
         SLS,R4   2
         AI,R4    UNSATAC
         AW,R4    R6
         BAL,SR4  LACCTST           STORE UNSAT ACCN IN LOCCT
         LI,SR2   ','
         BAL,SR4  CHARSCAN          CHECK FOR COMMA
         BCS,8    LUNSA2
         PUSH     R4
         BAL,SR4  LLEGALPW
         BCS,8    B2ER106           ERROR IF ILLEGAL PASSWORD
         LI,SR4   LUNSA3            RETURN
         B        LACCTST-2         STR UNSAT PSWD IN LOCCT
LUNSA2   EQU      %
         BAL,SR4  LACCTST1-2        ZERO UNSAT PSWD LOC
LUNSA3   EQU      %
         LI,SR2   ')'
         BAL,SR4  CHARSCAN          CHECK FOR ')'
         BCS,8    B1ER004
         LI,R2    UNSATCT
         MTH,1    *R6,R2            INCREMENT UNSAT COUNT
         LI,SR2   KCOMMA
         BAL,SR4  CHARSCAN
         BCR,8    LUNSA1            BRANCH IF PRESENCE OF ANOTHER UNSAT
         B        LCCFLAG1
         SPACE    2
LLMN     EQU      %                 KEYWORD 'LMN' IDENTIFIED
         BAL,SR4  TCOMMA
         BCS,8    B1ER002           ERROR IF MISSING COMMA
         BAL,SR4  LLEGALNM
         BCS,8    B1ER102           ERROR IF ILLEGAL ALPHA NAME
         BAL,SR4  PLBNMSH
         LW,R4    R6                GET LMN ADDRESS
         AI,R4    LMNM
         LCI      3                 STORE LM NAME
         LM,R1    PLB,R7             IN LOCCT
         STM,R1   0,R4
         BAL,SR4  STARNM1           STORE JOB ACCN, ZEROED PSWD IN LOCCT
         LI,SR2   ','
         BAL,SR4  CHARSCAN          CHECK FOR   ,
         BCS,8    LCCFLAG1
         PUSH     R4
         BAL,SR4  LLEGALPW
         BCS,8    B2ER106           ERROR IF ILLEGAL PASSWORD
         PULL     R4
         B        LPERM2            REPLACE PASSWORD
         SPACE    2
LPERM    EQU      %                 KEYWORD 'PERM' IDENTIFIED
         LI,R1    K8
         STS,R1   LOCCT,R6          SET FLAG TO STORE LM IN USER'S FILE
         LI,SR2   ','
         BAL,SR4  CHARSCAN          CHECK FOR   ,
         BCS,8    LCCFLAG1
         LI,SR2   LIB
         BAL,SR4  QUOTSCAN          IDENTIFY KEYWORD
         BCS,8    B1ER100           ERROR IF NOT 'LIB'
         LI,R0    X'2010'           RESET ABS FLAG(RELOC. LM)
         LI,R1    X'2110'           SET LIB AND NOTCB FLAGS
         STS,R0   LOCCT,R6          SET FLAG TO STORE LM IN :USER'S LIB
         LI,SR2   ','
         BAL,SR4  CHARSCAN          CHECK FOR   ,
         BCS,8    LCCFLAG1
         BAL,SR4  LLEGALPW
         BCS,8    B1ER106           ERROR IF ILLEGAL PASSWORD
         LW,R4    R6
         AI,R4    LIBPW
LPERM2   PULL     SR4
         B        LACCTST
         SPACE    2
LREAD    EQU      %                 KEYWORD 'READ' IDENTIFIED
         LI,R2    READAC            SET REGISTER CONTENTS TO 'READ'
         LI,R3    READCT
         B        LRDWT1-1
         SPACE    1
LWRIT    EQU      %                 KEYWORD 'WRITE' IDENTIFIED
         LI,R2    WRITEAC           SET REGISTER CONTENTS TO 'WRITE'
         LI,R3    WRITECT
         STW,R2   SCRDCBAD,R6              VALUES
LRDWT1   EQU      %
         PUSH     R3
         BAL,SR4  TCOMMA
         BCS,8    B2ER002           ERROR IF MISSING COMMA
         LI,SR2   ALL
         BAL,SR4  QUOTSCAN          IDENTIFY KEYWORD
         BCS,8    LRDWT2            BRANCH IF NOT 'ALL'
         PULL     R3
         LI,R0    K1
         STH,R0   *R6,R3            SET READ/WRITE COUNT =1
         B        LRDWT3
LRDWT2   EQU      %
         BAL,SR4  GETACCN
         BCS,8    B2ER106           ERROR IF ILLEGAL ACCN
         PULL     R3
         MTH,K1   *R6,R3            INCREMENT READ/WRITE COUNT
LRDWT3   EQU      %
         LI,R0    K10
         LI,R1    RDWTCT
         CH,R0    *R6,R1
         BE       B1ER108           ERROR IF TOTAL RD-WT COUNT >15
         LW,R4    SCRDCBAD,R6
         AW,R4    R6
         BAL,SR4  LACCTST           STORE 'ALL' OR ACCN IN LOCCT
         LI,R1    RDWTCT
         MTH,K1   *R6,R1
         MTW,K2   SCRDCBAD,R6       INCREMENT READ/WRITE ACCN ADDR
         LI,SR2   ','
         BAL,SR4  CHARSCAN          CHECK FOR   ,
         BCS,8    LCCFLAG1
         PUSH     R3
         B        LRDWT2            BRANCH TO GET NEXT ACCN
         SPACE    2
LEXPI    EQU      %                 KEYWORD 'EXPIRE' IDENTIFIED
         LI,R0    EXPDTE
         AW,R0    R6
         BAL,SR4  CALENDTE
         B        LEXPI1
         B        LCCFLAG1
         SPACE    2
LSL      EQU      %                 KEYWORD 'SL' IDENTIFIED
         BAL,SR4  TCOMMA
         BCS,8    B1ER002           ERROR IF MISSING COMMA
         BAL,SR4  HEXSCAN
         BCS,8    B1ER104           ERROR IF ILLEGAL HEX NO.
         LW,R1    CSL,R7
         CI,R1    K1
         BNE      B1ER106           ERROR IF BYTE COUNT > 1
         LI,R0    PLB
         AW,R0    R7
         BAL,SR4  CONEBCD           CONVERT FROM EBCDIC TO HEX
         LW,R2    R3
         SLS,R2   16
         LW,R3    Y000F
         STS,R2   LOCCT,R6          STORE SEVERITY LEVEL IN LOCCT
         B        LCCFLAG1
         SPACE    2
LBIAS    EQU      %                 KEYWORD 'BIAS' IDENTIFIED
         BAL,SR4  TCOMMA
         BCS,8    B1ER002           ERROR IF MISSING COMMA
         BAL,SR4  HEXSCAN
         BCS,8    B1ER104           ERROR IF ILLEGAL HEX NO.
         LW,R1    CSL,R7
         CI,R1    K5
         BG       B1ER106           ERROR IF BYTE COUNT >5
         LI,R0    PLB
         AW,R0    R7
         BAL,SR4  CONEBCD           CONVERT FROM EBCDIC TO HEX
         LI,R1    LPAGE
         LS,R1    R3
         BEZ      LBIAS1            BRANCH IF BIAS A MULTIPLE OF X'200'
         LI,R1    K100
         STS,R1   LOCCT,R6          SET ABSOLUTE LOAD FLAG
LBIAS1   EQU      %
         LW,R2    R3                STORE NEW LOAD
         LI,R3    X'1FFFF'          BIAS INTO LOCCT
         STS,R2   LDBIAS,R6
         B        LCCFLAG1
         SPACE    2
LTSS     EQU      %                 KEYWORD 'TSS' IDENTIFIED
         LI,R1    TSSIZE
         B        LSIZE
         SPACE    2
LERTA    EQU      %
         LI,R1    ETBLSIZE
         B        LSIZE
         SPACE    2
LERST    EQU      %
         LI,R1    ETSSIZE
LSIZE    EQU      %
         PUSH     R1
         BAL,SR4  TCOMMA
         BCS,8    B2ER002
         BAL,SR4  HEXSCAN
         BCS,8    B2ER104
         LW,R1    CSL,R7
         CI,R1    K4
         BG       B2ER106
         LI,R0    PLB
         AW,R0    R7
         BAL,SR4  CONEBCD           CONVERT FROM EBCDIC TO HEX
         CI,R3    X'7FFF'
         BG       B2ER104
         PULL     R1
         STH,R3   *R6,R1            STORE TEMP STACK SIZE IN LOCCT
         B        LCCFLAG1
         SPACE    2
LMAP     EQU      %                 KEYWORD 'MAP' IDENTIFIED
         LI,SR2   ','               *IS OPTION (MAP,XXXX,XXXX)
         BAL,SR4  CHARSCAN
         BCS,8    LMAP15            *NO
         LI,SR2   VALUE             *IS XXXX= 'VALUE'
         BAL,SR4  QUOTSCAN
         BCS,8    LMAP5             *NO, CHECK FOR 'NAME'
         LW,R1    Y002              *SET BIT 10 IN LOCCT
         STS,R1   LOCCT,R6
         B        LMAP
LMAP5    EQU      %
         LI,SR2   NAME              *IS XXXX= 'NAME'
         BAL,SR4  QUOTSCAN
         BCS,8    B1ER100           *NO, ILLEGAL OPTION
         LW,R1    Y001              *SET BIT 11 IN LOCCT
         STS,R1   LOCCT,R6
         B        LMAP
LMAP15   EQU      %
         LW,R1    Y003              *SET DEFAULT FOR MAP (NAME)
         CW,R1    LOCCT,R6          *IF 'VALUE' OR 'NAME' NOT SPEC.
         BANZ     LCCFLAG1
         LW,R1    Y001
         STS,R1   LOCCT,R6
         B        LCCFLAG1
         SPACE    2
LBI      EQU      %                 KEYWORD 'BI' IDENTIFIED
         LI,R1    K800
         LI,D2    'B'
         B        LGO1
         SPACE    2
LREL     EQU      %                 KEYWORD 'REL' IDENTIFIED
         LI,R0    0
         LI,R1    K100              RESET BIT 23
         STS,R0   LOCCT,R6
         B        LCCFLAG1
         SPACE    2
OSEG     EQU      %
         CW,R3    Y05               LOOK FOR REF OR BREF
         BANZ     B1ER100           ERROR.
         CI,R2    K10               LOOK FOR MREF
         BANZ     B1ER100           ERROR
         B        LCCFLAG1
         SPACE    2
LMREF    EQU      %                 'MREF' KEYWORD IDENTIFIED
         LI,D3    0
         CW,R3    Y07               LOOK FOR BREF,SEG OR REF
         BANZ     B1ER100           ERROR.
         CI,SR1   ','               IS THERE A VALUE FOR MREF
         BE       LBREF1A           YES
         LI,R2    K64               NO, SET DEFAULT
         B        LBREF1C
         SPACE    2
         SPACE    2
OREF     EQU      %                 KEYWORD 'REF' IDENTIFIED
         LI,D3    K4
         CW,R3    Y06               LOOK FOR BREF OR SEG
         B        LBREF1
         SPACE    2
LBREF    EQU      %                 'BREF' KEYWORD SPECIFIED
         LW,D3    Y4
         CW,R3    Y03               LOOK FOR REF OR SEG
LBREF1   RES      0
         BANZ     B1ER100           ERROR.
         CI,R2    K10               LOOK FOR MREF
         BANZ     B1ER100           ERROR.
         CI,SR1   ','               IF NXT CHAR IS NOT A COMMA
         BNE      LBREF2
LBREF1A  EQU      %
         LI,R1    X'7FFF'           MAX NUM VALUE
         BAL,SR4  GETDECVAL         GET NUM SIZE
         BCS,8    LCCIND0           FOOPA
LBREF1C  EQU      %
         SLS,R2   17                SAVE NEXT
          OR,R2     LDBIAS,R6      ADD IN LOAD BIAS
          STW,R2    LDBIAS,R6      AND STORE
LBREF2   LW,R1    D3
         B        LCCFLAGS
         SPACE    2
LEXEC    EQU      %
         BAL,SR4  TCOMMA
         BCS,8    B1ER002           ERROR IF COMMA MISSING
LEXEC5   EQU      %
         BAL,SR4  GETACCN
         BCS,8    B1ER106           ERROR IF ILLEGAL ACCN
         LI,R1    EXECCT
         LH,R2    *R6,R1
         CI,R2    K7
         BG       B1ER001           ERROR IF TOTAL EXEC. COUNT >8
         MTH,1    *R6,R1
         LI,R4    EXECAC
         AW,R4    R6
         SLS,R2   1
         AW,R4    R2
         BAL,SR4  LACCTST           STORE 'ALL' OR ACCN IN LOCCT
         LI,SR2   ','
         BAL,SR4  CHARSCAN          CHECK FOR ,
         BCS,8    LCCFLAG1
         B        LEXEC5            GET NEXT ACCN
         SPACE    2
LUNDE    EQU      %
         BAL,SR4  TCOMMA
         BCS,8    B1ER002           ERROR IF COMMA MISSING
         BAL,SR4  LLEGALNM
         BCS,8    B1ER102           ERROR IF ILLEGAL ALPHA NAME
         LI,R4    EXECVE
         AW,R4    R6
         LCI      3
         LM,R1    PLB,R7            STORE EXECUTE VEHICLE
         STM,R1   0,R4
         MTW,3    TREEAD,R6         INCREMENT TREE
         LW,R1    Y1
         SPACE    1
LCCFLAGS EQU      %
         STS,R1   LOCCT,R6          SET FLAG INDICATED BY KEYWORD
LCCFLAG1 EQU      %
         PULL     SR4
         B        *SR4
         SPACE    2
B1ER001  RES      0
         LI,SR3   MXEXECCD          MAXIMUM NUMBER OF EXECUTE ACCTS
         B        LCCIND0
B2ER002  PULL     SR3
B1ER002  RES      0
         LI,SR3   COMERCD           EXPECTED COMMA MISSING
         B        LCCIND0
B1ER003  PULL     SR3
LERR003  LI,SR3   LPERCD            EXPECTED LEFT PARENTHESIS MISSING
         B        LCCIND1
B1ER004  PULL     SR3
LERR004  LI,SR3   RPERCD            EXPECTED RIGHT PARENTHESIS MISSING
         B        LCCIND1
LERR006  RES      0
         LI,SR3   MXUNSTCD          MAXIMUM NUMBER OF UNSAT ACCTS
         B        LCCIND0
LERR005  LI,SR3   TERMERCD          EXPECTED TERMINATOR MISSING
         B        LCCIND1
B1ER100  PULL     SR3
LERR100  LI,SR3   KWERCD            ILLEGAL KEYWORD
         B        LCCIND1
B1ER102  PULL     SR3
LERR102  LI,SR3   ALPHERCD          ILLEGAL ALPHANUMERIC NAME
         B        LCCIND1
B2ER104  PULL     SR3
B1ER104  RES      0
         LI,SR3   HEXERCD           ILLEGAL HEXADECIMAL NUMBER
         B        LCCIND0
B1ER105  RES      0
         LI,SR3   DUPERCD           DUPLICATION OF FIELDS
         B        LCCIND0
B2ER106  PULL     SR3
B1ER106  RES      0
         LI,SR3   VALERCD           ILLEGAL VALUE
         B        LCCIND0
LERR107  LI,SR3   INSFERCD          INSUFFICIENT PARAMETERS
         B        LCCIND1
LERR108A PULL     2,SR1
LERR108 LI,SR3    NOPGERR
       PULL     2,R7
         B        LCCIND1
B1ER108  RES      0
         LI,SR3   MRWERCD           MAXIMUM NUMBER OF READ/WRITE ACCTS
LCCIND0  PULL     R0
LEXPI1   EQU      LCCIND0
LCCIND1  LI,R0    K0
         LI,R4    K2
LCCIND2  EQU      %
         PULL     R6
         PULL     SR4
         AW,SR4   R0
         B        *SR4              END OF INTERPRET LOAD CONTROL COMND
*                                                                      *
         END

