         PCC      0                                                             
         SYSTEM   SIG9P                                                         
         SYSTEM   OPTIONS                                                       
*                                                                               
*                                                                               
*                                                                               
*                                                                               
         DEF      MMO6                                                          
         DEF      MMO6EXIT                                                      
         DEF      MMUNLOCK,MMLOCK,MMRPREF,PREFMODE                              
OLAYFLAG EQU      'MMO6'                                                        
         PSYS     0                                                             
         SYSTEM   CPRMON                                                        
MMO6     RES      0                                                             
         TITLE    '** MMO6 **'                                                  
         TITLE    '** MMO6 - LOCK/UNLOCK A TASK **'                             
*                                                                               
*        MMLOCK   LOCK A SECONDARY TASK IN MEMORY                               
*        MMUNLOCK UNLOCK A SECONDARY TASK IN MEMORY                             
*                                                                               
*                 AT ENTRY:   R8 =LINK                                          
*                 AT EXIT:    R0 =DESTROYED                                     
*                             R15= ERROR CODE X'9E'                             
*                             RETURN IS TO LINK IF ERROR                        
*                             RETURN IS TO LINK+1 IF NO ERROR                   
*                                                                               
         DO       #ROLL             PROCESS IF ROLLOUT                          
MMUNLOCK PUSH     6,R5              SAVE REGISTERS                              
         LI,R8    0                 R8=UNLOCK BIT                               
         LW,R10   MM16MTBM          R10=MTB -1                                  
         B        MM1600                                                        
MMLOCK   PUSH     6,R5              SAVE REGISTERS                              
         LW,R8    XSTILOCK          R8=LOCK/UNLOCK BIT                          
         LW,R10   MM16MTBP          R10=MTB +1                                  
MM1600   BIFPRIM  MM1606            ERROR                                       
         BIFBKG   MM1606            ERROR                                       
         LI,R5    STCBAST           OFFSET TO AST POINTER                       
         LW,R6    *TCBPOINT,R5      GET AST ENTRY                               
         LB,R7    R6                GET AST LENGTH                              
         BGZ      MM1601            B IF NOT ZERO LENGTH                        
         CRASH    'MM16-NO AST'                                                 
MM1601   LB,R5    TCBPOINT          STI INDEX                                   
         LW,R9    XSTILOCK          IS LOCK BIT ALREADY IN                      
         CS,R8    STITCB,R5             MODE BEING REQUESTED                    
         BE       MM1604                YES, ERROR                              
         DISABLE                                                                
         STS,R8   STITCB,R5         SET MODE REQUESTED                          
         AI,R6    -1                ADJUST ADDRESS FOR  COUNT INDEX             
         LI,R5    SDTLOCK           OFFSET TO LOCK COUNT                        
MM1602   LW,R0    *R6,R7            GET AST ENTRY                               
         BLEZ     MM1602A               NOT USED                                
         EXU      R10               MODIFY THE COUNT + OR -1                    
MM1602A  BDR,R7   MM1602            B IF NOT DONE                               
         ENABLE                                                                 
         DO       #ROLL                                                         
         MTW,1    ROLL99            ALTER ROLLOUT RE-ENT                        
         CI,R8    0                 UNLOCK?                                     
         BNEZ     MM1603                NO                                      
         BAL,R8   MMSTART               YES, START EXEC IN CASE                 
         FIN      #ROLL                                                         
MM1603   LI,R15   TYCNORM           NORMAL COMPLETION                           
         PULL     6,R5              RESTORE  REGISTERS                          
         AI,R8    1                 NORMAL EXIT                                 
         B        OLAYEXIT          EXIT                                        
MM1604   LI,R15   TYC9C             ERROR CODE                                  
MM1605   PULL     6,R5              RESTORE REGISTERS                           
         B        OLAYEXIT                                                      
MM1606   LI,R15   TYC6A             INVALID CAL FOR TASK                        
         B        MM1605                                                        
MM16MTBP MTB,1    *R0,R5            INCR LOCK COUNT                             
MM16MTBM MTB,-1   *R0,R5            DECR LOCK COUNT                             
         ELSE                       NO ROLLOUT                                  
MMLOCK   EQU      %                                                             
MMUNLOCK AI,R8    1                 TAKE NORMAL EXIT                            
         LI,R15   TYCNORM                                                       
         B        OLAYEXIT                                                      
         FIN      #ROLL                                                         
         TITLE    '** MMO6 - SUBR TO RECOVER PREF PARTITION PAGES **'           
