         SYSTEM   SIG9P                                                         
         SYSTEM   OPTIONS                                                       
         SPACE    2                                                             
*                                                                               
*                                                                               
*                                                                               
OLAYFLAG EQU      'TIO2'                                                        
         DEF      TIO2                                                          
         DEF      TISREAD                                                       
         DEF      TISEXIT                                                       
         DEF      TIS15                                                         
         DEF      TIS21,TIO2ABEN                                                
         DEF      TIO2EXIT                                                      
         DEF      TIO2EX02                                                      
         DO1      #DEBUG                                                        
         DEF      TIO2EX03,TIO2EX04                                             
         DEF      TICRASH                                                       
         DEF      TISAST                                                        
TIO2     EQU      %                                                             
         SYSTEM   CPRMON                                                        
         TITLE    '** TIO2 - SECONDARY TASK INITIATION **'                      
TIS15    EQU      %                 THE AST ENTRIES HAVE BEEN SORTED            
******** THE TEMPORARY AST ENTRIES HAVE BEEN SORTED                             
******** FIRST WE WILL PROCESS THE PUBLIB SEGMENTS                              
         LI,R1    LMPUBLIB          OFFSET TO PUB LIB                           
         LW,R13   *R14              GET ADDRESS OF HEADER                       
         AW,R13   R1                POINT TO PUBLIB AREA                        
         LW,R0    *R13              GET FIRST WORD OF PUB LIBS                  
         BEZ      TIS17             B IF NO PUB LIBS                            
         LI,R7    2                 SET UP TO GET AET SPACE                     
         BAL,R8   GETTEMP           GET SPACE                                   
         B        TISABENX          B IF NO SPACE                               
         STW,R7   LMIAET,R5         SET THE POINTER                             
         ENABLE                                                                 
         BAL,R8   PUBLIB                                                        
         B        TISABENX          ERROR EXIT                                  
         LI,R7    0                 ZERO AND                                    
         DISABLE                                                                
         XW,R7    LMIAET,R5         GET POINTER TO TEMP AET SPACE               
         BAL,R8   RELTEMP           RETURN SPACE TO SYSTEM                      
TIS17    EQU      %                                                             
         LI,R7    STCBAST                                                       
         LW,R7    *TCBPOINT,R7      GET AST POINTER                             
******** NOW WE WILL PROCESS THE TEMPORARY AST ENTRIES                          
******** AND CONSTRUCT SEGMENT DESCRIPTORS FINALLY PRODUCING                    
******** THE PERMANENT AST ENTRIES                                              
TIS18    EQU      %                                                             
         LW,R0    0,R7              GET AST ENTRY                               
         BGEZ     TIS20             B IF NO SD NEEDED                           
         LI,R1    2                 BYTE INDEX                                  
         LB,R3    R0,R1             GET OVLOAD TABLE INDEX                      
         MI,R3    11                OV TABLE ENTRY LENGTH                       
         AI,R3    1                 SKIP  CONTROL WORD                          
         LI,R1    PCBOVLD           OFFSET TO OVLOAD TABLE ADDRESS              
         AW,R3    *PCBPOINT,R1      ADD ADDRESS OF OV LOAD TABLE                
         LB,R0    *R3               GET FLAG BYTE                               
         CI,R0    OVS3              CHECK FOR  TASK LEVEL                       
         BAZ      TIS27             B IF TASK LEVEL                             
         LW,R0    0,R3              GET FLAGS AND SEGMENT NUMBER                
         BAL,R8   TISEARCH          SEARCH FOR EXISTING SD                      
         B        TIS27             B  IF NOT FOUND                             
         LI,R1    SDTUSING                                                      
         MTB,1    *R9,R1            INCREMENT  TASKS USING                      
         STW,R9   0,R7              SET AST ENTRY                               
         MTW,0    *R9               TEST SDT WORD 0                             
         BGEZ     TIS18A            B IF NOT DISP SKIP                          
         LI,R8    0                                                             
         STW,R8   TDLAST            INSURE MAP RELOAD                           
         BAL,R8   TMRDLTRG          GET REDISPATCHED                            
TIS18A   RES      0                                                             
         ENABLE                                                                 
