         SYSTEM   SIG5                                                          
         SYSTEM   OPTIONS                                                       
         TITLE    '       **** DEFS AND REFS ****'                              
         DEF      CCI,CC95,ERRFUND,OERFUND,RDCONT,OLAYCCI                       
         REF      LML:ROO2                                                      
         REF      FLG:ROO2                                                      
*        REF               TRACE                                                
         REF      ADDNXT,ADDX,B:C,B:ROM,B:X,BAP:ROM,BAP:ROO2,BEPROMI            
         REF      BL:ROO2,BOUNDCS,BOUNDRDW,CCDCBV                               
         REF      CCSTACK,CCVALUE,CHKBLANK,CMPZ,COMPBS,CONVROMX,DCBTYPE         
         REF      DWBOUND,EXTEND,F:DEFREF,F:DEVICE,F:EBCDIC,F:MODIR             
         REF      F:MODULE,F:PUBL,FBA:COMN,FBA:DCBT,FBA:INTT,FBA:LIM            
         REF      FBA:OVLO,FBA:ROO2,FBA:TABS,FBA:TEMP,FL:BACK,FL:BOUND          
         REF      FL:COMN,FL:ERROR,FL:GO,FL:LBLD,FL:LBPAS,FL:LIB,FL:MAP         
         REF      FL:MODF,FL:NXTCC,FL:OFLOW,FL:OUTOV,FL:PAS2,FL:PUBL            
         REF      FL:RTYPE,FL:STEP,FL:TASKS,FL:TEMP,FL:UDCB,FL:UNNAM            
         REF      FLTMPTSK,FPT:CCI6,FPT:CCI7,FPT:CC1,FPT:CC2,FPT:CC3            
         REF      FPT:CC4,FPT:CC5,FPT:CC8,FPT:DIAG,FPT:LB1,FPT:LB11             
         REF      FPT:LB10,FPT:LB13,FPT:LB2,FPT:LB3,FPT:LB4,FPT:LB5             
         REF      FPT:LB6,FPT:LB7,FPT:LB8,FPT:LB9,FPT:ONE1,FPT:ONE2             
         REF      FPT:ONE4,FPT:ONE3,FPT:PRLO,FPT:RDG,FPT:RD2,FPT:RD3            
         REF      FPT:WTG,FPT:XN1,FWA:ASSN,GETDECL,LBA:COMN,LBA:DCBT            
         REF      LBA:LIM,LBA:OVLO,LBA:PATH,LBA:ROM,LBA:ROO2,LOADERR            
         REF      LOADSEG,LWA:ASSN,M:C,M:GO,M:LL,M:LO,M:OC,M:OV,M:X1            
         REF      M:X2,M:X3,M:X4,M:X5,M:X6,MOVBYTS,MOVEDW,NBA:SECT              
         REF      NUM1,NUM2,NXTSEG,OLOADPCB,P:GRAN,P:POOL,PATHEND               
         REF      PT:CC6,PT:CC7,PT:DIAG1,PT:LB12,PT:RD1,PT:SCAN,PT:WTGR         
         REF      RABORT,RAREABC,RAX,RDIAG,RDIAGX,READXN,ROMBYTE                
         REF      ROMBYTES,ROMERR,SATREF,SCANEXIT,SCANFLAG,SCANITEM             
         REF      SCAN80,SCAN82,SCAN83,SCAN84,SCAN85,SCAN88,SCAN89              
         REF      SCAN89A,SCAN90,SCAN91,SCAN92,SCAN93,SCAN94,SCAN95             
         REF      SCAN96,SCAN97,SCAN98,SCAN99                                   
         REF      SERCHDCB,SERCHFWD,SERCHPUB                                    
         REF      SERCHSEG,SERCHSYM,SERCHVAL,SKIPX,SOLVEX,STORCBV               
         REF      SYMFBA,T:BDP,T:BZA,T:FBA,T:LBA,T:LDADDR                       
         REF      T:LDINST,T:NBE,T:PL,TBENTRY,V:CCDCB,V:CCTYPE                  
         REF      V:COLAY,V:DECLNO,V:LIBSIZ,V:LINKID,V:MASK,V:MODLOC            
         REF      V:ROMRNO,V:SEGID,V:TOTSIZ,VMODMTB,WDP:ASSN,WORD               
         REF      WRITEXN,XBC,ZERONXT,ZEROX,4BYTES                              
         REF      X:F,X:FFFF,X:TY,X:1FFFF,X:3,X:3FFF,X:7,X:7F,Y:8,Y:FF     101  
         REF      X:FF                                                          
         REF      Y:2                                                           
         REF      Y:FFFE                                   /SIG7-3407/*C5733    
         REF      X:7FFFF                                                       
         REF      V:MSECB,V:MRECB,V:MENQ,V:NUSG,V:NPLSG                         
         REF      FBA:RTMP,LBA:ROO1                                             
         REF      FL:STM,FL:PRIM,FL:CRIT,FL:RTMP                                
         REF      S:FMSK,S:IMSK,S:MMSK,S:SMSK,S:PMSK                            
         REF      BOUNDRP,PUBMEM                                                
         REF      V:MODBD,V:REL                                                 
         REF      FL:SORT,FL:SMM                                                
         REF      WDP:PL                                                        
         REF      GIOOBIT,GIODBIT,GIOFBIT,GIOABIT,GIOFA,GIOBITS                 
         REF      X:FFF                                                         
         REF      FPT:ASN,FPT:GASN,FPT:COR,FPT:REW,FPT:PACK                     
         REF      FPT:OPEN,FPT:CLS                                              
         REF      PT:OPEN,PT:CLS                                                
         REF      B:OPLBNM,B:DEVNM,B:DEVX,B:DEVCON,B:ERRCC                      
         REF      NXTROM,GIOCT                                                  
         REF      FPT:ROM1                                                      
         TITLE    '       **** EQUATES ****'                                    
*                                                                               
SAVE%    SET      %                                                             
         ASECT                                                                  
R0       EQU      %                                                             
R1       EQU      %+1                                                           
R2       EQU      %+2                                                           
R3       EQU      %+3                                                           
R4       EQU      %+4                                                           
R5       EQU      %+5                                                           
R6       EQU      %+6                                                           
R7       EQU      %+7                                                           
R8       EQU      %+8                                                           
R9       EQU      %+9                                                           
R10      EQU      %+10                                                          
R11      EQU      %+11                                                          
R12      EQU      %+12                                                          
R13      EQU      %+13                                                          
R14      EQU      %+14                                                          
R15      EQU      %+15                                                          
         USECT    SAVE%                                                         
*                       *V:CCTYPE INDICES                                       
:OLOAD   EQU      1                                                             
:PUBLIB  EQU      2                                                             
:ROOT    EQU      3                                                             
:SEG     EQU      4                                                             
:COMMON  EQU      5                                                             
:LCOMMON EQU      6                                                             
:INCLUDE EQU      7                                                             
:EXCLUDE EQU      8                                                             
:RES     EQU      9                                                             
:LIB     EQU      10                                                            
:MODIFY  EQU      11                                                            
:ASSIGN  EQU      12                                                            
:BINARY  EQU      13                (BINARY ROM RECORD)                         
:LMHDR   EQU      14                                                            
*                       *FPT CONSTANTS                                          
OPEN     EQU      X'14'                                                         
CLOSE    EQU      X'15'                                                         
READ     EQU      X'10'                                                         
WRITE    EQU      X'11'                                                         
REWIND   EQU      X'01'                                                         
SKIPREC  EQU      X'1D'                                                         
RECORDNO EQU      X'80000000'                                                   
ERA      EQU      X'80000000'                                                   
ABA      EQU      X'40000000'                                                   
BUF      EQU      X'20000000'                                                   
RSZ      EQU      X'10000000'                                                   
KEY      EQU      X'01000000'                                                   
REALTIME EQU      X'00400000'                                                   
WAIT     EQU      X'10'                                                         
*                       *DCB CONSTANTS (BYTE ITEMS)                             
IN       EQU      1                                                             
OUT      EQU      2                                                             
INOUT    EQU      3                                                             
RETRY    EQU      3                                                             
RAD      EQU      1                                                             
DEVICE   EQU      3                                                             
DEVF     EQU      X'80'                                                         
OPLB     EQU      3                                                             
VFC      EQU      1                                                             
*                       ASSIGN CONSTANTS                                        
RIGHT    EQU      -1                RIGHT SHIFT                                 
LEFT     EQU      1                 LEFT SHIFT                                  
BIT14    EQU      1**(31-14)                                                    
BIT17    EQU      1**(31-17)                                                    
BIT20    EQU      1**(31-20)                                                    
BIT21    EQU      1**(31-21)                                                    
BIT22    EQU      1**(31-22)                                                    
BIT23    EQU      1**(31-23)                                                    
NWE:ASSN EQU      10                10 WORDS PER ENRTY IN T:ASSN                
DEVFBIT  EQU      1**(31-16)                                                    
DEVMSK   EQU      X'BFFF'           MASK FOR WD 1 OF DCB DEVICE                 
TYP      EQU      X'3F00'                                                       
DOR      EQU      X'F'              D/O/R MASK FOR WD 1 OF DCB.                 
*                       *RAD AREAS                                              
FP       EQU      1                 FOREGROUND PROGRAMS                         
SP       EQU      0                 SYSTEM PROGRAMS                             
BT       EQU      3                 BACKGROUND TEMP                             
*                       *DEVICE TYPES                                           
PR       EQU      2                 PAPER-TAPE READER                           
7T       EQU      9                 7-TRACK TAPE                           101  
*                       *ABNORMAL I/O CONDITION CODES                           
IL       EQU      7                 BUFFER SMALLAR THAN DATA READ               
EOD      EQU      5                 TAPE MARK OR 'EOD'                          
EOF      EQU      6                 CONTROL COMMAND ON 'C' DEVICE               
EOT      EQU      X'1C'             END-OF-TAPE                                 
NOFILE   EQU      3                 RAD FILE DOES NOT EXIST                     
*                        *SIZES                                                 
PCBSIZE  EQU      13*4              PCB SIZE IN BYTES                           
TEMPSIZE EQU      150               DEFAULT TEMP STACK SIZE (IN WORDS)          
GRANSIZE EQU      256               GRANULE SIZE IN WORDS                       
DCBSIZE  EQU      11                                                            
PLESIZE  EQU      16                T:PL ENTRY SIZE                             
PLSIZE   EQU      5*PLESIZE+1       T:PL SIZE IN WORDS:                         
*                                   ENTRY SIZE TIMES MAX NR ENTRIES             
*                                   PLUS ONE WORD TO ALLOW ZERO                 
*                                   WORD AT END OF TABLE                        
*        T:PL ENTRY ITEM INDICES                                                
PLSYMBL  EQU      12                WORD INDEX TO T:SYMBOL BL                   
PLSYMGO  EQU      13                WORD INDEX TO T:SYMBOL GRAN ORIGIN          
PLVALBL  EQU      14                WORD INDEX TO T:VALUE BL                    
PLVALGO  EQU      15                WORD INDEX TO T:VALUE GRAN ORIGIN           
PLNSEGS  EQU      24                BYTE INDEX TO NR OF SEGS IN PUBLIB          
PLPLWO   EQU      6                 WORD INDEX TO PUBLIB ORIGIN                 
PLPLML   EQU      5                 WORD INDEX TO PUBLIB MEM BL                 
PLCXWO   EQU      9                 WORD INDEX TO CONTEXT ORIGIN                
PLCXML   EQU      8                 WORD INDEX TO CONTEXT MEM BL                
*T:SEG FIELDS                                                                   
S:LL     EQU      9                 WD OF LOAD MODULE LENGTH OF SEG             
S:MA     EQU      12                HWD OF SEGMENT START ADDRESS                
S:ML     EQU      13                HWD OF SEGMENT MEMORY LENGTH                
S:ENTRY  EQU      7                 WD OF ROOT ENTRY                            
S:VALBL  EQU      7                 HWD OF BL OF T:VALUE(I)                     
S:SYMBL  EQU      9                 HWD OF BL OF T:SYMBOL(I)                    
S:VALBD  EQU      6                 HWD TO BD OF T:VALUE(I) IN T:VALUE          
S:SYMBD  EQU      8                 HWD TO BD OF T:SYM(I) IN T:SYM              
S:LA     EQU      5                 HWD OF LM ADDRESS OF SEG                    
S:FLAGS  EQU      7                 W INDEX TO FLAG FIELD                       
*        SHIFTS FROM RJ TO NATURAL POSITION IN T:SEG FLAG WORD                  
S:FSHIFT EQU      28                FIXED REAL MEMORY FLAG SHIFT                
S:ISHIFT EQU      27                INITIAL LOAD FLAG SHIFT                     
S:MSHIFT EQU      25                MEM ACCESS PROT CODE SHIFT                  
S:SSHIFT EQU      23                SHARABILITY CODE SHIFT                      
S:PSHIFT EQU      22                PRELOADED SHARABLE SEG FLAG SHIFT           
*                        *CONTROL BYTE MASKS AND VALUES                         
TY       EQU      X'C0'             SYMBOL TYPE (DEF,DSECT,PREF,SREF)           
DEF      EQU      0                     EXTERNAL DEFINITION                     
DSECT    EQU      X'40'                 DUMMY SECTION                           
SREF     EQU      X'80'                 SECONDARY REFERENCE                     
PREF     EQU      X'C0'                 PRIMARY REFERENCE                       
D        EQU      X'20'            *SYMBOL HAS/HASNOT BEEN DEFINED,             
*                                   ALLOCATED, OR SATISFIED FLAG MASK           
DEFINED  EQU      X'20'                 DEFINED DEF                             
UNDEFINE EQU      0                     DEF UNDEFINED                           
SATISFYD EQU      X'20'                 SATISFIED REF                           
UNSAT    EQU      0                     REF UNSATISFIED                         
ALLOCATD EQU      X'20'                 ALLOCATED DSECT                         
UNALLOCT EQU      0                     DSECT NOT ALLOCATED                     
V        EQU      X'10'            *SYMBOL HAS BEEN DEFINED/ALLOCATED/          
*                                   SATISFIED WITH EITHER A VALUE               
*                                   OR AN EXPRESSION FLAG MASK                  
VALUE    EQU      X'10'                 VALUE                                   
EXP      EQU      0                     EXPRESSION                              
C        EQU      X'08'            *SYMBOL VALUE IS EITHER A CONSTANT OR        
*                                   AN ADDRESS FLAG MASK                        
CONSTANT EQU      X'08'                *SYMBOL VALUE IS A CONSTANT              
*                                       WITH NO RESOLUTION                      
ADDRESS  EQU      0                    *SYMBOL VALUE IS AN ADDRESS              
*                                       WITH BYTE RESOLUTION                    
F        EQU      X'04'            *SYMBOL IS/ISNOT A DUPLICATE FLAG            
*                                   MASK                                        
DUPLICAT EQU      X'04'                 DUPLICATE SYMBOL                        
NOTDUP   EQU      0                     NOT DUPLICATE SYMBOL                    
LB       EQU      X'03'             SYMBOL FROM ROM OR LIBRARY                  
ROM      EQU      0                     SYMBOL FROM ROM                         
USER     EQU      X'02'                 SYMBOL FROM USER LIBRARY                
SYSTEM   EQU      X'01'                 SYMBOL FROM SYSTEM LIBRARY              
PUBLIC   EQU      X'03'                 PUBLIC LIBRARY SYMBOL                   
RES      EQU      DSECT+ALLOCATD+; *RES SYMBOL CONTROL BYTE                     
                  EXP+NOTDUP+ROM    (TO BE ALLOCATED AT SEGMENT END)            
EXCLPREF EQU      PREF+UNSAT+VALUE; EXCLUDED PREF SYMBOL CONTROL BYTE           
                  +NOTDUP+ROM                                                   
ADSECT   EQU      DSECT+ALLOCATD+VALUE+ADDRESS+NOTDUP+ROM                       
*                 ALLOCATED DSECT TYPE CODE FOR T:VALUE                         
UADSECT  EQU      DSECT+UNALLOCT+VALUE+ADDRESS+NOTDUP+ROM                       
*                 UNALLOCATED DSECT TYPE CODE FOR T:VALUE                       
*        TASK SCHEDULING CLASS FLAGS                                            
PRIMARY  EQU      1**1              FL:PRIM BIT FOR PRIMARY EXECUTION           
SECNDRY  EQU      1**0              FL:PRIM BIT FOR SECONDARY EXECUTION         
*        TEMP CELL IN ROOT                                                      
KEYNR    EQU      P:POOL+13                                                     
BLCOMN   EQU      KEYNR                                                         
*                        *MONITOR CELLS                                         
PCBPOINT EQU      X'4E'             FWA OF BACKGROUND PROGRAM'S PCB             
K:BACKBG EQU      X'140'            FWA OF BACKGROUND                           
K:BCKEND EQU      X'141'            LWA OF BACKGROUND                           
K:FGDEND EQU      X'143'            LWA OF FOREGROUND                           
K:CCBUF  EQU      X'144'            FWA OF CONTROL COMMAND BUFFER               
K:FGDBG2 EQU      X'146'            DEFAULT FWA OF FOREGROUND                   
K:FMBOX  EQU      X'147'            MONITOR FOREGROUND PRGMS MAILBOX            
K:BPEND  EQU      X'153'            LWA+1 OF LOADED BACKGROUND PROGRAM          
K:DCT1   EQU      X'176'            POINTER TO HW WITH # OF DCT ENTRIES         
K:DCT16  EQU      X'177'            POINTER TO DW WITH DEVICE EBCDIC            
K:OPLBS1 EQU      X'178'            EBCDIC OPLABELS IN SYSTEM                   
K:DCT4   EQU      X'18F'            DEVICE TYPE NUMBERS                         
K:OPLBS3 EQU      X'179'            POINTER TO OPLB'S CURRENT ASSIGNMENY        
K:RFT4   EQU      X'17A'            RAD FILE TABLE GRANULE SIZE POINTER         
K:JCP1   EQU      X'150'            BIT 30=1,ATTENDED JOB                       
*                                         =0,CLOSED SHOP JOB                    
K:RFT1   EQU      X'205'            POINTER TO EBCDIC NAME OF THE RAD FILE      
K:RFT8   EQU      X'206'            POINTER TO THE AREA INDEX OF THE RAD FILE   
K:MDNAME EQU      X'212'            MASTER DIRECTORY AREA NAME TABLE            
         DO       #MAP~=0                                                       
K:RMPT   EQU      X'20E'            POINTER TO REAL MEMORY PAGE TABLE           
K:PPT    EQU      X'216'            ADDR OF POINTER TO PARTITION                
*                                   POINTER TABLE                               
         FIN                                                                    
*                        *FLAG VALUES FOR FL:NXTCC                              
ORENTRY  EQU      X'40000000'                                                   
NOOLOAD  EQU      X'30000000'                                                   
NOPUB    EQU      X'0C000000'                                                   
NOROOT   EQU      X'03000000'                                                   
NOSEG    EQU      X'00C00000'                                                   
NOCOM    EQU      X'00300000'                                                   
NOLCOM   EQU      X'000C0000'                                                   
NOINC    EQU      X'00030000'                                                   
NOEXC    EQU      X'0000C000'                                                   
NORES    EQU      X'00003000'                                                   
NOLIB    EQU      X'00000C00'                                                   
NOMOD    EQU      X'00000300'                                                   
NOASS    EQU      X'000000C0'                                                   
NOBIN    EQU      X'00000030'                                                   
NOLMH    EQU      X'0000000C'                                                   
NOEOF    EQU      X'00000003'                                                   
MODEND   EQU      X'00000100'                                                   
ASSEND   EQU      X'00000040'                                                   
BINEND   EQU      X'00000010'                                                   
LMHEND   EQU      X'00000004'                                                   
EOFEND   EQU      X'00000001'                                                   
SEGEND   EQU      X'00400000'                                                   
COMEND   EQU      X'00100000'                                                   
*                        *OPLBS                                                 
OPLB:C   EQU      1                                                             
OPLB:OC  EQU      2                                                             
OPLB:LO  EQU      3                                                             
OPLB:LL  EQU      4                                                             
*                        *OVERLAY LOADER SEGMENT IDENTS                         
SEG:CCI  EQU      1                 CONTROL COMMAND INTERPRETER                 
SEG:PAS1 EQU      2                 PASS ONE                                    
SEG:PAS2 EQU      3                 PASS TWO                                    
SEG:MAP  EQU      4                 MAP                                         
SEG:DIAG EQU      5                 DIAGNOSTICS                                 
SEG:LIB  EQU      6                 LIBRARY SEARCH                              
CC1      EQU      8                 CONDITION CODE 1                            
CC2      EQU      4                 CONDITION CODE 2                            
CC3      EQU      2                 CONDITION CODE 3                            
CC4      EQU      1                 CONDITION CODE 4                            
*                        *ALARMS                                                
*                        *DIAGNOSTICS                                           
CCITEM   EQU      1           CC ERR:ITEM XX                                    
OCCITEM  EQU      2           CC ERR:ITEM XX  (OLOAD)                           
OCCFITEM EQU      4           CC ERR:FOLLOWING ITEM XX (OLOAD)                  
CCFITEM  EQU      3           CC ERR:FOLLOWING ITEM XX                          
CCORDER  EQU      5           CC ERR:ILLEGAL ORDER                              
CCIDENT  EQU      6           CC ERR:SEG IDENT NOT 1ST OPTION                   
CCDUPNAM EQU      7           CC ERR:DUP NAME IN ITEM XX                        
CCSEGORD EQU      8           CC ERR:SEG'S ORDERED INCORRECTLY                  
CCDUPSEG EQU      9           CC ERR:DUP SEG IDENT                              
CCUNDSEG EQU      10          CC ERR:SEG IDENT UNRECOGNIZED                     
CCUNDSYM EQU      11          CC ERR:UNDEFINED SYMBOL IN ITEM XX                
OCCFORE  EQU      12          CC ERR:NEED (FORE,FWA,LWA) OPT FOR PUBLIB         
OCCTEMP  EQU      13          CC ERR:ILLEGAL OPT FOR PUBLIB (TEMP,VAL)          
OCCLINKS EQU      14          CC ERR:ILLEGAL OPT FOR PUBLIB (GO,LINKS)          
OCCTASKS EQU      15          CC ERR:ILLEGAL OPT FOR PUBLIB (TASKS,VAL)         
OCCPUBL  EQU      16          CC ERR:ILLEGAL OPT FOR PUBLIB (PUBL,NAME)         
CHKSUM   EQU      17          ROM ERR:CHKSUM                                    
SEQERR   EQU      18          ROM ERR:BAD SEQ                                   
LOADITEM EQU      19          ROM ERR:ILL LOAD ITEM                             
OBJFORMT EQU      20          ROM ERR:NOT OBJ LANGUAGE                          
NOTSTBIN EQU      21          ROM ERR:NOT STANDARD BIN                          
NOMODEND EQU      22          ROM ERR:NO MODULE END                             
TEXOFLO  EQU      23          ROM ERR:EXPRESSION SIZE EXCEEDS MAX               
RFUND    EQU      24          CC ERR:UNDEFINED FILE                             
RFUND2   EQU      25          CC ERR:UNDEFINED FILE                             
EOFONCC  EQU      26          UNEXPECTED MONITOR CC ON TTYDD                    
ILLEOD   EQU      27          UNEXPECTED EOD ON DEVICE/FILE                     
ILLEOD2  EQU      28          UNEXPECTED EOD ON DEVICE/FILE                     
BOTERR   EQU      29          BOT ON DEVICE/FILE                                
EOTERR   EQU      30          EOT ON DEVICE/FILE                                
EOTERR2  EQU      31          EOT ON DEVICE/FILE                                
IRRECRD  EQU      32          UNRECOVERABLE RD ERR ON DEVICE/FILE               
IRRECWR  EQU      33          UNRECOVERABLE WR ERR ON DEVICE/FILE               
TINYBUFF EQU      34          BUF SMALLAR THAN DATA RECD                        
RONGDCB  EQU      35          DCB HAS BAD PARAMETERS                            
NORADFIL EQU      36          UNDEFINED FILE AA,XXXXXXXX (IN DCB)               
DCBNODEV EQU      37          DCB NOT ASSIGNED                                  
READOUTP EQU      38          READING AN OUTPUT DEVICE                          
WRITEINP EQU      39          WRITING ON INPUT DEVICE                           
NOOPDCBW EQU      40          DCB HAS INSUFFICIENT INFO                         
NOOPDCBR EQU      41          DCB HAS INSUFFICIENT INFO                         
PROGERR  EQU      42          PROGRAM ERROR,OLAY,ADDR XXXXX                     
DCBCLOSE EQU      43          PROGRAM ERROR,OLAY,SB=XX,ADDR XXXXX               
DCBOPEN  EQU      44          PROGRAM ERROR,OLAY,SB=XX,ADDR XXXXX               
NONREAL  EQU      45          PROGRAM ERROR,OLAY,SB=XX,ADDR XXXXX               
INVBUFF  EQU      46          PROGRAM ERROR,OLAY,SB=XX,ADDR XXXXX               
REREADCC EQU      47          PROGRAM ERROR,OLAY,SB=XX,ADDR XXXXX               
ILLDCB   EQU      48          WARNING:ILL DCB NAME                              
ILLDCB2  EQU      49          WARNING:DCB IN OVERLAY SEG                        
LCOMSIZE EQU      50          LCOM XXX OF SIZE XX GR. THAN ALLOCATED            
DCBADR   EQU      51          WARNING:ILL DCB ADDR                              
PUBLIB5  EQU      52          DSECT'S IN PUBLIB LOAD                            
PLENGTH  EQU      53          BIAS TOO LARGE                                    
BACKSIZE EQU      54          BACKGROUND TOO SMALL                              
TABOFLO  EQU      55          BACKGROUND TOO SMALL                              
MOUNTPT  EQU      56          MOUNT PAPER TAPE ROM                              
FULLRFT  EQU      57          RAD FILE TABLE FULL                               
RADWP    EQU      58          TTYDD WRT PROT                                    
UPREF    EQU      59          WARNING:UNSATISFIED REF'S                         
DUPLDEFS EQU      60          WARNING:DUPLICATE DEF'S                           
UNDEFDEF EQU      61          WARNING:UNDEFINED DEF'S                           
UNDEFORG EQU      62          UNDEFINED ORIGIN                                  
ILLORG   EQU      63          ILLEGAL ORIGIN XXXXX                              
FLDOFLO  EQU      64          WARNING:FIELD OVERFLOW AT ADDR XXXXX              
NOSTART  EQU      65          WARNING:NO START ADDR FOR ROOT                    
SEGGT16K EQU      66          WARNING:OVERLAY SEG GREATER THAN 16K              
ABORT    EQU      67          FILE DESTROYED AA,FFFFFFFF                        
ABORT2   EQU      68          FILE UNCHANGED AA,FFFFFFFF                        
EXCLIM   EQU      69          WARNING:PROGRAM EXCEEDS SPEC ADDR LIMITS          
UNDEFRLC EQU      70          PROGRAM ERROR:UNALLOCATED CONTROL SECT            
UNDEFDCB EQU      71          WARNING:UNALLOCATED DEFID DCB                     
OCCAREA  EQU      72          CC ERR:SPECIFIED AREA FOR PUBLIB NOT 'FP'         
UNDEFST  EQU      73          WARNING:UNDEFINED START ADDR                      
ILLSTRT  EQU      74          WARNING:START ADDR XXXXX OUTSIDE SEGMENT          
ILLMCC   EQU      79          MONITOR CC ENCOUNTERED INSTEAD :ROOT,ETC.         
NOATTEND EQU      80          CC ERR: STEP OPTION ILLEGAL WITHOUT ATTEND        
CCMODLOC EQU      81          CC ERR: MODIFY OUTSIDE SEG LIMITS                 
CCOPCODE EQU      82          CC ERR: ILL OPCODE IN ITEM XX                     
CCBINORD EQU      84          BINARY CARD ENCOUNTERED INSTEAD OF CC             
OCCBP    EQU      88                CC ERR: BCKG AND PRIMARY                    
PUBMEMER EQU      90                MEM CONFLICT INVOLVING PUBLIBS              
SMMER    EQU      91                SIMPLIFIED MEM MGT W FGD OR PUBLIB          
OCCACNT  EQU      93                CC ERR: ACNT NAME ILLEGAL FOR PUBLIB        
NOUDCB   EQU      95                NOT ENUF UDCBS                              
         TITLE    ' **** DYNAMIC TABLE AREA POINTERS ****'                      
*                                                                               
*                       *THE FOLLOWING TABLES AREAS ARE DYNAMICALLY             
*                        ALLOCATED (DURING PASSONE) AND ARE LOCATED             
*                        BETWEEN THE END OF THE LOGEST OVERLAY                  
*                        (K:PEND) AND THE END OF BACKGROUND (K:BACKEND).        
*                       *THE EQUATED VALUES ARE INDICES INTO T:FBA,             
*                        T:LBA,T:NBE,AND T:BZA.                                 
*                                                                               
T:PUBVAL EQU      1      PUBLIC LIBRARY DEF VALUE TABLE                         
*                            *5 BYTES PER ENTRY                                 
*                            *ENTRIES PARALLEL TO T:PUBSYM ENTRIES              
*                                                                               
*                                                                               
T:PUBSYM EQU      2      PUBLIC LIBRARY DEF EBCDIC NAME TABLE                   
*                            *VARIABLE SIZED ENTRIES                            
*                            *ENTRIES PARALLEL TO T:PUBVAL ENTRIES              
*                                                                               
*                                                                               
*                                                                               
T:VALUE  EQU      3     *PROGRAM SYMBOL TABLE VALUES (ADDR,CONSTANT,OR E        
*                        (SYMBOL TABLE HAS DEFS,DSECTS,AND FORWARD REFS)        
*                            *5 BYTES PER ENTRY                                 
*                            *ENTRIES PARALLEL TO T:SYMBOL                      
*                                                                               
*                                                                               
T:SEG    EQU      4      SEGMENT INFORMATION TABLE                              
*                                   *10 WORDS PER ENTRY                         
*                            *ONE ENTRY PER SEGMENT                             
*                                                                               
T:DCBV   EQU      5      TABLE OF VARIABLE DCB'S                                
*                            *7 WORDS PER ENTRY                                 
*                            *ONE DCB FOR EACH DISTINCT RAD FILE                
*                             SPECIFIED FOR ROM INPUT                           
*                                                                               
T:DCB    EQU      6     *TABLE OF SYSTEM (M:) AND USER (F:) DCB                 
*                        DEF'S AND  REF'S                                       
*                            *3 WORDS PER ENTRY                                 
*                                                                               
T:ROMI   EQU      7     *ROM INPUT INFORMATION TABLE;CONTAINS THE               
*                        NUMBER OF ROM'S TO INPUT AND THE INPUT SOURCE.         
*                        (TABLE ONLY EXIST DURING PASSONE)                      
*                            *1 WORD PER ENTRY                                  
*                                                                               
T:MODIFY EQU      8     *TABLE OF CORE IMAGE MODIFICATIONS FOR THE              
*                        SEGMENT                                                
*                            *VARIABLE SIZED ENTRIES                            
*                                                                               
T:MODULE EQU      9      MODULE INFORMATION TABLE                               
*                            *5 WORDS PER ENTRY                                 
*                            *ONE ENTRY PER MODULE                              
*                                                                               
B:MT     EQU      10    *MODULE TABLES BUFFER FOR T:DECL,T:CSECT,T:FWD          
*                        AND T:FWDX; BUFFER OUTPUT EITHER AT THE END            
*                        OF THE SEGMENT OR WHEN THE BUFFER IS FULL.             
*                                                                               
T:DECL   EQU      11    *MODULE DECLARATION TABLE; EACH DECLARATION             
*                        ENTRY POINTS TO AN ENTRY IN (1) T:DCB,                 
*                        (2) T:SYMBOL/T:VALUE,(3) T:CSECT, OR                   
*                        (4) T:PUBSYM/T:PUBVAL                                  
*                            *2 BYTES PER ENTRY                                 
*                                                                               
T:CSECT  EQU      12    *CONTROL SECTION TABLE; EACH ENTRY CONTAINS             
*                        SIZE AND ALLOCATED ADDRESS.                            
*                            *2 WORDS PER ENTRY                                 
*                                                                               
T:FWD    EQU      13    *FORWARD TABLE; EACH ENTRY CONTAINS A FORWARD           
*                        NUMBER AND IT'S CORRESPONDING VALUE. A VALUE           
*                        CAN BE AN ADDR, CONSTANT, OR AN EXPRESSION.            
*                            *2 WORDS PER ENTRY                                 
T:FWDX   EQU      14     FORWARD EXPRESSION TABLE                               
*                            *VARIABLE SIZED ENTRIES                            
*                                                                               
T:SYMBOL EQU      15    *PROGRAM SYMBOL TABLE EBCDIC NAMES AND DSECT            
*                        SIZES; ENTRIES PARALLEL TO T:VALUE ENTRIES             
*                            *VARIABLE SIZED ENTRIES                            
*                                                                               
T:VALX   EQU      16    *T:VALUE EXPRESSION TABLE; BACKWARD TABLE               
*                        WITH FORWARD ENTRIES,BUILT FROM K:BACKEND              
*                            *VARIABLE SIZED ENTRIES                            
*                                                                               
*                                                                               
FBA:PUBV EQU      T:FBA+T:PUBVAL                                                
FBA:PUBS EQU      T:FBA+T:PUBSYM                                                
FBA:VALU EQU      T:FBA+T:VALUE                                                 
FBA:SEG  EQU      T:FBA+T:SEG                                                   
FBA:DCBV EQU      T:FBA+T:DCBV                                                  
FBA:DCB  EQU      T:FBA+T:DCB                                                   
FBA:ROMI EQU      T:FBA+T:ROMI                                                  
FBA:MODF EQU      T:FBA+T:MODIFY                                                
FBA:MODL EQU      T:FBA+T:MODULE                                                
FBA:MTB  EQU      T:FBA+B:MT                                                    
FBA:DECL EQU      T:FBA+T:DECL                                                  
FBA:CSEC EQU      T:FBA+T:CSECT                                                 
FBA:FWD  EQU      T:FBA+T:FWD                                                   
FBA:FWDX EQU      T:FBA+T:FWDX                                                  
FBA:SYM  EQU      T:FBA+T:SYMBOL                                                
FBA:VALX EQU      T:FBA+T:VALX                                                  
BDP:PUBV EQU      T:BDP+T:PUBVAL                                                
BDP:PUBS EQU      T:BDP+T:PUBSYM                                                
BDP:VALU EQU      T:BDP+T:VALUE                                                 
BDP:SEG  EQU      T:BDP+T:SEG                                                   
BDP:DCBV EQU      T:BDP+T:DCBV                                                  
BDP:DCB  EQU      T:BDP+T:DCB                                                   
BDP:ROMI EQU      T:BDP+T:ROMI                                                  
BDP:MODF EQU      T:BDP+T:MODIFY                                                
BDP:MODL EQU      T:BDP+T:MODULE                                                
BDP:MTB  EQU      T:BDP+B:MT                                                    
BDP:DECL EQU      T:BDP+T:DECL                                                  
BDP:CSEC EQU      T:BDP+T:CSECT                                                 
BDP:FWD  EQU      T:BDP+T:FWD                                                   
BDP:FWDX EQU      T:BDP+T:FWDX                                                  
BDP:SYM  EQU      T:BDP+T:SYMBOL                                                
BAP:VALX EQU      T:BDP+T:VALX                                                  
LBA:PUBV EQU      T:LBA+T:PUBVAL                                                
LBA:PUBS EQU      T:LBA+T:PUBSYM                                                
LBA:VALU EQU      T:LBA+T:VALUE                                                 
LBA:SEG  EQU      T:LBA+T:SEG                                                   
LBA:DCBV EQU      T:LBA+T:DCBV                                                  
LBA:DCB  EQU      T:LBA+T:DCB                                                   
LBA:ROMI EQU      T:LBA+T:ROMI                                                  
LBA:MODF EQU      T:LBA+T:MODIFY                                                
LBA:MODL EQU      T:LBA+T:MODULE                                                
LBA:MTB  EQU      T:LBA+B:MT                                                    
LBA:DECL EQU      T:LBA+T:DECL                                                  
LBA:CSEC EQU      T:LBA+T:CSECT                                                 
LBA:FWD  EQU      T:LBA+T:FWD                                                   
LBA:FWDX EQU      T:LBA+T:FWDX                                                  
LBA:SYM  EQU      T:LBA+T:SYMBOL                                                
LBA:VALX EQU      T:LBA+T:VALX                                                  
NBE:PUBV EQU      T:NBE+T:PUBVAL                                                
NBE:PUBS EQU      T:NBE+T:PUBSYM                                                
NBE:VALU EQU      T:NBE+T:VALUE                                                 
NBE:SEG  EQU      T:NBE+T:SEG                                                   
NBE:DCBV EQU      T:NBE+T:DCBV                                                  
NBE:DCB  EQU      T:NBE+T:DCB                                                   
NBE:ROMI EQU      T:NBE+T:ROMI                                                  
NBE:MODF EQU      T:NBE+T:MODIFY                                                
NBE:MODL EQU      T:NBE+T:MODULE                                                
NBE:MTB  EQU      T:NBE+B:MT                                                    
NBE:DECL EQU      T:NBE+T:DECL                                                  
NBE:CSEC EQU      T:NBE+T:CSECT                                                 
NBE:FWD  EQU      T:NBE+T:FWD                                                   
NBE:FWDX EQU      T:NBE+T:FWDX                                                  
NBE:SYM  EQU      T:NBE+T:SYMBOL                                                
NBE:VALX EQU      T:NBE+T:VALX                                                  
BZA:PUBV EQU      T:BZA+T:PUBVAL                                                
BZA:PUBS EQU      T:BZA+T:PUBSYM                                                
BZA:VALU EQU      T:BZA+T:VALUE                                                 
BZA:SEG  EQU      T:BZA+T:SEG                                                   
BZA:DCBV EQU      T:BZA+T:DCBV                                                  
BZA:DCB  EQU      T:BZA+T:DCB                                                   
BZA:ROMI EQU      T:BZA+T:ROMI                                                  
BZA:MODF EQU      T:BZA+T:MODIFY                                                
BZA:MODL EQU      T:BZA+T:MODULE                                                
BZA:MTB  EQU      T:BZA+B:MT                                                    
BZA:DECL EQU      T:BZA+T:DECL                                                  
BZA:CSEC EQU      T:BZA+T:CSECT                                                 
BZA:FWD  EQU      T:BZA+T:FWD                                                   
BZA:FWDX EQU      T:BZA+T:FWDX                                                  
BZA:SYM  EQU      T:BZA+T:SYMBOL                                                
BZA:VALX EQU      T:BZA+T:VALX                                                  
         TITLE    '       **** SUBROUTINE CALLS ****'                           
*                                                                               
*                                                                               
*                                                                               
BAL      EQU      X'6A'             BAL OPERATION CODE                          
*                                                                               
CHKBLANK COM,8,4,3,17  BAL,15,0,CHKBLANK                                        
INBYTS   COM,8,4,3,17  BAL,14,0,INBYTS                                          
LOADSEG  COM,8,4,3,17  BAL,15,0,LOADSEG                                         
RABORT   COM,8,4,3,17    BAL,14,0,RABORT                                        
MAPSYM   COM,8,4,3,17  BAL,12,0,MAPSYM                                          
MOVBYTS  COM,8,4,3,17  BAL,15,0,MOVBYTS                                         
PRINTSYM COM,8,4,3,17  BAL,15,0,PRINTSYM                                        
BLNKSUPR COM,8,4,3,17  BAL,13,0,BLNKSUPR                                        
RDIAG    COM,8,4,3,17  BAL,15,0,RDIAG                                           
HEXTOEBD COM,8,4,3,17  BAL,13,0,HEXTOEBD                                        
DECHEX   COM,8,4,3,17  BAL,13,0,DECHEX                                          
HEADER   COM,8,4,3,17  BAL,15,0,HEADER                                          
PRINTLO  COM,8,4,3,17  BAL,14,0,PRINTLO                                         
PREPFLD  COM,8,4,3,17  BAL,15,0,PREPFLD                                         
ADDNXT   COM,8,4,3,17     BAL,14,0,ADDNXT                                       
ADDX     COM,8,4,3,17     BAL,14,0,ADDX                                         
ALLOCOMN COM,8,4,3,17     BAL,14,0,ALLOCOMN                                     
BLDCSECT COM,8,4,3,17    BAL,13,0,BLDCSECT                                      
         DO       #MAP~=0                                                       
BOUNDRP  COM,8,4,3,17    X'6A',15,0,BOUNDRP                                     
         FIN      #MAP~=0                                                       
BOUNDRDW COM,8,4,3,17     BAL,15,0,BOUNDRDW                                     
BOUNDCS  COM,8,4,3,17    BAL,15,0,BOUNDCS                                       
DWBOUND  COM,8,4,3,17     BAL,15,0,DWBOUND                                      
COMPBS   COM,8,4,3,17     BAL,15,0,COMPBS                                       
COMPSIZE COM,8,4,3,17    BAL,14,0,COMPSIZE                                      
CONVROMX COM,8,4,3,17     BAL,13,0,CONVROMX                                     
DCBTYPE  COM,8,4,3,17     BAL,15,0,DCBTYPE                                      
EXTEND   COM,8,4,3,17     BAL,15,0,EXTEND                                       
GETDECL  COM,8,4,3,17     BAL,14,0,GETDECL                                      
INCLFWDX COM,8,4,3,17     BAL,13,0,INCLFWDX                                     
LOADERR  COM,8,4,3,17     BAL,15,0,LOADERR                                      
ROMERR   COM,8,4,3,17     BAL,15,0,ROMERR                                       
MOVEMT   COM,8,4,3,17     BAL,14,0,MOVEMT                                       
NXTSEG   COM,8,4,3,17     BAL,13,0,NXTSEG                                       
PATHEND  COM,8,4,3,17     BAL,12,0,PATHEND                                      
PUBMEM   COM,8,4,3,17 BAL,10,0,PUBMEM                                           
RAX      COM,8,4,3,17     BAL,12,0,RAX                                          
READXN   COM,8,4,3,17     BAL,15,0,READXN                                       
WRITEXN  COM,8,4,3,17     BAL,15,0,WRITEXN                                      
RESETMTA COM,8,4,3,17     BAL,14,0,RESETMTA                                     
ROMBYTE  COM,8,4,3,17     BAL,15,0,ROMBYTE                                      
ROMBYTES COM,8,4,3,17     BAL,14,0,ROMBYTES                                     
SATREF   COM,8,4,3,17     BAL,13,0,SATREF                                       
SERCHDCB COM,8,4,3,17     BAL,14,0,SERCHDCB                                     
SERCHFWD COM,8,4,3,17     BAL,14,0,SERCHFWD                                     
SERCHSEG COM,8,4,3,17     BAL,15,0,SERCHSEG                                     
SERCHSYM COM,8,4,3,17     BAL,14,0,SERCHSYM                                     
SERCHPUB COM,8,4,3,17     BAL,14,0,SERCHPUB                                     
SERCHVAL COM,8,4,3,17     BAL,15,0,SERCHVAL                                     
SERCHX   COM,8,4,3,17     BAL,14,0,SERCHX                                       
SIZECS   COM,8,4,3,17     BAL,14,0,SIZECS                                       
SKIPX    COM,8,4,3,17     BAL,13,0,SKIPX                                        
SOLVEX   COM,8,4,3,17     BAL,13,0,SOLVEX                                       
CHGRR    COM,8,4,3,17     BAL,15,0,CHGRR                                        
STORCBV  COM,8,4,3,17     BAL,14,0,STORCBV                                      
SYMFBA   COM,8,4,3,17     BAL,15,0,SYMFBA                                       
TBENTRY  COM,8,4,3,17     BAL,15,0,TBENTRY                                      
WORD     COM,8,4,3,17     BAL,15,0,WORD                                         
WRITEMT  COM,8,4,3,17     BAL,14,0,WRITEMT                                      
XBC      COM,8,4,3,17    BAL,15,0,XBC                                           
ZERONXT  COM,8,4,3,17     BAL,14,0,ZERONXT                                      
ZEROX    COM,8,4,3,17     BAL,14,0,ZEROX                                        
4BYTES   COM,8,4,3,17     BAL,15,0,4BYTES                                       
SCAN1ST  COM,8,4,3,17    BAL,14,0,SCAN1ST                                       
SCANEBC  COM,8,4,3,17    BAL,14,0,SCANEBC                                       
SCANHEX  COM,8,4,3,17    BAL,14,0,SCANHEX                                       
SCANHE   COM,8,4,3,17    BAL,14,0,SCANHE                                        
SCANDEC  COM,8,4,3,17    BAL,14,0,SCANDEC                                       
SCANDE   COM,8,4,3,17    BAL,14,0,SCANDE                                        
SCANSYM  COM,8,4,3,17     BAL,13,0,SCANSYM                                      
SCAN     COM,8,4,3,17     BAL,15,0,SCAN                                         
LBOPTION COM,8,4,3,17     BAL,13,0,LBOPTION                                     
RDCC     COM,8,4,3,17    BAL,14,0,RDCC                                          
ADDMODF  COM,8,4,3,17    BAL,13,0,ADDMODF                                       
ADRX     COM,8,4,3,17    BAL,12,0,ADRX                                          
ADRV     COM,8,4,3,17    BAL,12,0,ADRV                                          
SCANADDR COM,8,4,3,17    BAL,13,0,SCANADDR                                      
SCANLOC  COM,8,4,3,17    BAL,13,0,SCANLOC                                       
SCANR    COM,8,4,3,17    BAL,12,0,SCANR                                         
SCANX    COM,8,4,3,17    BAL,12,0,SCANX                                         
NUMSCAN  COM,8,4,3,17    BAL,13,0,NUMSCAN                                       
SCANMODF COM,8,4,3,17    BAL,14,0,SCANMODF                                      
         TITLE    '      **** PROCEDURES ****'                                  
*                 USES TEMP STACK                                               
*                 FORMAT:  PUSH  R1(,R2)  OR   PULL   R1(,R2)                   
PUSH     CNAME    1                                                             
PULL     CNAME    0                                                             
         PROC                                                                   
         DO       (AF(2)=0)|(AF(2)=AF(1))                                       
LF       GEN,8,4,3,17  X'88'+NAME,AF(1),0,PCBPOINT                              
         ELSE                                                                   
         DO       AF(2)>AF(1)                                                   
LF       LCFI     (AF(2)-AF(1)+1)&X'F'                                          
         ELSE                                                                   
LF       LCFI     (16-AF(1)+AF(2)+1)&X'F'                                       
         FIN                                                                    
         GEN,8,4,3,17     X'8A'+NAME,AF(1),0,PCBPOINT                           
         FIN                                                                    
         PEND                                                                   
         TITLE    '       **** HEX CONSTANTS ****'                              
OLAYCCI  EQU      %                                                             
*                                                                               
X:20     DATA     X'20'                                                         
X:FFFFF  DATA     X'FFFFF'                                                      
X:FFFFFF DATA     X'FFFFFF'                                                     
Y:02     DATA     X'02000000'                                                   
Y:C      DATA     X'C0000000'                                                   
Y:FFF    DATA     X'FFF00000'                                                   
Y:84     DATA     X'84000000'                                                   
Y:F      DATA     X'F0000000'                                                   
Y:FFFFFF DATA     X'FFFFFF00'                                                   
ROOT1ID  EQU      X'9000'           ROOT1 SEG ID NR                             
COMNID   EQU      X'9004'           COMMON SEG ID NR                            
PLCXTID  EQU      X'A001'           PUBLIB CONTEXT SEG ID NR                    
SAVEFLAG DATA     0                                        /SIG7-2627/*C5732    
*                                                                               
COMMON   DATA,1   7                 T:SYMBOL 'COMMON' ENTRY                     
         DATA,6   'F4:COM'                                                      
         BOUND    4                                                             
PEND     DATA,1   6                                                             
         DATA,5   'P:END'                                                       
         BOUND    4                                                             
FPMBOX   DATA,1   8                 T:SYMBOL FP MAILBOX DEF                     
         DATA,7   'FP:MBOX'                                                     
         BOUND    4                                                             
*                        *EBCDIC CONSTANTS                                      
E:SMM    DATA     'SMM'                                                         
E:NON    DATA     'NON'                                                         
E:PRE    DATA     'PRE'             PRELOAD                                     
E:JOB    DATA     'JOB'                                                         
E:DEF    DATA     'DEF'             DEFER                                       
E:REL    DATA     'REL'                                                         
E:LIN    DATA     'LIN'                                                         
E:ALL    DATA     'ALL'                                                         
E:PRO    DATA     'PRO'                                                         
E:ONT    DATA     'ONT'                                                         
E:PAC    DATA     'PAC'                                                         
E:EOD    DATA     'EOD'                                                         
E:USE    DATA     'USE'                                                         
E:SEG    DATA     'SEG '                                                        
E:LOC    DATA     'LOC '                                                        
E:ALP    DATA     'ALP'                                                         
E:ADD    DATA     'ADD'                                                         
E:R1E    DATA     'R1E'             ROOT-1-END                                  
SCAN81   TEXT     'BA  '                                                        
         TEXT     'HA  '                                                        
         TEXT     'WA'                                                          
         TEXT     'DA'                                                          
E:SYS    DATA     'SYS'                                                         
E:NLBB   DATA     X'155A5A00'       NEW LINE,EXCL,EXCL                          
E:BLANKS TEXT     '    '                                                        
E:MFDCB  TEXT     'M:F:'                                                        
E:REC    TEXT     'REC '                                                        
E:TRI    TEXT     'TRI '                                                        
E:BTD    TEXT     'BTD '                                                        
E:GO     TEXT     'GO'                                                          
E:OV     TEXT     'OV'                                                          
E:BLBLBL DATA     X'00404040'                                                   
         TITLE    '       **** TABLES ****'                                     
*                                                                               
T:OP2    DATA,2   HA(T:OP2%)-HA(T:OP2)-1 *TABLE OF 1-2 BYTE OPCODE MNEMONICS    
*                                                                               
         DATA,2   'LI','LB','LH','LW','LD','LS','LM','LC','LF','XW'             
         DATA,2   'AI','AH','AW','AD','SH','SW','SD','MI','MH','MW'             
         DATA,2   'DH','DW','CI','CB','CH','CW','CD','CS','OR','S '             
         DATA,2   'B ','BE','BG','BL','BC','RD','WD'                            
T:OP2%   EQU      %                                                             
*                                                                               
         BOUND    4                                                             
T:OP2HEX DATA,2   0                *TABLE OF T:OP2 ENTRY'S HEX OP-CODES,        
*                                   FLAGS,AND CLASSES                           
         DATA,2   X'2241',X'7210',X'5210',X'3210',X'1210',X'4A10'               
         DATA,2   X'2A10',X'7022',X'7012',X'4610',X'2041',X'5010'               
         DATA,2   X'3010',X'1010',X'5810',X'3810',X'1810',X'2341'               
         DATA,2   X'5710',X'3710',X'5610',X'3610',X'2141',X'7110'               
         DATA,2   X'5110',X'3110',X'1110',X'4510',X'4910',X'2510'               
         DATA,2   X'6802',X'6832',X'6922',X'6912',X'6982',X'6C10'               
         DATA,2   X'6D10'                                                       
*                                                                               
         BOUND    4                                                             
T:OP4    DATA,4   (T:OP4%-T:OP4)-1 *TABLE OF 3-4 BYTE OPCODE MNEMONICS          
*                                                                               
         DATA,4   'LCH ','LAH ','LCW ','LAW ','LCD ','LAD ','LCFI'              
         DATA,4   'LCF ','STB ','STH ','STW ','STD ','STS ','STM '              
         DATA,4   'STCF','ANLZ','INT ','AWM ','MTB ','MTH ','MTW '              
         DATA,4   'CLR ','CLM ','EOR ','AND ','SLS ','SLD ','SCS '              
         DATA,4   'SCD ','SAS ','SAD ','CVA ','CVS ','PSW ','PLW '              
         DATA,4   'PSM ','PLM ','MSP ','EXU ','BCS ','BCR ','BIR '              
         DATA,4   'BDR ','BAL ','BGE ','BLE ','BNE ','BEZ ','BNEZ'              
         DATA,4   'BGZ ','BGEZ','BLZ ','BLEZ','BAZ ','BANZ','BOV '              
         DATA,4   'BNOV','BNC ','BWP ','BDP ','BEV ','BOD ','BSU '              
         DATA,4   'BNSU','BSE ','BSNE','BSF ','BSNF','BSO ','BNSO'              
         DATA,4   'CAL1','CAL2','CAL3','CAL4','LPSD','XPSD','LRP '              
         DATA,4   'MMC ','WAIT','NOP ','SIO ','HIO ','TIO ','TDV '              
         DATA,4   'AIO ','PZE ','LCI '                                          
T:OP4%   EQU      %                                                             
*                                                                               
         BOUND    4                                                             
T:OP4HEX DATA,2   0                *TABLE OF T:OP4 ENTRY'S HEX OP-CODES,        
*                                   FLAGS,AND CLASSES                           
         DATA,2   X'5A10',X'5B10',X'3A10',X'3B10',X'1A10',X'1B10'               
         DATA,2   X'0234',X'7032',X'7510',X'5510',X'3510',X'1510'               
         DATA,2   X'4710',X'2B10',X'7402',X'4410',X'6B10',X'6610'               
         DATA,2   X'7315',X'5315',X'3315',X'3910',X'1910',X'4810'               
         DATA,2   X'4B10',X'2503',X'2513',X'2523',X'2533',X'2543'               
         DATA,2   X'2553',X'2910',X'2810',X'0910',X'0810',X'0B10'               
         DATA,2   X'0A10',X'1310',X'6702',X'6910',X'6810',X'6510'               
         DATA,2   X'6410',X'6A10',X'6812',X'6822',X'6932',X'6832'               
         DATA,2   X'6932',X'6922',X'6812',X'6912',X'6822',X'6842'               
         DATA,2   X'6942',X'6942',X'6842',X'6882',X'6842',X'6942'               
         DATA,2   X'6882',X'6982',X'6922',X'68A2',X'6912',X'6812'               
         DATA,2   X'6942',X'68F2',X'6982',X'6882',X'0410',X'0510'               
         DATA,2   X'0610',X'0710',X'0E10',X'0F10',X'2F02',X'6F16'               
         DATA,2   X'2E02',X'6902',X'4C10',X'4F10',X'4D10',X'4E10'               
         DATA,2   X'6E10',X'0002',X'0224'                                       
*                                                                               
         BOUND    8                                                             
T:OP8    DATA     DA(T:OP8%)-DA(T:OP8)-1  *TABLE OF 5-6 BYTE OPCODE MNEMONIC>   
         DATA     0                                                             
         DATA,8   'BNCNO   ','BIOAR   ','BIOANR  ','BIODO   ',;                 
                  'BIODNO  ','BIOSP   ','BIOSNP  ','BIOSS   ',;                 
                  'BIOSNS  '                                                    
T:OP8%   EQU      %                                                             
*                                                                               
         BOUND    4                                                             
T:OP8HEX DATA,2   0                *TABLE OF T:OP8 ENTRY'S HEX OP-CODES,        
*                                   FLAGS,AND CLASSES                           
         DATA,2   X'68C2',X'6882',X'6982',X'6942',X'6842',X'6842',;             
                  X'6942',X'6842',X'6942'                                       
         TITLE    '       **** CCI ****'                                        
CCI      EQU      %                                                             
CCI5     LW,R0    BDP:PUBS          SAVE FLAGS AND POINTERS                     
         LW,R1    BDP:PUBV                                                      
         LW,R2    BDP:SYM                                                       
         LW,R3    BDP:VALU                                                      
         LW,R4    BDP:DCBV                                                      
         LW,R5    BDP:ROMI                                                      
         LW,R6    V:SEGID                                                       
         LW,R7    V:LINKID                                                      
         LW,R8    FL:LIB                                                        
         LW,R9    NBA:SECT                                                      
         LD,R10   *PCBPOINT                                                     
         LW,R12   BDP:MODF                                                      
         LW,R13   V:NUSG                                                        
         LW,R14   V:NPLSG                                                       
         LCI      15                                                            
         STM,R0   CCSTACK                                                       
CC10     LW,R5    V:CCTYPE         *COMPARE CONTROL COMMAND IN B:C              
         LW,R6    FL:NXTCC          (IF ANY) WITH PREVIOUS COMMAND              
         SCS,R6   0,R5                                                          
         SCS,R6   0,R5                                                          
         AND,R6   Y:C                                                           
         BGZ      CC30                 *END OF SUBSTACK,EXIT FROM CCI           
         BLZ      ERORDER              *ILLEGAL ORDER OF CONTROL COMMAND        
         CI,R5    0                                                             
         BL       CC25              B IF EOD:  SHOULDNT BE HERE                 
         BE       CC50              B IF NO CURRENT CMND (GET ONE)              
         CI,R5    :BINARY                                                       
         BE       CC25              B IF BINARY CARD: SHOULDNT BE HERE          
         CI,R5    :OLOAD                                                        
         BE       %+3               B IF OLOAD CMND (DONT LOG)                  
         LI,R9    0                 NO SPECIAL ERROR HANDLING                   
         CAL1,1   FPT:RD3           LOG COMMAND ON LL                           
         LI,R5    BA(B:C)                                                       
         LI,R6    BA(B:ERRCC)+1                                                 
         LI,R8    80                                                            
         MOVBYTS                    MOVE CMND INTO ERROR-LOGGING BUFFER         
         LI,R5    ' '               ONE BLANK                                   
         STB,R5   B:ERRCC           VFC                                         
         LW,R5    V:CCTYPE          RECOVER CMND INDEX                          
         B        CC20,R5           B TO CMND PROCESSOR                         
*                                                                               
CC20     EQU      %-1                                                           
         B        CC100            *OLOAD                                       
         B        CC500            *PUBLIB                                      
         B        CC510            *ROOT                                        
         B        CC520            *SEG                                         
         B        CC800            *COMMON                                      
         B        CC810            *LCOMMON                                     
         B        CC820            *INCLUDE                                     
         B        CC830            *EXCLUDE                                     
         B        CC840            *RES                                         
         B        CC900            *LIB                                         
         B        CC1000           *MODIFY                                      
         B        CC920             *ASSIGN                                     
         B        CC25              *BINARY                                     
         B        CC1300            *LMHDR                                      
CC25     LI,R9    PROGERR          *BINARY (SHOULD NEVER TRY TO PROCESS)        
         RDIAG                                                                  
*                                                                               
*                                                                               
CC30     LW,R5    V:CCTYPE                                                      
         CI,R5    :SEG                                                          
         BNE      CC35                                                          
         LW,R11   CC94                                                          
         STW,R11  CC90+:SEG                                                     
CC35     LW,R11   CC93              ON RETURN TO CCI,THE COMMAND                
*                                   WHICH CAUSED EXIT WILL BE ALLOWED           
         CI,R5    :BINARY                                                       
         BNE      %+2                                                           
         LW,R11   CC90,R5                                                       
         STW,R11  FL:NXTCC                                                      
         MTW,0    FL:PAS2                                                       
         BEZ      CC40              BRANCH TO ENTER PASS1                       
         LI,R11   SEG:PAS2              CALL PASSTWO                            
         LOADSEG                                                                
CC40     LI,R11   SEG:PAS1              CALL PASSONE                            
         LOADSEG                                                                
         PAGE                                                                   
CC50     RDCC                       READ NEXT CONTROL COMMAND INTO B:C          
         SCAN1ST                    ... AND SCAN THE MNEMONIC FIELD             
         SLS,R8   -8                SEARCH FOR CC TYPE                          
         LW,R5    CC75                                                          
CC60     CW,R8    CC75,R5                                                       
         BE       CC70                                                          
         BDR,R5   CC60                                                          
         B        ERITEM                CONTROL COMMAND NOT RECOGNIZED          
CC70     STW,R5   V:CCTYPE          STORE TYPE                                  
         LW,R6    SCANFLAG                                                      
         BEZ      ERFITEM               ERROR,MNEMONIC HAS MORE THAN            
*                                             ONE ITEM IN THE FIELD             
         B        CC10                                                          
CC75     DATA     CC80-CC75-1                                                   
         DATA     0                 (OLOAD NEVER INPUT BY RDCC)                 
         DATA     'PUB'             :PUBLIB                                     
         DATA     'ROO'             :ROOT                                       
         DATA     'SEG'             :SEG                                        
         DATA     'COM'             :COMMON                                     
         DATA     'LCO'             :LCOMMON                                    
         DATA     'INC'             :INCLUDE                                    
         DATA     'EXC'             :EXCLUDE                                    
         DATA     'RES'             :RES                                        
         DATA     'LIB'             :LIB                                        
         DATA     'MOD'             :MODIFY                                     
         DATA     'ASS'             :ASSIGN                                     
         DATA     'BIN'             :BINARY                                     
         DATA     'LMH'             :LMHDR                                      
         PAGE                                                                   
CC80     LW,R5    V:CCTYPE         *CONTROL COMMAND PROCESSING FINISHED;        
         LW,R8    FL:NXTCC          SET FLAG FOR NEXT CONTROL COMMAND           
         LW,R9    CC90,R5                                                       
         CW,R9    X:ORENT           REPLACE OR ACCUMULATE SYNTAX CONTROLS       
         BAZ      CC85                                                          
         EOR,R9   X:ORENT           ACCUMULATE (DELETE 'OR' FLAG)               
         OR,R9    R8                                                            
CC85     STW,R9   FL:NXTCC                                                      
         LI,R9    0                                                             
         STW,R9   V:CCTYPE                                                      
         B        CCI5                                                          
*                                                                               
X:ORENT  DATA     ORENTRY                                                       
*                                                                               
         DATA     NOOLOAD+NOPUB+NOROOT+NOSEG+NOCOM+NOLCOM+NOINC+NOEXC;          
                  +NORES+NOLIB+NOMOD+NOASS+NOBIN;                               
                  +NOLMH+NOEOF       (EOF)                                      
CC90     DATA     0                                                             
         DATA     NOOLOAD+NOSEG+NOCOM+NOLCOM+NOEXC+NOLIB;                       
                  +NOBIN+MODEND+ASSEND+LMHEND+EOFEND                            
*                 (OLOAD WITHOUT 'GO' KEY)                                      
         DATA     NOOLOAD+NOROOT+NOPUB+SEGEND+NOCOM+NOLCOM;                     
                  +MODEND+ASSEND+EOFEND+NOBIN+NORES+NOLMH (PUBLIB)              
         DATA     NOOLOAD+NOPUB+NOROOT+SEGEND+MODEND+ASSEND+EOFEND;             
                  +NOBIN+LMHEND+COMEND   (ROOT)                                 
         DATA     NOOLOAD+NOPUB+NOROOT+SEGEND+MODEND+ASSEND+EOFEND;             
                  +NOBIN+LMHEND+COMEND   (SEG)                                  
         DATA     NOOLOAD+NOPUB+NOROOT+SEGEND+NOCOM+NOLCOM+NOINC+NOEXC;         
                  +NORES+NOLIB+NOMOD+ASSEND+NOBIN+EOFEND;                       
                  +LMHEND    (COMMON)                                           
         DATA     ORENTRY+NOROOT+NOPUB     (LCOMMON)                            
         DATA     ORENTRY+NOROOT+NOPUB     (INCLUDE)                            
         DATA     ORENTRY+NOROOT+NOPUB     (EXCLUDE)                            
         DATA     ORENTRY+NOROOT+NOPUB       (RES)                              
         DATA     ORENTRY+NOROOT+NOPUB+NOLIB   (LIB)                            
         DATA     NOOLOAD+NOPUB+NOROOT+SEGEND+COMEND+NOLCOM+NOINC;              
                  +NOEXC+NORES+NOLIB+ASSEND+EOFEND+LMHEND;                      
                  +NOBIN    (MODIFY)                                            
         DATA     NOOLOAD+NOPUB+NOROOT+NOSEG+NOCOM+NOLCOM+NOINC+NOEXC;          
                  +NORES+NOLIB+NOMOD+EOFEND+NOBIN      (ASSIGN)                 
         DATA     NOOLOAD+NOPUB+NOROOT+COMEND+NOLCOM+NOINC;                     
                  +NOEXC+NORES+NOLIB+SEGEND+ASSEND+EOFEND+LMHEND;               
                  +NOBIN   (BINARY)                                             
         DATA     NOOLOAD+NOPUB+NOROOT+NOSEG+NOCOM+NOLCOM+NOINC;                
                  +NOEXC+NORES+NOLIB+NOMOD+NOBIN+NOLMH+EOFEND                   
*                 (LMHDR)                                                       
*                                                                               
*                                                                               
CC91     DATA     NOOLOAD+NOPUB+NOROOT+NOSEG+NOCOM+NOLCOM+NOLIB+MODEND;         
                  +ASSEND+NOBIN+EOFEND+NOEXC+LMHEND                             
*                 (OLOAD WITH 'GO' KEY)                                         
CC92     DATA     NOOLOAD+NOPUB+NOROOT+NOSEG+NOCOM+NOLCOM+NOINC+NOEXC;          
                  +NORES+NOLIB+MODEND+ASSEND+NOBIN+EOFEND+LMHEND                
*                                           (OLOAD WITH 'GO,LINKS' OPTIO        
CC93     DATA     NOOLOAD+NOPUB+NOROOT+NOLCOM+NOINC+NOEXC+NORES;                
                  +NOLIB+NOBIN+EOFEND (AFTER COMMAND SUBSTACK END)              
CC94     DATA     NOOLOAD+NOPUB+NOROOT+SEGEND+MODEND+ASSEND+EOFEND;             
                  +NOBIN+LMHEND+COMEND   (ORIGINAL SEG IN CC90)                 
         DATA     NOOLOAD+NOPUB+NOROOT+NOSEG+NOCOM+NOLCOM+NOMOD;                
                  +NOASS+NOEOF+NOLMH+BINEND                                     
*                 (PUBLIB IF ROMS INPUT VIA 'C')                                
         DATA     NOOLOAD+NOPUB+NOROOT+NOSEG+NOMOD+NOASS+NOEOF;                 
                  +NOCOM+NOLMH+BINEND   (ROOT IF ROMS INPUT VIA 'C')            
         DATA     NOOLOAD+NOPUB+NOROOT+NOSEG+NOMOD+NOASS+NOEOF;                 
                  +NOCOM+NOLMH+BINEND  (SEG IF ROMS INPUT VIA 'C')              
*                                                                               
*                                                                               
*                                                                               
*                                                                               
*                                                                               
CC95     LI,R0    -1                'EOF' ENCOUNTERED ON M:C                    
         B        CC98                                                          
*                                                                               
*                                                                               
*                                                                               
CC97     LI,R0    :BINARY           BINARY RECORD INPUT INTO B:C                
CC98     STW,R0   V:CCTYPE                                                      
         B        CC10                                                          
         PAGE                                                                   
CC100    RES      0                 PROCESS OLOAD CMND                          
         LI,R0    ':'                                                           
         STB,R0   B:C               FIX LEAD CHAR FOR SCAN                      
         SCAN1ST                        SCAN PAST MNEMONIC FIELD                
         LW,R8    K:BPEND           ALLOCATE FBA OF DYNAMIC TABLE AREA          
         SLS,R8   2                                                             
         BOUNDRDW                                                               
         STW,R8   FBA:TABS                                                      
         STW,R8   FBA:PUBS                                                      
         STW,R8   LBA:PUBS                                                      
         STW,R8   FBA:PUBV                                                      
         STW,R8   LBA:PUBV                                                      
CC110    LW,R6    SCANFLAG          SCAN NEXT OPTION ON OLOAD CC                
         CI,R6    2                     END-OF-CC                               
         BE       CC440                     YES                                 
         CI,R6    1                     END-OF-SUBFIELD                         
         BNE      OERFITEM                  NO,ERROR                            
         SCANEBC                        SCAN KEYWORD OF NEXT OPTION             
         SLS,R8   -8                                                            
         LW,R5    CC130                                                         
CC120    CW,R8    CC130,R5                                                      
         BE       CC140,R5              BRANCH TO PROCESS OPTION                
         BDR,R5   CC120                                                         
         B        OERITEM               KEYWORD NOT RECOGNIZED,ERROR            
CC130    DATA     CC140-CC130       TABLE OF OLOAD OPTIONS:                     
         DATA     'GO '                 GO                                      
         DATA     'PUB'                 PUBLIB                                  
         DATA     'LIB'                 LIB                                     
         DATA     'BAC'                 BACK                                    
         DATA     'FOR'                 FORE                                    
         DATA     'TAS'                 TASKS                                   
         DATA     'TEM'                 TEMP                                    
         DATA     'FIL'                 FILE                                    
         DATA     'MAP'                 MAP                                     
         DATA     'BOU'                 BOUND                                   
         DATA     'UDC'                 UDCB                                    
         DATA     'STE'                 STEP                                    
         DATA     'PRI'             PRIMARY                                     
         DATA     'SEC'             SECONDARY                                   
         DATA     'SMM'             SMM                                         
CC140    EQU      %-1               OLOAD OPTION SWITCH                         
         B        CC150                 GO                                      
         B        CC390                 PUBLIB                                  
         B        CC380                 LIB                                     
         B        CC180                 BACK                                    
         B        CC185                 FORE                                    
         B        CC250                 TASKS                                   
         B        CC260                 TEMP                                    
         B        CC330                 FILE                                    
         B        CC300                 MAP                                     
         B        CC290                 BOUND                                   
         B        CC270                 UDCB                                    
         B        CC280                 STEP                                    
         DO       (#MAP+#UST)>0                                                 
         B        CC240             PRIMARY                                     
         B        CC245             SECONDARY                                   
         DO       #MAP                                                          
         B        CC248             SMM                                         
         ELSE     #MAP                                                          
         B        CC110             SIMPLIFIED MEM MGT (IGNORED)                
         FIN      #MAP                                                          
         ELSE     (#MAP+#UST)>0                                                 
         B        CC110             PRIMARY (IGNORED)                           
         B        CC110             SECONDARY (IGNORED)                         
         B        CC110             SMM (IGNORED)                               
         FIN      (#MAP+#UST)>0                                                 
         PAGE                                                                   
CC150    LW,R6    SCANFLAG          PROCESS 'GO' OPTION ON OLOAD CC             
         BGZ      CC160                 (END OF SUBFIELD/CC)                    
         SCANEBC                                                                
         SLS,R8   -8                                                            
         CW,R8    E:LIN                                                         
         BNE      OERITEM                                                       
         LI,R1    -1                    (GO,LINKS)                              
         LW,R3    CC92                                                          
         B        CC170                                                         
CC160    LI,R1    1                     (GO)                                    
         LW,R3    CC91                                                          
CC170    STW,R1   FL:GO            *SET GO FLAG                                 
         STW,R3   CC90+:OLOAD       *SET UP NEXT-CC-BITS IN OLOAD ENTRY         
         B        CC110                                                         
         PAGE                                                                   
CC180    EQU      %                 (BACK)                                      
         DO       #MAP=0                                                        
         LI,R3    SECNDRY                                                       
         STW,R3   FL:PRIM           UNMAPPED BACKGND AUTOMATIC SECONDARY        
         FIN                        #MAP=0                                      
         LI,R3    3                 FLAG:  EXPLICIT 'BACK'                      
         B        CC190                                                         
CC185    RES      0                                                             
         DO       (#MAP+#UST)=0                                                 
         LI,R3    PRIMARY           UNMAPPED FGD MUST BE                        
         STW,R3   FL:PRIM           PRIMARY                                     
         FIN      (#MAP+#UST)=0                                                 
         LI,R3    0                 FLAG:  FOREGROUND                           
CC190    STW,R3   FL:BACK                                                       
         LI,R9    -1                FLAG:  LIMITS NOT SPECIFIED                 
         STD,R9   FBA:LIM                                                       
         LI,R2    0                 FLAG:  NO 'REL' OPTION                      
CC191    LW,R6    SCANFLAG                                                      
         BGZ      CC200             BRANCH IF END OF SUPFIELD                   
         SCANHE                     GET 'REL' OR FWA                            
         CI,R9    0                                                             
         BE       CC192             BRANCH IF NUMERIC (FWA)                     
         SLS,R8   RIGHT*8           FIRST THREE CHARACTERS ONLY                 
         CW,R8    E:REL                                                         
         BNE      OERITEM           BRANCH IF NOT 'REL'                         
         LI,R2    1                 FLAG:  'REL' SPECIFIED                      
         B        CC191             BRANCH TO GET FWA                           
CC192    CI,R8    X'20000'                                                      
         BGE      OERITEM           BRANCH IF TOO BIG                           
         CI,R8    0                                                             
         BL       OERITEM           BRANCH IF TOO SMALL                         
         SLS,R8   LEFT*2            WA TO BA                                    
         STW,R8   FBA:LIM           SAVE PROGRAM FBA                            
         STB,R2   FBA:LIM           SAVE 'REL' OPTION FLAG                      
         LW,R6    SCANFLAG                                                      
         BGZ      CC200             BRANCH IF END OF SUBFIELD                   
         SCANHEX                    GET LWA                                     
         CI,R8    X'20000'                                                      
         BGE      OERITEM           BRANCH IF TOO BIG                           
         SLS,R8   LEFT*2            WA TO BA                                    
         AI,R8    3                 LAST BYTE OF LAST WORD                      
         LW,R9    FBA:LIM                                                       
         AND,R9   X:FFFFFF                                                      
         CW,R8    R9                                                            
         BLE      OERITEM           BRANCH IF TOO SMALL                         
         STW,R8   LBA:LIM                                                       
CC200    LW,R0    FL:BACK                                                       
         BGZ      CC110                 NO                                      
         LW,R0    FL:TASKS              YES, SET DEFAULT FOR (TASKS)            
         BGZ      CC110                                                         
         MTW,1    FL:TASKS                                                      
         B        CC110                                                         
         DO       (#MAP+#UST)>0                                                 
         PAGE                                                                   
CC240    RES      0                 PRIMARY OPTION                              
         MTW,0    FL:TASKS                                                      
         BNEZ     %+2               BRANCH IF 'TASKS' WAS SPECIFIED             
         MTW,1    FL:TASKS          SET DEFAULT VALUE OF 'TASKS'                
         LW,R2    FL:BACK                                                       
         CI,R2    3                                                             
         BE       %+3               B IF EXPLICIT 'BACK'. ERROR LATER.          
         LI,R2    0                                                             
         STW,R2   FL:BACK           IF IMPLICIT, CHANGE TO 'FORE'               
         LI,R2    PRIMARY                                                       
         B        CC246                                                         
CC245    RES      0                 SECONDARY OPTION                            
         LI,R2    SECNDRY                                                       
CC246    RES      0                                                             
         STW,R2   FL:PRIM                                                       
         B        CC110                                                         
CC248    RES      0                 SMM OPTION                                  
         LI,R2    1                                                             
         STW,R2   FL:SMM            SET SMM FLAG                                
         B        CC110                                                         
         FIN      (#MAP+#UST)>0                                                 
         PAGE                                                                   
CC250    LI,R2    FL:TASKS          (TASKS,N)                                   
         LI,R0    4                                                             
         B        CC265                                                         
CC260    LI,R2    FL:TEMP           (TEMP,N1,N2)                                
         LI,R0    1                                                             
CC265    OR,R0    FLTMPTSK                                                      
         STW,R0   FLTMPTSK                                                      
         B        CC275                                                         
CC270    LI,R2    FL:UDCB           (UDCB,N)                                    
CC275    LW,R0    SCANFLAG                                                      
         BGZ      OERFITEM                                                      
         SCANDEC                                                                
         STW,R8   0,R2                                                          
         CI,R2    FL:TEMP                                                       
         BNE      CC110             BRANCH IF NOT 'TEMP' OPTION                 
         LW,R0    SCANFLAG                                                      
         BNEZ     CC110             BRANCH IF NO RTMP SIZE                      
         SCANDEC                                                                
         DO       #MAP=0                                                        
         CI,R8    64                COMPARE REQUESTED AND REQUIRED SIZES        
         BGE      %+2               B IF REQUESTED .GT. REQUIRED                
         LI,R8    64                USE MIN RQD SIZE                            
         FIN      #MAP=0                                                        
         STW,R8   FL:RTMP                                                       
         LI,R9    2                                                             
         STS,R9   FLTMPTSK                                                      
         B        CC110                                                         
CC280    LW,R0    SCANFLAG          (STEP)                                      
         BEZ      OERFITEM                                                      
         LW,R0    K:JCP1            IS THE JOB ATTENDED                         
         CI,R0    X'2'                                                          
         BAZ      OERSTEP               NO,ILLEGAL OPTION                       
         MTW,1    FL:STEP                                                       
         B        CC110                                                         
CC290    LW,R0    SCANFLAG          (BOUND,VALUE)                               
         BGZ      OERFITEM                                                      
         SCANHEX                                                                
         LW,R2    R8                                                            
         BEZ      OERITEM               ERROR,ZERO BOUND                        
         LI,R3    0                                                             
CC295    SCD,R2   -1                                                            
         CI,R3    0                                                             
         BE       CC295                                                         
         CI,R2    0                                                             
         BNE      OERITEM               ERROR,NOT POWER OF TWO                  
         SLS,R8   2                                                             
         AI,R8    -1                                                            
         STW,R8   FL:BOUND                                                      
         B        CC110                                                         
         PAGE                                                                   
CC300    LW,R6    SCANFLAG                                                      
         BEZ      CC310                                                         
         MTW,1    FL:MAP            (MAP)                                       
         B        CC110                                                         
CC310    SCANEBC                                                                
         SLS,R8   -8                                                            
         CW,R8    E:PRO                                                         
         BNE      CC320                                                         
         MTW,2    FL:MAP            (MAP,PROGRAM)                               
         LW,R6    SCANFLAG                                                      
         BEZ      CC322             BRANCH IF MORE PARAMETERS                   
         B        CC110                                                         
CC320    CW,R8    E:ALL                                                         
         BNE      OERITEM                                                       
         MTW,3    FL:MAP            (MAP,ALL)                                   
         LW,R6    SCANFLAG                                                      
         BNEZ     CC110             BRANCH IF NO MORE PARAMETERS                
CC322    SCANEBC                    GET KEYWORD FOR SORT TYPE                   
         SLS,R8   RIGHT*8           ONLY FIRST 3 CHARACTERS                     
         CW,R8    E:ALP                                                         
         BNE      CC325             BRANCH IF NOT 'ALP'                         
         MTW,1    FL:SORT           SET FLAG TO ZERO                            
         B        CC110             GET NEXT PARAMETER GROUP                    
CC325    CW,R8    E:ADD                                                         
         BNE      OERITEM           BRANCH IF NOT 'ADD'                         
         MTW,2    FL:SORT           SET FLAG TO 1                               
         B        CC110                                                         
         PAGE                                                                   
CC330    RES      0                                                             
         LW,R9    GIOFA             FLAGS FOR FILE/ACNT TYPE IO ID              
         STW,R9   GIOCT                                                         
         LI,R9    GIOCT             GETIOID CONTROL TABLE ADDR                  
         BAL,R8   GETIOID           SCAN IO MEDIUM NAME                         
         CI,R6    0                                                             
         BL       OERITEM           B IF SCAN ERROR                             
         LW,R0    GIOCT+1                                                       
         CI,R0    'BT'                                                          
         BNE      CC360             B IF NOT BT AREA                            
         LW,R0    GIOCT+2                                                       
         CW,R0    E:OV                                                          
         BNE      OERITEM           B IF BT BUT NOT OV                          
CC360    RES      0                                                             
         LW,R0    GIOCT                                                         
         LW,R1    GIOBITS                                                       
         STS,R0   FPT:ASN+1         SET IO ID FLAGS AS CAL P-BITS               
         LI,R7    M:OV                                                          
         LI,R9    0                                                             
         CAL1,1   FPT:ASN           ASSIGN M:OV TO LOAD MODULE FILE             
         LI,R9    PT:CC6                                                        
         CAL1,1   FPT:CC1              *OPEN M:OV AND RETURN TO                 
*                                       OERFUND IF FILE NOT RECOGNIZED          
         CAL1,1   FPT:CC2              *CLOSE M:OV                              
         B        CC110                                                         
         PAGE                                                                   
CC380    LI,R6    0                 (LIB,USER,SYSTEM)                           
         STW,R6   FL:LIB                                                        
         LI,R2    2                                                             
CC385    LW,R6    SCANFLAG                                                      
         BGZ      CC110                 END-OF-SUBFIELD                         
         LBOPTION                   SCAN OPTION AND STORE IN FL:LIB             
         CI,R2    3                                                             
         BE       CC385                                                         
         LI,R2    2                                                             
         CB,R8    FL:LIB,R2                                                     
         BE       OERITEM               ERROR,SAME LIBRARY SPECIFIED            
         BNE      CC110                                                         
         PAGE                                                                   
CC390    LW,R6    SCANFLAG          (PUBLIB,NAME1,NAME2,NAME3)                  
         BGZ      OERFITEM              ERROR,NAME NOT SPECIFID                 
CC395    SCANEBC                    SCAN PUBLIB NAME                            
         BAL,R10  CC400             OBTAIN PUBLIB SYMBOL TABLE                  
         LW,R6    SCANFLAG                                                      
         BGZ      CC110             BRANCH IF NO MORE NAMES                     
         B        CC395             BRANCH FOR NEXT PUBLIB                      
*                                                                               
CC400    LW,R3    WDP:PL                                                        
         CI,R3    PLSIZE-1                                                      
         BGE      OERITEM           BRANCH IF TOO MANY PUBLIBS                  
         PUSH     10                                                            
         STW,R8   T:PL,R3                                                       
         STW,R9   T:PL+1,R3                                                     
         STW,R8   F:PUBL+5                                                      
         STW,R9   F:PUBL+6                                                      
         LI,R9    WA(PT:CC6)                                                    
         CAL1,1   FPT:CC3          *OPEN DCB TO VALIDATE FILE NAME              
         LI,R5    WA(F:PUBL)       *READ PUBLIB FILE HEADER INTO T:PL           
         LW,R6    R3                ENTRY                                       
         AI,R6    T:PL+2               (BA OF I/O BUFFER)                       
         SLS,R6   2                                                             
         LI,R9    (PLESIZE-2)*4        (NO. OF BYTES IN HEADER)                 
         LI,R12   0                    (GRANULE NO. OF HEADER)                  
         READXN                                                                 
         LW,R8    T:PL+PLPLWO,R3    PUBLIB ORIGIN                               
         LW,R9    T:PL+PLPLML,R3    PUBLIB MEM BL                               
         AND,R8   X:FFFFF                                                       
         AND,R9   X:FFFFF                                                       
         SLS,R9   RIGHT*2           BL TO WL                                    
         AW,R9    R8                                                            
         AI,R9    -1                LWA                                         
         PUBMEM                     CHECK FOR CONFLICTS                         
         LW,R8    T:PL+PLCXWO,R3    CONTEXT ORIGIN                              
         LW,R9    T:PL+PLCXML,R3    CONTEXT MEM BL                              
         AND,R8   X:FFFFF                                                       
         AND,R9   X:FFFFF                                                       
         SLS,R9   RIGHT*2           BL TO WL                                    
         AW,R9    R8                                                            
         AI,R9    -1                LWA                                         
         PUBMEM                     CHECK FOR CONFLICTS                         
         LI,R5    BA(T:PL)+PLNSEGS                                              
         LB,R5    *R3,R5            NR OF SEGS                                  
         AWM,R5   V:NPLSG           ADD TO TOTAL NR OF PUBLIB SEGS              
         LW,R5    FBA:PUBS          CURRENT BA OF T:PUBSYM                      
         LW,R9    T:PL+PLVALBL,R3   BL OF NEXT T:PUBVAL SUBTABLE                
         LW,R8    BDP:PUBV          CURRENT T:PUBVAL BL                         
         AWM,R9   BDP:PUBV          NEW T:PUBVAL BL                             
         AW,R8    FBA:PUBV          BA FOR NEXT T:PUBVAL SUBTABLE               
         LW,R7    R8                SAVE FOR READ PARAMETER                     
         AW,R8    R9                END OF NEW T:PUBVAL                         
         BOUNDRDW                                                               
         STW,R8   R6                NEW BA FOR T:PUBSYM                         
         STW,R8   FBA:PUBS                                                      
         STW,R8   LBA:PUBV                                                      
         LW,R8    BDP:PUBS          BL OF CURRENT T:PUBSYM                      
         BEZ      CC410             BRANCH IF NO T:PUBSYM TO MOVE               
         MOVBYTS                    MAKE SPACE FOR NEW T:PUBVAL                 
CC410    LI,R5    WA(F:PUBL)        DCB TO READ PUBLIB FILE                     
         LW,R6    R7                BA FOR NEXT T:PUBVAL SUBTABLE               
*                                   (R9) IS STILL BL TO READ                    
         LW,R12   T:PL+PLVALGO,R3   GRAN NR OF VAL TABLE                        
         LW,R12   T:PL+PLVALGO,R3   GRAN NR OF VALUE TABLE                      
         READXN                                                                 
         LI,R5    WA(F:PUBL)        READ PUBLIB SYMBOL TABLE INTO T:PUBS        
         LW,R6    FBA:PUBS              (BA OF BUFFER)                          
         AW,R6    BDP:PUBS                                                      
         LW,R9    T:PL+PLSYMBL,R3   BL OF SYMBOL TABLE                          
         AWM,R9   BDP:PUBS                                                      
         LW,R12   T:PL+PLSYMGO,R3   GRAN NR OF SYMBOL TABLE                     
         READXN                                                                 
         AI,R3    PLESIZE           NEXT T:PL ENTRY                             
         STW,R3   WDP:PL            SAVE NEW END OF T:PL                        
         LI,R0    0                                                             
         STW,R0   T:PL,R3           MARK END OF T:PL WITH ZERO WORD             
CC430    LW,R8    FBA:PUBS          CALCULATE LBA+1 OF T:PUBSYM                 
         AW,R8    BDP:PUBS                                                      
         BOUNDRDW                                                               
         STW,R8   LBA:PUBS                                                      
         PULL     10                                                            
         B        *R10                                                          
         PAGE                                                                   
CC440    RES      0                 FINISHED PROCESSING OLOAD OPTIONS           
         DO       #MAP=0                                                        
         LW,R1    FL:BACK                                                       
         BNEZ     CC441             BRANCH IF BACKGROUND                        
         LW,R8    K:FGDBG2          DEFAULT FGD FWA                             
         LW,R9    K:FGDEND          DEFAULT FGD LWA                             
         B        CC442                                                         
CC441    LW,R8    K:BACKBG          DEFAULT BKG FWA                             
         LW,R9    K:FGDBG2                                                      
         AI,R9    -1                DEFAULT BKG LWA                             
         ELSE                                                                   
         LW,R8    K:BACKBG          DEFAULT FWA                                 
         LI,R9    X'1DFFF'                                                      
         LW,R1    FL:PRIM                                                       
         CI,R1    SECNDRY                                                       
         BANZ     CC442             BRANCH IF SECONDARY                         
* FOR PRIMARY TASKS, DEFAULT IS FIRST FGD PRIVATE MEMORY                        
* PARTITION, IF THERE IS ONE                                                    
         LW,R8    K:FGDBG2                                                      
         LW,R9    K:FGDEND                                                      
         LI,R1    2                 INITIAL PPT INDEX (1 IS RBM AREA)           
         LW,R10   K:PPT                                                         
         AND,R10  X:FFFFFF          WA OF PPT BASE                              
         LI,R3    7                 MASK FOR PARTITION TYPE FIELD               
CC441A   LW,R2    *R10,R1           PPT ENTRY FOR PARTITION                     
         LB,R2    R2                FLAG BYTE FROM ENTRY                        
         AND,R2   R3                TYPE FIELD FROM BYTE                        
         CI,R2    1                                                             
         BE       CC441B            BRANCH IF PARTITION IS FGD PRIVATE          
         AI,R1    1                 INCREMENT PPT INDEX                         
         CB,R1    K:RMPT            COMPARE WITH LAST PPT INDEX                 
         BLE      CC441A            B IF NOT REACHED YET                        
         B        CC442             NO FGD PRIV PARTITION                       
CC441B   LD,R8    *K:RMPT,R1                                                    
         AND,R8   X:FFFFFF                                                      
         AND,R9   X:FFFFFF                                                      
         FIN                                                                    
CC442    STW,R8   V:REL             BIAS FOR REL OPTION                         
         SLD,R8   LEFT*2            DEFAULT LIMITS WA TO BA                     
         AI,R9    3                 LAST BYTE OF LAST WORD                      
         LW,R2    FBA:LIM                                                       
         BLZ      CC443             BRANCH IF NO SPECIFIED LIMITS               
         LB,R1    R2                REL FLAG                                    
         BEZ      %+2               BRANCH IF NOT REL.  (R1)=0                  
         LW,R1    R8                (R1)=REL BIAS (BA)                          
         AND,R2   X:FFFFFF          MASK FOR SPECIFIED FBA                      
         AW,R2    R1                ADD REL BIAS OR ZERO                        
         LW,R8    R2                                                            
         LW,R2    LBA:LIM           SPECIFIED LBA                               
         BLZ      CC443             BRANCH IF LWA WAS NOT SPECIFIED             
         AW,R2    R1                ADD REL BIAS OR ZERO                        
         LW,R9    R2                                                            
CC443    RES      0                                                             
         DO       #MAP~=0                                                       
         LW,R1    FL:PRIM                                                       
         CI,R1    SECNDRY                                                       
         BAZ      %+2               BRANCH IF NOT SECONDARY                     
         BOUNDRP                    PAGE-BOUND THE FWA                          
         FIN                        #MAP                                        
         BOUNDRDW                                                               
         STD,R8   FBA:LIM           STORE THE PROGRAM AREA LIMITS               
         STW,R8   NBA:SECT          STORE POINTER TO NEXT BYTE TO LOAD          
         DO       #MAP~=0                                                       
         LW,R9    FL:PRIM                                                       
         CI,R9    PRIMARY                                                       
         BAZ      CC446             BRANCH IF NOT PRIMARY                       
         MTW,0    FL:SMM                                                        
         BNEZ     ERSMM             B IF PRIMARY SMM                            
         LW,R9    FL:BACK                                                       
         BNEZ     OERBP             BRANCH IF BCKG PRIMARY                      
CC446    RES      0                                                             
         MTW,0    FL:SMM            SMM OPTION                                  
         BEZ      CC447             BRANCH IF NOT                               
         MTW,0    V:NPLSG           PUBLIBS ILLEGAL                             
         BNEZ     ERSMM             BRANCH IF PUBLIBS USED                      
         FIN                                                                    
CC447    RES      0                                                             
         LI,R9    0                                                             
         CAL1,1   FPT:CC8          *SET M:X1 FORMAT TO BLOCKED WITH             
*                                   120 BYTE RECORDS                            
         CAL1,1   FPT:CCI6         *OPEN M:X2 TO GET RFT INDEX TO GET           
         LI,R7    7                 GRANULE SIZE OF X2 AND THEN CLOSE           
         LB,R7    *FPT:CCI6,R7      M:X2                                        
         LH,R2    *K:RFT4,R7                                                    
         AND,R2   X:FFFF                                                        
         CAL1,1   FPT:CCI7                                                      
         LW,R3    K:BCKEND         *CALCULATE THE NUMBER OF BYTES               
         AI,R3    1                 IN THE DYNAMIC TABLE AREA AND               
         SLS,R3   2                 ROUND DOWN TO A DOUBLEWORD BOUNDARY         
         SW,R3    LBA:PUBS                                                      
         SLS,R3   -3                                                            
         SLS,R3   3                                                             
         LI,R4    0          *DETERMINE THE INITIAL BYTE SIZE FOR EACH          
         LI,R1    T:PUBSYM+1   DYNAMIC TABLE AREA                               
ONE450   LW,R9    T:BZA,R1          IS THE AREA TO BE ALLOCATED BY RATIO        
         BLZ      ONE460                YES                                     
         MW,R9    T:NBE,R1          IS THIS THE NO. OF ENTRIES FOR AREA         
         BNEZ     ONE455               *YES,NOW EQUALS NO. OF BYTES             
         LW,R9    T:BZA,R1              *NO,EQUALS NO. OF BYTES FOR AREA        
ONE455   LW,R8    R9                                                            
         BOUNDRDW                                                               
         STW,R8   T:BZA,R1                                                      
         SW,R3    R8                R3=NO. OF UNALLOCATED BYTES                 
         B        ONE465                                                        
ONE460   SW,R4    R9                R4=SUM OF RATIO PARTS                       
ONE465   AI,R1    1                                                             
         CI,R1    T:VALX                                                        
         BLE      ONE450                                                        
         CI,R3    0                 IS THERE ANY SPACE LEFT TO ALLOCATE         
         BG       ONE475                                                        
ONE470   LI,R9    BACKSIZE               NO,OUTPUT ALARM 'BACKGROUND            
         RDIAG                              TOO SMALL' AND ABORT                
         B        %                                                             
ONE475   DW,R3    R4                     YES,ALLOCATE REMAINING AREAS           
         SLS,R3   -3                         BY RATIO FACTOR                    
         SLS,R3   3                                                             
         LI,R1    T:PUBSYM+1                                                    
ONE480   LCW,R9   T:BZA,R1          IS AREA TO BE ALLOCATED BY RATIO            
         BLEZ     ONE485                NO                                      
         MW,R9    R3                    YES,MULTIPLY BY RATIO FACTOR            
         STW,R9   T:BZA,R1                                                      
ONE485   AI,R1    1                                                             
         CI,R1    T:VALX                                                        
         BLE      ONE480                                                        
         LW,R9    BZA:MTB          *IS THE MODULE TABLES BUFFER EQUAL           
         CW,R9    R2                OR GREATER THAN X2 GRANULE SIZE             
         BL       ONE470                NO,BACKGROUND TOO SMALL                 
         DW,R9    R2                    YES,MAKE AN EVEN MULTIPLE OF            
         MW,R9    R2                        THE GRANULE SIZE                    
         STW,R9   BZA:MTB                                                       
         LI,R1    T:PUBSYM          ALLOCATE DYNAMIC TABLE AREAS                
         LW,R8    LBA:PUBS                                                      
CC490    BOUNDRDW                                                               
         AI,R1    1                                                             
         STW,R8   T:FBA,R1                                                      
         AW,R8    T:BZA,R1                                                      
         STW,R8   T:LBA,R1                                                      
         CI,R1    B:MT                  (B:MT OVERLAYS T:DECL,ETC.)             
         BNE      CC493                                                         
         LW,R8    FBA:MTB                                                       
         B        CC490                                                         
CC493    CI,R1    T:FWDX                                                        
         BNE      CC495                                                         
         LW,R8    LBA:MTB                                                       
CC495    CI,R1    T:VALX                                                        
         BL       CC490                                                         
         LW,R0    K:BCKEND              (LWA OF AVAILABLE CORE)                 
         AI,R0    1                                                             
         SLS,R0   2                     (LBA+1 OF AVAILABLE CORE)               
         STW,R0   LBA:VALX                                                      
         STW,R0   BAP:VALX                                                      
         CW,R0    FBA:VALX          IS FBA OF T:VALX > LBA OF T:VALX            
         BL       ONE470                YES,BACKGROUND TOO SMALL                
*                 SET FOR GO OR GO,LINKS                                        
         NXTSEG                         YES,INITIALIZE FOR ROOT AND             
         LI,R0    ROOT1ID                                                       
         STH,R0   *R5               SET ROOT1 ID NR IN T:SEG                    
         LI,R0    PCBSIZE                   ALLOCATE SPACE FOR PCB              
         AWM,R0   NBA:SECT                                                      
         LI,R5    BA(CC499)                  SET T:ROMI ENTRY                   
         LW,R0    FL:GO                                                         
         BGZ      CC496                                                         
         LI,R5    BA(CC498)                                                     
CC496    LI,R1    T:ROMI                                                        
         ADDNXT                                                                 
         B        CC80                                                          
*                                                                               
CC498    DATA,2   1,3               (GO,LINKS) T:ROMI ENTRY                     
CC499    DATA,2   -5,3              (GO) T:ROMI ENTRY                           
         PAGE                                                                   
CC500    RES      0                                                             
*                 CANCEL DEFAULT 'GO' OPTION                                    
         LI,R0    0                                                             
         STW,R0   BDP:ROMI                                                      
         STW,R0   BDP:SEG           INITIALIZED IN NXTSEG                       
         STW,R0   BDP:VALU          INITIALIZED IN NXTSEG                       
         STW,R0   BDP:SYM           INITIALIZED IN NXTSEG                       
         STW,R0   FL:GO                                                         
         LI,R0    -PCBSIZE                                                      
         AWM,R0   NBA:SECT                                                      
         MTW,-1   V:NUSG                                                        
*                 SET FOR PUBLIB LOAD                                           
         MTW,1    FL:PUBL           :PUBLIB CONTROL COMMAND                     
         LI,R9    X'FFFF'                                                       
         LI,R8    'FP'                                                          
         CS,R8    M:OV+8                                                        
         BNE      OERAREA           B IF AREA FOR LM NOT FP                     
         LW,R0    M:OV+7                                                        
         CW,R0    Y:2                                                           
         BANZ     OERACNT           B IF ACNT NAME SPECIFIED                    
         LW,R0    FL:BACK               WAS 'FORE' SPECIFIED ON OLOAD           
         BNEZ     OERFORE                   NO,ERROR                            
         DO       #MAP~=0                                                       
         LW,R0    FL:SMM            SMM OPTION ILLEGAL                          
         BNEZ     ERSMM             BRANCH IF USED                              
         FIN                                                                    
         LW,R0    FLTMPTSK          WAS TEMP SPECIFIED ON OLOAD                 
         CI,R0    3                                                             
         BANZ     OERTEMP           BRANCH TO REPORT ERROR IF YES               
         LI,R0    0                         NO,SET TEMP STACK SIZE TO 0         
         STW,R0   FL:TEMP                                                       
         STW,R0   FL:RTMP                                                       
         LW,R0    T:PL                  WERE PUBLIC LIBRARY NAMES SPECIF        
         BNEZ     OERPUBL                   YES,ERROR                           
         LW,R0    FLTMPTSK          WAS 'TASKS' OPTION SPECIFIED                
         CI,R0    4                                                             
         BANZ     OERTASKS          BRANCH TO REPORT ERROR IF YES               
         STW,R0   FL:TASKS              NO,CHANGE DEFAULT TO ZERO               
         STW,R0   V:MSECB                                                       
         STW,R0   V:MRECB                                                       
         STW,R0   V:MENQ                                                        
         NXTSEG                                                                 
         LW,R9    CC509             INSERT ADDITIONAL COMMAND                   
         STS,R9   CC90+:BINARY      RESTRICTIONS TO BE APPLIED                  
         STS,R9   CC90+:MODIFY      FOLLOWING PUBLIB AND CONTEXT                
         STS,R9   CC93              SEGMENT COMMANDS                            
         B        CC550                                                         
*                                                                               
CC509    DATA     NOCOM+NOLMH                                                   
CC510    RES      0                 :ROOT CONTROL COMMAND                       
*                 CANCEL DEFAULT 'GO' OPTION                                    
         LI,R0    0                                                             
         STW,R0   BDP:ROMI                                                      
         STW,R0   FL:GO                                                         
         B        CC550                                                         
         PAGE                                                                   
CC520    LI,R0    -1                :SEG CONTROL COMMAND                        
         STW,R0   V:SEGID                                                       
         NXTSEG                                                                 
         MTW,0    FL:PUBL                                                       
         BNEZ     CC525             BRANCH IF PUBLIB CONTEXT SEG                
         LW,R6    SCANFLAG          SCAN FOR  'LINK' KEYWORD                    
         CI,R6    1                                                             
         BNE      ERFITEM                                                       
         SCANEBC                                                                
         LW,R6    SCANFLAG                                                      
         BNEZ     ERFITEM                                                       
         SLS,R8   -8                                                            
         CW,R8    E:LIN                                                         
         BE       CC630                                                         
         BNE      ERIDENT               ERROR,IDENT NOT SPECIFIED FIRST         
*                                                                               
CC524    DATA     NOSEG+NOCOM+NOLCOM+NOEXC+NOLMH                                
*                                                                               
CC525    RES      0                 PUBLIB CONTEXT SEG                          
         LI,R9    PLCXTID                                                       
         STH,R9   *R5               STORE SEGID IN T:SEG                        
         STW,R9   V:SEGID                                                       
         LW,R9    CC524             INSERT ADDITIONAL COMMAND                   
         STS,R9   CC90+:SEG         RESTRICTIONS TO BE APPLIED                  
*                                   FOLLOWING PUBLIB CONTEXT SEG                
*                                   COMMAND                                     
         LW,R9    0                                                             
         STW,R9   V:LINKID                                                      
         PATHEND                                                                
CC550    LW,R6    SCANFLAG          END OF:PUBLIB/:ROOT/:SEG ENCOUNTERED        
         CI,R6    2                                                             
         BE       CC595                                                         
         CI,R6    1                     NO,END OF OPTION SUBFIELD               
         BNE      ERFITEM                      NO,ERROR                         
         SCANEBC                               YES,SCAN KEYWORD OF NEXT         
         SLS,R8   -8                               OPTION                       
         LW,R5    CC570                                                         
CC560    CW,R8    CC570,R5                                                      
         BE       CC580,R5                                                      
         BDR,R5   CC560                                                         
         B        ERITEM                ERROR,UNRECOGNIZED KEYWORD              
CC570    DATA     CC580-CC570                                                   
         DATA     'EXL'             (EXLOC)                                     
         DO       #MAP~=0                                                       
         DATA     'FIX'             (FIX)                                       
         DATA     'ILO'             (ILOAD)                                     
         DATA     'ACC'             (ACCESS)                                    
         FIN      #MAP~=0                                                       
         DATA     'SHA'             (SHARE)                                     
         DATA     'ENT'             (ENTRY)                                     
         DATA     'DEV'             (DEVICE)                                    
         DATA     'OPL'             (OPLB)                                      
         DATA     'FIL'             (FILE)                                      
         DATA     'NON'             (NONE)                                      
CC580    EQU      %-1        BRANCH TO PROCESS:                                 
         B        CC600                 EXLOC                                   
         DO       #MAP~=0                                                       
         B        CC605             FIX                                         
         B        CC607             ILOAD                                       
         B        CC615             ACCESS                                      
         FIN      #MAP~=0                                                       
         B        CC610             SHARE                                       
         B        CC620                 ENTRY                                   
         B        CC660                 DEVICE                                  
         B        CC735                 OPLB                                    
         B        CC740                 FILE                                    
         B        CC775             NONE                                        
CC595    LW,R5    BDP:ROMI              WAS AN INPUT OPTION SPECIFIED           
         BNEZ     CC597             YES                                         
         LI,R5    BA(CC498)                 NO,DEFAULT CASE IS TO LOAD          
         LI,R1    T:ROMI                       ONE ROM FROM 'GO'                
         ADDNXT                                                                 
         B        CC80                                                          
CC597    AW,R5    FBA:ROMI                                                      
         SW,R5    NBE:ROMI          BA OF LAST T:ROMI ENTRY                     
         SLS,R5   RIGHT*2           BA TO WA                                    
         LW,R5    *R5               LOAD LAAST T:ROMI ENTRY                     
         BNEZ     CC80              BRANCH IF NOT 'NONE'                        
         STW,R5   BDP:ROMI          IF 'NONE' RESET BDP:ROMI                    
         B        CC80                                                          
         PAGE                                                                   
*        (EXLOC,REL,adr)                                                        
*        (EXLOC,adr)                                                            
* or for root2 only                                                             
*        (EXLOC,R1END)                                                          
*        (EXLOC,R1END,length)                                                   
CC600    LW,R0    V:SEGID           (EXLOC,ADDR)                                
         BNEZ     CC601             LEGAL FOR SEG, PUBLIB SEG                   
         MTW,0    FL:PUBL           AND ROOT.  ILLEGAL FOR PUBLIB               
         BNEZ     ERITEM                                                        
CC601    MTW,0    SCANFLAG                                                      
         BNEZ     ERFITEM           BRANCH IF KEY WITHOUT PARAMETER             
*        LI,14    0                                                             
*        BAL,15            TRACE                                                
         SCANHE                     ADDRESS OR 'REL' OPTION                     
         CI,R9    0                                                             
         BE       CC601A            BRANCH IF ADDRESS                           
         SLS,R8   RIGHT*8           1ST 3 CHARS ONLY                            
         CW,R8    E:R1E             COMBINE R1 AND R2 SPECIFIED                 
         BE       CC601B            B IF YES                                    
         CW,R8    E:REL                                                         
         BNE      ERITEM            BRANCH IF NOT 'REL'                         
         LW,R8    SCANFLAG                                                      
         BNEZ     ERFITEM           BRANCH IF NO ADDRESS                        
         SCANHEX                    GET ADDRESS                                 
         AW,R8    V:REL             ADD 'REL' RELOCATION BIAS                   
CC601A   SLS,R8   LEFT*2            WA TO BA                                    
         CW,R8    FBA:LIM                                                       
         BLE      ERITEM            B IF SEG STARTS BELOW ROOT1                 
         CW,R8    LBA:LIM                                                       
         BLE      %+3               B IF SEG STARTS IN BOUNDS                   
         LI,R9    EXCLIM            WARNING: SEG OUT OF BOUND                   
         RDIAG                                                                  
         BOUNDRDW                                                               
         DO       #MAP~=0                                                       
         LW,R9    FL:PRIM                                                       
         CI,R9    1                                                             
         BAZ      %+4               BRANCH IF NOT SECONDARY                     
         MTW,0    FL:SMM                                                        
         BNEZ     %+2               BRANCH IF SIMPLIFIED MEM MGT                
         BOUNDRP                                                                
         FIN      #MAP~=0                                                       
         MTW,0    V:SEGID                                                       
         BNEZ     CC602             BRANCH IF NOT ROOT                          
         STW,R8   FBA:ROO2          IF ROOT, EXLOC APPLIES TO PART 2            
         B        CC550             RETURN FOR NEXT PARAMETER GROUP             
CC601B   RES      0                 COMBINE ROOT1 AND ROOT2 SPECIFIED           
         MTW,0    V:SEGID                                                       
         BNEZ     ERITEM            ILLEGAL EXCEPT FOR ROOT                     
         LI,R8    -1                SET FLAG                                    
         STW,R8   FLG:ROO2                                                      
         LW,R8    SCANFLAG                                                      
         BNEZ     CC601BB                                                       
         SCANDEC                                                                
         STW,R8   LML:ROO2                                                      
CC601BB  RES      0                                                             
         B        CC550             RETURN FOR NEXT PARAMER GROUP               
CC602    RES      0                                                             
         STW,R8   NBA:SECT                                                      
         BOUNDCS                        BOUND BY SPECIFIED VALUE                
         LW,R8    NBA:SECT                                                      
         SLS,R8   -3                (BA TO DA)                                  
         LW,R5    FBA:SEG                                                       
         AW,R5    BDP:SEG                                                       
         SLS,R5   -1                    (HA OF T:SEG ENTRY FOR SEGMENT)         
         STH,R8   6,R5                  STORE FDA OF SEGMENT IN T:SEG EN        
         B        CC550                                                         
         DO       #MAP~=0                                                       
         PAGE                                                                   
CC605    RES      0                 OPTION 'FIX': FIXED REAL MEMORY             
         MTW,0    V:SEGID           LOCATION.  ILLEGAL FOR ROOT,COMMON,         
         BEZ      ERITEM            PUBLIB, AND PUBLIB SEG                      
         MTW,0    FL:PUBL                                                       
         BNEZ     ERITEM                                                        
         LW,R9    S:FMSK                                                        
         LW,R8    R9                                                            
         B        CC619                                                         
         PAGE                                                                   
CC607    RES      0                                                             
         LW,R9    FL:PRIM                                                       
         CI,R9    PRIMARY                                                       
         BANZ     ERITEM                                                        
         MTW,0    V:SEGID           OPTION 'ILOAD': INITIAL LOAD WITH           
         BEZ      ERITEM            ROOT.  ILLEGAL FOR ROOT, COMMON,            
         MTW,0    FL:PUBL           PUBLIB,    PUBLIB SEG, AND PRIMARY          
         BNEZ     ERITEM                                                        
         LW,R9    S:IMSK                                                        
         LW,R8    R9                                                            
         B        CC619                                                         
         FIN      #MAP                                                          
         PAGE                                                                   
CC610    RES      0                                                             
         MTW,0    V:SEGID           OPTION 'SHARE': SEGMENT SHARABILITY         
         BEZ      ERITEM            ILLEGAL FOR ROOT,COMMON, PUBLIB,            
         MTW,0    FL:PUBL           AND PUBLIB SEG                              
         BNEZ     ERITEM                                                        
         DO       #MAP                                                          
         MTW,0    SCANFLAG                                                      
         BNEZ     ERFITEM           NO PARAMETER FOLLOWS KEY                    
         SCANEBC                    GET SHARABILITY CODE                        
         SLS,R8   RIGHT*8           1ST 3 CHARACTERS WITH LEADING 0             
         LI,R9    1                 JOB SHARABLE                                
         CW,R8    E:JOB                                                         
         BE       CC612             BRANCH IF YES                               
         LI,R9    2                 SYSTEM SHARABLE                             
         CW,R8    E:SYS                                                         
         BE       CC612             B IF YES                                    
         LI,R9    3                                                             
         CW,R8    E:SMM                                                         
         BE       CC612             B IF SMM                                    
         LI,R9    0                                                             
         CW,R8    E:NON                                                         
         BNE      ERITEM            BRANCH IF UNKNOWN CODE                      
         ELSE     #NAP                                                          
         LI,R9    1                 ALWAYS JOB SHARABLE                         
         FIN      #MAP                                                          
CC612    SLS,R9   S:SSHIFT          PUT FLAG IN NORMAL POSITION                 
         LW,R8    S:SMSK            MASK FOR SHARABILITY FIELD                  
         MTW,0    SCANFLAG                                                      
         BNEZ     CC613             B IF NO MORE SUBFIELDS                      
         PUSH     R8,R9                                                         
         SCANEBC                    GET PARAMETER                               
         SLS,R8   RIGHT*8           FIRST 3 CHARACTERS, LEADING ZERO            
         CW,R8    E:PRE                                                         
         BNE      ERITEM            B IF NOT PRELOAD                            
         PULL     R8,R9                                                         
         OR,R8    S:PMSK            INCLUDE PRELOAD FLAG                        
         OR,R9    S:PMSK                                                        
CC613    RES      0                                                             
         XW,R8    R9                                                            
         B        CC619                                                         
         DO       #MAP                                                          
         PAGE                                                                   
CC615    RES      0                                                             
         MTW,0    V:SEGID           OPTION 'ACCESS':  MEMORY                    
         BEZ      ERITEM            ACCESS CONTROL.  ILLEGAL                    
         MTW,0    FL:PUBL           FOR ROOT,COMMON,PUBLIB,                     
         BNEZ     ERITEM            AND PUBLIB CONTEXT SEG                      
         MTW,0    SCANFLAG                                                      
         BNEZ     ERFITEM           NO PARAMETER FOLLOWS KEY                    
         SCANEBC                    GET ACCESS CODE                             
         SLS,R8   RIGHT*8           1ST 3 CHARACTERS WITH LEADING 0             
         LI,R6    4                                                             
CC616    CW,R8    MACODE,R6                                                     
         BE       CC617                                                         
         BDR,R6   CC616                                                         
         B        ERITEM            BRANCH IF CODE IS UNKNOWN                   
MACODE   EQU      %-1                                                           
         DATA     'ALL'             ANY ACCESS                                  
         DATA     'RX '             READ AND EXECUTE                            
         DATA     'R  '             READ ONLY                                   
         DATA     'NO '             NO ACCESS                                   
CC617    AI,R6    -1                CONVERT INDEX TO INTERNAL CODE              
         LW,R8    R6                                                            
         SLS,R8   S:MSHIFT          PUT CODE IN NORMAL POSITION                 
         LW,R9    S:MMSK            MASK FOR ACCESS CONTROL FIELD               
         FIN      #MAP                                                          
*                                                                               
CC619    RES      0                                                             
         LW,R5    FBA:SEG                                                       
         AW,R5    BDP:SEG                                                       
         SLS,R5   RIGHT*2           CONVERT BA TO WA                            
         STS,R8   S:FLAGS,R5        STORE THE SPECIFIED FLAGS                   
         B        CC550                                                         
         PAGE                                                                   
CC620    LW,R0    FL:PUBL           (ENTRY,DEF)                                 
         BNEZ     ERITEM                                                        
         MTW,0    SCANFLAG                                                      
         BNEZ     ERFITEM           BRANCH IF KEY WITHOUT PARAMETER             
         SCANSYM                                                                
         CI,R7    0                                                             
         BNE      CC622             B IF AN EARLIER DEFINITION FOUND            
         LI,R3    0                    *SCAN DEF AND STORE IN T:SYMBOL          
         LI,R2    PREF+UNSAT+NOTDUP+ROM                                         
         LI,R5    BA(R2)+3             * STORE AS REF IN T:VALUE                
         LI,R1    T:VALUE                                                       
         ADDNXT                                                                 
CC622    RES      0                                                             
         AND,R9   X:3FFF           *MASK ENTRY NO. AND SET R,E                  
         AI,R9    X'60000'              FLAGS (BITS 13,14,) AND STORE           
         LW,R8    R9                                                            
         OR,R9    X:3FFF                                                        
         LW,R5    FBA:SEG               IN T:SEG ENTRY                          
         AW,R5    BDP:SEG                                                       
         SLS,R5   -2                    (BA TO WA)                              
         STS,R8   7,R5              INSERT FLAGS AND DECL NR IN T:SEG           
         B        CC550                                                         
         PAGE                                                                   
CC630    SCANDEC                    (LINK,IDENT1,ONTO,IDENT2)                   
         STW,R8   V:SEGID                                                       
         CI,R8    0                                                             
         BLE      ERITEM                ERROR,NOT LEGAL  VALUE                  
         CI,R8    X'8000'                                                       
         BGE      ERITEM                ERROR,NOT LEGAL VALUE                   
         SERCHSEG                   SEARCH T:SEG FOR DUPLICATE ENTRY            
         CI,R7    0                                                             
         BNE      ERDUPSEG              ERROR,DUPLICATE SEG IDENT               
         LW,R2    FBA:SEG           STORE IDENT IN T:SEG ENTRY                  
         AW,R2    BDP:SEG                                                       
         SLS,R2   -1                    (ADDR OF HW0)                           
         STH,R8   0,R2                                                          
         LW,R6    SCANFLAG          IS 'ONTO ,DENT2' SPECIFIED                  
         BGZ      CC650                 NO,DEFAULT LINK IS THE ROOT (0)         
         SCANEBC                        YES,SCAN FOR 'ONTO' KEYWORD             
         SLS,R8   -8                                                            
         CW,R8    E:ONT                                                         
         BNE      ERITEM                                                        
         LW,R6    SCANFLAG                                                      
         BGZ      ERFITEM                                                       
         SCANDEC                    SCAN 'IDENT2' ON CC                         
         STW,R8   V:LINKID                                                      
         CI,R8    0                                                             
         BEZ      CC650                                                         
         AI,R2    1                 STORE LINK,IDENT IN T:SEG ENTRY             
         STH,R8   0,R2                                                          
         LW,R7    FBA:SEG                                                       
         AW,R7    BDP:SEG                                                       
         SW,R7    NBE:SEG                                                       
CC640    SLS,R7   -2               *SEARCH PATH TO SEE IF SEGMENT INPUT         
         LW,R8    0,R7              IN CORRECT ORDER                            
         SLS,R8   -16                                                           
         CW,R8    V:LINKID                                                      
         BE       CC650                 SEGMENT INPUT IN CORRECT ORDER          
         CI,R8    ROOT1ID                                                       
         BE       ERSEGORD              SEGMENT INPUT IN WRONG ORDER,ERR        
         LW,R8    0,R7                                                          
         AND,R8   X:FFFF                                                        
         SERCHSEG                                                               
         CI,R7    0                                                             
         BNE      CC640                                                         
CC645    LI,R9    PROGERR               PROGRAM ERROR,OUTPUT ALARM              
         RDIAG                                         AND ABORT                
CC650    PATHEND                    CHECK FOR PATHEND                           
         B        CC550                                                         
         PAGE                                                                   
CC660    MTW,0    SCANFLAG          (DEVICE,YYNDD)                              
         BNEZ     ERFITEM           NO PARAMETER FOLLOWS KEY                    
         LW,R9    GIODBIT           FLAG FOR DEVICE TYPE IO ID                  
CC670    RES      0                                                             
         STW,R9   GIOCT             SET IO MEDIUM TYPE FLAGS                    
         LI,R9    GIOCT             LOAD GETIOID CONTROL TABLE ADDR             
         BAL,R8   GETIOID           GET IO ID                                   
         CI,R6    0                                                             
         BL       ERITEM            B IF ERROR IN IO MEDIUM NAME                
         LW,R0    GIOCT                                                         
         CW,R0    GIOFBIT                                                       
         BNE      CC675             B IF NOT A FILE                             
         LW,R0    GIOCT+1                                                       
         CI,R0    'BT'                                                          
         BNE      CC675             B IF NOT A BT FILE                          
         LW,R0    GIOCT+2                                                       
         CW,R0    E:GO                                                          
         BNE      ERITEM            B IF BT FILE BUT NOT GO                     
         LW,R3    CC498             T:ROMI ENTRY FOR GO FILE                    
         LI,R7    M:GO              DCB FOR GO FILE                             
         B        CC685                                                         
*                                                                               
CC675    RES      0                                                             
         LI,R1    T:DCBV                                                        
         LI,R5    BA(GIOCT)                                                     
         ADDNXT                     GIOCT BECOMES NEXT T:DCBV ENTRY             
         LW,R3    R6                T:DCBV BDP FOR ENTRY JUST ADDED             
         DW,R3    NBE:DCBV          GET THE ENTRY NUMBER                        
         AI,R3    X'00011001'       DEFAULT ONE ROM;                            
*                                   FLAG FOR T:DCBV ENTRY;                      
*                                   CHANGE INDEX BASE TO 1                      
         LI,R7    F:DEVICE          DCB TO USE FOR T:DCBV ROMS                  
         LW,R0    GIOCT             IO ID TYPE FLAGS                            
         LW,R1    GIOBITS                                                       
         STS,R0   FPT:ASN+1         SET FLAGS AS P-BITS FOR ASSIGN CAL          
         SLS,R0   1                                                             
         LW,R1    Y:8                                                           
         STS,R0   FPT:ASN+3         NAME PTR IS INDIRECT FOR OPLB               
         LI,R9    PT:CLS                                                        
         CAL1,1   FPT:CLS           CLOSE F:DEVICE IF NECESSARY                 
         LI,R9    0                                                             
         CAL1,1   FPT:ASN           ASSIGN F:DEVICE TO ROM MEDIUM               
CC680    RES      0                                                             
         LI,R9    PT:CC7                                                        
         CAL1,1   FPT:OPEN          OPEN THE ROM MEDIUM                         
         LI,R6    M:C                                                           
         CAL1,1   FPT:COR                                                       
         CI,R8    0                                                             
         BE       CC685             B IF ROM NOT FROM 'C' OPLABEL               
         LW,R5    V:CCTYPE          CURRENT COMMAND TYPE                        
         LW,R6    CC93,R5                                                       
         STW,R6   CC90,R5           CHANGE SYNTAX TO TERMINATE                  
*                                   COMMAND SUBSTACK ON READING                 
*                                   A BINARY RECORD                             
CC685    RES      0                                                             
         LW,R6    SCANFLAG              YES,SCAN FOR 'PACK'                     
         BGZ      CC730                 END-OF-SUBFIELD(DEFAULT NROM=1)         
         SCANDE                    *SCAN NEXT ITEM                              
         CI,R9    0                *IS NEXT ITEM DECIMAL OR EBCDIC              
         BE       CC720                 DECIMAL                                 
         SLS,R8   -8                    EBCDIC,DOES FIELD EQUAL 'PACK'          
*                                              OR 'EOD'                         
CC690    CW,R8    E:PAC                                                         
         BNE      CC710                                                         
CC692    AI,R3    X'4000'                     'PACK',SET BIT 17            101  
         LW,R6    SCANFLAG          IS THERE MORE TO SCAN                       
         BGZ      CC730                 NO                                      
         SCANDE                         YES,SCAN FOR 'EOD' OR 'VALUE'           
         CI,R9    0                                                             
         BE       CC720                                                         
         SLS,R8   -8                                                            
CC710    CW,R8    E:EOD                     'EOD',SET NROM=-5                   
         BNE      ERITEM                                                        
         LI,R0    -5                                                            
         STH,R0   R3                                                            
         B        CC730                                                         
CC720    STH,R8   R3                        'VALUE'                             
         BCS,CC2  ERITEM                       ERROR,VALUE > HALFWORD           
         CI,R8    0                                                             
         BLE      ERITEM                       ERROR,VALUE < ZERO               
CC730    LI,R1    T:ROMI            STORE ROM INPUT OPTION IN T:ROMI            
         LI,R5    BA(R3)                                                        
         ADDNXT                                                                 
         B        CC550                                                         
         PAGE                                                                   
CC735    MTW,0    SCANFLAG          (OPL,OPLABEL)                               
         BNEZ     ERFITEM           NO PARAMETER FOLLOWS KEY                    
         LW,R9    GIOOBIT           FLAG FOR OPLABEL TYPE IO ID                 
         B        CC670                                                         
         PAGE                                                                   
CC740    MTW,0    SCANFLAG          (FILE,AREA,NAME)                            
         BNEZ     ERFITEM           NO PARAMETER FOLLOWS KEY                    
         LW,R9    GIOFA             FLAGS FOR FILE/ACNT TYPE IO ID              
         B        CC670                                                         
         PAGE                                                                   
CC775    RES      0                 (NONE)                                      
         MTW,0    SCANFLAG                                                      
         BEZ      ERFITEM           BRANCH IF PARAMETER FOLLOWS KEY             
         LI,R3    0                 ZERO ENTRY FOR T:ROMI                       
         B        CC730             BRANCH TO INSERT ENTRY                      
         PAGE                                                                   
CC800    LW,R0    FL:COMN           :COMMON CONTROL COMMAND                     
         BGEZ     ERORDER               :COMMON CC HAS ALREADY BEEN INPU        
         LI,R0    0                                                             
         STW,R0   BLCOMN                                                        
         STW,R0   V:SEGID           SET EXTERNAL SEG ID TO ZERO                 
         NXTSEG                     PREPARE T:SEG ENTRY                         
         LCW,R6   NBE:SEG           NEG T:SEG ENTRY BL                          
         SLS,R6   RIGHT*2           BL TO WL                                    
         AW,R6    R5                PRIOR T:SEG ENTRY                           
         LH,R9    *R6               PRIOR SEG ID NR                             
         STW,R9   *R5               IS COMMON SEG LINK ID                       
         LI,R8    COMNID                                                        
         STH,R8   *R5               COMMON SEG ID                               
         LW,R9    NBA:SECT                                                      
         STW,R9   FBA:COMN                                                      
CC801    RES      0                 ANALYZE NEXT SUBFIELD                       
         LW,R6    SCANFLAG                                                      
         BEZ      ERFITEM           BRANCH IF NOT END OF SUBFIELD               
         CI,R6    2                                                             
         BE       CC803             B IF END OF COMMAND                         
         SCANEBC                                                                
         SLS,R8   RIGHT*8           FIRST 3 BYTES OF KEYWORD                    
         LW,R6    CC801Y            LENGTH OF KEYWORD TABLE                     
         CW,R8    CC801Y,R6         COMPARE INPUT KEY WITH TABLE KEY            
         BE       CC801Z,R6         B IF FOUND                                  
         BDR,R6   %-2                                                           
         B        ERFITEM           B IF NOT FOUND                              
*                                                                               
CC801A   RES      0                 EXLOC                                       
         LW,R6    SCANFLAG                                                      
         BNEZ     ERFITEM           B IF END OF SUBFIELD                        
         SCANHE                     GET ADDRESS OR 'REL'                        
         CI,R9    0                                                             
         BE       CC801B            B IF ADDRESS                                
         SLS,R8   RIGHT*8           1ST 3 CHARS ONLY                            
         CW,R8    E:REL                                                         
         BNE      ERITEM            BRANCH IF NOT 'REL'                         
         LW,R8    SCANFLAG                                                      
         BNEZ     ERFITEM           BRANCH IF NO ADDRESS                        
         SCANHEX                    GET ADDRESS                                 
         AW,R8    V:REL             ADD 'REL' RELOCATION BIAS                   
CC801B   RES      0                                                             
         SLS,R8   LEFT*2            WA TO BA                                    
         CW,R8    FBA:LIM                                                       
         BLE      ERITEM            B IF SEG STARTS BELOW ROOT1                 
         CW,R8    LBA:LIM                                                       
         BLE      %+3               B IF SEG STARTS IN BOUNDS                   
         LI,R9    EXCLIM            WARNING: SEG OUT OF BOUND                   
         RDIAG                                                                  
         BOUNDRDW                                                               
         DO       #MAP~=0                                                       
         LW,R9    FL:PRIM                                                       
         CI,R9    1                                                             
         BAZ      %+4               BRANCH IF NOT SECONDARY                     
         MTW,0    FL:SMM                                                        
         BNEZ     %+2               BRANCH IF SIMPLIFIED MEM MGT                
         BOUNDRP                    PAGE-BOUND                                  
         FIN      #MAP~=0                                                       
         STW,R8   FBA:COMN                                                      
         B        CC801             GET NEXT SUBFIELD                           
*                                                                               
CC801F   RES      0                 SIZE                                        
         LW,R6    SCANFLAG                                                      
         BNEZ     ERFITEM           B IF END OF SUBFIELD                        
         SCANHEX                                                                
         CI,R8    X'20000'                                                      
         BGE      ERITEM            BRANCH IF SIZE IS TOO BIG                   
         SLS,R8   LEFT*2            CONVERT WORDS TO BYTES                      
         STW,R8   BLCOMN            SAVE IN TEMP LOC                            
         B        CC801             GET NEXT SUBFIELD                           
*                                                                               
         DO       #MAP                                                          
CC801K   RES      0                 SHARE                                       
         LW,R6    SCANFLAG                                                      
         BNEZ     ERFITEM           B IF END OF SUBFIELD                        
         SCANEBC                                                                
         SLS,R8   RIGHT*8           FIRST 3 BYTES OF KEYWORD                    
         LI,R6    1                 JOB-SHARABLE                                
         CW,R8    E:JOB                                                         
         BE       CC801L            B IF JOB-SHARABLE WAS REQUESTED             
         LI,R6    2                 SYSTEM-SHARABLE                             
         CW,R8    E:SYS                                                         
         BNE      ERITEM            B IF UNRECOGNIZED KEY                       
CC801L   SLS,R6   S:SSHIFT          SHIFT CODE TO NATURAL POSITION              
         LW,R7    S:SMSK            MASK FOR INSERTION                          
         B        CC801Q                                                        
*                                                                               
CC801P   RES      0                 FIX                                         
         LW,R6    S:FMSK                                                        
         LW,R7    S:FMSK            FLAG FOR FIXED SEGMENT                      
CC801Q   LW,R5    FBA:SEG                                                       
         AW,R5    BDP:SEG                                                       
         SLS,R5   RIGHT*2           WA OF T:SEG ENTRY                           
         STS,R6   S:FLAGS,R5        STORE IN T:SEG ENTRY                        
         B        CC801                                                         
         FIN                        #MAP                                        
*                                                                               
CC801Y   DATA     CC801YE-%         NR OF ENTRIES                               
         DATA     'EXL'             EXLOC                                       
         DATA     'SIZ'             SIZE                                        
         DO       #MAP                                                          
         DATA     'SHA'             SHARE                                       
         DATA     'FIX'             FIX                                         
         FIN                        #MAP                                        
CC801YE  EQU      %-1                                                           
CC801Z   EQU      %-1                                                           
         B        CC801A            EXLOC                                       
         B        CC801F            SIZE                                        
         DO       #MAP                                                          
         B        CC801K            SHARE                                       
         B        CC801P            FIX                                         
         FIN                        #MAP                                        
*                                                                               
CC803    LW,R5    FBA:VALU                                                      
         LW,R8    FBA:COMN                                                      
         LI,R9    RES               RES DSECT. PASS1 WILL ALLOCATE              
         STB,R9   0,R5                                                          
         LW,R9    R8                                                            
         WORD                                                                   
         LW,R5    FBA:SEG                                                       
         AW,R5    BDP:SEG                                                       
         SLS,R9   RIGHT*3           CONVERT BYTES TO DW                         
         SLS,R5   RIGHT*2           CONVERT BYTES TO WORDS                      
         LI,R6    S:MA                                                          
         STH,R9   *R5,R6            INSERT COMMON ORIGIN IN T:SEG               
         STW,R8   NBA:SECT          POINT TO NEXT BYTE TO LOAD                  
         LW,R8    BDP:SYM                                                       
         LI,R6    S:SYMBD                                                       
         STH,R8   *R5,R6            PUT BD OF T:SYM(I) IN T:SEG                 
         LW,R8    BDP:VALU                                                      
         LI,R6    S:VALBD                                                       
         STH,R8   *R5,R6            PUT BD OF T:VALUE(I) IN T:SEG               
         DO       #MAP=0                                                        
         LI,R8    2                 SYSTEM SHARABLE SEG FLAG                    
         SLS,R8   S:SSHIFT          SHIFT TO NATURAL POSITION                   
         LW,R9    S:SMSK            MASK FOR INSERTING                          
         STS,R8   S:FLAGS,R5        FORCE TO SYSTEM-SHARABLE                    
*        IN AN UNMAPPED SYSTEM, FOREGROUND COMMON SEGS                          
*        ARE OMITTED FROM THE PROGRAM LIMITS BY BEING                           
*        AUTOMATICALLY GIVEN THE 'SHARABLE' CHARACTERISTIC.                     
*                                                                               
*        IN A MAPPED SYSTEM, SHARABILITY FOR THE COMMON                         
*        SEGMENT MUST BE EXPLICITLY SPECIFIED.                                  
         FIN                        #MAP=0                                      
         LW,R5    FBA:SYM           F4:COM CONTINUATION ENTRY IS                
         LB,R5    0,R5              SECOND ENTRY IN T:SYMBOL.  IT               
         AW,R5    FBA:SYM           CONTAINS THE COMMON BL REQUIRED             
         AI,R5    -1                BY ROMS WHICH HAVE BEEN LINKED.             
         4BYTES                     GET THE ENTRY                               
         AND,R8   X:FFFFFF          EXTRACT THE BL                              
         CW,R8    BLCOMN                                                        
         BGE      CC804             BRANCH IF SIZE REQUIRED BY ROMS             
*                                   IS GREATER THAN SIZE FROM :COMMON CC        
         LW,R8    BLCOMN            GET SIZE FROM :COMMON CC                    
         LW,R9    R8                                                            
         OR,R9    Y:84              MERGE ENTRY HEADER BYTE                     
         AI,R5    -4                POINT TO ENTRY START - 1                    
         WORD                       PUT NEW SIZE IN THE T:SYMBOL ENTRY          
CC804    RES      0                                                             
         AW,R8    FBA:COMN          ADD BA OF COMMON TO ITS BL                  
         STW,R8   LBA:COMN          SET LBA OF COMMON DSECT                     
         MTW,1    FL:COMN           INDICATE THAT :COMMON CC                    
*                                   HAS BEEN ENCOUNTERED                        
         B        CC80              GET ANOTHER CC                              
         PAGE                                                                   
CC810    RES      0                 :LCOMMON COMMAND                            
         LW,R6    SCANFLAG                                                      
         CI,R6    2                                                             
         BE       CC80              BIF END OF COMMAND                          
         LI,R3    ADSECT            ALLOCATED DSECT                             
         STW,R3   CCVALUE           SET T:VALUE ITEM TYPE                       
         SCANSYM                                                                
         CI,R7    0                                                             
         BNE      CC815             B IF SYMBOL HAS PRIOR DEFINITION            
         LW,R6    SCANFLAG                                                      
         BNEZ     ERFITEM           B IF END OF SUBFIELD                        
         SCANDE                                                                 
         CI,R9    0                                                             
         BE       CC850             B IF SIZE IS SPECIFIED                      
         SLS,R8   -8                KEEP FIRST 3 CHARS ONLY                     
         CW,R8    E:DEF                                                         
         BNE      ERITEM            B IF NOT DEFER                              
         LI,R8    UADSECT           UNALLOCATED DSECT                           
         STW,R8   CCVALUE                                                       
         LI,R8    0                 DSECT SIZE ZERO FOR NOW                     
         B        CC850             B TO BUILD DSECT TABLE ENTRIES              
*                                                                               
CC815    RES      0                 :LCOM SYMBOL ALREADY DEFINED                
         LB,R6    0,R7              GET DEFINITION TYPE                         
         CI,R6    UADSECT                                                       
         BNE      ERDUPNAM          B IF NOT UNALLOCATED DSECT                  
         LI,R6    0                 DEFAULT SIZE OF DSECT IS 0                  
         STW,R6   CCVALUE+1         SAVE IT                                     
CC817    SERCHSYM                                                               
         CI,R6    0                                                             
         BE       CC818             B IF NO EARLIER OCCURRENCE                  
         LB,R0    0,R7              GET TYPE OF EARLIER OCCURRENCE              
         CI,R0    UADSECT                                                       
         BNE      CC817             B IF NOT UADSECT                            
         LB,R0    0,R6              SKIP SYMBOL ENTRY                           
         AW,R6    R0                                                            
         LI,R1    -3                                                            
         LI,R8    0                                                             
         AI,R6    1                 GET DSECT SIZE IN R8                        
         LB,R0    0,R6                                                          
         STB,R0   R8+1,R1                                                       
         BIR,R1   %-3                                                           
         SLS,R8   RIGHT*2           BA TO WA                                    
         CW,R8    CCVALUE+1                                                     
         BLE      CC817             B IF OLD SIZE GREATER OR EQUAL              
         STW,R8   CCVALUE+1         SAVE NEW SIZE                               
         B        CC817                                                         
*                                                                               
CC818    RES      0                                                             
         LI,R1    T:SYMBOL                                                      
         ADDNXT                     BUILD NEW T:SYMBOL ENTRY                    
         LW,R8    CCVALUE+1         GET DECLARED SIZE                           
         LW,R6    SCANFLAG                                                      
         BNEZ     CC850             B IF NO SPECIFIED SIZE                      
         SCANDEC                                                                
         CW,R8    CCVALUE+1                                                     
         BGE      CC850             B IF SPECIFIED VALUE BIGGER                 
         LW,R8    CCVALUE+1         GET DECLARED VALUE                          
         B        CC850                                                         
*                                                                               
CC820    RES      0                 :INCLUDE COMMAND                            
         LW,R6    SCANFLAG                                                      
         CI,R6    2                                                             
         BE       CC80              B IF END OF COMMAND                         
         LI,R3    PREF+EXP+UNSAT+NOTDUP+ROM                                     
         STW,R3   CCVALUE           T:VALUE ITEM TYPE: UNSAT REF                
         SCANSYM                                                                
         CI,R7    0                                                             
         BNE      ERDUPNAM          B IF SYMBOL HAS PRIOR DEFINITION            
         LI,R6    0                 SEARCH FOR PRIOR REFS TO SYMBOL             
CC822    SERCHSYM                                                               
         CI,R6    0                                                             
         BE       CC824             B IF END OF T:SYMBOL                        
         LB,R0    0,R7              GET TYPE OF PRIOR ENTRY                     
         CI,R0    EXCLPREF                                                      
         BNE      CC822             B IF NOT EXCLUDED PREF                      
         LW,R0    CCVALUE           CHANGE EXCLUDED PREF                        
         STB,R0   0,R7                  TO INCLUDED PREF                        
         B        CC822                                                         
CC824    LI,R0    0                 VALUE IS ZERO                               
         B        CC890             B TO BUILD T:VALUE ENTRY                    
*                                                                               
CC830    RES      0                 :EXCLUDE COMMAND                            
         LW,R6    SCANFLAG                                                      
         CI,R6    2                                                             
         BE       CC80              B IF END OF COMMAND                         
         LI,R3    EXCLPREF          EXLUDED PREF                                
         STW,R3   CCVALUE           SET T:VALUE ITEM TYPE                       
         SCANSYM                                                                
         CI,R7    0                                                             
         BNE      ERDUPNAM          B IF PREVIOUSLY DEFINED SYMBOL              
         LI,R4    0                 VALUE IS ZERO                               
         B        CC890             B TO BUILD T:VALUE ENTRY                    
*                                                                               
CC840    RES      0                 :RESERVE COMMAND                            
         LW,R6    SCANFLAG                                                      
         CI,R6    2                                                             
         BE       CC80              B IF END OF COMMAND                         
         LI,R3    RES               RESERVED DSECT AREA                         
         STW,R3   CCVALUE           SET T:VALUE ENTRY TYPE                      
         SCANSYM                                                                
         CI,R7    0                                                             
         BNE      CC815             B IF PRIOR TABLE ENTRY                      
         LW,R6    SCANFLAG                                                      
         BGZ      ERFITEM           B IF END OF SUBFIELD                        
         SCANDEC                                                                
CC850    CI,R8    X'1FFFF'                                                      
         BG       ERITEM            B IF DSECT TOO BIG                          
         LW,R2    R8                                                            
         SLS,R2   2                 WORDS TO BYTES                              
         LW,R6    SCANFLAG                                                      
         BEZ      ERFITEM           B IF NOT END OF SUBFIELD                    
         OR,R2    Y:84              CONSTRUCT DSECT CONTINUATION ENTRY          
         LI,R5    BA(R2)            ADD TO T:SYMBOL                             
         LI,R1    T:SYMBOL                                                      
         ADDNXT                                                                 
         LI,R4    0                 ADDRESS OF DSECT IF UNALLOC                 
         LW,R0    CCVALUE           IS THIS AN ALLOCATED DCEST                  
         CI,R0    DSECT+ALLOCATD+;                                              
                  VALUE+ADDRESS+;                                               
                  NOTDUP+ROM                                                    
         BNE      CC890                 NO                                      
         DWBOUND                        YES,ALLOCATE LCOM DSECT                 
         LW,R4    NBA:SECT                                                      
         AND,R2   X:FFFFF                                                       
         AWM,R2   NBA:SECT                                                      
CC890    STW,R4   CCVALUE+1         ADD VALUE ENTRY TO T:VALUE                  
         LI,R5    BA(CCVALUE)+3                                                 
         LI,R1    T:VALUE                                                       
         ADDNXT                                                                 
         LW,R1    CCVALUE           GET ITEM TYPE JUST ADDED                    
         CI,R1    ADSECT                                                        
         BNE      CC892             B IF NOT ALLOCATED DSECT                    
         AND,R9   X:3FFF            MASK T:VALUE INDEX FROM ADDNXT              
         SATREF                                                                 
*                                   SATISFY PRIOR REFERNCES                     
CC892    RES      0                                                             
         LW,R1    V:CCTYPE              NO,RETURN TO PROCESS NEXT ITEM          
         B        CC20,R1                                                       
         PAGE                                                                   
CC900    LI,R0    0                 :LIB CONTROL COMMAND                        
         STH,R0   FL:LIB                                                        
         LW,R6    SCANFLAG                                                      
         CI,R6    2                                                             
         BE       CC80                  NO-LIB SEARCH SPECIFIED                 
         LI,R2    0                                                             
         LBOPTION                      *SCAN FIRST LIBRARY SEARCH OPTION        
*                                       AND STORE LIBRARY AREA+1 IN             
*                                       BYTE ZERO OF FL:LIB                     
         LW,R6    SCANFLAG                                                      
         CI,R6    2                                                             
         BE       CC80                      END OF :LIB CC                      
         CI,R6    1                                                             
         BE       ERFITEM                   OTHER INFO ON CC,ERROR              
         LBOPTION                      *SCAN SECOND LIBRARY SEARCH              
*                                       OPTION AND STORE LIBRARY AREA+1         
*                                       IN BYTE ONE OF FL:LIB                   
         LW,R6    SCANFLAG                                                      
         CI,R6    2                                                             
         BE       CC80                      END OF :LIB CC                      
         BNE      ERFITEM                   OTHER INFO ON CC,ERROR              
         PAGE                                                                   
*                                                                               
*                 PROCESS ASSIGN CONTROL COMMAND                                
*                                                                               
*                                                                               
*                                                                               
*                 ASSUMES THAT PASS 2 HAS SET PTRS FWA:ASSN,LWA:ASSN            
*                                                                               
*                 FOR T:ASSN, THE TABLE INTR WHICH ASSIGN INFORMATION           
*                                                                               
*                 WILL BE PLACED.                                               
*                                                                               
*                                                                               
*                 WDP:ASSN CONTAINS THE DISPLACEMENT OF THE CURRENT             
*                                                                               
*                 ENTRY IN T:ASSN, AND IS NOT UPDATED UNTIL EACH                
*                                                                               
*                 AN ASSIGN CARD HAS BEEN COMPLETELY PROCESSED.                 
*                                                                               
*                 IT IS 0 INITIALLY ON ENTRY FROM PASS 2.                       
*                                                                               
*                                                                               
CC920    LW,R4    FWA:ASSN                                                      
         AW,R4    WDP:ASSN          PTR TO CURRENT T:ASSN ENTRY                 
         CW,R4    LWA:ASSN                                                      
         BL       CC930                                                         
         LI,R9    PROGERR           SO UNLIKELY THAT THERE WILL NOT BE          
         RDIAG                      ENOUGH ROOM THAT NO STANDARD                
*                                   ALARM IS GENERATED.                         
CC930    LI,R3    0                                                             
         STW,R3   FL:UNNAM          > 0 INDICATES USE OF UNNAMED DCB            
         LI,R2    4                                                             
         STD,R3   *R4,R2            ZERO FILE NAME IN T:ASSN ENTRY              
         SCANEBC                    1ST FLD MUST BE EBCDIC                      
         LH,R3    R8                LEFT HW MUST BE M: OR F:                    
         CH,R3    E:MFDCB                                                       
         BE       CC932             M:DCB                                       
         LI,R2    1                                                             
         CH,R3    E:MFDCB,R2        F:DCB                                       
         BNE      ASSNERR           NEITHER                                     
         CI,R10   3                                                             
         BL       ASSNERR           MUST BE 3-8 CHAR NAME                       
*                                                                               
*                                                                               
*                 WE HAVE A 3-8 CHAR M: OR F: DCB NAME.                         
*                                                                               
*                 IF AN ENTRY OF THIS NAME EXISTS IN T:DCB,                     
*                 SAVE THE WA OF THE ENTRY IN WORD 1 OF T:ASSN,                 
*                 AND THE BYTE ADDRESS OF THE DCB IN WORD 0                     
*                 OF THE DCB.                                                   
*                                                                               
*                 IF NO ENTRY EXISTS:                                           
*                                                                               
*                   IF NO UNNAMED DCB IS AVAILABLE, ERROR                       
*                                                                               
*                   IF AN UNNAMED DCB EXISTS, USE THAT AND                      
*                   SET F:UNNAM.                                                
*                                                                               
*                  IN CASE OF AN ERROR IN PROCESSING THE 'UNNAMED'              
*                  DCB CASE, T:DCB ENTRY WILL HAVE TO BE RESET.                 
*                                                                               
*                                                                               
CC932    LW,R2    FBA:DCB                                                       
CC933    CW,R2    LBA:DCB           PTS TO CURRENT T:DCB ENTRY                  
         BGE      ERNOUDCB          B IF NO MATCH, NO UDCBS                     
         LW,R3    R2                                                            
         SLS,R3   RIGHT*2           WA OF T:DCB ENTRY                           
         CW,R8    1,R3                                                          
         BNE      CC935             NO MATCH ON WORD 1                          
         CW,R9    2,R3                                                          
         BE       CC937             COMPLETE MATCH; USE THIS ENTRY              
CC934    AW,R2    NBE:DCB           NEXT ENTRY                                  
         B        CC933                                                         
CC935    LW,R0    E:BLANKS                                                      
         CW,R0    1,R3              ARE WE INTO UNNAMED DCBS                    
         BNE      CC934             NO - LOOK AT NEXT                           
         STW,R8   1,R3              YES - NO MATCH SO USE THIS.                 
         STW,R9   2,R3                                                          
         MTW,1    FL:UNNAM          SET FLAG IN CASE OF ERROR                   
CC937    LW,R0    0,R3              BA OF DCB                                   
         AND,R0   X:7FFFF           MASK OUT THE BYTE ADDRESS                   
         STW,R0   0,R4              TO WORD 0 OF T:ASSN                         
         STW,R3   1,R4              WA OF T:DCB ENTRY TO T:ASSN WD 1            
         MTW,0    SCANFLAG                                                      
         BNEZ     ASSNERRF          MUST BE SUBFIELD END                        
*                                                                               
*                 SCAN REST OF FIELD ONE FOR:                                   
*                                                                               
*                 OPLABEL                                                       
*                 AREA                                                          
*                 DEVICE                                                        
*                 BACKGROUND FILE NAME                                          
*                 ZERO                                                          
*                                                                               
         LI,R9    GIOCT             POINTER TO GETIOID CTRL BLOCK               
         LW,R0    GIOBITS                                                       
         STW,R0   *R9               SET TO SCAN ANY IO MEDIUM ID                
         BAL,R8   GETIOID           GET ASSIGNMENT                              
         CI,R6    0                                                             
         BL       ASSNERR           B IF ERROR IN ID                            
         BE       ASSNERRF          B IF NOT END OF FIELD 1                     
         LCI      6                                                             
         LM,R8    GIOCT             MOVE IO MEDIUM NAME                         
         STM,R8   2,R4              INTO T:ASSN ENTRY                           
         PAGE                                                                   
*                                                                               
*        SCAN AND DECODE ASSIGN OPTIONS                                         
*                                                                               
CC940    RES      0                                                             
         LI,R0    0                                                             
         LI,R1    #AKEYS            NR OF ASSIGN OPTION KEYWORDS                
         STB,R0   T:AFLAGS,R1       ZERO OPTION PRESENCE FLAGS                  
         BDR,R1   %-1                                                           
*                                                                               
CC942    RES      0                                                             
         LW,R0    SCANFLAG                                                      
         CI,R0    1                                                             
         BG       CC950             B IF NO MORE OPTIONS                        
         BL       ASSNERRF          B IF NOT START OF NEW FIELD                 
*                                                                               
         SCANEBC                    GET NEXT KEYWORD                            
         LI,R1    #AKEYS            NR OF OPTION KEYWORDS                       
         LW,R9    Y:FFFFFF          KEYWORD COMPARE MASK                        
*                                                                               
CC944    RES      0                                                             
         CS,R8    T:AKEYS,R1        COMPARE NEXT KEYWORD                        
         BNE      CC946             B IF NOT A MATCH                            
         LB,R0    T:AIVAL,R1        GET INTRINSIC VALUE FOR KEY                 
         LB,R2    T:APRCX,R1        GET PROCESSOR INDEX FOR KEY                 
         LB,R3    T:ACTLX,R1        GET PACKING CONTROL INDEX FOR KEY           
         STW,R0   T:AVAL,R3         SET FIELD VALUE TO INTRINSIC VALUE          
         LI,R0    1                                                             
         STB,R0   T:AFLAGS,R3       SET OPTION PRESENCE FLAG                    
         B        T:APRCB,R2        GO BRANCH TO PROCESSOR                      
*****                                                                           
CC946    RES      0                                                             
         BDR,R1   CC944             TRY NEXT KEYWORD                            
         B        ASSNERR           NO MORE TO TRY                              
*****                                                                           
CC948    RES      0                                                             
         LW,R0    SCANFLAG                                                      
         BNEZ     ASSNERRF          B IF NO PARAMETER AFTER KEYWORD             
         SCANDEC                    GET PARAMETER                               
         CLM,R8   R12                                                           
         BCS,9    ASSNERR           B IF PARAMETER OUT OF LIMITS                
         STW,R8   T:AVAL,R3         SET FIELD VALUE                             
*                                                                               
CC949    RES      0                                                             
         B        CC942             LOOK FOR MORE OPTIONS                       
*****                                                                           
         PAGE                                                                   
*                                                                               
*        PACK ASSIGN OPTIONS INTO T:ASSN                                        
*                                                                               
CC950    RES      0                                                             
         LI,R3    0                 OPTION PACKING INDEX                        
*                                                                               
CC952    RES      0                                                             
         AI,R3    1                 NEXT PACKING CONTROL WORD                   
         LW,R7    ASNCTL,R3         GET THE WORD                                
         LI,R1    1                                                             
         LB,R6    R7,R1             GET FIELD SIZE                              
         LCW,R6   R6                MAKE IT A RIGHT-SHIFT INDEX                 
         AND,R7   X:FF              GET T:ASSN ENTRY WORD INDEX                 
         LW,R15   *R4,R7            GET T:ASSN WORD                             
         LB,R14   T:AFLAGS,R3       GET PRESENCE FLAG FOR CURRENT OPTION        
         SLD,R14  -1                PACK PRESENCE FLAG                          
         LW,R14   T:AVAL,R3         GET OPTION VALUE                            
         SLD,R14  0,R6              PACK VALUE                                  
         STW,R15  *R4,R7            PUT T:ASSN WORD BACK IN T:ASSN              
         CW,R3    ASNCTL                                                        
         BL       CC952             B IF NOT DONE PACKING T:ASSN YET            
*                                                                               
         LI,R3    NWE:ASSN                                                      
         AWM,R3   WDP:ASSN          UPDATE T:ASSN ENTRY POINTER                 
         B        CC80              GO GET NEXT COMMAND                         
*                                                                               
         PAGE                                                                   
*                                                                               
*        TABLE OF :ASSIGN OPTION KEYWORDS                                       
*                                                                               
T:AKEYS  DATA     #AKEYS            TABLE SIZE IN ENTRIES                       
         TEXT     'BCD '            BCD                                         
         TEXT     'BIN '            BINARY                                      
         TEXT     'NOV '            NOVFC                                       
         TEXT     'VFC '            VFC                                         
         TEXT     'UNP '            UNPACK                                      
         TEXT     'PAC '            PACK                                        
         TEXT     'EBC '            EBCDIC                                      
         TEXT     'ASC '            ASCII                                       
         TEXT     'NOD '            NODRC                                       
         TEXT     'DRC '            DRC                                         
         TEXT     'D80 '            D800                                        
         TEXT     'D16 '            D1600                                       
         TEXT     'REC '            RECL                                        
         TEXT     'BTD '            BTD                                         
         TEXT     'TRI '            TRIES                                       
#AKEYS   EQU      %-T:AKEYS-1                                                   
*                                                                               
         PAGE                                                                   
*                                                                               
*        TABLE OF :ASSIGN OPTION PROCESSOR BRANCH INDEXES                       
*        PARALLEL TO T:AKEYS                                                    
*        INDEXES INTO T:APRCB                                                   
*                                                                               
T:APRCX  DATA,1   0                 UNUSED ENTRY 0                              
         DATA,1   1                 BCD                                         
         DATA,1   1                 BINARY                                      
         DATA,1   1                 NOVFC                                       
         DATA,1   1                 VFC                                         
         DATA,1   1                 UNPACK                                      
         DATA,1   1                 PACK                                        
         DATA,1   1                 EBCDIC                                      
         DATA,1   1                 ASCII                                       
         DATA,1   1                 NODRC                                       
         DATA,1   1                 DRC                                         
         DATA,1   1                 D800                                        
         DATA,1   1                 D1600                                       
         DATA,1   2                 RECL                                        
         DATA,1   3                 BTD                                         
         DATA,1   4                 TRIES                                       
         BOUND    4                                                             
         PAGE                                                                   
*                                                                               
*        TABLE OF :ASSIGN OPTION T:ASSN PACKING CONTROL INDEXES                 
*        PARALLEL TO T:AKEYS                                                    
*        INDEXES INTO T:AVAL, T:AFLAGS, ASNCTL                                  
*                                                                               
T:ACTLX  DATA,1   0                 UNUSED ENTRY 0                              
         DATA,1   ASNMOD            BCD                                         
         DATA,1   ASNMOD            BINARY                                      
         DATA,1   ASNVFC            NOVFC                                       
         DATA,1   ASNVFC            VFC                                         
         DATA,1   ASNDP             UNPACK                                      
         DATA,1   ASNDP             PACK                                        
         DATA,1   ASNASC            EBCDIC                                      
         DATA,1   ASNASC            ASCII                                       
         DATA,1   ASNDRC            NODRC                                       
         DATA,1   ASNDRC            DRC                                         
         DATA,1   ASNDP             D800                                        
         DATA,1   ASNDP             D1600                                       
         DATA,1   ASNRSZ            RECL                                        
         DATA,1   ASNBTD            BTD                                         
         DATA,1   ASNNRT            TRIES                                       
         BOUND    4                                                             
         PAGE                                                                   
*                                                                               
*        TABLE OF :ASSIGN OPTION INTRINSIC VALUES                               
*        PARALLEL TO T:AKEYS                                                    
*        GIVES FLAG BIT SET OR RESET, MOSTLY                                    
*                                                                               
T:AIVAL  DATA,1   0                 UNUSED ENTRY 0                              
         DATA,1   0                 BCD                                         
         DATA,1   1                 BINARY                                      
         DATA,1   0                 NOVFC                                       
         DATA,1   1                 VFC                                         
         DATA,1   0                 UNPACK                                      
         DATA,1   1                 PACK                                        
         DATA,1   0                 EBCDIC                                      
         DATA,1   1                 ASCII                                       
         DATA,1   0                 NODRC                                       
         DATA,1   1                 DRC                                         
         DATA,1   0                 D800                                        
         DATA,1   1                 D1600                                       
         DATA,1   80                RECL                                        
         DATA,1   0                 BTD                                         
         DATA,1   3                 TRIES                                       
         BOUND    4                                                             
         PAGE                                                                   
*                                                                               
*                                                                               
*        THE FOLLOWING TABLE CONTROLS THE REPRESENTATION                        
*        IN T:ASSN OF FIELDS TO BE ALTERED OTHER                                
*        THAN THOSE IDENTIFYING THE I/O MEDIUM.                                 
*                                                                               
*        WORD ZERO CONTAINS THE NUMBER OF ENTRIES.                              
*        EACH FOLLOWING WORD IS AN ENTRY WHICH DESCRIBES                        
*        THE LOCATION OF A DCB FIELD AND THE PACKING OF                         
*        ITS ASSIGNED VALUE IN T:ASSN.                                          
*                                                                               
*        BYTE 0 OF AN ENTRY CONTAINS THE LEFT-SHIFT COUNT                       
*        TO SHIFT A VALUE FROM RIGHT-ALIGNED (NORMAL)                           
*        TO DCB-ALIGNED (NATURAL) POSITION IN A WORD.                           
*        BYTE 1 IS THE BIT LENGTH OF THE FIELD CONCERNED.                       
*        BYTE 2 IS THE DCB WORD IN WHICH THE FIELD RESIDES.                     
*        BYTE 3 IS THE T:ASSN WORD IN WHICH THE VALUE IS PACKED.                
*                                                                               
*        THE ENTRIES FOR FIELD VALUES PACKED IN A SINGLE T:ASSN                 
*        WORD ARE GROUPED IN THE CONTROL TABLE ORDERED                          
*        INVERSE TO THE ORDER IN WHICH THE VALUES WILL BE LEFT-SHIFTED          
*        OUT OF THE T:ASSN WORD.                                                
*                                                                               
*        THIS TABLE MUST BE THE DUPLICATE OF THE ONE IN OPASS2                  
*        WHICH IS USED TO UNPACK T:ASSN.                                        
*                                                                               
ASNCTL   CNAME                                                                  
         PROC                                                                   
LF       EQU      %-ASNCTL                                                      
         DATA,1   AF(1),AF(2),AF(3),AF(4)                                       
         PEND                                                                   
*                                                                               
ASNCTL   DATA     ASNCTLE-ASNCTL-1                                              
*        ENTRIES FOR T:ASSN WORD 8                                              
ASNNRT   ASNCTL   24,8,1,8          NRT                                         
ASNBTD   ASNCTL   4,2,0,8           BTD                                         
ASNVFC   ASNCTL   8,1,0,8           VFC                                         
ASNDP    ASNCTL   9,1,0,8           D/P                                         
ASNDRC   ASNCTL   10,1,0,8          DRC                                         
ASNASC   ASNCTL   11,1,0,8          ASC                                         
ASNMOD   ASNCTL   17,1,0,8          MOD                                         
*        ENTRIES FOR T:ASSN WORD 9                                              
ASNRSZ   ASNCTL   17,15,3,9         RSZ                                         
ASNCTLE  RES      0                                                             
         PAGE                                                                   
*                                                                               
*        TABLE OF T:ASSN FIELD VALUES UNTIL COMMAND SCAN IS DONE                
*        PARALLEL TO ASNCTL                                                     
*                                                                               
T:AVAL   EQU      B:X                                                           
         PAGE                                                                   
*                                                                               
*        TABLE OF T:ASSN FIELD SPECIFIED FLAGS UNTIL :ASSIGN                    
*        COMMAND SCAN IS COMPLETE                                               
*        PARALLEL TO ASNCTL                                                     
*                                                                               
T:AFLAGS EQU      B:X+#AKEYS+1                                                  
         PAGE                                                                   
*                                                                               
*        TABLE OF :ASSIGN COMMAND OPTION PROCESSOR BRANCHES                     
*        INDEXED BY VALUE FROM T:APRCX                                          
*                                                                               
T:APRCB  DATA     0                 UNUSED ENTRY 0                              
         B        APRCFLAG          PROCESSOR FOR FLAG KEYWORDS                 
         B        APRCREC           PROCESSOR FOR RECL KEYWORD                  
         B        APRCBTD           PROCESSOR FOR BTD KEYWORD                   
         B        APRCTRI           PROCESSOR FOR TRIES KEYWORD                 
         PAGE                                                                   
*                                                                               
*        ASSIGN OPTION PROCESSORS                                               
*                                                                               
APRCFLAG EQU      CC949             FLAG KEYWORD PROCESSOR                      
*                                                                               
APRCREC  RES      0                 PROCESSOR FOR RECL KEYWORD                  
         LI,R12   1                 MINIMUM VALUE                               
         LI,R13   X'7FFF'           MAXIMUM VALUE                               
         B        CC948                                                         
*                                                                               
APRCBTD  RES      0                 PROCESSOR FOR BTD KEYWORD                   
         LI,R12   0                 MINIMUM VALUE                               
         LI,R13   3                 MAXIMUM VALUE                               
         B        CC948                                                         
*                                                                               
APRCTRI  RES      0                 PROCESSOR FOR TRIES KEYWORD                 
         LI,R12   0                 MINIMUM VALUE                               
         LI,R13   255               MAXIMUM VALUE                               
         B        CC948                                                         
*                                                                               
         PAGE                                                                   
*                                                                               
*        ASSNERR  ERROR IN FIELD OF ASSIGN CARD                                 
*                                                                               
*        ASSNERRF ERROR FOLLOWING FIELD OF ASSIGN CARD                          
*                                                                               
*                                                                               
ASSNERR  LI,R9    ERITEM            ERROR PLACE IN CCI                          
         B        CC992                                                         
ASSNERRF LI,R9    ERFITEM                                                       
CC992    MTW,0    FL:UNNAM          WAS AN UNNAMED DCB ALTERED                  
         BEZ      CC997             NO -JUST PUT OUT ERROR MESSAGE              
         LW,R8    E:BLANKS                                                      
         LW,R3    1,R4              ENTRY IN DCB TABLE                          
         STW,R8   1,R3              RESTORE UNNAMED DCB                         
         STW,R8   2,R3                                                          
CC997    B        *R9               APPROPRIATE ERROR EXIT                      
         PAGE                                                                   
CC1000   LW,R6    SCANFLAG          :MODIFY CONTROL COMMAND                     
         CI,R6    1                                                             
         BNE      ERFITEM               ERROR,SPECIFICATION FIELD NOT           
*                                             NEXT ITEM                         
         SCANEBC                    SCAN FOR (SEG,XXXXX)                        
         CW,R8    E:SEG                                                         
         BNE      CC1015                                                        
         CI,R6    0                                                             
         BNE      ERFITEM                                                       
         SCANDEC                                                                
         CW,R8    V:SEGID               DOES XXXXX EQUAL SEG IDENT              
         BE       CC1010                   *YES                                 
         LW,R0    FL:GO                    *NO,GO-LINKS OPTION                  
         BGEZ     ERUNDSEG                         NO ERROR                     
         CW,R8    V:SEGID                          YES,IS XXXXX GREATER         
*                                                      THAN SEG IDENT           
         BG       CC30                                     YES,EXIT             
         BL       ERORDER                                  NO,ERROR             
CC1010   CI,R6    1                                                             
         BNE      ERFITEM                                                       
         SCANEBC                    SCAN FOR (LOC,ADDRESS)                      
CC1015   CW,R8    E:LOC                                                         
         BNE      ERITEM                                                        
         CI,R6    0                                                             
         BNE      ERFITEM                                                       
         SCANMODF                       SCAN FOR DEF NAME OF LOCATION           
         CI,R9    0                                                             
         BE       ERITEM                     ERROR,NOT EBCDIC                   
         SCANLOC                       *BUILD AN EXPRESSION IN T:LDADDR         
*                                       THAT EQUALS 'DEF PLUS/MINUS OFFSET'     
         LI,R5    BA(T:LDADDR)+3   *ADD ORIGIN ITEM AND LOCATION                
         LB,R8    T:LDADDR          EXPRESSION TO T:MODIFY                      
         ADDMODF                                                                
         LI,R5    BA(T:LDADDR)+4       *SOLVE EXPRESSION                        
         SOLVEX                                                                 
         CI,R6    0                                                             
         BNE      ERMODLOC                  ERROR,CANT RESOLVE                  
         LW,R5    FBA:SEG               GET FBA AND LBA+1 OF THE SEGMENT        
         AW,R5    BDP:SEG                                                       
         SLS,R5   -1                                                            
         LH,R10   6,R5                                                          
         AI,R5    1                                                             
         LH,R11   6,R5                                                          
         AND,R10  X:FFFF                                                        
         AND,R11  X:FFFF                                                        
         SLS,R10  3                                                             
         SLS,R11  3                                                             
         AW,R11   R10                  *IS THE LOCATION ADDR WITHIN             
         CW,R9    R10                   THE LIMITS OF THE SEGMENT               
         BL       ERMODLOC                  NO,ERROR                            
         SW,R11   R9                                                            
         BLEZ     ERMODLOC                  NO,ERROR                            
         SLS,R11  -2                    (CONVERT TO A WORD COUNT)               
         STW,R11  V:MODLOC                  YES,SAVE NUMBER OF LOCATIONS        
         SW,R9    R10               CONVERT :MODIFY BA TO BD IN SEG             
         STW,R9   V:MODBD           SAVE BD TO FIRST UNCHANGED BYTE             
         LW,R6    SCANFLAG                                                      
         B        CC1030                                                        
CC1020   LW,R6    SCANFLAG          END OF :MODIFY CC                           
         CI,R6    2                                                             
         BNE      CC1030            IF NOT, BRANCH TO CONTINUE                  
*                 FINISHED WITH :MODIFY CC.                                     
*                 DETERMINE IF LOAD MODULE IMAGE LENGTH MUST BE                 
*                 INCREASED TO CONTAIN MODIFIED LOCATIONS                       
         LW,R8    V:MODBD           BD IN SEG OF 1ST UNCHANGED BYTE             
         LW,R5    BDP:SEG                                                       
         AW,R5    FBA:SEG                                                       
         SLS,R5   -2                                                            
         SW,R8    S:LL,R5           SUBTRACT SEG LM IMAGE LENGTH                
         BLEZ     CC80              BRANCH FOR NEXT CC IF LM                    
*                                   IMAGE LENGTH CONTAINS MODIFICATION          
         AWM,R8   S:LL,R5           EXTEND LM IMAGE LENGTH                      
*                                   TO INCLUDE MODIFICATION                     
         B        CC80                                                          
CC1030   CI,R6    1                 SCAN NEXT SUBFIELD                          
         BNE      ERFITEM               (NOT END OF LAST SUBFIELD,ERROR)        
         SCANMODF                                                               
         MTW,-1   V:MODLOC         *IS THE LOCATION TO BE MODIFIED              
*                                   WITHIN THE SEGMENT ADDR LIMITS              
         BLZ      ERMODLOC              NO,ERROR                                
         MTW,4    V:MODBD           UPDATE BD TO 1ST UNCHANGED BYTE             
         CI,R6    X'80'             WAS AN INSTRUCTION SCANNED                  
         BANZ     CC1060                YES                                     
         CI,R9    0                 WAS AN EBCDIC SYMBOL SCANNED                
         BNE      CC1040                                                        
         STW,R8   T:LDINST+1            NO,ADD VALUE TO T:MODIFY WITH           
CC1035   LI,R8    5                        A 'LOAD ABSOLUTE' LOAD ITEM          
         LI,R5    BA(T:LDINST)+3                                                
CC1036   ADDMODF                                                                
         B        CC1020                                                        
CC1040   SCANADDR                       YES,SCAN FOR OFFSET(IF ANY)AND          
         LI,R5    BA(T:LDADDR)+4            BUILD AN EXPRESSION IN              
         SOLVEX                             T:LDADDR                            
         CI,R6    0                     CAN THE EXPRESSION BE RESOLVED          
         BNE      CC1050                                                        
         CI,R8    CONSTANT                  YES,IS THE VALUE AN ADDRESS         
         BANZ     CC1045                            NO                          
         LCW,R6   R10                               YES,CHANGE TO ADDR          
         SAS,R9   0,R6                                  RESOLUTION              
CC1045   STW,R9   T:LDINST+1                            SPECIFIED               
         B        CC1035                                                        
CC1050   LB,R8    T:LDADDR                  NO,ADD THE EXPRESSION TO            
         LI,R5    BA(T:LDADDR)+3               T:MODIFY                         
         B        CC1036                                                        
CC1060   CI,R9    0                 INSTRUCTION SCANNED                         
         BE       ERITEM                ERROR,OPCODE FIELD NOT EBCDIC           
         LI,R0    5                                                             
         STB,R0   T:LDINST                                                      
         CI,R10   2                 DOES OPCODE HAVE LESS THAN 2 CHAR           
         BG       CC1075                NO                                      
         LH,R8    R8                    YES,SEARCH T:OP2 FOR OPCODE             
         LI,R3    T:OP2HEX                                                      
         LH,R5    T:OP2                                                         
CC1065   CH,R8    T:OP2,R5                                                      
         BE       CC1100                                                        
         BDR,R5   CC1065                                                        
         B        EROPCODE                                                      
CC1075   CI,R10   4                 DOES THE OPCODE HAVE 3 OR 4 CHAR            
         BG       CC1090                                                        
         LW,R5    T:OP4                 YES,SEARCH T:OP4 FOR OPCODE             
         LI,R3    T:OP4HEX                                                      
CC1080   CW,R8    T:OP4,R5                                                      
         BE       CC1100                                                        
         BDR,R5   CC1080                                                        
         B        EROPCODE                                                      
CC1090   LW,R5    T:OP8                 NO,SEARCH T:OP8 FOR OPCODE              
         LI,R3    T:OP8HEX                                                      
CC1095   CD,R8    T:OP8,R5                                                      
         BE       CC1100                                                        
         BDR,R5   CC1095                                                        
         B        EROPCODE                                                      
CC1100   LH,R3    *R3,R5            MATCH FOUND,GET HEX AND CLASS               
         STH,R3   R10                   R3=HEX (BITS 16-23)                     
         AND,R10  Y:FF                    =FLAGS(BITS 24-27)                    
         STW,R10  T:LDINST+1              =CLASS(BITS 29-31)                    
         LW,R4    R3                                                            
         SLS,R4   -4                                                            
         AND,R4   X:F                   R4=FLAGS (IN BITS 28-31)                
         AND,R3   X:7                   R3=CLASS (IN BITS 29-31)                
         B        CC1110,R3         BRANCH TO PROCESS INSTRUCTION TYPE:         
CC1110   B        CC1120               (OP,R  *A,X)   ALL OTHERS                
         B        CC1120               (OP,R  VALU)   LI,AI,MI,CI               
         B        CC1150               (OP    *A,X)   B...BIDSNS,EXU,ETC        
         B        CC1160                (OP,R  VALU,X) SAS,SLS,SCS,ETC.         
         B        CC1170                (OP    CC,FC)  LCFI,LCI                 
         B        CC1180               (OP,VALU *A,X) MTB,MTH,MTW,MTD           
         B        CC1190                (OP,R  *A)     MMC                      
         PAGE                                                                   
CC1120   EQU      %                 PROCESS (OP,R *A,X) AND (OP,R VALU)         
         AI,R4    16                    R4=NO. OF BITS IN ADDR FIELD            
         LW,R3    CC1145,R3             R3=ADDR FIELD MASK                      
         SCANR                         *SCAN THE REGISTER FIELD                 
CC1122   SCANMODF                      *SCAN THE ADDRESS FIELD                  
         CI,R9    0                                                             
         BNE      CC1125                                                        
CC1124   LW,R9    R8                    VALUE SCANNED,STORE VALUE IN            
         ADRV                                         ADDR FIELD                
         B        CC1130                                                        
CC1125   SCANADDR                       EBCDIC SCANNED,SCAN OFFSET AND          
         ADRX                                          STORE EXPRESSION         
*                                                      IN T:LDADDR              
CC1130   LW,R6    SCANFLAG              IS THERE AN INDEX FIELD                 
         CI,R6    0                                                             
         BNE      CC1140                    NO                                  
         CI,R4    20                        YES,IMMEDIATE ADDRESSING            
         BE       ERFITEM                           YES,ERROR                   
         SCANX                                      NO,SCAN INDEX AND           
*                                                      STORE IN T:LDINST        
CC1140   LB,R8    T:LDINST              ADD INSTRUCTION TO T:MODIFY             
         LI,R5    BA(T:LDINST)+3                                                
         ADDMODF                                                                
         B        CC1020                                                        
CC1145   DATA     X'1FFFF'          ADDR FIELD MASK FOR CLASS 0                 
         DATA     X'FFFFF'          ADDR FIELD MASK FOR CLASS 1                 
         PAGE                                                                   
CC1150   LI,R5    X'F'              PROCESS (OP *A,X)                           
         SCD,R4   20                   *STORE FLAGS IN BITS 8-11 OF THE         
         STS,R4   T:LDINST+1            INSTRUCTION WORD                        
         LI,R3    X'1FFFF'             *R3=ADDR FIELD MASK                      
         LI,R4    17                   *R4=ADDR FIELD BIT LENGTH                
         LW,R6    SCANFLAG                                                      
         CI,R6    X'83'                 IS THE OPCODE TERM. BY A BLANK          
         BNE      ERFITEM                   NO,ERROR                            
         BE       CC1122                    YES,SCAN THE ADDRESS FIELD          
         PAGE                                                                   
CC1160   LI,R5    7                 PROCESS (OP,R VALUE,X)                      
         SCD,R4   8                    *STORE FLAGS IN BITS 21-23 OF            
         STS,R4   T:LDINST+1            THE INSTRUCTION WORD                    
         SCANR                         *SCAN THE REGISTER FIELD AND             
*                                       STORE IN THE INSTRUCTION WORD           
         LI,R10   -64                  (LOWER LIMIT OF VALUE)                   
         LI,R11   +63                  (UPPER LIMIT OF VALUE)                   
         NUMSCAN                       *SCAN THE 'SHIFT COUNT' AND STORE        
         LI,R3    X'7F'                 IN BITS 25-31 OF THE INSTRUCTION        
         LI,R4    7                     WORD                                    
         B        CC1124                                                        
         PAGE                                                                   
CC1170   LW,R6    SCANFLAG          PROCESS (LCFI CC,FC)                        
         CI,R6    X'83'                                                         
         BNE      ERFITEM               ERROR,OPCODE FOLLOWED BY R FIELD        
         LI,R5    3                                                             
         SCD,R4   20                   *STORE FLAGS IN BITS 10-11 OF            
         STS,R4   T:LDINST+1            THE INSTRUCTION WORD                    
         LI,R10   0                                                             
         LI,R11   15                                                            
         NUMSCAN                       *SCAN THE 'CONDITION CODE' FIELD         
         LI,R9    X'F'                  AND STORE IN BITS 24-27 OF THE          
         SCD,R8   4                     INSTRUCTION WORD                        
         STS,R8   T:LDINST+1                                                    
         CI,R6    0                                                             
         BNE      CC1140                NO 'FLOATING CONTROLS' FIELD            
         SLS,R4   -20                   IS THIS THE 'LCFI' INSTRUCTION          
         CI,R4    3                                                             
         BNE      ERFITEM                   NO,ERROR                            
         LI,R10   0                                                             
         LI,R11   7                                                             
         NUMSCAN                       *SCAN THE 'FLOATING CONTROLS'            
         LI,R9    X'7'                  AND STORE IN BITS 29-31 OF              
         STS,R8   T:LDINST+1            THE INSTRUCTION WORD                    
         B        CC1140                                                        
         PAGE                                                                   
CC1180   LI,R3    X'1FFFF'          PROCESS (OP,VALUE *A,X)                     
         AI,R4    16                    R4=NO. OF BITS IN ADDR FIELD            
         LW,R6    SCANFLAG                                                      
         CI,R6    X'80'                 IS THERE A VALUE FIELD                  
         BNE      CC1185                   *NO,LEAVE 'R' SET TO  ZERO           
         LI,R10   -8                       *YES,SCAN 'R' FIELD AND              
         LI,R11   +7                            STORE IN BITS 8-11 OF           
         NUMSCAN                                THE INSTRUCTION WORD            
         LI,R9    X'F'                                                          
         SCD,R8   20                                                            
         STS,R8   T:LDINST+1                                                    
         CI,R6    3                     IS THERE A BLANK AFTER 'VALUE'          
         B        CC1186                                                        
CC1185   CI,R8    X'83'                 IS THERE ABLANK AFTER OPCODE            
CC1186   BNE      ERFITEM                   NO,ERROR                            
         BE       CC1122                    YES,BRANCH TO SCAN ADDR             
         PAGE                                                                   
CC1190   LI,R5    7                 PROCESS (OP,R  *A)     MMC                  
         SCD,R4   17                                                            
         STS,R4   T:LDINST+1            STORE IN 'INDEX' FIELD OF INST.         
         SCANR                                                                  
         SCANMODF                                                               
         LI,R3    X'1FFFF'              R3=ADDR FIELD MASK                      
         LI,R4    17                    R4=NO. OF BITS IN ADDR FIELD            
         CI,R9    0                    *WAS AN EBCDIC ADDR SCANNED              
         BNE      CC1195                                                        
         LW,R9    R8                        NO,STORE VALUE IN ADDR FIELD        
         ADRV                                                                   
         B        CC1198                                                        
CC1195   SCANADDR                           YES,SCAN FOR OFFSET AND             
*                                               STORE THE ADDRESS               
*                                               EXPRESSION IN T:LDADDR.         
         ADRX                                   IF THE EXPRESSION CAN BE        
*                                               RESOLVED,STORE THE VALUE        
*                                               IN THE ADDR FIELD;ELSE,         
*                                               ADD THE EXP. TO T:LDINST        
CC1198   LW,R6    SCANFLAG              IS THERE AN INDEX FIELD                 
         CI,R6    0                                                             
         BE       ERFITEM                   YES,ERROR                           
         BNE      CC1140                    NO,ADD INST. TO T:MODIFY            
CC1300   RES      0                 PROCESS 'LMHDR' COMMAND                     
         LW,R8    SCANFLAG                                                      
         BEZ      ERFITEM           BRANCH IF NOT END-OF-FIELD                  
         CI,R8    2                                                             
         BE       CC80              BRANCH IF END-OF-CC                         
         SCANEBC                                                                
         SLS,R8   RIGHT*8           FIRST 3 CHARACTERS ONLY                     
         LW,R7    CC1350                                                        
CC1310   CW,R8    CC1350,R7                                                     
         BE       CC1360,R7                                                     
         BDR,R7   CC1310                                                        
         B        ERITEM            NOT A RECOGNIZED KEY                        
*        VALUELESS KEYS                                                         
CC1320   LW,R9    CC1370,R7                                                     
         LI,R8    1                                                             
         STW,R8   *R9               SET A FLAG                                  
         B        CC1300                                                        
*        KEYS FOLLOWED BY VALUES                                                
CC1330   MTW,0    SCANFLAG                                                      
         BNEZ     ERFITEM           NO VALUE FOLLOWS KEY                        
         STW,R7   KEYNR                                                         
         SCANDEC                                                                
         LW,R7    KEYNR                                                         
         LW,R9    CC1370,R7                                                     
         STW,R8   *R9               STORE THE VALUE                             
         B        CC1300                                                        
*        KEYS                                                                   
CC1350   DATA     CC1351-CC1350-1                                               
         DATA     'CRI'             CRITICAL                                    
         DATA     'STM'             STM                                         
         DATA     'SEC'             SECB                                        
         DATA     'REC'             RECB                                        
         DATA     'ENQ'             ENQ                                         
CC1351   RES      0                                                             
*        BRANCH TO APPROPRIATE PROCESSOR                                        
CC1360   EQU      %-1                                                           
         B        CC1320            CRITICAL                                    
         B        CC1320            STM                                         
         B        CC1330            SECB                                        
         B        CC1330            RECB                                        
         B        CC1330            ENQ                                         
*        STORAGE LOCS FOR VALUES/FLAGS                                          
CC1370   EQU      %-1                                                           
         DATA     FL:CRIT           CRITICAL                                    
         DATA     FL:STM            STM                                         
         DATA     V:MSECB           SECB                                        
         DATA     V:MRECB           RECB                                        
         DATA     V:MENQ            ENQ                                         
*                                                                               
         TITLE    '       **** ADDMODF ****'                                    
*                                                                               
*        PURPOSE: ADD BYTES TO T:MODIFY                                         
*                                                                               
*        INPUT:   R5=FBA OF BYTE STRING                                         
*                 R8=NUMBER OF BYTES TO ADD                                     
*                                                                               
*        CALL:    BAL,R13  ADDMODF                                              
*                                                                               
*        OUTPUT:  R5,R8 UNCHANGED                                               
*                 R1=T:MODIFY                                                   
*                 BDP:MODF=(R8)+BDP:MODF                                        
*                                                                               
*        CALLS:   ADDNXT                                                        
*                                                                               
ADDMODF  STW,R8   NBE:MODF                                                      
         LI,R1    T:MODIFY                                                      
         ADDNXT                                                                 
         LI,R8    0                                                             
         XW,R8    NBE:MODF                                                      
         B        *R13                                                          
         TITLE    '       **** NUMSCAN ****'                                    
*                                                                               
*        PURPOSE: TO SCAN A DECIMAL OR HEX NUMBER ON THE :MODIFY CC             
*                 AND TO OUTPUT AN ERROR ALARM IF THE NUMBER IS                 
*                 OUTSIDE THE SPECIFIED LIMITS                                  
*                                                                               
*        INPUT:   R10=SMALLEST LEGAL VALUE OF NUMBER  (LOWER LIMIT)             
*                 R11=LARGEST  LEGAL VALUE OF NUMBER   (UPPER LIMIT)            
*                                                                               
*        CALL:    BAL,R13  NUMSCAN                                              
*                                                                               
*        OUTPUT:  R8=BINARY NUMBER                                              
*                 R6=SCANFLAG                                                   
*                                                                               
*        CALLS:   SCANMODF                                                      
*                                                                               
NUMSCAN  STW,R10  NUM1              SAVE THE LIMITS                             
         STW,R11  NUM2                                                          
         SCANMODF                   SCAN THE NEXT ITEM ON THE :MODIFY CC        
         CI,R9    0                     WAS A NUMBER SCANNED                    
         BNE      ERITEM                    NO,ERROR                            
         LW,R10   NUM1                      YES,COMPARE AGAINST LIMITS          
         LW,R11   NUM2                                                          
         CLR,R10  R8                                                            
         BCS,CC2+CC3  ERITEM            ERROR,OUTSIDE LIMITS                    
         B        *R13                                                          
         TITLE    '       **** SCANR ****'                                      
*                                                                               
*        PURPOSE: TO SCAN THE REGISTER FIELD OF THE MNEMONIC INSTRUCTION        
*                 ON THE :MODIFY CONTROL COMMAND                                
*                                                                               
*        INPUT:   SCANFLAG=RESULTS FROM OP-CODE FIELD SCAN                      
*                 T:LDINST+1=INSTRUCTION WORD IN HEX                            
*                                                                               
*        CALL:    BAL,R12  SCANR                                                
*                                                                               
*        OUTPUT:  T:LDINST+1=VALUE SCANNED STORED INTO BITS 8-11                
*                                                                               
*        CALLS:   NUMSCAN                                                       
*                                                                               
SCANR    LW,R6    SCANFLAG                                                      
         CI,R6    X'80'                                                         
         BNE      ERFITEM               ERROR,NO REGISTER FIELD                 
         LI,R10   0                                                             
         LI,R11   15                                                            
         NUMSCAN                    SCAN THE REGISTER FIELD                     
         CI,R6    3                                                             
         BNE      ERFITEM               ERROR,R FIELD NOT TERMINATED            
*                                             BY A BLANK                        
         LI,R9    X'F'              ADD THE R FIELD TO THE INSTRUCTION          
         SCD,R8   20                                                            
         STS,R8   T:LDINST+1                                                    
         B        *R12                                                          
         TITLE    '       **** SCANX ****'                                      
*                                                                               
*        PURPOSE: TO SCAN THE INDEX FIELD OF THE MNEMONIC INSTRUCTION           
*                 ON THE :MODIFY CONTROL COMMAND,IF ANY                         
*                                                                               
*        INPUT:   T:LDINST+1=HEX INSTRUCTION WORD                               
*                 SCANFLAG=RESULTS OF ADDRESS FIELD SCAN                        
*                                                                               
*        CALL:    BAL,R12  SCANX                                                
*                                                                               
*        OUTPUT:  T:LDINST+1=VALUE SCANNED STORED INTO BITS 12-14               
*                                                                               
*        CALLS:   NUMSCAN                                                       
*                                                                               
SCANX    LW,R6    SCANFLAG                                                      
         CI,R6    0                                                             
         BNE      *R12                  EXIT,NO INDEX FIELD TO SCAN             
         LI,R10   1                                                             
         LI,R11   7                                                             
         NUMSCAN                    SCAN THE INDEX FIELD                        
         LI,R9    X'7'                                                          
         SCD,R8   17                                                            
         STS,R8   T:LDINST+1        ADD THE X FIELD TO THE INSTRUCTION          
         B        *R12                                                          
         TITLE    '       **** SCANLOC ****'                                    
*                                                                               
*        PURPOSE: TO BUILD AN EXPRESSION IN T:LDADDR THAT EQUALS                
*                 THE 'LOCATION' TO BE MODIFIED ON THE :MODIFY CC               
*                                                                               
*        INPUT:   SCANFLAG=RESULTS OF 'LOCATION' SYMBOL SCAN                    
*                 R8,R9=EBCDIC SYMBOL                                           
*                 R10=NUMBER OF EBCDIC CHARACTERS SCANNED                       
*                 R5=ADDRESS RESOLUTION IN BITS 30-31                           
*                   =ASTERISK FLAG IN BIT 24                                    
*                                                                               
*        CALL:    BAL,R13  SCANLOC                                              
*                                                                               
*        OUTPUT:  ORIGIN LOAD ITEM FOLLOWED BY ADDRESS EXPRESSION               
*                 IN T:LDADDR                                                   
*                                                                               
*        CALLS:   SERCHSYM,SCANMODF,MOVBYTS                                     
*                                                                               
SCANLOC  CI,R5    2                                                             
         BNE      ERITEM                ERROR,MUST BE A WORD ADDR               
*                                             AND CAN'T BE INDIRECT             
         LI,R12   X'04'             (ORIGIN LOAD ITEM)                          
         B        SA05                                                          
         TITLE    '       **** SCANADDR ****'                                   
*                                                                               
*        PURPOSE: TO BUILD AN EXPRESSION IN T:LDADDR THAT EQUALS THE            
*                 ADDRESS SCANNED ON THE:MODIFY CONTROL COMMAND                 
*                                                                               
*        INPUT:   SCANFLAG=RESULTS OF ADDRESS SYMBOL SCAN                       
*                 R8,R9=EBCDIC SYMBOL                                           
*                 R10=NO. OF EBCDIC  CHARACTERS SCANNED                         
*                 R5=ADDRESS RESOLUTION IN BITS 30-31                           
*                   =ASTERISK FLAG IN BIT 24                                    
*                                                                               
*        CALL:    BAL,R13  SCANADDR                                             
*                                                                               
*        OUTPUT:  LOAD-EXPRESSION LOAD ITEM FOLLOWED BY ADDRESS                 
*                 EXPRESSION IN T:LDADDR                                        
*                                                                               
*        CALLS:   SERCHSYM,SERCHDCB,SERCHPUB,ADDNXT,MOVBYTS,SCANMODF            
*                                                                               
SCANADDR LI,R12   X'60'             (LOAD-EXPRESSION LOAD ITEM)                 
SA05     LI,R6    3                                                             
         STB,R12  T:LDADDR,R6                                                   
         CI,R5    X'80'             IS ASTERISK FLAG SET                        
         BAZ      SA10                  NO                                      
         LW,R7    Y:8                   YES,SET BIT 0 IN THE INST. WORD         
         STS,R7   T:LDINST+1                                                    
SA10     AND,R5   X:3                   R5=ADDR RESOLUTION                      
         OR,R5    X:20                  (ADD VALUE OF TABLE LOAD ITEM)          
         STB,R5   T:LDADDR+1                                                    
         PUSH     1,4                                                           
         LW,R2    R10                                                           
         AI,R2    1                                                             
         LW,R3    R8                                                            
         LW,R4    R9                                                            
         LI,R5    BA(R2)+3         *FBA OF EBCDIC BYTE STRING IN                
         LI,R6    0                 T:SYMBOL FORMAT                             
         SERCHSYM                  *SEARCH T:SYMBOL FOR MATCHING ENTRY          
         CI,R6    0                                                             
         BNE      SA20                 *MATCH LOCATED                           
         CI,R12   X'04'                *NO MATCH,IS THIS THE LOC ADDR           
         BNE      SA15                               NO                         
         LI,R13   ERUNDSYM                           YES,ERROR                  
         B        SA35                                                          
SA15     SERCHPUB                   SEARCH T:PUBSYM FOR MATCHING ENTRY          
         CI,R6    0                                                             
         BNE      SA20                  MATCH LOCATED                           
         SERCHDCB                   SEARCH T:DCB FOR MATCHING ENTRY             
         CI,R6    0                                                             
         BNE      SA20                 *MATCH LOCATED                           
         LI,R1    T:SYMBOL             *NO MATCH,ADD SYMBOL AS A PREF           
         LI,R5    BA(R2)+3                       TO THE SYMBOL TABLE            
         ADDNXT                                                                 
         LI,R1    T:VALUE                                                       
         LI,R2    PREF+UNSAT+NOTDUP+ROM                                         
         LI,R3    0                                                             
         ADDNXT                                                                 
SA20     LI,R2    X'0200'           BUILD THE EXPRESSION IN T:LDADDR            
         STH,R9   R2                    R2='TB' IN BITS 0,1                     
         LI,R5    BA(R2)                   'ENTRY IN BITS 2-15                  
         LI,R6    BA(T:LDADDR)+5           'EXP  END' IN BITS 16-23             
         LI,R8    3                                                             
         MOVBYTS                                                                
         LI,R2    5                (NO. OF BYTES IN T:LDADDR)                   
         LW,R6    SCANFLAG                                                      
         CI,R6    4                 DOES THE ADDR HAVE AN OFFSET VALUE          
         BNE      SA30                  NO                                      
         SCANMODF                       YES,SCAN THE OFFSET VALUE               
         CI,R9    0                         IS THE OFFSET A NUMBER              
         BE       SA25                          YES                             
         LI,R13   ERITEM                        NO,ERROR                        
         B        SA35                                                          
SA25     CI,R8    0                     DOES THE ADDR OFFSET EQUAL ZERO         
         BE       SA30                      YES,DONT ADD TO EXPRESSION          
         LW,R3    R8                        NO,ADD TO EXPRESSION                
         LI,R2    X'01'                        (ADD CONSTANT LOAD ITEM)         
         LI,R5    BA(R2)+3                                                      
         LW,R4    Y:02                                                          
         LI,R8    6                                                             
         LI,R6    BA(T:LDADDR)+7                                                
         MOVBYTS                                                                
         LI,R2    10                                                            
SA30     STB,R2   T:LDADDR                                                      
SA35     PULL     1,4                                                           
         B        *R13                                                          
         TITLE    '       **** ADRX ****'                                       
*                                                                               
*        PURPOSE: TO RESOLVE THE EXPRESSION IN T:LDADDR,IF POSSIBLE;            
*                 AND TO STORE THE RESOLVED VALUE IN THE ADDRESS                
*                 FIELD OF T:LDINST+1.IF THE ADDRESS CANNOT BE RESOLVED,        
*                 TO ADD THE EXPRESSION TO T:LDINST WITH THE DEFINE             
*                 FIELD LOAD ITEM                                               
*                                                                               
*        INPUT:   R3=ADDR FIELD MASK                                            
*                 R4=NO. OF BITS IN ADDR FIELD                                  
*                                                                               
*        CALL:    BAL,R12  ADRX                                                 
*                                                                               
*        OUTPUT:  R3,R4 UNCHANGED                                               
*                                                                               
*        CALLS:   SOLVEX,MOVBYTS                                                
*                                                                               
*        USES:    ALL REGISTERS                                                 
*                                                                               
ADRX     LI,R5    BA(T:LDADDR)+4                                                
         SOLVEX                     SOLVE THE EXPRESSION IN T:LDADDR            
         CI,R6    0                     WAS THE EXPRESSION RESOLVED             
         BNE      AR20                      NO                                  
         CI,R8    CONSTANT                  YES,IS THE VALUE AN ADDRESS         
         BANZ     ADRV                              NO                          
         LCW,R6   R10                               YES,CHANGE BACK TO          
         SAS,R9   0,R6                                  RESOLUTION              
         B        ADRV                                  SPECIFIED               
         TITLE    '       **** ADRV ****'                                       
*                                                                               
*        PURPOSE: TO STORE A VALUE IN THE ADDRESS FIELD OF  T:LDINST+1,         
*                 CHECKING FOR TRUNCATION ERRORS                                
*                                                                               
*        INPUT:   R3=ADDR FIELD MASK                                            
*                 R4=NO. OF BITS IN ADDR FIELD                                  
*                 R9=VALUE TO BE STORED IN THE ADDR FIELD                       
*                                                                               
*        CALL:    BAL,R12  ADRV                                                 
*                                                                               
*        OUTPUT:  R3,R4 UNCHANGED                                               
*                                                                               
*        CALLS:   MOVBYTS                                                       
*                                                                               
*        USES:    ALL REGISTERS                                                 
*                                                                               
ADRV     LW,R2    R9                STORE VALUE IN ADDR FIELD                   
         STS,R2   T:LDINST+1                                                    
         LW,R5    SAVEFLAG                                 /SIG7-2627/*C5732    
         CI,R5    X'80'             IS ASTERISK FLAG SET   /SIG7-2627/*C5732    
         BAZ      %+3               NO                     /SIG7-2627/*C5732    
         LW,R5    Y:8               YES,SET BIT 0 IN INST. /SIG7-2627/*C5732    
         STS,R5   T:LDINST+1                               /SIG7-2627/*C5732    
         LCW,R2   R4                IS THE VALUE LARGER THAN THE FIELD          
         SAS,R9   0,R2                                                          
         CI,R9    0                                                             
         BE       *R12                  NO,EXIT                                 
         CI,R9    -1                                                            
         BE       *R12                  NO,EXIT                                 
         BNE      ERITEM                YES,ERROR                               
AR20     LI,R5    2                *STORE NO. OF BITS IN FIELD IN               
         STB,R4   T:LDINST+2,R5     'DEFINE FIELD' LOAD ITEM                    
         LB,R8    T:LDADDR         *ADD  ADDR  EXPRESSION TO T:LDINST           
         AI,R8    -1                    (NO. OF BYTES IN THE EXP.)              
         LI,R5    BA(T:LDADDR)+4                                                
         LI,R6    BA(T:LDINST)+11                                               
         MOVBYTS                                                                
         AI,R8    8                                                             
         STB,R8   T:LDINST          ADJUST T:LDINST BYTE COUNT                  
         B        *R12                                                          
         TITLE    '       **** CCI DIAG CALLS ****'                             
         DO       #MAP~=0                                                       
OERBP    LI,R9    OCCBP             *BACKGROUND PRIMARY TASK                    
         B        OER20              WAS SPECIFIED                              
         FIN                                                                    
OERFUND  LI,R9    RFUND2           *PROGRAM OR PUBLIB RAD FILE ON OLOAD         
         B        OER10             CC UNDEFINED                                
OERAREA  LI,R9    OCCAREA          *FILE AREA NOT 'FP' AND :PUBL                
         B        OER20             ENCOUNTERED                                 
OERFORE  LI,R9    OCCFORE          *(FORE,FWA,LWA) NOT SPECIFIED ON OLOA        
         B        OER20             AND :PUBLIB ENCOUNTERED                     
OERTEMP  LI,R9    OCCTEMP          *TEMP KEYWORD ON OLOAD CC AND                
         B        OER20             :PUBLIB ENCOUNTERED                         
OERPUBL  LI,R9    OCCPUBL          *PUBLIB KEYWORD ON OLOAD CC AND              
         B        OER20             :PUBLIB ENCOUNTERED                         
OERTASKS LI,R9    OCCTASKS         *TASKS KEYWORD ON OLOAD CC AND               
         B        OER20             :PUBLIB ENCOUNTERED                         
OERSTEP  LI,R9    NOATTEND         *STEP OPTION SPECIFIED AND JOB NOT           
         B        OER20             ATTENDED                                    
OERACNT  LI,R9    OCCACNT           ACCOUNT NAME ON LM FILE ID                  
         B        OER20             FOR A PUBLIB LOAD                           
OERITEM  LI,R9    OCCITEM          *ERROR IN ITEM XX ON OLOAD CC                
         B        OER10                                                         
OERFITEM LI,R9    OCCFITEM         *ERROR FOLLOWING ITEM XX ON OLOAD            
OER10    LW,R12   SCANITEM                                                      
OER20    RDIAG                     *OUTPUT DIAGNOSTIC AND ABORT                 
         B        %                                                             
         PAGE                                                                   
ERMODLOC LI,R9    CCMODLOC          MODIFYING OUTSDIE SEG LIMITS                
         B        ER10                                                          
EROPCODE LI,R9    CCOPCODE          ILLEGAL OR NON-IMPLEMENTED OPCODE           
         B        ER10                                                          
ERRFUND  LI,R9    RFUND             INPUT FILE UNDEFINED                        
         B        ER10                                                          
ERORDER  LI,R9    CCORDER           ILLEGAL ORDER OF CONTROL COMMANDS           
         LW,R5    V:CCTYPE              WAS MONITOR CC INPUT (EOF)              
         CI,R5    -1                                                            
         BNE      ER05                                                          
         LI,R9    ILLMCC                    YES,MONITOR CC ENCOUNTERED          
         B        OER20                         INSTEAD OF :ROOT OR             
*                                               :PUBLIB CC,                     
ER05     CI,R5    :BINARY               WAS A BINARY CARD INPUT                 
         BNE      ER10                      NO                                  
         LI,R9    CCBINORD                  YES,BINARY CARD ENCOUNTERED         
         B        ER10                          INSTEAD OF CC                   
         DO       #MAP~=0                                                       
ERSMM    LI,R9    SMMER             SIMPLIFIED MEM MGT W FGD OR PUBLIB          
         B        ER10                                                          
         FIN                                                                    
ERNOUDCB LI,R9    NOUDCB            NOT ENUF UDCBS                              
         B        ER10                                                          
ERSEGORD LI,R9    CCSEGORD          :SEG COMMANDS OUT-OF-ORDER                  
         B        ER10                                                          
ERITEM   LI,R9    CCITEM            ERROR IN ITEM XX ON CC                      
         B        ER10                                                          
ERFITEM  LI,R9    CCFITEM           ERROR FOLLOWING ITEM XX ON CC               
         B        ER10                                                          
ERUNDSEG LI,R9    CCUNDSEG          UNDEFINED SEGMENT ON :MODIFY CC             
         B        ER10                                                          
ERDUPSEG LI,R9    CCDUPSEG          DUPLICATE IDENT ON :SEG CC                  
         B        ER10                                                          
ERUNDSYM LI,R9    CCUNDSYM          UNDEFINED SYMBOL ON :MODIFY CC 'LOC'        
         B        ER10                                                          
ERDUPNAM LI,R9    CCDUPNAM         *DUPLICATE NAME ON :INC,:EXC,:RES,           
         B        ER10              OR :LOOMMON CC                              
ERIDENT  LI,R9    CCIDENT          *SEGMENT IDENT MISSING FROM :SEG CC          
ER10     RES      0                                                             
         LI,R5    BA(B:C)                                                       
         LI,R6    BA(B:ERRCC)+1                                                 
         LI,R8    80                                                            
         MOVBYTS                    MOVE CMND INTO ERROR-LOGGING                
*                                   BUFFER IN CASE IT IS NOT                    
*                                   ALREADY THERE                               
         LI,R5    ' '               BLANK (LP VFC)                              
         STB,R5   B:ERRCC                                                       
         LW,R12   SCANITEM          GET ERROR ITEM NUMBER                       
         RDIAG                     *OUTPUT DIAGNOSTIC AND (IF RETURN)           
         LI,R0    0                 REREAD CONTROL COMMAND                      
         STW,R0   V:CCTYPE                                                      
         LW,R10   V:CCDCB          *WA OF DCB FROM WHICH CORRECTED CC           
*                                   WILL BE INPUT (M:C OR M:OC)                 
         STW,R10  FPT:RD2          *STORE ADDR OF DCB WHERE NEXT CC             
         LI,R10   READ              IS TO BE INPUT                              
         STB,R10  FPT:RD2                                                       
         LCI      15                                                            
         LM,R0    CCSTACK           ORIGINAL VALUES                             
         STW,R0   BDP:PUBS                                                      
         STW,R1   BDP:PUBV                                                      
         STW,R2   BDP:SYM                                                       
         STW,R3   BDP:VALU                                                      
         STW,R4   BDP:DCBV                                                      
         STW,R5   BDP:ROMI                                                      
         STW,R6   V:SEGID                                                       
         STW,R7   V:LINKID                                                      
         STW,R8   FL:LIB                                                        
         STW,R9   NBA:SECT                                                      
         STD,R10  *PCBPOINT                                                     
         STW,R12  BDP:MODF                                                      
         STW,R13  V:NUSG                                                        
         STW,R14  V:NPLSG                                                       
         B        CCI5                                                          
         TITLE    '       **** LBOPTION ****'                                   
*                                                                               
*        PURPOSE: TO SCAN NEXT LIBRARY SEARCH OPTION ON CONTROL COMMAND         
*                 AND STORE LIBRARY AREA+1 IN SPECIFIED BYTE OF FL:LIB          
*                                                                               
*        INPUT:   R2=BYTE INDEX INTO FL:LIB WHERE SCANNED OPTION FLAG           
*                    IS TO BE STORED                                            
*                                                                               
*        CALL:    BAL,R13  LBOPTION                                             
*                                                                               
*        OUTPUT:  R2=(R2)+1                                                     
*                 R8=SP+1,IF 'SYSTEM' SCANNED                                   
*                   =FP+1,IF 'USER' SCANNED                                     
*                                                                               
*        CALLS:   SCANEBC                                                       
*                                                                               
*                                                                               
LBOPTION SCANEBC                    SCAN USER,SYSTEM OPTION                     
         SLS,R8   -8                                                            
         CW,R8    E:USE                                                         
         BE       LB10                                                          
         CW,R8    E:SYS                                                         
         BNE      LB30                                                          
         LI,R8    SP+1                  SYSTEM LIBRARY                          
         B        LB20                                                          
LB10     LI,R8    FP+1                  USER LIBRARY                            
LB20     STB,R8   FL:LIB,R2                                                     
         MTW,1    R2                                                            
         B        *R13                                                          
LB30     LW,R0    V:CCTYPE          ERROR ON...                                 
         CI,R0    :OLOAD                                                        
         BE       OERITEM               OLOAD CC                                
         BNE      ERITEM                :LIB CC                                 
         TITLE    '       **** RDCC ****'                                       
*                                                                               
*        PURPOSE: TO READ CONTROL COMMAND FROM M:C AND LOG ONTO M:LL,           
*                 SKIPPING BLANK RECORDS (RETURN TO CC95 IF 'EOF' READ)         
*                 OR (RETURN TO CC97 IF BINARY CARD INPUT)                      
*                                                                               
*        INPUT:   NONE                                                          
*                                                                               
*        CALL:    BAL,R14   RDCC                                                
*                                                                               
*        OUTPUT:  CONTROL COMMAND IN B:C                                        
*                                                                               
*        CALLS:   READ,WRITE,CHKBLANK                                           
RDCC     LI,R9    1                 RETURN TO CC95 IF 'EOF' ENCOUNTERED         
         STW,R9   PT:RD1            RETURN TO CC95 IF EOD                       
RD10     RES      0                                                             
         LI,R9    PT:RD1                                                        
         CAL1,1   FPT:RD2           READ C FOR NEXT CMND                        
         LB,R9    B:C                                                           
         CI,R9    X'3C'                                                         
         BE       CC97              B IF BINARY CARD                            
         CI,R9    X'1C'                                                         
         BE       CC97              B IF BINARY CARD                            
         LI,R5    BA(B:C)                                                       
         CHKBLANK                   CHECK FOR ALL-BLANK CMND                    
         BCS,CC1+CC2  RD10          B IF ALL BLANKS                             
         B        *R14              RETURN                                      
         TITLE    '       **** RDCONT ****'                                     
*                                                                               
*        PURPOSE: TO READ CONTINUATION CONTROL COMMANDS AND LOG ONTO LL         
*                                                                               
*        INPUT:   NONE                                                          
*                                                                               
*        CALL:    BAL,R14   RDCONT                                              
*                                                                               
*        OUTPUT:  CONTROL COMMAND IN B:C                                        
*                                                                               
*        CALLS:   READ,WRITE,CHKBLANK                                           
*                                                                               
*                                                                               
RDCONT   RES      0                                                             
         LI,R9    0                 NO SPECIAL ERROR HANDLING                   
         CAL1,1   FPT:RD2           READ CONTINUATION CMND                      
         LI,R5    BA(B:C)                                                       
         CHKBLANK                   CHECK FOR ALL-BLANK CMND                    
         BCS,CC1+CC2  RDCONT        B IF ALL BLANKS                             
         CAL1,1   FPT:RD3           LOG CONTINUATION ON LL                      
         LI,R5    BA(B:C)                                                       
         LI,R6    BA(B:ERRCC)+1                                                 
         LI,R8    80                                                            
         MOVBYTS                    MOVE LINE INTO ERROR-LOGGING BUFFER         
         LI,R5    ' '                                                           
         STB,R5   B:ERRCC           SET VFC BYTE                                
         B        *R14                                                          
         TITLE    '**** SCAN ROUTINE ****'                                      
*                                                                               
*                                                                               
*                                   SCANS ONE SUBFIELD AT A TIME                
*                                                                               
*                                   CALL IS    BAL,R15  SCAN                    
*                                     WHERE  R7=ADD. OF INPUT PARAM.            
*                                     WHICH ARE                                 
*                                                                               
*                                       WORD 1= ADD. OF INPUT BUFFER            
*                                               (MUST START ON WORD BND)        
*                                       WORD 2=1, LEAVE FIELD IN EBCDIC         
*                                             =2, CONVERT TO HEX                
*                                             =4, CONVERT TO DECIMAL            
*                                             =3, CONVERT TO HEX OR BCD         
*                                             =5, CONVERT TO DEC OR BCD         
*                                                                               
*                                       WORD 3=0, FIRST TIME FOR CARD           
*                                             =1, CONTINUE ON CARD              
*                                                                               
*                                       WORD 4=ADDRESS OF ROUTINE TO            
*                                              PROCESS  ;                       
*                                                                               
*                                   EXITS WITH FOLLOWING:                       
*                                                                               
*                                     R7- UNCHANGED                             
*                                     R8,R9- CONTAIN VALUE                      
*                                       IF R9=0, R8 CONTAINS DEC OR HEX         
*                                            =NONZERO, R8 AND R9 CONTAIN        
*                                               EBCDIC(UNUSED CHAR. HAVE        
*                                               BLANKS)                         
*                                                                               
*                                     R6=0, END OF SUBFIELD                     
*                                       =1, END OF FIELD                        
*                                       =2, END OF CARD                         
*                                       =3, END OF FILE ID FIELD                
*                                       =-1,ERROR IN SUBFIELD OR FIELD          
*                                         ERRORS ARE:                           
*                                           ILLEGAL CHAR.                       
*                                           MORE THAN 8 CHARS.                  
*                                           COL. 80 SCANNED                     
*                                           ILLEGAL PARENTHSES                  
*                                     R10= NO. CHARS. IN FIELD OR SUBF.         
*                                     R11= SUBFIELD NO. IN EBCDIC FOR           
*                                          ERROR FIELD XX ALARM; CHARS.         
*                                          ARE IN BITS 8-23, OTHER CHARS        
*                                          ARE BLANKS                           
*                                                                               
*                                   REGISTERS USED:  R0, R5-R11                 
*                                                    R7 IS UNCHANGED            
*                                   AFTER AN ERROR RETURN, WORD 3 OF            
*                                     INPUT PARAM. MUST BE ZERO                 
*                                                                               
*                                                                               
*                                                                               
KXF      DATA     X'F'                                                          
*                                                                               
*                                                                               
SCAN     STW,R15  SCAN99                                                        
         LI,R0    5                                                             
         STW,R0   SCAN83            INIT. TO DEC. OR BCD.                       
         LW,R0    SCAN91                                                        
         STW,R0   SCAN84            SAVE PARENTHSES FLAG AT START               
         LW,R0    SCAN98                                                        
         STW,R0   SCAN85            SAVE SCAN98 IN CASE HAVE TO RESCAN          
         LW,R0    *R7                                                           
         STW,R0   SCAN96            SAVE ADD. OF BUFFER                         
         LW,R0    SCAN92            IS IT A CONT. CARD                          
         BNEZ     SCAN0             NO                                          
         STW,R7   SCAN88            YES, SAVE R7                                
         LW,R0    3,R7              ADDR OF CONTINUATION SUBR                   
         BAL,R14  *R0                                                           
         LW,R7    SCAN88            RESTORE R7                                  
SCAN0    LW,R8    SCAN89A           HOUSEKEEP R8,R9 TO ALL BLANKS               
         STW,R8   R9                                                            
         LI,R0    -9                                                            
         STW,R0   SCAN93            HOUSEKEEP CHAR. COUNT                       
         LI,R0    0                                                             
         STW,R0   SCAN95            CLEAR COUNT OF HEX CHARS.                   
         STW,R0   SCAN80                                                        
         LI,R0    2                 SET FOR WA AT START                         
         STW,R0   SCAN82                                                        
         LW,R0    SCAN84                                                        
         STW,R0   SCAN91            RESET PARENTHSES FLAG                       
         LW,R0    2,R7              IS THIS A CONTINUATION                      
         BNEZ     SCAN4             YES                                         
         STW,R0   SCAN90            HOUSEKEEP FIELD FLAG AND                    
         LI,R0    -1                  PARENTHESES FLAG                          
         STW,R0   SCAN91                                                        
         STW,R0   SCAN84                                                        
SCAN1    LI,R0    X'F0F0'                                                       
         STW,R0   SCAN94            HOUSEKEEP FIELD COUNT                       
         LI,R6    0                 FIRST CHARACTER INDEX                       
         LB,R0    *SCAN96           IS COLUMN ONE A COLON                       
         CI,R0    X'7A'                                                         
         BNE      %+2               B IF COL 1 NOT :                            
         LI,R6    1                 SET TO COL. 2                               
         LI,R0    X'40'                                                         
SCAN2    CB,R0    *SCAN96,R6        SCAN OFF LEADING BLANKS                     
         BNE      SCAN6             NOT BLANK                                   
         AI,R6    1                 STEP INDEX                                  
         CI,R6    80                                                            
         BL       SCAN2             NOT COL. 80 YET                             
         LI,R10   0                 BLANK CARD, SET NO. CHARS=0                 
         LI,R6    2                 SET TO END OF CARD                          
         B        SCAN33            EXIT                                        
*                                                                               
SCAN4    LW,R0    SCAN92            IS THIS A CONT. CARD                        
         BEZ      SCAN1             YES                                         
         LW,R6    SCAN98            GET COL. INDEX                              
         AI,R6    1                 STEP TO NEXT COL.                           
SCAN6    LW,R11   1,R7              GET INPUT CONVERSION TYPE IN R11            
         BNEZ     %+2               NOT MODIFY CASE                             
         LW,R11   SCAN83            SET FOR PROPER SCAN                         
         LI,R0    0                                                             
         STW,R0   SCAN98            HOUSEKEEP                                   
         MTW,1    SCAN94            STEP FIELD COUNTER IN EBCDIC                
         LI,R5    3                 CHECK FOR OVERFLOW AND RESET IF             
         LI,R0    X'FA'             OVERFLOW                                    
         CB,R0    SCAN94,R5                                                     
         BG       SCAN7             NO OVERFLOW                                 
         LI,R0    X'F0'             RESET FOR OVERFLOW                          
         STB,R0   SCAN94,R5                                                     
         LI,R5    2                                                             
         MTB,1    SCAN94,R5                                                     
SCAN7    LB,R10   *SCAN96,R6        GET NEXT BYTE                               
         CI,R10   X'C1'                                                         
         BL       SCAN25            SPECIAL CHAR.                               
         MTW,1    SCAN93            STEP CHAR. COUNT                            
         BNEZ     SCAN9             NOT TOO MANY CHARS.                         
SCAN8    LI,R6    -1                SET TO ERROR EXIT                           
         B        SCAN33            GO TO EXIT                                  
SCAN9    CI,R10   X'C7'                                                         
         BL       SCAN19            HEX CHAR.                                   
         CI,R10   X'F0'                                                         
         BL       SCAN14            EBCDIC CHAR.                                
         CI,R10   X'FA'                                                         
         BGE      SCAN8             ERROR, ILLEGAL CHAR.                        
         CI,R11   4                 IS FIELD DECIMAL                            
         BL       SCAN19            NO DECIMAL CONVERSION                       
         LI,R11   4                 SET FLAG SO ONLY DECIMAL CONVERSION         
         CW,R8    SCAN89A           IS THIS FIRST CHAR.                         
         BNE      %+2               NO                                          
         LI,R8    0                 YES, CLEAR R8                               
         LW,R9    R8                                                            
         MI,R9    10                CHANGE TO DECIMAL                           
         AI,R10   -X'F0'                                                        
         AW,R9    R10               ADD INTO ACC. SUM                           
         LW,R8    R9                MOVE VALUD TO R8                            
SCAN10   LI,R9    0                 SET EXIT VALUE TO DEC OR HEX                
SCAN11   LW,R0    SCAN91            WAS ) PREVIOUS CHAR.                        
         BEZ      SCAN8             YES, ERROR IN FIELD                         
SCAN12   AI,R6    1                 STEP COL. COUNT                             
         CI,R6    80                COL. 80                                     
         BL       SCAN7             NO                                          
         B        SCAN8             YES, ERROR                                  
SCAN14   LW,R0    R10               CHECK FOR LEGAL EBCDIC CHAR.                
         AND,R0   KXF                                                           
         BEZ      SCAN8             ILLEGAL CHAR.                               
         CI,R0    'A'                                                           
         BGE      SCAN8             ILLEGAL CHAR.                               
         CI,R10   X'E1'                                                         
         BE       SCAN8             ILLEGAL CHAR.                               
SCAN14A  LI,R0    1                                                             
         AND,R11  R0                EBCDIC CONV. REQUESTED                      
         BNEZ     SCAN14D           YES                                         
         LW,R0    1,R7              NO, IS THIS A MODIFY CARD                   
         BNEZ     SCAN8             NO                                          
         MTW,-4   SCAN83            YES, CHANGE TO BCD SCAN                     
         BLEZ     SCAN8             ERROR, IF NOT PREVIOUSLY DEC.+BCD           
         MTW,-1   SCAN94            RESET FIELD COUNT TO WHERE IT WAS           
         LW,R0    SCAN85                                                        
         STW,R0   SCAN98            RESET COL. TO RESTART IN                    
         B        SCAN0             GO TO RETRY SCAN                            
SCAN14D  LW,R5    SCAN93            GET CHAR. COUNT                             
         AI,R5    8                 GET PROPER BYTE FOR CHAR.                   
         STB,R10  R8,R5             STORE CHAR. IN PROPER BYTE                  
         B        SCAN11                                                        
SCAN19   LI,R0    2                                                             
         AND,R0   R11                                                           
         BEZ      SCAN14A           NOT HEX CONV.                               
         LI,R11   2                 SET TO HEX ONLY                             
         CW,R8    SCAN89A           IS THIS FIRST CHAR.                         
         BNE      SCAN22            NO                                          
         LI,R8    0                 YES, CLEAR R8                               
SCAN22   SLS,R8   4                                                             
         CI,R10   X'F0'                                                         
         BGE      %+2                                                           
         AI,R10   X'39'             CHANGE TO HEX                               
         AI,R10   -X'F0'                                                        
         AW,R8    R10                                                           
         MTW,1    SCAN95            STEP COUNT OF HEX                           
         B        SCAN10            GET NEXT CHAR.                              
SCAN25   CI,R10   X'6B'             COMMA                                       
         BNE      SCAN35            NO                                          
         LW,R0    SCAN91            GET PARENTHSES FLAG                         
         CI,R0    2                 ARE THERE 2 LEFT PARENTHSES                 
         BE       SCAN8             YES,ERROR                                   
SCAN25C  LW,R0    SCAN91            GET PARENTHSES FLAG                         
         BGZ      SCAN29            NOT END OF FIELD                            
SCAN28   MTW,1    SCAN98            SET EXIT PARAM. FOR END OF FIELD            
SCAN29   MTW,1    SCAN90            STEP FIELD FLAG                             
         LW,R10   SCAN93            GET CHAR. COUNT ON EXIT                     
         AI,R10   9                 CHANGE TO POSITIVE                          
         LW,R0    SCAN80            WAS A + OR - SIGN ENCOUNTERED               
         BEZ      SCAN32            NO                                          
         BGZ      %+2               PLUS SIGN                                   
         LCW,R8   R8                - SIGN, TAKE COMPLIMENT                     
         CI,R9    0                 IS IT DEC OR HEX                            
         BNE      SCAN8             NO,ERROR                                    
SCAN32   XW,R6    SCAN98            SAVE CHAR COUNT AND SET EXIT PM.            
SCAN33   MTW,1    SCAN92            STEP CONT. CARD FLAG                        
         LW,R11   SCAN94            SET R11 TO FIELD NO.                        
         SLS,R11  8                 POSITION TO PROPER BITS                     
         AW,R11   SCAN89            ADD IN BLANKS                               
         LW,R0    SCAN91                                                        
         BNEZ     %+3                                                           
         LI,R0    -1                                                            
         STW,R0   SCAN91                                                        
         LI,R0    0                                                             
         STW,R0   SCAN97            RESET FILE ID SCAN FLAG                     
         LW,R5    SCAN82            SET R5 UPON EXIT                            
         B        *SCAN99           EXIT                                        
SCAN35   CI,R10   X'5D'             RIGHT PARENTH.                              
         BNE      SCAN36            NO                                          
         LW,R0    SCAN91            YES, CHECK LEGALITY                         
         BLEZ     SCAN8             ERROR, RT.PARENTH., BUT NO LEFT             
         MTW,-1   SCAN91            SET PARENTH. FLAG TO RT. PARENTH.           
         B        SCAN12            GET NEXT CHAR.                              
SCAN36   CI,R10   X'4D'             LEFT PARENTHSES                             
         BNE      SCAN37            NO                                          
         MTW,0    SCAN91            YES                                         
         BGZ      SCAN36F           MORE THAN 1 LEFT PARENTHSES                 
         LI,R0    1                                                             
         STW,R0   SCAN91            SET TO LEFT PARENTH.                        
         LW,R0    1,R7              IS THIS MODIFY CARD                         
         BNEZ     SCAN12            NO,GET NEXT CHAR.                           
         LW,R10   SCAN93            YES                                         
         CI,R10   -9                WAS THIS FIRST CHAR.                        
         BNE      SCAN36C           NO,GO CHECK GOR RESL. NAMES                 
         LI,R0    X'80'             YES                                         
         STW,R0   SCAN98            SET R6 FOR OP CODE HIT                      
         B        SCAN12            GO GET NEXT CHAR.                           
SCAN36C  LI,R5    4                                                             
         CW,R8    SCAN81-1,R5       IS THIS A RESOL. NAME                       
         BE       %+3               YES                                         
         BDR,R5   %-2                                                           
         B        SCAN8             NO,ERROR                                    
         MTW,-2   SCAN82            RESET TO 0                                  
         AI,R5    -1                                                            
         AWM,R5   SCAN82            SET NEW RESOL. CODE FOR R5                  
         LI,R0    -9                                                            
         STW,R0   SCAN93            RESET FOR 8 CHARS.                          
         B        SCAN12            GO GET NEXT CHAR.                           
SCAN36F  LW,R0    1,R7              IS THIS MODIFY CARD                         
         BNEZ     SCAN8             NO,ERROR                                    
         MTW,-1   SCAN91            YES,WAS 1 LEFT PARENTHSES SCANNED           
         BGZ      SCAN8             ERROR IF ALREADY 2 LEFT PARENTHSES          
         MTW,2    SCAN91            YES, SET FOR 2 LEFT PARENTHSES              
         B        SCAN36C                                                       
SCAN37   CI,R10   X'40'             BLANK                                       
         BNE      SCAN38            NO                                          
         LW,R0    SCAN91            GET PARENTH. FLAG                           
         BGZ      SCAN37F           LEFT BUT NO RUGHT PARENTHSES                
         LW,R0    SCAN90            YES, CHECK FIELD                            
         BNEZ     SCAN37C           SPEC. FIELD, SO EXIT                        
         LI,R0    '.'               CHECK FOR . TOO                             
SCAN37A  AI,R6    1                                                             
         CI,R6    80                STRIP OFF BLANKS AFTER MNE. FIELD           
         BE       SCAN37C           END OF CARD, NO SPEC. FIELD                 
         CB,R10   *SCAN96,R6                                                    
         BE       SCAN37A           A BLANK                                     
         CB,R0    *SCAN96,R6        IS IT A PERIOD                              
         BE       SCAN37C           YES,TREAT AS END OF CARD                    
         AI,R6    -1                RESET TO LAST BLANK                         
         B        SCAN28            GO TO EXIT WITH END OF FIELD                
SCAN37C  MTW,2    SCAN98                                                        
         B        SCAN29                                                        
SCAN37F  CI,R0    1                 IS THERE MORE THAN 1 LEFT PARENTHSES        
         BG       SCAN8             YES,ERROR                                   
         LW,R0    1,R7              IS IT MODIFY CARD                           
         BNEZ     SCAN8             NO,ERROR                                    
         MTW,3    SCAN98            SET R6 TO BLANK TERM.                       
         B        SCAN29            GO TO EXIT                                  
SCAN38   CI,R10   X'5E'             ;                                           
         BNE      SCAN39            NO                                          
         LW,R0    SCAN90                                                        
         BEZ      SCAN8             NOT ALLOWED IN MNEMONIC FIELD               
         LW,R0    SCAN91                                                        
         BGZ      SCAN8             ERROR, LFT. PARENTH., BUT NO RIGHT          
         LI,R0    -1                                                            
         STW,R0   SCAN92            SET CONT. CARD FLAG                         
         B        SCAN28                                                        
SCAN39   CI,R10   X'4B'             PERIOD                                      
         BNE      SCAN40            NO                                          
         LW,R0    1,R7              IS IT MODIFY CARD                           
         BNEZ     SCAN39D           NO                                          
         LW,R10   SCAN93                                                        
         CI,R10   -9                WAS ANY CHAR. SCANNED                       
         BNE      SCAN8             YES,ERROR                                   
         LI,R11   2                 SET FOR HEX                                 
SCAN39C  STW,R11  SCAN83                                                        
         B        SCAN12            GO GET NEXT CHAR.                           
SCAN39D  RES      0                                                             
         MTW,0    SCAN97                                                        
         BEZ      SCAN8             B IF NOT FILE ID SCAN.  ERROR               
         MTW,3    SCAN98            END OF FILE ID FIELD FLAG                   
         B        SCAN29                                                        
SCAN40   LW,R0    1,R7              IS IT MODIFY CARD                           
         BNEZ     SCAN40C           NO                                          
         CI,R10   '+'               YES, IS IT PLUS                             
         BNE      %+3               NO                                          
         LI,R0    1                 SET FLAG FOR +                              
         B        SCAN51                                                        
         CI,R10   '-'               IS IT -                                     
         BE       SCAN50            YES                                         
         CI,R10   '*'               %?                                          
         BNE      SCAN40C           NO                                          
         LW,R10   SCAN93                                                        
         CI,R10   -9                ANY CHAR. SCANNED                           
         BNE      SCAN8             YES,ERROR                                   
         LI,R0    X'82'                                                         
         STW,R0   SCAN82            SET FLAG FOR * HIT                          
         B        SCAN12            GET NEXT CHAR.                              
SCAN40C  CI,R10   '%'               CHECK FOR LEGAL BCD CHAR.                   
         BE       SCAN41            OK                                          
         CI,R10   ':'                                                           
         BL       SCAN8             ILLEGAL CHAR.                               
         CI,R10   X'7C'                                                         
         BG       SCAN8             ILLEGAL CHAR.                               
SCAN41   MTW,1    SCAN93            OK, STEP CHAR. COUNT                        
         BNEZ     SCAN14A                                                       
         B        SCAN8             ERROR,TOO MANY CHARS.                       
SCAN50   LI,R0    -1                                                            
SCAN51   LW,R10   SCAN93                                                        
         CI,R10   -9                ANY CHAR. SCANNED                           
         BNE      SCAN53            YES                                         
         STW,R0   SCAN80            SET FLAG FOR + OT -                         
         LI,R11   4                 SET FOR DEC.                                
         B        SCAN39C                                                       
SCAN53   LW,R0    SCAN91                                                        
         BLEZ     %+3                                                           
         CW,R0    SCAN84            DID PARENTHSES COUNT CHANGE                 
         BNE      SCAN8             YES,ERROR                                   
         MTW,4    SCAN98            SET R6 TO TERM. BY +,-SIGN                  
         AI,R6    -1                SET SO GETS RESCANNED NEXT TIME             
         B        SCAN29            GO TO EXIT                                  
         PAGE                                                                   
*                                                                               
*        ENVIRONMENT FOR GETIOID                                                
*                                                                               
GIOSCAN  CNAME                                                                  
         PROC                                                                   
         LI,R0    1                                                             
         STW,R0   SCAN97            SET FOR POSSIBLE FILE ID                    
         SCANEBC                    GET NEXT SUBFIELD                           
         PEND                                                                   
*                                                                               
         OPEN     PUSH,PULL                                                     
PULL     CNAME    0                                                             
PUSH     CNAME    1                                                             
         PROC                                                                   
LF       RES      0                                                             
         DO       NUM(AF)=1                                                     
         GEN,1,7,4,3,17  1,8+NAME,AF(1),0,PCBPOINT                              
         ELSE                                                                   
         GEN,8,4,12,4,4  2,3,0,AF(1),0                                          
         GEN,1,7,4,3,17  1,X'A'+NAME,AF(2),0,PCBPOINT                           
         FIN                                                                    
         PEND                                                                   
*                                                                               
GIODEV0  DATA     '0   '            NULL DEVICE NAME                            
NLBB     EQU      E:NLBB                                                        
BLBLBL   EQU      E:BLBLBL                                                      
         BOUND    8                                                             
NULLDEV  DATA     0,0                                                           
*                                                                               
         TITLE    '***** GETIOID *****'                                         
*                                                                               
*        NAME:    GETIOID                                                       
*                                                                               
*        PURPOSE: SCAN A DEVICE, OPLABEL, OR FILE IDENTIFIER                    
*                 FROM A COMMAND                                                
*                                                                               
*        CALL:    BAL,R8  GETIOID                                               
*                                                                               
*        INPUT:   R9 = ADDRESS OF A MEMORY AREA, THE FIRST                      
*                      WORD OF WHICH INDICATES PERMISSIBLE FORMS AS             
*                      FOLLOWS:                                                 
*                      BIT 1 SET IF AN OPLABEL NAME IS PERMITTED                
*                      BIT 2 SET IF A DEVICE NAME IS PERMITTED                  
*                      BIT 3 SET IF A FILE AND AREA IS PERMITTED                
*                      BIT 13 SET IF AN ACCOUNT NAME IS PERMITTED               
*                      NOTE THAT THESE ARE THE CORRESPONDING                    
*                      P-BITS FOR AN ASSIGN CAL.                                
*                      FOLLOWING THE FIRST WORD MUST BE ENOUGH                  
*                      SPACE FOR THE RETURN AS INDICATED BELOW                  
*                      (SPACE NEED NOT BE ALLOWED FOR NON-                      
*                      PERMISSIBLE NAME TYPES)                                  
*                 R7 = R7 VALUE FOR SCAN                                        
*                                                                               
*        RETURN:  R6 = -1 IF A NON-ALLOWED OR UNRECOGNIZED FORM                 
*                      IS FOUND.  OTHERWISE, AS RETURNED FROM                   
*                      THE LAST SCAN CALL.                                      
*                 R10,R11 AS RETURNED FROM LAST SCAN CALL                       
*                 OTHER REGISTERS UNCHANGED                                     
*                 AREA POINTED BY R9:                                           
*                   FIRST WORD BITS 1, 2, 3, AND 13 SET TO INDICATE             
*                   THE FORM FOUND. OTHER BITS UNCHANGED.                       
*                   FOLLOWING WORDS AS INDICATED BELOW:                         
*                      OPLABEL:  RIGHT-ALIGNED IN ONE WORD                      
*                      DEVICE:  LEFT-ALIGNED WITH TRAILING BLANKS               
*                      IN TWO WORDS                                             
*                      FILE AND AREA:  AREA NAME IN ONE WORD, RIGHT             
*                      ALIGNED, AND FILE NAME IN FOLLOWING TWO                  
*                      WORDS, LEFT-ALIGNED WITH TRAILING BLANKS                 
*                      ACCOUNT NAME: IN TWO WORDS FOLLOWING THE                 
*                      SPACE FOR FILE AND AREA NAMES (WORDS 4                   
*                      AND 5 FOLLOWING THE P-BIT WORD), LEFT-ALIGNED            
*                      WITH TRAILING BLANKS                                     
*                      THIS FORMAT MAY BE USED IN AN ASSIGN CAL FPT.            
*                                                                               
GETIOID  RES      0                                                             
         PUSH     R8                                                            
         PUSH     4,R0                                                          
*                                                                               
         LW,R1    R9                SAFER AND MORE USABLE PLACE                 
         GIOSCAN                    GET NEXT SUBFIELD                           
*                                                                               
*        CHECK TO SEE IF A DEVICE NAME COULD BE IN R8, R9                       
         LW,R0    GIODBIT                                                       
         CW,R0    *R1                                                           
         BAZ      GIO10             B IF NOT PERMITTED                          
         CI,R6    2                                                             
         BG       GIO10             B IF NEW-FORMAT FILE ID                     
         CW,R8    GIODEV0                                                       
         BNE      GIO01             B IF NOT NULL DEVICE                        
         LD,R8    NULLDEV           GET NULL DEVICE ID                          
         B        GIO05                                                         
*****                                                                           
GIO01    RES      0                                                             
         CI,R10   5                                                             
         BNE      GIO10             B IF WRONG LENGTH                           
         SLD,R8   -24               ADJUST TO DCT16 FORMAT                      
         OR,R8    NLBB                                                          
         LH,R2    *K:DCT1           GET DCT NR OF ENTRIES                       
GIO02    RES      0                 SEARCH FOR NAME IN DCT                      
         CD,R8    *K:DCT16,R2                                                   
         BE       GIO03             B IF FOUND                                  
         BDR,R2   GIO02                                                         
         SLD,R8   24                NOT FOUND.  RESTORE NAME                    
         OR,R9    BLBLBL                                                        
         B        GIO10                                                         
*****                                                                           
GIO03    RES      0                                                             
         SLD,R8   24                NAME FOUND. RESTORE TO INPUT FORMAT         
         OR,R9    BLBLBL                                                        
GIO05    RES      0                                                             
*                                                                               
*        DEVICE ID SCANNED. PACK IT AWAY.                                       
         STW,R8   1,R1                                                          
         STW,R9   2,R1                                                          
         LW,R3    GIODBIT                                                       
         B        GIOOKEX           SPLIT                                       
*****                                                                           
GIO10    RES      0                                                             
*                                                                               
*        CHECK TO SEE IF AN OPLABEL NAME COULD BE IN R8                         
         LW,R0    GIOOBIT                                                       
         CW,R0    *R1                                                           
         BAZ      GIO20             B IF NOT PERMITTED                          
         CI,R6    2                                                             
         BG       GIO20             B IF NEW-FORMAT FILE ID                     
         CI,R10   2                                                             
         BG       GIO20             B IF NAME IS TOO LONG                       
         LH,R2    *K:OPLBS1         GET OPLBS1 NR OF ENTRIES                    
         LH,R0    R8                                                            
GIO15    RES      0                 SEARCH FOR NAME IN OPLB                     
         CH,R0    *K:OPLBS1,R2                                                  
         BE       GIO17             B IF FOUND                                  
         BDR,R2   GIO15                                                         
         B        GIO20             B IF NOT FOUND                              
*****                                                                           
GIO17    RES      0                                                             
*                                                                               
*        OPLABEL NAME SCANNED. PACK IT AWAY.                                    
         SLS,R8   -16                                                           
         STW,R8   1,R1                                                          
         LW,R3    GIOOBIT                                                       
         B        GIOOKEX                                                       
*****                                                                           
GIO20    RES      0                                                             
*                                                                               
*        CHECK TO SEE IF AN OLD-FORMAT AREA NAME COULD BE IN R8, R9             
         LW,R0    GIOFBIT                                                       
         CW,R0    *R1                                                           
         BAZ      GIO30             B IF NOT PERMITTED                          
         CI,R6    0                                                             
         BG       GIO30             B IF NEW-FORMAT FILE ID                     
         CI,R10   2                                                             
         BNE      GIO30             B IF WRONG LENGTH                           
*                                                                               
*        OLD FORMAT AREA NAME FOUND. PACK IT AWAY.                              
*                                                                               
         SLS,R8   -16                                                           
         STW,R8   1,R1                                                          
         LW,R3    GIOFBIT           FLAG FOR FILE ID FOUND                      
*                                                                               
*        FILE NAME FOLLOWS AREA NAME                                            
         GIOSCAN                    GET NEXT SUBFIELD                           
         CI,R6    2                                                             
         BG       GIOEREX           B IF A NEW-FORMAT TERMINATOR                
*                                                                               
*        FILE NAME FOUND. PACK IT AWAY.                                         
         STW,R8   2,R1                                                          
         STW,R9   3,R1                                                          
*                                                                               
         LW,R0    GIOABIT                                                       
         CW,R0    *R1               IS AN ACCOUNT NAME REQUESTED                
         BAZ      GIOOKEX           NO, SKIP THIS                               
*                                   YES                                         
         LI,R0    0                                                             
         STW,R0   4,R1                                                          
         STW,R0   5,R1              ZERO IS THE DEFAULT ACCOUNT NAME            
         B        GIOOKEX           DONE.                                       
*****                                                                           
*        ASSUME SCANNED FIELD IS A NEW-FORMAT FILE NAME                         
GIO30    RES      0                                                             
         LW,R3    GIOFBIT                                                       
         CW,R3    *R1                                                           
         BAZ      GIOEREX           B IF FILE ID NOT PERMITTED                  
         STW,R8   2,R1                                                          
         STW,R9   3,R1              SET FILE NAME                               
         LI,R0    0                                                             
         STW,R0   1,R1              SET AREA NAME UNSPECIFIED FOR NOW.          
*                                                                               
         LW,R0    GIOABIT                                                       
         CW,R0    *R1               IS AN ACCOUNT NAME REQUESTED                
         BAZ      GIO31             NO, SKIP THIS                               
*                                   YES                                         
         LI,R0    0                                                             
         STW,R0   4,R1                                                          
         STW,R0   5,R1              ZERO IS THE DEFAULT ACCOUNT NAME            
*                                                                               
GIO31    RES      0                                                             
         CI,R6    3                                                             
         BNE      GIOOKEX           B IF NO MORE FILE ID FIELDS                 
         GIOSCAN                    GET NEXT SUBFIELD                           
*                                                                               
*        CHECK TO SEE IF A NEW-FORMAT AREA NAME COULD BE IN R8, R9              
         CI,R10   0                                                             
         BE       GIO34             B IF NULL AREA SCANNED                      
         CI,R10   2                                                             
         BNE      GIO35             B IF WRONG LENGTH                           
         LB,R2    K:MDNAME          NR OF AREA NAMES                            
GIO33    RES      0                                                             
         AI,R2    -1                                                            
         BLZ      GIO35             B IF NOT AN AREA NAME                       
         LH,R0    *K:MDNAME,R2      GET NEXT NAME FROM TABLE                    
         CH,R0    R8                                                            
         BNE      GIO33             B IF NOT MATCHED                            
*                                                                               
*        AREA NAME FOUND. SET IT.                                               
         SLS,R8   -16                                                           
         STW,R8   1,R1                                                          
*                                                                               
GIO34    RES      0                                                             
         CI,R6    3                                                             
         BNE      GIOOKEX           B IF NO MORE FILE ID FIELDS                 
         GIOSCAN                    GET NEXT SUBFIELD                           
*                                                                               
GIO35    RES      0                                                             
*                                                                               
*        CHECK TO SEE IF AN ACCOUNT NAME COULD BE IN R8, R9                     
         LW,R0    GIOABIT                                                       
         CW,R0    *R1                                                           
         BAZ      GIOEREX           B IF NOT PERMITTED                          
*                                                                               
*        ACCOUNT NAME FOUND. SET IT                                             
         STW,R8   4,R1                                                          
         STW,R9   5,R1                                                          
         OR,R3    GIOABIT           SET ACCOUNT NAME BIT.                       
         CI,R6    3                                                             
         BNE      GIOOKEX           B IF END OF FILE ID                         
*        OTHERWISE, TOO MANY FILE ID FIELDS                                     
*                                                                               
*        NON-SCAN ERROR ENCOUNTERED. SET R6 AND EXIT.                           
GIOEREX  RES      0                                                             
         LI,R6    -1                                                            
         B        GIOEXIT                                                       
*****                                                                           
*        NORMAL EXIT                                                            
*        R1 IS PARAM TABLE POINTER                                              
*        R2 IS P-BITS FOR TYPE OF I/O STREAM NAME FOUND                         
GIOOKEX  RES      0                                                             
         LW,R9    R1                RESTORE R9                                  
         LW,R0    R3                GET NEW P-BIT SETTING                       
         LW,R1    GIOBITS                                                       
         STS,R0   *R9               SET EM                                      
*                                                                               
*        ALL EXIT PATHS MEET HERE                                               
GIOEXIT  RES      0                                                             
         PULL     4,R0              RESTORE OTHER STUFF                         
         PULL     R8                RESTORE LINK                                
GIOEX    B        *R8               RETURN                                      
*****                                                                           
*****                                                                           
         CLOSE    PUSH,PULL                                                     
         TITLE    '       **** SCANSYM ****'                                    
*                                                                               
*        PURPOSE: TO SCAN FIRST/NEXT EBCDIC NAME ON CC IN SPEC. FIELD           
*                 (ILLEGAL IF F4:COM,FP:MBOX,F:DCB,OR M:DCB);                   
*                 TO SEARCH T:SYMBOL AND T:PUBSYM FOR DUPLICATE                 
*                 ENTRIES; AND, IF NONE, TO BUILD T:SYMBOL ENTRY.               
*                                                                               
*        INPUT:   NONE                                                          
*                                                                               
*        CALL:    BAL,R13  SCANSYM                                              
*                                                                               
*        OUTPUT:  R2,3,4 = SYMBOL IN T:SYMBOL FORMAT,                           
*                          STARTING IN BYTE 3 OF R2                             
*                 R5 = BA(R2)+3, WHICH IS BA OF ABOVE                           
*                 R7 = BA OF T:VALUE ENTRY FOR PRIOR DEFINITION,                
*                      OR ZERO IF NO PRIOR DEFINITION                           
*                 R9 = (TABLE,ENTRY) AS RETURNED FROM SERCHSYM/SERCHPUB         
*                                                                               
*        USES:    R1-R10                                                        
*                                                                               
*        CALLS:   SCANEBC,ADDNXT,SERCHSYM,SERCHPUB,COMPBS,RDIAG(ERDUPNAM        
*                                                                               
*                                                                               
SCANSYM  SCANEBC                                                                
         LW,R3    R8                R3,R4=EBCDIC NAME                           
         LW,R4    R9                                                            
         LW,R2    R10                                                           
         AI,R2    1                 R2=NO. OF BYTES IN ENTRY                    
         LI,R5    BA(COMMON)                                                    
         LI,R6    BA(R2)+3                                                      
         COMPBS                     DOES 'NAME' EQUAL 'F4:COM'                  
         BE       ERITEM                YES,ERROR                               
         LI,R5    BA(FPMBOX)                                                    
         LI,R6    BA(R2)+3                                                      
         COMPBS                     DOE0 'NAME' EQUAL 'FP8MBOX'                 
         BE       ERITEM                YES,ERROR                               
         LW,R8    R3                DOES 'NAME' EQUAL 'F:DCB'                   
         SLS,R8   -16                                                           
         CI,R8    'F:'                                                          
         BE       ERITEM                YES,ERROR                               
         CI,R8    'M:'              DOES 'NAME' EQUAL 'M:DCB'                   
         BE       ERITEM                YES,ERROR                               
         LI,R5    BA(R2)+3                                                      
         LI,R6    0                                                             
SCN10    SERCHSYM                  *IS THIS 'NAME' A DUPLICATE OF AN            
         CI,R6    0                 ENTRY IN T:SYMBOL                           
         BE       SCN30                 NO,END OF TABLE                         
         LB,R0    0,R7                          YES,IS MATCHING ENTRY           
         AND,R0   X:TY                              A  REF                      
         CI,R0    PREF                                                          
         BE       SCN10                                 YES,CONTINUE            
         CI,R0    SREF                                                          
         BE       SCN10                                 YES,CONTINUE            
         BNE      *R13              NO. RETURN WITH THE DUPLICATE               
SCN30    LW,R0    V:CCTYPE          IS 'NAME' AN 'EXCLUDED PREF'                
         CI,R0    :EXCLUDE                                                      
         BE       SCN40                 YES,DONT SEARCH T:PUBSYM                
         SERCHPUB                  *IS THIS NAME A DUPLICATE OF AN              
         CI,R6    0                 ENTRY IN T:PUBSYM                           
         BNE      *R13              YES. RETURN WITH THE DUPLICATE              
SCN40    LI,R1    T:SYMBOL          ADD 'NAME' TO T:SYMBOL                      
         ADDNXT                                                                 
         LI,R7    0                 NO PRIOR DEFINTION FOUND                    
         B        *R13                                                          
         TITLE    '       **** SCANXXX ****'                                    
*                                                                               
*        PURPOSE: TO SET UP THE DIFFERENT PARAMETER TABLES FOR SCAN;            
*                 TO CALL SCAN; AND TO CHECK FOR ERROR RETURN                   
*        INPUT:   NONE                                                          
*                                                                               
*        CALL:    BAL,R14  SCANXXX                                              
*                                                                               
*        OUTPUT:  SCANITEM=ITEM NUMBER IN EBCDIC (BITS 8-23)                    
*                 SCANFLAG=0,END OF SUBFIELD                                    
*                         =1,END OF FIELD                                       
*                         =2,END OF CC                                          
*                 R8=DECIMAL OR HEX. VALUE, R9=0                                
*                 R8,R9=EBCDIC CHARACTERS (PADDED TO 8 CHAR WITH BLANKS)        
*                 R10=NO. OF CHARACTERS SCANNED                                 
*                                                                               
*        CALLS:   SCAN,RDIAG(OERITEM OR ERITEM)                                 
*                                                                               
*                                                                               
SCAN1ST  LI,R5    1                 SCAN 1ST FIELD OF CC (EBCDIC)               
         LI,R6    0                                                             
         B        DE20                                                          
SCANEBC  LI,R5    1                 SCAN EBCDIC ITEM                            
         B        DE10                                                          
SCANHEX  LI,R5    2                 SCAN HEX ITEM                               
         B        DE10                                                          
SCANMODF LI,R5    0                *SCAN :MODIFY CC ITEM                        
         B        DE10                                                          
SCANHE   LI,R5    3                 SCAN EITHER HEX OR EBCDIC ITEM              
         B        DE10                                                          
SCANDEC  LI,R5    4                 SCAN DECIMAL ITEM                           
         B        DE10                                                          
SCANDE   LI,R5    5                 SCAN EITHER DECIMAL OR EBCDIC ITEM          
DE10     LI,R6    1                                                             
DE20     RES      0                                                             
         STW,R5   PT:SCAN+1                                                     
         STW,R6   PT:SCAN+2                                                     
         LI,R7    PT:SCAN                                                       
         STW,R14  SCANEXIT          SAVE RETURN ADDRESS                         
         SCAN                       SCAN ITEM ON CC                             
         STW,R5   SAVEFLAG          SAVE REGISTER          /SIG7-2627/*C5732    
         STW,R6   SCANFLAG                                                      
         STW,R11  SCANITEM                                                      
         CI,R6    -1                ERROR                                       
         BNE      *SCANEXIT                                                     
         LW,R0    V:CCTYPE              YES,OLOAD CC ERROR                      
         CI,R0    :OLOAD                                                        
         BE       OERITEM                      YES                              
         BNE      ERITEM                       NO                               
         END                                                                    