*******************                                                             
*    MMRPREF      *    SUBR TO RECOVER PREFERRED PARTITION                      
*******************      PAGES FROM STM MODE                                    
*                                                                               
* ENTRY  R2       ECB ID (TYPE 5)                                               
*        R7       RMPT INDEX                                                    
*        BAL,R8   MMRPREF                                                       
* EXIT   +1       NO POST OF ECB YET                                            
*        +2       POST ECB WITH CODE IN R15                                     
* REGISTERS USED: R0-R1,R3-R15                                                  
*          SAVED: R2                                                            
* STACK WORDS:    5                                                             
* SUBROUTINES:    MMSDS,MMGSTM,MMRDS,MMRPPS,MMMOVE,MMOMFPP                      
*                                                                               
*        R0 - WORK                  R8 - LINK, WORK                             
*        R1 - WORK                  R9 - ALLOC MAP ADDR, PCT                    
*        R2 - REAL PAGE NO          R10- LOC ADDR, PCT                          
*        R3 - REL PAGE IN PCT       R11- PCT ADDR                               
*        R4 - FLAGS ADDR IN SD      R12- AST ADDR                               
*        R5 - REL PGNO OF VPNL,VPNH R13- MAP ADDR, SD                           
*        R6 - SD ADDRESS            R14- BIT MAP FOR PCT SCAN                   
*        R7 - RMPT INDEX            R15- BIT MAP FOR PCT SCAN                   
MMRPREF  PUSH     R8                SAVE REGS                                   
         PUSH     R2                                                            
         LW,R14   Y8                INITIALIZE SCAN OF PCT                      
         LI,R15   0                     R14,R15=BIT   FOR SCAN                  
         LW,R11   PPT,R7                R11=PCT  ADDRESS                        
         LW,R10   R11                   R10=LOC  WORD BASE ADDR                 
         AI,R10   PCTLOC                                                        
         LI,R2    PCTSP                 R2=OFFSET  TO REAL PG NO                
         LB,R2    *R11,R2               R2=REAL  PAGE NUMBER                    
         LW,R9    R11                   R9=ALL MAP WORD                         
         AI,R9    PCTALMP                                                       
         LW,R4    TCBPOINT              R12=0TH  AST ENTRY                      
         LW,R12   STCBAST,R4            CURRENT TASK                            
         LI,R3    0                     R2=RELATIVE  PAGE NO IN PART            
MM6002   LW,R1    LMIRECB+MMLMID    HAS CHAIN HEAD CHANGED AND                  
         CW,R7    ECBDATA,R1            BEEN QUEUED                             
         BNE      MM6026                YES, EXIT                               
         PUSH     2,R14                 SAVE BIT MASK                           
         LD,R0    *R9               IS NEXT PAGE ALLOCATED                      
         OR,R0    R14                   SET BIT AND TEST                        
         OR,R1    R15                   FOR CHANGE                              
         CD,R0    *R9                                                           
         BNE      MM6020                NO, CONTINUE                            
         LW,R6    *R10,R3               YES, FETCH LOCATOR                      
         CW,R6    XPCTSTM               IS ALLOC STM VS PREF                    
         BAZ      MM6020                NO, ALLOCATED PREFERRED                 
         AND,R6   M17                   LINK TO SD AND ACQUIRE                  
         BEZ      MM6016                NO SD, GIVEN TO OMAN                    
         LW,R0    STIPRIO+MMTID     MAKE SURE DSO IS                            
         AND,R0   XSTINDSO          FIELD IS RESET FOR                          
         STW,R0   STIPRIO+MMTID     MMEXEC TASK.                                
         STW,R6   *R12                  EXCLUSIVE USE OF SEGMENT                
         BAL,R8   MMSDS                 GO SET 'DS'                             
         LI,R0    MMIOWAIT/5            SET APPROX IO WAIT TIME                 
MM6004   MTB,0    IOLOCK,R2             IS PAGE IO LOCKED                       
         BEZ      MM6006                NO, CONTINUE                            
         AI,R0    -1                    WAIT FOR                                
         BGEZ     MM6004                THE IO LOCK TO GO AWAY                  
         LI,R15   TYC67                 IF IT DOESN'T, TIMEOUT                  
         BAL,R8   MM60RDS               ECB AND RELEASE SD                      
         PULL     2,R0              RESTORE STACK                               
         B        MM6022                GIVEN POST EXIT                         