******** HERE WE HAVE CONSTRUCTED A SEGMENT DESCRIPTOR NOW WE                   
******** WILL GET SEGMENT MEMORY AND CONTENT IF INITIALLY ACTIVE                
TIS19    EQU      %                                                             
         LB,R0    *R3               GET FLAG BYTE FROM OVLOAD ENTRY             
         CI,R0    OVI               CHECK FOR INITIALLY ACTIVE                  
         BAZ      TIS20             B IF NOT TO BE ACTIVE                       
         LI,R1    TISCTX3           USE CONTEXT AREA 3                          
         LW,R9    *R14,R1           GET ADDRESS OF CONTEXT AREA                 
         LCI      3                                                             
         LM,R0    TISFPT3           GET PROTOTYPE FPT                           
         STM,R0   *R9               STORE IN CONTEXT AREA                       
         LI,R1    1                 HALFWORD OFFSET                             
         LH,R0    *R3,R1            GET SEGMENT NUMBER                          
         STH,R0   *R9,R1            PLACE IN ACTIVATE  FPT                      
         CAL1,7   *R9               ACTIVATE  SEGMENT                           
         LI,R1    TISATYC*4         OFFSET TO TYC FROM ACTIVATE                 
         LB,R15   *R9,R1            GET TYC                                     
         CI,R15   TYCNORM           NORMAL                                      
         BNE      TISABENX          B IF NOT NORMAL                             
TIS20    AI,R7    1                 POINT TO NEXT AST                           
         MTB,-1   R7                DECREMENT LOOP COUNT                        
         BGZ      TIS18             B FOR MORE SEGMENTS                         
******** DO SIMPLIFIED MEMORY MANAGEMENT FOR BACKGROUND                         
TIS21    EQU      %                                                             
         LW,R1    *R14              GET ADDRESS OF HEADER                       
         BIFFGD   TIS21A            B IF NOT BKG                                
         LW,R10   LMLWA,R1          GET LM LAST WORD ADDRESS                    
         AND,R10  M24                                                           
         STW,R10  K:BPEND           SET END OF BKG PROGRAM                      
         LH,R10   K:BMEM            GET MAX MEM PAGES ALLOWED                   
         SLS,R10  9                 MAX WORDS                                   
         AW,R10   LMFWA,R1          ADD FIRST WORD ADDRESS                      
         AI,R10   -1                NOW HAVE LAST WORD PERMITTED                
         AND,R10  M24                                                           
         STW,R10  K:BCKEND          SAVE IT                                     
TIS21A   RES      0                                                             
         LB,R10   *R1               GET HEADER FLAG BYTE                        
         CI,R10   LMB               BACKGND EXTENSION SEG                       
         BAZ      TIS21E            B IF NO                                     
         LW,R10   LMLWA,R1          GET TASK LAST WORD ADDRESS                  
         AND,R10  M24               MASK                                        
         LW,R11   LMFWA,R1          GT TASK FIRST WORD ADDRESS                  
         AND,R11  M24               MASK                                        
         SW,R10   R11               LWA-FWA                                     
         AI,R10   511               FOR ROUNDING UP TO PAGE                     
         SLS,R10  -9                FORM # OF PAGES REQUIRED                    
*                                                                               
         LH,R3    K:FSMM            R3 = MAX SMM PAGES                          
         BIFFGD   TIS21D                                                        
         LH,R3    K:BMEM                                                        
*                                                                               
TIS21D   EQU      %                                                             
         CW,R10   R3                CHECK REQUEST AGAINST LIMIT                 
         BL       TIS21B            B IF NEED MORE TO MAKE LIMIT                
         BE       TIS21E            B IF AT LIMIT NOW                           
         LI,R15   TYCA3             BACKGROUND MEMORY LIMIT EXCEEDED            
         B        TISABEND                                                      
TIS21B   EQU      %                                                             
         LCW,R10  R10               FORM -(LWA-FWA+511/512)                     
         AW,R10   R3                YIELDS #OF PAGES IN EXTENSION SEG           
         STW,R10  R9                SAVE FOR LATER                              
         LI,R3    TISCTX2           USE CONTEXT AREA 2                          
         LW,R3    *R14,R3           GET ADDRESS OF CONTEXT AREA 2               
         AND,R10  XFF               MASK PAGE                                   
         SLS,R10  16                POSITION IN BYTE 1                          