MM6006   LI,R5    0                 SEARCH SD FOR RPN TO BE                     
         LI,R4    SDACICNT          OFFSET TO #OF WORDS IN ACI                  
         LB,R4    *R6,R4            GET COUNT                                   
         AI,R4    SDFIXED           OFFSET TO FLAGS                             
         AW,R4    R6                R6 NOW HAS ADDRESS OF FLAGS                 
         LI,R1    SDVPCNT               R1=VP COUNT FOR SEG                     
         LB,R1    *R6,R1                                                        
         LW,R13   0,R6                  R13=MAP  LOCATION                       
MM6008   EQU      %                                                             
         LB,R0    *R4,R5            IS NEXT REAL PAGE PRESENT                   
         CI,R0    SDRPP                                                         
         BAZ      MM6010                NO                                      
         DO       #SIGMA9M                                                      
         CH,R2    *R13,R5               DOES REAL PAGE NUMBER                   
         ELSE     #SIGMA9M                                                      
         CB,R2    *R13,R5               MATCH THE PAGE TO BE                    
         FIN      #SIGMA9M                                                      
         BE       MM6014                YES, MOVE IT                            
MM6010   AI,R5    1                     ADVANCE TO NEX PAGE IN                  
         CW,R5    R1                    SEGMENT UNTIL VP LIMIT                  
         BL       MM6008                IS REACHED                              
         DISABLE                                                                
         LD,R0    *R9               IS PAGE STILL ALLOCATED                     
         OR,R0    R14                                                           
         OR,R1    R15                                                           
         CD,R0    *R9                                                           
         BNE      MM6018                NO, RELEASED IN INTERIM                 
         LW,R0    *R10,R3               LOCATOR STILL SAME SD                   
         CW,R0    XPCTSTM                                                       
         BAZ      MM6018                NO, CONTINUE                            
MM60CRSH CRASH    'MMRPREF ERROR'                                               
MM6014   BAL,R8   MMGSTM            FETCH A NEW REAL PAGE                       
         B        MM6024                NONE AVAIL, EXIT                        
         ENABLE                     ENABLE, MMEXEC PERM TASK                    
         PUSH     R14                   SAVE REAL PAGE NUMBER                   
         PUSH     2,R9                                                          
         PUSH     R2                                                            
         SLS,R14  9                 CONVERT RPN TO REAL ADDRESS                 
         LW,R9    R2                    R9=VPNL (PAGE NO)                       
         LW,R10   R2                    R10=VPNH                                
         SLS,R2   9                     CONVERT TO AN ADDRESS                   
         BAL,R8   MMMOVE                MOVE PAGE (R2 AREA TO R14)              
         LW,R1    R5                RELEASE THE PREFERRED PAGE                  
*                                   R1,R5=REL PG IN SD, R6=SD                   
*                                   R9,R10=VPNL,VPNH (=REAL)                    
*                                   R7=RMPT, R4=FLAGS                           
         BAL,R8   MMRPPSI           ENTER INTERVAL VERSION OF                   
         B        MM60CRSH              RELEASE PREF PAGE                       
         DISABLE                    RESET SD TO INCLUDE NEW                     
         LB,R0    *R4,R5                REAL PAGE                               
         OR,R0    XSDRPP                                                        
         STB,R0   *R4,R5                                                        
         PULL     R2                                                            
         PULL     2,R9                                                          
         PULL     R14                   REFETCH REAL                            
         DO       #SIGMA9M                                                      
         STH,R14  *R13,R5               MAP IMAGE                               
         ELSE     #SIGMA9M                                                      
         STB,R14  *R13,R5                                                       
         FIN      #SIGMA9M                                                      
         LI,R5    SDRPCNT               INCR REAL PAGE COUNT                    
         MTB,1    *R6,R5                                                        
         ENABLE                                                                 
         B        MM6018            RELEASE SD AND CONTINUE                     
MM6016   LW,R14   R2                SET R14=REAL  ADDRESS OF PAGE TO            
         BAL,R8   MMOMFPP               CALL OMANFPP FROM ROOT                  
         B        MM6020                CONTINUE                                
*                                                                               
MM6018   BAL,R8   MM60RDS           RELEASE SD                                  
*                                                                               
MM6020   PULL     2,R14             RESTORE FLAG WORDS                          
         SLD,R14  -1                    SHIFT SCAN BIT                          
         AI,R2    1                     INCR REAL PAGE NO                       
         AI,R3    1                     INCR REL PAGE IN PART                   
         CB,R3    *R11              DONE                                        
         BL       MM6002                NO                                      
         LI,R15   TYCNORM                                                       
MM6022   PULL     R2                TAKE POST EXIT                              
         PULL     R8                                                            
         AI,R8    1                                                             
         B        OLAYEXIT                                                      
MM6024   PULL     2,R14             PULL FLAG WORDS                             
         BAL,R8   MM60RDS           RELEASE SD                                  
         LI,R15   TYCA4                 SET R15=NO PAGE                         
MM6026   PULL     R2                EXIT, NO POST                               
         LW,R0    ECBPC,R2          SET # PAGES TO 1                            
         AND,R0   YFFFFFF               ZERO # PAGES                            
         CI,R15   TYCA4                 TYC=NO PAGE                             
         BNE      MM6028                YES                                     
         AI,R0    1                     SET NO PAGES=1                          
MM6028   STW,R0   ECBPC,R2                                                      
         DISABLE                                                                
         LW,R0    ECBFPT,R2             REVERSE INP                             
         AND,R0   XECBNINP                                                      
         STW,R0   ECBFPT,R2                                                     
         PULL     R8                EXIT                                        
         B        OLAYEXIT                                                      
*                                                                               
*        SUBR TO RELEASE SD                                                     
*                                                                               
MM60RDS  PUSH     R8                SAVE EXIT                                   
         BAL,R8   MMRDS             RELEASE SEGMENT                             
         LI,R6    0                     REMOVE LINK                             
         STW,R6   *R12                                                          
         PULL     R8                                                            
         B        *R8               EXIT                                        
         TITLE    '** MM06 - PREF PARTITION MODE CAL **'                        
*******************                                                             
*    PREFMODE     *    CAL PROCESSOR TO ALTER MODE OF A                         
*******************      PREFERRED MEMORY PARTITION TO AND FROM                 
*                        STM MODE                                               
* ENTRY, EXIT PER CAL PROCESSOR SPECS                                           
*                                                                               
XFPTMODE EQU      XBIT9             1=STM, 0=PREF                               
*                                                                               
*        REGISTER USAGE                                                         
*        R0 - WORK                  R8 - LINK                                   
*        R1 - PCT ADDR              R9 - TYC SAVE                               
*        R2 - PPT TYPE              R10 - NU                                    
*        R3 - FPT ADDR              R11 - NU                                    
*        R4 - TASK ID               R12 - NU                                    
*        R5 - NU                    R13 - NU                                    
*        R6 - MODE (0-1)            R14 - NU                                    
*        R7 - RMPT INEX             R15 - TYC                                   
PREFMODE LW,R14   0,R3              LOCATE THE PREFERRED                        
         AND,R14  M17                   BEING ALTERED                           
         BEZ      PREF20                ZERO, DO ALL PREFERRED                  
         BAL,R8   MMFMP                 R7=MEMORY PARTITION INDEX               
         B        PREFER91              NOT IN A PARTITION                      
         LW,R1    PPT,R7                R1=TYPE, PCT ADDRESS                    
         LB,R2    R1                    R2=TYPE                                 
         AND,R2   XPPTTYPE              ISOLATE                                 
         CI,R2    PPTTYPE4              PREFERRED                               
         BNE      PREFER91              NO, NOT PREF PAGE ADDR                  
         LI,R15   TYCNORM               SET R15=NORMAL COMPL                    
         LW,R6    0,R3                  FETCH STM MODE OPTION                   
         AND,R6   XFPTMODE              R6=MODE SWITCH                          
         BEZ      PREF02                RECOVERING PARTITION                    
         BAL,R8   PREF60                PARTITION TO STM                        
         B        PREF10            EXIT                                        
PREF02   BAL,R8   PREF50            RECOVER PARTITION                           
         NOP                            ERROR                                   
PREF10   BAL,R8   TMTYC15S          STORE TYC                                   
         BAL,R8   TMSETERR          DRIVE ERROR EXITS                           
PREFX    B        CALSTDX           EXIT CAL                                    
PREFER91 LI,R15   TYC91             SET ERROR CODE, NOT IN                      
         B        PREF10                A PREFERRED PARTITION                   
PREF20   LB,R7    K:RMPT            SCAN RMPT,PPT FOR ALL                       
         LW,R6    0,R3                  PREF PARTITIONS,                        
         AND,R6   XFPTMODE              R6=MODE SWITCH                          
         LI,R9    TYCNORM               R9=NORMAL TYC                           