*                 ACCESS =00, SHARE =00 , L=0, F=0                              
         AI,R10   TISBXS#           SET SEGMENT NUMBER                          
         STW,R10  0,R3              SET IN FIRST WORD OF OVTAB                  
         LW,R10   LMLWA,R1          LAST WORD ADDRESS                           
         AI,R10   511               FIRST WORD OF NEXT PAGE                     
         AND,R10  X1FE00                                                        
         STW,R10  OVVMWO,R3         SET AS WORD ORIGIN                          
         STW,R3   R9                POINT TO OVTAB                              
         BAL,R8   TISD              CONSTRUCT SEGMENT DESCRIPTOR                
         B        TISABEND                                                      
         BAL,R8   TISAST            STORE SD ADDRESS                            
         LCI      3                                                             
         LM,R8    TISFPT3           ACTIVATE FPT PROTOTYPE                      
         AI,R8    TISBXS#           SET SEGMENT NUMBER                          
         LCI      3                                                             
         STM,R8   *R3               STORE IN CONTEXT AREA                       
         CAL1,7   *R3               ACTIVATE TO GET REAL MEMORY                 
         LI,R1    TISATYC*4         OFFSET TO TYC                               
         LB,R15   *R3,R1            GET TYC                                     
         CI,R15   TYCNORM           ISIT NORMAL                                 
         BNE      TISABEND          B IF NO                                     
TIS21E   EQU      %                                                             
******** NOY DO MAXIMUM ENQ AND ECB COUNTS ********                             
         LW,R9    *R14              GET ADDRESS OF HEADER                       
         LI,R1    LMMENQ            OFFSET TO MAX ENQ                           
         LB,R7    *R9,R1            GET MAX ENQUEUES ALLOWED                    
         BEZ      TIS22A            B IF NO ENQUEUES                            
         CI,R7    128                                                           
         BL       TIS21F            B IF MAX ENQ SPECIFIED SMALL ENUF           
         LI,R7    S:TENQ            DEFAULT TO SYSGENNED VALUE                  
         BEZ      TIS22A            SKIP IT ALL                                 
TIS21F   EQU      %                                                             
         SLS,R7   1                 USE TWICE THIS NUMBER FOR SPACE             
         BAL,R8   GETTEMP           GET SPACE                                   
         B        TISABENX          NO SPACE                                    
         STW,R7   LMIAET,R5         SET POINTER TO AET                          
         ENABLE                                                                 
         LI,R0    0                 TO ZERO                                     
         LB,R1    R7                NUMBER OF WORDS                             
         AI,R1    -1                ADJUST FOR COUNT                            
         AND,R1   XFF               LIMIT TO 256                                
TIS22    EQU      %                                                             
         STW,R0   *R7,R1            ZERO AET                                    
         BDR,R1   TIS22             B FOR NEXT                                  
         STW,R0   *R7               GET LAST WORD                               
TIS22A   EQU      %                                                             
         LW,R9    *R14              GET ADDRESS OF HEADER                       
         LI,R1    LMMSECB           OFFSET TO MAX S ECB'S                       
         LB,R0    *R9,R1            GET  MSECB                                  
         CI,R0    X'FF'                                                         
         BNE      %+2               B IF MAX SECBS SPECIFIED                    
         LB,R0    IOQ4              GET DEFAULT VALUE                           
         STB,R0   LMIMAXS,R5        STORE IN LMI                                
         LI,R1    LMMRECB           OFFSET TO MAX R ECB'S                       
         LB,R0    *R9,R1            GET MRECB                                   
         CI,R0    X'FF'                                                         
         BNE      %+2               B IF MAX RECBS SPECIFIED                    
         LB,R0    IOQ4              GET DEFAULT VALUE                           
         STB,R0   LMIMAXR,R5        INITILIZE  LMI                              
         LB,R10   PCBPOINT                                                      
         AND,R10  X7F               RESET RBM BIT                               
         STB,R10  PCBPOINT                                                      
         LI,R1    PCBENTRY          OFFSET TO ENTRY ADDRESS                     
         LW,R7    *PCBPOINT,R1      GET TASKS ENTRY POINT                       
******** NEXT SET UP TO GET RID OF PRIVATE CONTEXT AREA                         
TIS26    EQU      %                                                             
         SLS,R14  -9                MAKE WORD ADDRESS OF TASK RESERVED          
*                                   PAGE INTO A PAGE ADDRESS                    
         BAL,R8   MMRTRP            RELEASE PAGE                                
         B        TICRASH           BAD ERROR  (CRASH)                          
******** NOW POST THE INIT ECB AS NORMAL COMPLETION                             
         BIFFGD   TIS260A                                                       
         LW,R1    Y008                                                          
         STS,R1   K:CTST            SET BIT FOR CT TO RUN BKL1                  
TIS260A  EQU      %                                                             
         LI,R6    TYCNORM           NORMAL TYPE COMPLETION                      
         SCS,R6   -8                PLACE IN  BYTE 0                            
         LW,R2    LMI4,R5           GET ECB ID                                  
         LI,R1    ECBCLASS          OFFSET TO ECBCLASS                          
         LH,R5    *R2,R1            SAVE IN  REG 5                              
         STB,R5   R7                SAVE STOP INDICATOR                         
         BAL,R8   EMPOST            POST ECB                                    
         NOP                                                                    
         LB,R1    TCBPOINT          GET TASK ID                                 
         LB,R1    STILMID,R1        GET LMI ID                                  
         DISABLE                                                                
         LH,R2    LMISTAT,R1        GET STATUS BITS                             
         AND,R2   XFE7D             RESET LOAD BIT                              
         OR,R2    X4                SET ACTIVE BIT                              
         STH,R2   LMISTAT,R1        RESTORE IN LMI                              
         ENABLE                                                                 
         CI,R2    RLSBIT            IS TASK TO BE TERMINATED                    
         BANZ     TISEXIT           B IF YES                                    
TIS26A   CW,R7    Y4                CHECK FOR STOP BIT                          
         BAZ      TIS26B            B TO TASK ENTRY POINT                       
         LW,R9    Y4B               STOP FPT  CODE                              
         CAL1,7   R9                STOP THE TASK - WAIT FOR START              
TIS26B   EQU      %                                                             
         BIFFGD   TIS26C            IF BACKGROUND DO ASSIGNS                    
         PUSH     R7                SAVE ENTRY ADDRESS                          
         BAL,R15  BKLASSN           GO DO ASSIGNS                               
         PULL     R7                SAVED TASK ENTRY ADDRESS                    
TIS26C   EQU      %                                                             
         LD,R12   TISPSD2           FOR BACKGROUND                              
TIS26D   EQU      %                                                             
*****    NOW DECIDE ON ENTRY POINT - NORMAL OR DEBUG                            
         DO       #DEBUG                                                        
         CW,R7    Y08               CHECK INIT F4 FLAG                          
         BANZ     TIS26G            G IF DEBUG REQUESTED                        
         LB,R1    TCBPOINT                                                      
         LB,R1    STILMID,R1        GET TASK LMI                                
         LW,R1    LMIPCB,R1                                                     
         LB,R1    R1                                                            
         CI,R1    LMIDEBUG          IS DEBUG REQUESTED                          
         BANZ     TIS26F            B IF YES                                    
         FIN      #DEBUG                                                        
TIS26E   EQU      %                                                             
         BAL,R8   TISLPSD           SET UP KEY,MAP,SLAVE                        
TIO2EX02 EQU      %                                                             
         B        *R7               GO TO USER TASK                             
*                                                                               
         DO       #DEBUG                                                        
TIS26F   EQU      %                                                             
         AND,R12  YFFFE             MASK OLD PSD ADDRESS                        
         AND,R7   M17               MASK ENTRY ADDRESS                          
         AW,R12   R7                SET USER ENTRY ADDRESS                      
         LI,R1    STCBAPSD          OFFSET TO ALT PSD                           
         STD,R12  *TCBPOINT,R1      SET ALT PSD FOR DEBUGGER                    
TIO2EX03 EQU      %                                                             
         B        :#ALTENT          GO TO DEBUG INIT                            