PREF22   LW,R1    PPT,R7            FETCH PPT FOR NEXT                          
         LB,R2    R1                    PARTITION                               
         AND,R2   XPPTTYPE              R2=TYPE                                 
         CI,R2    PPTTYPE4              PREFERRED                               
         BNE      PREF24                NO, SKIP IT                             
         CI,R6    0                     RECOVERING PART                         
         BE       PREF23                YES                                     
         BAL,R8   PREF60                NO, GOING TO STM                        
         B        PREF24                DO NEXT PARTITION                       
PREF23   BAL,R8   PREF50                RECOVER PARTITION                       
         LW,R9    R15                   ERROR, SWAP TYC                         
PREF24   BDR,R7   PREF22            DO NEXT PARTITION                           
         LW,R15   R9                    SWAP TYC INTO R15                       
         B        PREF10                AND EXIT CAL                            
         PAGE                                                                   
*        REGISTER USAGE IN SUBROUTINES:                                         
*        R0 - WORK                  R8 - LINK                                   
*        R1 - PCT ADDRESS           R9 - ADDR OF MAP IN PCT                     
*        R2 - ECB                   R10 - LOCATORS ADDR PCT                     
*        R3 - NU                    R11 - NU                                    
*        R4 - TASK ID               R12 - NU                                    
*        R5 - REL PAGE IN PCT       R13 - NU                                    
*        R6 - PAGES IN PCT          R14 - BIT MASK                              
*        R7 - RMPT INDEX            R15 - BIT MASK                              
*                                                                               
*        SUBR TO RECOVER A SINGLE PREFERRED PARTITION                           
*                                                                               
PREF50   PUSH     7,R3              SAVE REGS                                   
         DISABLE                                                                
         LW,R1    PPT,R7                REFETCH PPT WORD                        
         CW,R1    XPPTSTM               NO, IN STM MODE NOW                     
         BAZ      PREF56            NO, EXIT NORMALLY                           
         EOR,R1   XPPTSTM              SWITCH FROM STM TO NORMAL                
         STW,R1   PPT,R7                MODE, RESET PPT CONTROL                 
*                                   ESTABLISH HOW MANY PAGES ARE                
         BAL,R8   PREF70                SET UP PCT SCAN                         
         LW,R0    %+1                                                           
         NOP                                                                    
         STW,R0   *R1,R2                                                        
         LI,R2    0                     R2=NO STM ALLOC FOUND                   
         LW,R8    XPCTSTM               R8=STM ALLOC BIT                        
PREF52   LD,R0    *R9                   IS THE NEXT PAGE                        
         OR,R0    R14                   ALLOCATED                               
         OR,R1    R15                   SET AND TEST                            
         CD,R0    *R9                   IF SAME, WAS ALLOC                      
         BE       PREF53                YES                                     
         MTW,-1   MMTPAGES              NO, DECR FREE PAGE COUNT                
         BGEZ     PREF54                GTR OR =0 OK                            
         LI,R0    0                     FORCE MMTPAGES TO 0                     
         STW,R0   MMTPAGES                                                      
         B        PREF54                CONTINUE                                
PREF53   CW,R8    *R10,R5               IS PAGE ALLOCATED AS                    
         BAZ      PREF54                STM, NO, CONTINUE                       
         LI,R2    1                     YES, SET RECOVERY SW                    
PREF54   SLD,R14  -1                    DO NEXT PAGE                            
         AI,R5    1                     INCR REL PAGE NO                        
         BDR,R6   PREF52                UNTIL ALL PAGES DONE                    
         ENABLE                                                                 
         CI,R2    0                     ANY PAGES STM ALLOCATED                 
         BE       PREF56                NO, EXIT NOW, RECOVERY DONE             
*                                   RECOVERY WILL HAVE TO BE DONE               
         DO       #ROLL                                                         
         LI,R3    MMRECB5               BY MMEXEC, CREATE A                     
         LB,R5    STILMID,R4        SET UP LMI INDEX FOR ECB                    
         BAL,R8   MMRECB                TYPE 5 ECB AND WAIT                     
         B        PREF59                (ERROR, SPACE)                          
         BAL,R8   MMSTART               START MEM EXEC IF IDLE                  
         BAL,R8   MMICHK                WAIT FOR ECB TO BE                      
         B        PREFCR                POSTED (ERROR, BUSY)                    
         B        PREF57                EXIT                                    
         ELSE                                                                   
         LI,R15   TYC94             PAGES OUTSTANDING                           
         B        PREF57                                                        
         FIN      #ROLL                                                         