*                                                                               
TIS26G   EQU      %                                                             
         BAL,R8   TISLPSD                                                       
TIO2EX04 EQU      %                                                             
         B        TIO3DBUG          TO TO RESIDENT CODE TO DO DEBUG             
*                                                                               
         FIN      #DEBUG                                                        
         PAGE                                                                   
*                                                                               
*        ROUTINE TO GET PROPER OPERATING MODE                                   
*                                                                               
TISLPSD  EQU      %                                                             
         LPSD,0   R12                                                           
TISLPSD1 B        *R8               RETURN                                      
*                                                                               
         BOUND    8                                                             
TISPSD1 EQU %                                                                   
         GEN,12,20  X'00C',TISLPSD1 FOREGROUND                                  
         GEN,4,28   2,0                                                         
*                                                                               
TISPSD2 EQU %                                                                   
         GEN,12,20  X'00C',TISLPSD1 BACKGROUND                                  
         GEN,4,28   1,0                                                         
*                                                                               
*                                                                               
*                                                                               
TIS27    EQU      %                                                             
         LI,R15   TYCB8                                                         
         LB,R0    *R3               GET OVLOAD FLAG BYTE                        
         CI,R0    OVP                                                           
         BANZ     TISABENX          B IF SHOULD HAVE BEEN PRELOADED             
         LW,R9    R3                POINTS TO OVLOAD TABLE ENTRY                
         BAL,R8   TISD              BUILD SD                                    
         B        TISABENX          NO SPACE                                    
         LI,R1    SDFLAGS                                                       
         LH,R0    *R9,R1            GET SEGMENT FLAGS                           
         AND,R0   XSDSTMSK          MASK                                        
         AI,R0    SDSTATE1          SET STATE TO ERASED                         
         STH,R0   *R9,R1            RESTORE IN SD                               
         STW,R9   0,R7              SET AST ENTRY                               
         B        TIS19                                                         
         PAGE                                                                   
TISABENX EQU      %                                                             
TISABEND EQU      %                                                             
TIO2ABEN EQU      TISABEND                                                      
         LB,R1    TCBPOINT          GET TASK ID                                 
         LB,R1    STILMID,R1        GET LMI INDEX                               
         LW,R2    LMI4,R1           GET ECB ID                                  
         STB,R15  R6                TYC                                         
         AND,R6   YFF               MASK                                        
         BAL,R8   EMPOST            POST ECB                                    
         NOP                                                                    
         BIFFGD   TISEXIT           IF NOT BKG WE ARE DONE                      
         LW,R9    Y008              RUN BKL1                                    
         STS,R9   K:CTST                                                        
         BAL,R11  CTRIG             TRIGGER THE CONTROL TASK                    
TISEXIT  B        TMTERM            TERMINATE THE TASK                          
*                                                                               
*                                                                               
TICRASH  EQU      %                                                             
         CRASH    'SECONDARY TASK INITIATION CRASH'                             
TISFPT3  DATA     X'52800000'                                                   
         DATA     X'00400001'                                                   
         TITLE    '** TIO2 - TASK INIT. READ SUBROUTINE **'                     
*                                                                               
*        TISREAD  READ  SUB-ROUTINE  READS HEADERS AND ROOTS                    
*                       ALL READS ARE WITH WAIT                                 
*                 AT ENTRY:                                                     
*                             R8= LINK                                          
*                             R9= FPT ADDRESS                                   
*                             R10=BUFFER ADDRESS                                
*                             R11=START GRANULE #  (KEY)                        
*                             R12=BYTE COUNT                                    
*                                                                               
*                                                                               
*                 AT EXIT!                                                      
*                             R0= DESTROYED                                     
*                                   R10 BYTE ZERO DESTROYED                     
*                             R12=DESTROYED                                     
*                             RETURN IS TO LINK IF ANY ERRORS  R15 WILL         
*                                   HAVE AN ABNORMAL T4C  CODE                  
*                                                                               
*                             RETURN IS TO LINK+1 IF NO ERRORS                  
*                                                                               
*                                                                               
*                                                                               
*                                                                               
*                                                                               
*                                                                               
         PAGE                                                                   
TISREAD  EQU      %                                                             
         PUSH     5,R4              SAVE REGS                                   
         LW,R6    *R9               GET DCB ADDRESS                             
         LW,R0    XBIT10                                                        
         CW,R0    0,R6                                                          
         BANZ     TISS0600          B IF DCB IS OPEN                            
         LI,R0    0                                                             
         STB,R0   R10               INSURE R10 BYTE ZERO IS ZERO                
         LCI      2                                                             
         LM,R4    TISOPEN           GET OPEN FPT                                
         CAL1,1   R4                OPEN THE DCB IF NECESSARY                   
         LB,R0    R10                                                           
         BNEZ     TISS0604          B IF ANY ERRORS                             
TISS0600 RES      0                                                             
         LI,R7    6                 GET AREA INDEX BYTE DISPLACEMENT            
         LB,R6    *R6,R7            GET AREA INDEX                              
         LB,R5    MDDISCI,R6        THEN DISC TABLE INDEX, AND FINALLY          
         LH,R5    DISCNWPS,R5       NUMBER OF WORDS PER SECTOR                  
         AND,R5   X1FF              MASK                                        
         LI,R7    8191              MAX WORDS IN ONE READ                       
         DW,R7    R5                R7=MAX # SECTORS IN ONE READ                
         MW,R5    R7                R5=MAX # WORDS   IN ONE READ                
         LI,R6    4                 OFFSET TO KEY PARAMETER IN FPT              
         STW,R11  *R9,R6            PLACE START GRANULE # IN FPT                
         LI,R6    2                 OFFSET TO BUFFER ADDRESS IN FPT             
         STW,R10  *R9,6             SET BUFFER ADDRESS IN FPT                   
TISS0601 RES      0                                                             
         SLS,R5   2                 CHANGE WORDS TO BYTES                       
         LW,R6    R12               SAVE REMAINING BYTE COUNT                   
         SW,R12   R5                SUBTRACT MAX BYTE COUNT                     
         BLZ      TISS0602          B IF REMAINING .LT. MAX (READ REM)          
         LW,R6    R5                READ MAX BYTE COUNT                         
TISS0602 EQU      %                                                             
         LI,R4    3                 OFFSET TO BYTE COUNT                        
         STW,R6   *R9,R4            STORE IN FPT                                
         LI,R4    20                OFFSET TO COMPLETION STATUS WORD            
         CAL1,1   *R9               PERFORM READ                                
         LB,R6    *R9,R4            GET COMPLETION STATUS FROM FPT              
         CI,R6    TYCNORM           CHECK FOR NORMAL COMPLETION                 
         BNE      TISS0604          B IF ERRORS                                 
         CI,R12   0                 CHECK TO SEE IF WE ARE DONE                 
         BLE      TISS0603          B IF  DONE                                  
         LI,R4    4                 OFFSET TO GRANULE  # IN FPT                 
         AWM,R7   *R9,R4            SET UP GRANULE # FOR NEXT  READ             
         LI,R4    2                 OFFSET TO BUFFER ADDRESS                    
         SLS,R5  -2                 CHANGE TO WORDS                             
         AWM,R5   *R9,R4            ADD WORDS READ TO BUFFER ADDR               
         B        TISS0601          B TO CONTINUE READING                       
TISS0603 EQU      %                                                             
         PULL     5,R4              RESTORE  REGS                               
         AI,R8    1                 NORMAL EXIT                                 
         B        TIO2EXIT          RETURN                                      
*                                                                               
TISS0604 EQU      %                                                             
         LB,R15   R10               ERRORCODE                                   
         BNEZ     %+2               B IF OTHER THAN ZERO CODE                   
         LI,R15   TYCB6             IO ERROR CODE ZERO                          
         PULL     5,R4              RESTORE REGS                                
TIO2EXIT B        *R8                                                           
*                                                                               
TISOPEN  GEN,1,7,24  1,X'14',R6     OPEN DCB ADDRESSED BY R6                    
         DATA     F7                IGNORE ERRORS                               
*                                                                               
         TITLE    '** TIO2 - SORT AND STORE AST ENTRY **'                       