PREF56   LI,R15   TYCNORM           SET NORMAL TYPE COMPL                       
PREF57   PULL     7,R3                                                          
         AI,R8    1                     NORMAL EXIT                             
         B        PREF59A                                                       
*                                                                               
PREF59   PULL     7,R3              ERROR EXIT                                  
PREF59A  EQU      %                                                             
         ENABLE                                                                 
         CI,R15   TYCNORM           NORMAL COMPLETION                           
         BE       *R8               YES JUST EXIT                               
         DISABLE                                                                
         LW,R1    PPT,R7            DID WE LEAVE A PARTITION                    
         CW,R1    XPPTSTM           IN A PARTIALLY TRANSFORMED                  
         BANZ     %+3               STATE IF SO THEN CORRECT IT                 
         EOR,R1   XPPTSTM                                                       
         STW,R1   PPT,R7                                                        
         ENABLE                                                                 
         B        *R8                                                           
*                                                                               
PREFCR   CRASH    'PREFMODE ERROR'                                              
*                                                                               
*        SUBR TO CONVERT A SINGLE PREFERRED PARTITION TO STM                    
*                                                                               
PREF60   PUSH     4,R6              SAVE EXIT                                   
         DISABLE                                                                
         LW,R1    PPT,R7                R1=PPT, TYPE&PCT                        
         CW,R1    XPPTSTM               IN STM MODE ALREADY                     
         BANZ     PREF66                YES, EXIT NORMALLY                      
         OR,R1    XPPTSTM               NO, SET TO STM MODE                     
         BAL,R8   PREF71                SETUP REGISTERS                         
         STW,R1   PPT,R7                                                        
         LW,R0    PREF69                R0=AWM,R0 MMTPAGES                      
         STW,R0   *R1,R2                STORE INSTR FOR EXU                     
PREF62   LD,R0    *R9               NEXT PAGE FREE                              
         OR,R0    R14                   SET USED AND SEE IF CHANGE              
         OR,R1    R15                                                           
         CD,R0    *R9                                                           
         BE       PREF64                NO, PAGE IS USED                        
         MTW,1    MMTPAGES              YES, INCR MMTPAGES                      
PREF64   EQU      %                                                             
         SLD,R14  -1                DO NEXT PAGE                                
         BDR,R6   PREF62                                                        
PREF66   ENABLE                                                                 
         DO1      #ROLL                                                         
         BAL,R8   MMSTART                                                       
         LI,R15   TYCNORM                                                       
         PULL     4,R6                                                          
         B        *R8                                                           
PREF69   AWM,R0   MMTPAGES          COMMAND FOR PCT                             
*                                                                               
*        SUBR TO SET UP PCT SCAN                                                
*                                                                               
* ENTRY  R7       RMPT INDEX                                                    
*        R1       PCT ADDRESS (PPT ENTRY)                                       
*        BAL,R8   PREF70 OR PREF71  PREF70 SETSUP LOCATOR SCAN                  
*                                   PREF71 ONLY BIT SCAN                        
* EXIT   R5       OFFSET TO ZEROTH LPREF70 ENTRY                                
*        R10      ADDRESS OF ZEROTH LOCATOR                                     
* EXIT   R2       REL LOC OF EXU IN BOTH ENTRIES                                
*        R6       PAGE COUNT IN PCT                                             
*        R9       ALLOC MAP ADDR                                                
*        R14,R15  BIT MASK FOR SCAN                                             
*                                                                               
PREF70   LI,R5    0                     R5=0 (OFFSET)                           
         LW,R10   R1                    R10=LOCATOR ADDRESS                     
         AI,R10   PCTLOC                                                        
PREF71   LI,R2    PCTEXU            SET R2=EXU LOC                              
         LB,R6    *R1                   R6=PAGE LENGTH                          
         LW,R9    R1                    R9=PCT ALLOC MAP                        
         AI,R9    PCTALMP                                                       
         LW,R14   Y8                    R14,R15=BIT FOR SCAN                    
         LI,R15   0                                                             
         B        *R8               EXIT                                        
MMO6EXIT EQU      %                                                             
OLAYEXIT B        *R8               COMMON EXIT                                 
         OLAYEND                                                                
         END                                                                    