*                                                                               
*        TISAST   STORE AST ENTRY IN  ORDER  IN AST                             
*                                                                               
*                 AT ENTRY:                                                     
*                             R8 =LINK                                          
*                             R9 =AST ENTRY                                     
*                                                                               
*                                                                               
*                 AT EXIT:                                                      
*                             ALL  REGISTERS PRESERVED                          
*                             LINK+1 IF UNABLE TO INSERT AST                    
*                                                                               
*                                                                               
TISAST   EQU      %                                                             
         PUSH     6,R4              SAVE REGISTERS                              
         MTW,0    R9                CHECK IF NORMAL AST ENTRY                   
         BGZ      TISS0707          B IF NORMAL AST                             
         LI,R8    X'FF'             MASK TO GET PAGE ADDRESS                    
         AND,R8   R9                GET PAGE ADDRESS                            
TISS0701 EQU      %                                                             
         LI,R7    STCBAST           OFFSET TO AST ENTRY                         
         LW,R7    *TCBPOINT,R7      GET AST ENTRY                               
         LB,R6    R7                GET AST LENGTH                              
         AI,R6    -4                SKIP OVERLAY,ROOT1,JOB TASK PAGES           
         AI,R7    2                 POINT TO FIRST AST AFTER ROOT               
TISS0702 EQU      %                                                             
         LW,R5    0,R7              GET AST ENTRY                               
         BLEZ     TISS0703          B IF NOT NORMAL AST                         
         LW,R5    1,R5              GET SECOND WORD OF  SD                      
         SLS,R5   -9                MAKE CONTROL START WORD ADDRESS             
TISS0703 EQU      %                                                             
         AND,R5   M8                MASK                                        
         BEZ      TISS0708                                                      
         CW,R8    R5                IS NEW AST TO REPLACE CURRENT AST           
         BLE      TISS0705          B IF YES                                    
         AI,R7    1                 MOVE TO NEXT AST ENTRY                      
         AI,R6    -1                DECREMENT  LOOP COUNT                       
         BGZ      TISS0702          B FOR NEXT ENTRY                            
TISS0704 EQU      %                                                             
         LI,R15   TYCB3             AST LENGTH ERROR                            
         PULL     5,R4                                                          
         B        TIO2EXIT          ERROR EXIT                                  
TISS0705 EQU      %                                                             
         AI,R6    -1                LOOP COUNT                                  
         STW,R7   R4                SAVE CURRENT POINTER                        
         LI,R5    0                                                             
         DISABLE                                                                
         XW,R5    0,R7              GET CURRENT ENTRY                           
TISS0706 EQU      %                                                             
         XW,R5    1,R7              EXCHANGE WITH NEXT ENTRY                    
         AI,R7    1                 MOVE POINTER                                
         AI,R6    -1                DECREMENT LOOP COUNT                        
         BGZ      TISS0706          B FOR NEXT ENTRY                            
         STW,R9   0,R4              PLACE NEW AST ENTRY IN AST                  
         MTW,0    R9                TEST AST WORD 0                             
         BLZ      TISS0710          B IF AN INITIATION AST (ABN SDT)            
         MTW,0    *R9                                                           
         BGZ      TISS0710          B IF NOT A DISP SKIP SEG                    
         LI,R8    0                                                             
         STW,R8   TDLAST            INSURE MAP RELOAD                           
         BAL,R8   TMRDLTRG          GET REDISPATCHED                            
TISS0710 RES      0                                                             
         ENABLE                                                                 
TISS0709 RES      0                                                             
         PULL     6,R4              RESTORE REGISTERS                           
         AI,R8    1                 NORMAL EXIT                                 
         B        TIO2EXIT                                                      
*                                                                               
TISS0707 EQU      %                                                             
         LI,R7    1                                                             
         LW,R8    *R9,R7            GET START VIRTUAL ADDRESS                   
         SLS,R8   -9                MAKE PAGE ADDRESS                           
         AND,R8   M8                MASK                                        
         B        TISS0701                                                      
TISS0708 EQU      %                                                             
         STW,R9   0,R7              SET AST ENTRY                               
         B        TISS0709          EXIT                                        
         SPACE    2                                                             
         OLAYEND                                                                
         SPACE    2                                                             
         END                                                                    
