         TITLE    '** RROOT - RADEDIT ROOT (CONTEXT SEGMENT) **'                
         PCC      0                                                             
         SPACE    2                                                             
         SYSTEM   SIG7FDP                                                       
         SYSTEM   OPTIONS                                                       
*                                                                               
         SPACE    2                                                             
         TITLE    '** RROOT - DEFS, EQUS PROCS **'                              
*                                                                               
         DEF      RADROOT           NAME OF START OF MODULE                     
         DEF      EXEC0,ROOTEND                                                 
*                                                                               
*  DCB'S IN CONTEXT SEGMENT                                                     
         DEF      M:C,M:LL,M:OC,M:LO                                            
         DEF      M:BI,M:BO,M:X1                                                
         DEF      F:SI,F:SI2,SIFNAME                                            
         DEF      F:SO,F:SO2,SOFNAME                                            
         DEF      F:BI,BIBUFF,BIFNAME                                           
         DEF      F:LI                                                          
*  FPT'S IN CONTEXT SEGMENT                                                     
         DEF      READSI,SIBUFF,SIBCNT,SICOMPL                                  
         DEF      WRITESO,SOBUFF,SOBCNT,SOCOMPL                                 
         DEF      RDDISC,RDDISC4,RDDISC5,RDDISC6                                
         DEF      WRDISC,WRDISC4,WRDISC5                                        
         DEF      READBI,WRITEBO                                                
         DEF      ASNFILE                                                       
         DEF      TYPE,TYPE1,TYPE2,TYPRERR                                      
         DEF      PRINT,PRINT1,PRINT2                                           
         DEF      WRITELO,BYTCNT                                                
         DEF      SKIPRSI,SKIPNSI,SKIPRSO,SKIPNSO                               
         DEF      SKIPRCD,SKIPRCD1,NUMRECS                                      
         DEF      SETRSIZE,SETRSIZ2,SETDCBAT                                    
         DEF      STIMER,WAITTIME,STDLBCAL                                      
         DEF      RDSDISC,RDSDISC4,RDSDISC6                                     
*       FPT'S NEEDED FOR MAPPED SYSTEMS                                         
        DO1      #MAP                                                           
         DEF      GVPN,GVPNL,GVPNH,RVPN,RVPNL,RVPNH                             
*  ERROR MESSAGES                                                               
         DEF      MESS0,MESS2,MESS4,MESS5,MESS9,MESS10                          
         DEF      MESS14,MESS18,MESS20,MESS21,MESS22,MESS23                     
         DEF      MESS40,MESS41                                                 
*  %PRINT VARIABLES                                                             
         DEF      %19@3,%19@4,%TITLINE                                          
         DEF      %UP,%CP,%PL,%PLLEN                                            
         DEF      %7TEMP,%TEMP,%TEMPEND                                         
         DEF      %%#DIG,%9GETOD,%9TOD                                          
*  SCAN VARIABLES                                                               
         DEF      SCAN90,SCAN91,SCAN92,SCAN93                                   
         DEF      SCAN94,SCAN95,SCAN96                                          
         DEF      SCAN97,SCAN98                                                 
         DEF      SCAN99,MODEFLAG                                               
*  SCNMOD VARIABLES                                                             
         DEF      CRNTEBD,EBDBYTES,MODBYTES,DRFHWDS                             
         DEF      SKIPCKS,NMENOS,EBDBA                                          
         DEF      LINKSAVE,TEMP1,TEMPSAVE,TEMP1A                                
         DEF      NDEFS,LBAEBC,FBAEBC,DUPDEF,SEQNO                              
*                                                                               
*  MISC VARIABLES IN CONTEXT SEGMENT                                            
         DEF      BCKEND,BPEND,BPEND1,BACKSZE,BCKSZE                            
         DEF      SPARAM,SPARAMF1,SPARAMF2                                      
         DEF      BUFF1,BUFF2,BUFF3,BUFF4                                       
         DEF      LIBFLAG,LINEIMAG,COLPTR                                       
         DEF      AREANAME,FILENAME,AREA,ACNTNAME                               
         DEF      AREAASGN,DEVASGN,OPLBASGN                                     
         DEF      GIOCT                                                         
         DEF      MAPSW,MAXMASD                                                 
         DEF      ISINDEX,OSINDEX                                               
         DEF      ERRFCN,ERRORSW,CONESW                                         
         DEF      FREECELL,DIRCHAIN,ENDCHAIN                                    
*                                                                               
*  TABLES                                                                       
         DEF      AREASWS,AREASWSX                                              
         DEF      MASTDICT,MASDNAME,MASDBOA,MASDEOA                             
         DEF      MASDSIZE,MASDTPC,MASDSPT,MASDWPS                              
         DEF      MASDWP,MASDDEVA,MASDDCTI,MASDMODL                             
         DEF      MASDZERO,MASDLEOF,MASDFREE,MASDUSED                           
         DEF      MASDLOST,MASDNDS,MASDNFIL,MASDFRMT,MASDEND                    
         DEF      DIRENAME,DIREBOT,DIREEOT,DIRENSEC                             
         DEF      DIREFSIZ,DIRERSIZ,DIREGSIZ,DIRERF                             
         DEF      DIREORG,DIRESD,DIRESTAT,DIREXTNT,DIRELEN                      
         DEF      DIREUSEC,DIREDATE                                             
         DEF      DIREYEAR,DIREMON,DIREDAY,DIREHOUR,DIREMIN                     
         DEF      CON2H00,SQUZDATE                                              
         DEF      DIREESIZ,DIREACNT,DIREFIX,DIREPRIO,DIREEND                    
         DEF      MODULE,EBCDIC,DEFREF,MODIR                                    
         DEF      MODULLEN,EBDICLEN,DREFLEN,MODIRLEN                            
         DEF      MODULSZE,EBDICSZE,DREFSZE,MODIRSZE                            
         DEF      MODULMAX,EBDICMAX,DREFMAX,MODIRMAX                            
*                                                                               
*  DEFS FOR SEGMENT 0  (ROOT 1)                                                 
         DEF      OVNUMBR           CURRENT OVERLAY NUMBER IN CORE              
         DEF      CURINDCB          DCB INPUT CURRENTLY COMING FROM             
         DEF      TEMP              RETURN ADDRESS TEMP FOR ABNERR              
         DEF      SQUEZ95                                                       
         DEF      WHOAMI,MYPRIO                                                 
*                                                                               
*  DEFS FOR SEGMENT 1                                                           
         DEF      DAFLG,SRECVAL,ERECVAL,DAHDR,DFHDR,DFHDRE                      
         DEF      DCDMP80,DCDMP81,DCDMP82                                       
         DEF      DCDMP83,DCDMP84,DCDMP85                                       
         DEF      DCDMP91,DCDMP92,DCDMP93,DCDMP94,DCDMP94A                      
         DEF      DCDMP95,DCDMP96,DCDMP97,DCDMP98                               
         DEF      POSFILE,POSREC                                                
         DEF      DELTRUNC,ALLOTFPT,ALLFPTGS                                    
*                                                                               
*  DEFS FOR SEGMENT 2                                                           
         DEF      MAPTABLE,MAPEBCDC,MAPDEFRF,MAPMODIR                           
         DEF      READAFPT,RABUF,RABYTES,RASEC                                  
         DEF      READBFPT,RBBUF,RBBYTES,RBSEC                                  
         DEF      WRITAFPT,WABUF,WABYTES,WASEC                                  
         DEF      WRITBFPT,WBBUF,WBBYTES,WBSEC                                  
         DEF      CHKFPT                                                        
         DEF      DPFLAGS,NEXTSEC,ENDSEC,SECTX,SECTSIZE                         
         DEF      #TOZERO,OFFSEC,INMAXS,OUTMAXS                                 
*                                                                               
*  DEFS FOR SEGMENT 3                                                           
         DEF      COPYFLGS,COPYFLAG,VFCFLAG,BINFLAG                             
         DEF      BBCDFLAG,FBCDFLAG,ASCIFL,ASCOFL                               
         DEF      D8HFLAG,D16HFLAG,ADDFLAG,UPDFLAG,CCFLAG                       
         DEF      BLKIFLAG,BLKOFLAG,ORGIFLAG,ORGOFLAG                           
         DEF      NFIL,INFLAG,OUTFLAG,EODFLAG,CREAD                             
         DEF      PNCHFLAG,SIDEVICE,SODEVICE,FLAGTOTL                           
         DEF      CDEVICE,MFENTRY                                               
         DEF      DEBUGSW           DYNAMIC TRACE SWITCH FOR SQUEEZE            
*                                                                               
*  DEFS FOR SEGMENT 4                                                           
         DEF      SAVE90,SAVE91,SAVE92,SAVE93                                   
         DEF      REST90,REST91,REST92,REST93                                   
         PAGE                                                                   
         SPACE    2                                                             
*  REFERENCES TO ROUTINES IN OTHER SEGMENTS                                     
         REF      EXEC,PROCSCN,ABNERR,PAGERR                                    
         REF      ERADDR,ABNADDR    OLD DCB/FPT ERR/ABN ROUTINES                
         REF      CHKBUSY                                                       
         PAGE               DEFINITION OF REGISTERS AND FPT P-BITS              
         SPACE    2                                                             
R0       EQU      0                 GENERAL REGISTER 0                          
R1       EQU      1                 GENERAL REGISTER 1                          
R2       EQU      2                 GENERAL REGISTER 2                          
R3       EQU      3                 GENERAL REGISTER 3                          
R4       EQU      4                 GENERAL REGISTER 4                          
R5       EQU      5                 GENERAL REGISTER 5                          
R6       EQU      6                 GENERAL REGISTER 6                          
R7       EQU      7                 GENERAL REGISTER 7                          
LINK     EQU      8                 LINKAGE REGISTER 8                          
R8       EQU      8                 GENERAL REGISTER 8                          
R9       EQU      9                 GENERAL REGISTER 9                          
R10      EQU      10                GENERAL REGISTER 10                         
R11      EQU      11                GENERAL REGISTER 11                         
R12      EQU      12                GENERAL REGISTER 12                         
R13      EQU      13                GENERAL REGISTER 13                         
R14      EQU      14                GENERAL REGISTER 14                         
RLNK     EQU      R14                                                           
R15      EQU      15                GENERAL REGISTER 15                         
         PAGE                                                                   
         SPACE    2                                                             
*                           P BITS IN FPTS                                      
P0       EQU      1**23                                                         
P1       EQU      1**31                                                         
P2       EQU      1**30                                                         
P3       EQU      1**29                                                         
P4       EQU      1**28                                                         
P5       EQU      1**27                                                         
P6       EQU      1**26                                                         
P7       EQU      1**25                                                         
P8       EQU      1**24                                                         
P9       EQU      1**23                                                         
P10      EQU      1**22                                                         
P11      EQU      1**21                                                         
P12      EQU      1**20                                                         
P13      EQU      1**19                                                         
P14      EQU      1**18                                                         
P15      EQU      1**17                                                         
P16      EQU      1**16                                                         
P17      EQU      1**15                                                         
*                                                                               
F7       EQU      1**0                                                          
F6       EQU      1**1                                                          
F5       EQU      1**2                                                          
F4       EQU      1**3                                                          
F3       EQU      1**4                                                          
F2       EQU      1**5                                                          
F1       EQU      1**6                                                          
F0       EQU      1**7                                                          
F8       EQU      1**8                                                          
         PAGE               PROCEDURE DEFINITIONS                               
         SPACE    2                                                             
         OPEN     Q,I                                                           
TXT      CNAME    0                                                             
TXTC     CNAME    1                                                             
         PROC                                                                   
Q        SET      S:UT(AF)                                                      
I        SET      S:NUMC(Q)                                                     
Q(I+1)   SET      ' '                                                           
Q(I+2)   SET      ' '                                                           
Q(I+3)   SET      ' '                                                           
         DO       NAME=0                                                        
LF       TEXT     S:PT(Q(1),Q(2),Q(3),Q(4))                                     
         LIST     0                                                             
         ORG      %-1                                                           
         TEXT     AF                                                            
         ELSE                                                                   
LF       DATA     (((I)**8+Q(1))**8+Q(2))**8+Q(3)                               
         LIST     0                                                             
         ORG      %-1                                                           
         TEXTC    AF                                                            
         FIN                                                                    
         LIST     1                                                             
         PEND                                                                   
         CLOSE    Q,I                                                           
         TITLE    '** RROOT - DCBS AND FPTS **'                                 
*                                                                               
RADROOT  EQU      %                 BASE OF ROOT SEGMANT                        
EXEC0    B        EXEC              GO TO CONTROL PROCESSOR IN ROOT0            
*                                                                               
*                                                                               
         TEXT     'M:C '                                                        
M:C      RES      0                                                             
         GEN,8,24       11,3                                                    
         GEN,8,24       10,1        OPLB = C;FG WILL CHANGE IT TO SI            
         GEN,32         0                                                       
         GEN,15,17      80,ERADDR                                               
         GEN,15,17      0,ABNADDR                                               
         DATA     0                                                             
         DATA     0                                                             
         DATA     0,0,0,0                                                       
*                                                                               
         TEXT     'M:LL'                                                        
M:LL     RES      0                                                             
         GEN,8,24       11,3                                                    
         GEN,8,24      10,4         OPLB = LL                                   
         GEN,32        0                                                        
         GEN,15,17     120,ERADDR                                               
         GEN,15,17     0,ABNADDR                                                
         DATA          0                                                        
         DATA          0                                                        
         DATA     0,0,0,0                                                       
         PAGE                                                                   
*                                                                               
         TEXT     'M:OC'                                                        
M:OC     RES      0                                                             
         GEN,8,24       11,3                                                    
         GEN,8,24      10,2         OPLB = OC                                   
         GEN,32        0                                                        
         GEN,15,17     80,ERADDR                                                
         GEN,15,17     0,ABNADDR                                                
         DATA          0                                                        
         DATA          0                                                        
         DATA     0,0,0,0                                                       
*                                                                               
         TEXT     'M:LO'                                                        
M:LO     RES      0                                                             
         GEN,8,16,8     11,1,3      VFC                                         
         GEN,8,24      10,3         OPLB = LO                                   
         GEN,32         0                                                       
         GEN,15,17      120,ERADDR                                              
         GEN,15,17      0,ABNADDR                                               
         DATA           0                                                       
         DATA           0                                                       
         DATA     0,0,0,0                                                       
         PAGE                                                                   
*                                                                               
         TEXT     'M:BI'                                                        
M:BI     RES      0                                                             
         GEN,8,7,8,9    11,1,1,3    BIN AND PACK                                
         GEN,8,24       3,10        OPLB = BI                                   
         DATA           0           BUFFER ADDRESS FILLED                       
         GEN,15,17      X'7FFF',ABNERR                                          
         DATA           ABNERR                                                  
         DATA           0,0                                                     
         DATA     0,0,0,0                                                       
*                                                                               
         TEXT     'M:BO'                                                        
M:BO     RES      0                                                             
         GEN,8,7,8,9    11,1,1,3    BIN AND PACK                                
         GEN,8,24       40,7        OPLB = BO                                   
         DATA           0           BUFFER ADDRESS FILLED                       
         GEN,15,17      X'7FFF',ABNERR                                          
         DATA           ABNERR                                                  
         DATA           0,0                                                     
         DATA     0,0,0,0                                                       
         PAGE                                                                   
*                                                                               
         TEXT     'M:X1'                                                        
M:X1     GEN,8,24       7,1         DISK FILE                                   
         GEN,8,16,8     2,3,1       AREA = BT                                   
         DATA           BUFF3                                                   
         GEN,15,17      120,ERADDR                                              
         DATA           ABNADDR                                                 
         TEXT           'X1      '  FILENAME FILLED                             
*                                                                               
         TEXT     'F:SI'                                                        
F:SI     RES      0                                                             
         GEN,8,8,8,8    11,0,1,3    VFC                                         
F:SI2    GEN,8,24       20,0        NRT; RFILE                                  
         DATA           0           BUFFER FILLED                               
         GEN,15,17      32764,ERADDR                                            
         GEN,15,17      0,ABNADDR                                               
SIFNAME  DATA           0           FILENAME FILLED                             
         DATA           0                                                       
         DATA     0,0,0,0                                                       
         PAGE                                                                   
*                                                                               
         TEXT     'F:SO'                                                        
F:SO     RES      0                                                             
         GEN,8,24       11,3                                                    
F:SO2    GEN,8,24       20,0        NRT; RFILE                                  
         DATA           0           BUFFER FILLED                               
         GEN,15,17      32764,ERADDR                                            
         GEN,15,17      0,ABNADDR                                               
SOFNAME  DATA           0           FILENAME FILLED                             
         DATA           0                                                       
         DATA     0,0,0,0                                                       
*                                                                               
         BOUND    8                                                             
         TEXT     'F:BI'                                                        
F:BI     RES      0                 DCB                                         
         GEN,8,24       11,1                                                    
         GEN,8,24       3,0         NRT; RFILE                                  
BIBUFF   DATA           BUFF1                                                   
         DATA           ERADDR                                                  
         DATA           ABNADDR                                                 
BIFNAME  DATA           0           FILE NAME FILLED                            
         DATA           0           WORD#6                                      
         DATA     0,0,0,0                                                       
         PAGE                                                                   
*                                                                               
         BOUND    8                                                             
         TEXT     'F:LI'                                                        
F:LI     RES      0                 DCB TO READ LIB                             
         GEN,8,24       7,1         ASN = RAD FILE                              
         GEN,8,24       2,0         NRT; RFILE                                  
         DATA           0           BUFFER FILLED                               
         GEN,15,17      X'7FFF',ABNERR                                          
         DATA           ABNERR                                                  
         DATA           0,0         FILENAME FILLED                             
         PAGE                                                                   
         BOUND    4                                                             
*****                                                                           
READBI   RES      0                                                             
         GEN,8,24 X'10',M:BI                                                    
         DATA     P1+P2+P4+F3+F5                                                
         DATA     ERADDR                                                        
         DATA     ABNADDR                                                       
         DATA     0                 BYTE COUNT                                  
*****                                                                           
READSI   RES      0                                                             
         GEN,8,24 X'10',F:SI        READ F:SI FPT                               
         DATA     P1+P2+P3+P4+P7+P10+F3                                         
         DATA     ERADDR                                                        
         DATA     ABNADDR                                                       
SIBUFF   DATA     BUFF3                                                         
SIBCNT   DATA     0                                                             
         GEN,24,8  0,'>'            PROMPT CHARACTER                            
SICOMPL  DATA     0                 COMPLETION STATUS WORD                      
*****                                                                           
RDDISC   RES      0                 READ DISC  (DIRECT ACCESS)                  
         GEN,8,24 X'10',F:BI                                                    
         DATA     P1+P2+P4+P8+P10+F3                                            
         DATA     ERADDR                                                        
         DATA     ABNADDR                                                       
RDDISC4  DATA     0                 BYTE COUNT                                  
RDDISC5  DATA     0                 GRANULE NO.                                 
RDDISC6  DATA     0                 TYC AND ACTUAL BYTE COUNT                   
         PAGE                                                                   
*****                                                                           
RDSDISC  RES      0                 READ DISC SEQUENTIALLY W/ BYTE COUNT        
         GEN,8,24 X'10',F:BI                                                    
         DATA     P1+P2+P4+P10+F3                                               
         DATA     ABNERR     P1                                                 
         DATA     ABNERR     P2                                                 
RDSDISC4 DATA     0          P4     BYTE COUNT TO READ                          
RDSDISC6 DATA     0          P10    TYC AND ACTUAL BYTES READ                   
*****                                                                           
*                                                                               
***********************************************************************         
*                                                                               
*        W R I T E   F P T ' S                                                  
*                                                                               
*                                                                               
*****                                                                           
WRITELO  RES      0                 LO                                          
         GEN,8,24 X'11',M:LO                                                    
         GEN,32   X'F0000010'                                                   
         DATA     ERADDR                                                        
         DATA     ABNADDR                                                       
         DATA     LINEIMAG          BUFFER ADDRESS                              
BYTCNT   DATA     120               BYTE COUNT                                  
*****                                                                           
WRITEBO  RES      0                                                             
         GEN,8,24 X'11',M:BO                                                    
         GEN,4,28 X'D',X'14'                                                    
         DATA     ERADDR                                                        
         DATA     ABNADDR                                                       
         DATA     0                 BYTE COUNT                                  
*****                                                                           
WRITESO  RES      0                                                             
         GEN,8,24 X'11',F:SO        WRITE F:SO FPT                              
         GEN,12,20 X'F04',X'10'                                                 
         DATA     ERADDR                                                        
         DATA     ABNADDR                                                       
SOBUFF   DATA     BUFF3                                                         
SOBCNT   DATA     0                                                             
SOCOMPL  DATA     0                 COMPLETION STATUS WORD                      
*****                                                                           
WRDISC   RES      0                 WRITE DISC                                  
         GEN,8,24 X'11',F:BI                                                    
         GEN,32   X'D1000010'                                                   
         DATA     ERADDR                                                        
         DATA     ABNADDR                                                       
WRDISC4  DATA     0                 BYTE COUNT                                  
WRDISC5  DATA     0                 GRANULE NO.                                 
         PAGE                                                                   
*****                                                                           
TYPE     RES      0                                                             
         GEN,8,24 X'11',M:OC                                                    
         DATA     X'F4000010'                                                   
         DATA     TYPRERR           ERROR ADDRESS                               
         DATA     TYPRERR           ABNORMAL ADDRESS                            
TYPE1    DATA     0                 BUFFER ADDRESS                              
TYPE2    DATA     0                 BYTE COUNT                                  
         DATA     1                 BYTE DISPLACEMENT                           
*****                                                                           
PRINT    RES      0                                                             
         GEN,8,24 X'11',M:LL                                                    
         DATA     X'F4000010'                                                   
         DATA     TYPRERR           ERROR ADDRESS                               
         DATA     TYPRERR           ABNORMAL ADDRESS                            
PRINT1   DATA     0                 BUFFER ADDRESS                              
PRINT2   DATA     0                 BYTE COUNT                                  
         DATA     1                 BYTE DISPLACEMENT                           
*****                                                                           
TYPRERR  B        *R8               IGNORE ERRORS FOR TYPE, PRINT               
*****                                                                           
*****                                                                           
SKIPRSI  RES      0                                                             
         GEN,8,24 X'1D',F:SI        SKIP RECORDS                                
         GEN,32   X'C0000000'                                                   
SKIPNSI  DATA     0                                                             
         DATA     ABNADDR                                                       
*****                                                                           
SKIPRSO  RES      0                                                             
         GEN,8,24 X'1D',F:SO        SKIP RECORDS                                
         GEN,32   X'C0000000'                                                   
SKIPNSO  DATA     0                                                             
         DATA     ABNADDR                                                       
         PAGE                                                                   
*****                                                                           
SKIPRCD  RES      0                 SKIP RECORDS                                
         GEN,1,7,1,23    1,X'1D',1,R2                                           
         DATA            P1+P2+P10+F4                                           
SKIPRCD1 DATA            0              # RECS TO SKIP                          
         DATA            ABNADDR                                                
NUMRECS  DATA            0              TYC; # RECS SKIPPED                     
*****                                                                           
SETRSIZE RES      0                 SET RSIZE IN DCB, RFT TABLE                 
         GEN,1,7,24      1,X'22',R2      INDIRECT TO DCB IN R2                  
         DATA            P1              RSIZE PARAM PRESENT                    
SETRSIZ2 DATA            0               RECORD SIZE IN BYTES                   
*****                                                                           
SETDCBAT RES      0         SET DCB ATTRIBUTES; BIN,PACK,BLK,D1600,...          
         GEN,1,7,24      1,X'22',R2      INDIRECT TO DCB IN R2                  
         DATA     0                 WORD FOR P-BITS AND F-BITS                  
         DATA     0    PARAM 1      RSIZE        IF ALL OPTIONS USED            
         DATA     0    PARAM 2      ORG                                         
         DATA     0    PARAM 3      GSIZE                                       
*****                                                                           
ASNFILE  RES      0         ASSIGN A FILE TO A DCB                              
         GEN,1,7,1,6,17  1,X'08',1,0,R2                                         
         DATA            P1+P4+P14                                              
         DATA            ABNERR                                                 
         DATA            AREANAME           AREA, FILE NAME                     
         DATA            ACNTNAME           ACCOUNT NAME                        
*****                                                                           
DELTRUNC RES             0          DELETE / TRUNCATE A FILE FPT                
         GEN,8,1,23      X'5B',1,0                                              
         DATA            P1+P3+P4+P14+F3                                        
         DATA            ABNERR     ERROR ROUTINE                               
         DATA            0,0        FILE NAME                                   
         PZE             ACNTNAME   ACCOUNT NAME                                
*****                                                                           
ALLOTFPT RES             0    ALLOT CAL'S FPT                                   
         DATA            0          CODE AND AREA FILLED IN                     
         DATA            0          PRESENT BITS COMPUTED, FILLED IN            
         DATA            ABNERR                                                 
         PZE             *DIREORG                                               
         DATA            0,0        FILE NAME                                   
         PZE             *DIREFSIZ                                              
         PZE             *DIRERSIZ                                              
ALLFPTGS DATA            0          GSIZE      (OR ESIZE)                       
         DATA            0          (ACCOUNT)  (OR GSIZE)                       
         DATA            0                     (ACCOUNT)                        
*                                                                               
POSFILE  GEN,1,7,24      0,X'1C',F:BI    FPT TO POSITION A FILE                 
         DATA            0               DIRECTION, WAIT FLAGS                  
*                                                                               
POSREC   GEN,1,7,24      0,X'1D',F:BI    FPT TO POSITION RECORDS                
         DATA            P1+P2                                                  
         DATA            0               RECORD COUNT                           
         DATA            ABNERR                                                 
*                                                                               
*                                                                               
STIMER   RES      0         TIME DELAY CAL FOR INOP AND OTHER USES              
         GEN,8,1,23    X'44',1,0                                                
         DATA          P1+P13+F3                                                
         DATA          ABNERR   P1  ERROR ROUTINE                               
WAITTIME DATA          8        P13 TIME IN SECONDS TO WAIT                     
*****                                                                           
STDLBCAL RES      0                 ASSIGN A STANDARD LABEL                     
         GEN,8,1,23      X'62',1,C'XX'                                          
         DATA            P1+P10+F3  + P2 OR P3 OR P4+P14 AS REQUIRED            
         DATA            ABNERR     P1     ERROR ROUTINE                        
         DATA            AREANAME   P2,P3,P4 OPLB/DEVICE/FILE PTR               
         DATA            0          P10    TYC                                  
         DATA            ACNTNAME   P14    ACCOUNT NAME IF SET                  
*****                                                                           
WHOAMI   GEN,8,1,23  X'4E',1,0                                                  
         DATA     X'01000000'                                                   
MYPRIO   DATA     0                                                             
         PAGE                                                                   
         SPACE    2                                                             
***********************************************************************         
*                                                                               
*                                                                               
*    FPT'S FOR DPCOPY ( 2 SETS EACH READ/WRITE FOR DOUBLE BUFFERING)            
*                                                                               
READAFPT RES      0                                                             
         GEN,8,24 X'10',F:SI                                                    
         DATA     P1+P2+P3+P4+P8+P10                                            
         DATA     ABNERR                                                        
         DATA     ABNERR                                                        
RABUF    DATA     0                 BUFFER ADDRESS                              
RABYTES  DATA     1024                                                          
RASEC    DATA     0                 SECTOR NUMBER                               
         DATA     0                                                             
*                                                                               
READBFPT RES      0                                                             
         GEN,8,24 X'10',F:SI                                                    
         DATA     P1+P2+P3+P4+P8+P10                                            
         DATA     ABNERR                                                        
         DATA     ABNERR                                                        
RBBUF    DATA     0                 BUFFER ADDRESS                              
RBBYTES  DATA     1024                                                          
RBSEC    DATA     0                 SECTOR NUMBER                               
         DATA     0                                                             
*                                                                               
WRITAFPT RES      0                                                             
         GEN,8,24 X'11',F:SO                                                    
         DATA     P1+P2+P3+P4+P8+P10                                            
         DATA     ABNERR                                                        
         DATA     ABNERR                                                        
WABUF    DATA     0                 BUFFER ADDRESS                              
WABYTES  DATA     1024                                                          
WASEC    DATA     0                 SECTOR BUMBER                               
         DATA     0                                                             
*                                                                               
WRITBFPT RES      0                                                             
         GEN,8,24 X'11',F:SO                                                    
         DATA     P1+P2+P3+P4+P8+P10                                            
         DATA     ABNERR                                                        
         DATA     ABNERR                                                        
WBBUF    DATA     0                                                             
WBBYTES  DATA     1024                                                          
WBSEC    DATA     0                                                             
         DATA     0                                                             
*                                                                               
CHKFPT   RES      0                                                             
         GEN,8,24 X'29',READAFPT                                                
         DATA     P1+P2+P10                                                     
         DATA     ABNERR                                                        
         DATA     ABNERR                                                        
         PAGE                                                                   
         SPACE    2                                                             
*                      FPT'S FOR CP-R MEMORY MANAGEMENT                         
*                                                                               
         DO       #MAP                                                          
DEFSEG   EQU      999                                                           
GVPN     GEN,8,1,23   X'57',1,DEFSEG                                            
         GEN,1,6,25   1,3,0             P1                                      
         DATA         PAGERR            ERROR ADDRESS                           
GVPNL    DATA         0                                                         
GVPNH    DATA         0                                                         
*****                                                                           
RVPN     GEN,8,1,23   X'58',1,DEFSEG                                            
         GEN,1,6,25   1,3,0             P1                                      
         DATA         PAGERR            ERROR ADDRESS                           
RVPNL    DATA         0                                                         
RVPNH    DATA         0                                                         
*****                                                                           
         FIN      #MAP                                                          
         TITLE    '** RROOT - ERROR MESSAGES **'                                
******** ERROR MESSAGES ********                                                
*                                                                               
*        MESSAGES WITH INSERTS. INSERTS MADE WHEN MESSAGE IS USED.              
*                                                                               
*                 .  .   .   .   .   .   .   .   .   .                          
MESS0    TXTC     '!!YYNDD WRT RESTRICTED'                                      
MESS2    TXTC     'ERROR ITEM  XX '                                             
MESS4    TXTC     'AREA XX IS NOT ALLOCATED'                                    
MESS5    TXTC     'ERROR IN OPTION XXXX'                                        
MESS9    TXTC     'AREA XX CANNOT CONTAIN A RESIDENT FOREGROUND PROGRAM'        
MESS10   TXTC     'AREA XX DOES NOT CONTAIN A LIBRARY'                          
MESS14   TXTC     'AREA XX CONTAINS NO FILES'                                   
MESS18   TXTC     'ILLEGAL OPTION XXX.'                                         
MESS20   TXTC     'AREA XX NOT FOUND ON SAVE TAPE'                              
MESS21   TXTC     'AREA XX INCOMPATIBILITY'                                     
MESS22   TXTC     'AREA XX CKSM ERROR'                                          
MESS23   TXTC     'AREA XX TRUNCATED'                                           
MESS40   TXTC     ' ERROR: R10 CODE = XX  '                                     
MESS41   TXTC     'AREA XX HAS A BAD DIRECTORY'                                 
*                 .  .   .   .   .   .   .   .   .   .                          
         TITLE    '** RROOT - SCMOD, SCAN & MISC VARIABLES **'                  
************SCNMOD DATA*****************                                        
CRNTEBD  DATA     0                 BYTE ADDR. OF NXT. AVAIL EBCDIC LOC.        
EBDBYTES DATA     0                 NO. BYTES ADDED FOR ROM (EBCDIC FLE)        
MODBYTES DATA     0                 NO. BYTES ADDED FOR ROM (MODIR FLE)         
DRFHWDS  DATA     0                 NO. HWDS. ADDED FOR ROM (DEFREF FLE)        
SKIPCKS  DATA     0                   READ MODULE W/OUT SEQ. CHK AND CHKSUM     
NMENOS   DATA     0                 COUNT OF NAME NUMBERS FOR ROM               
EBDBA    DATA     0                 BYTE ADDR. OF LAST BYTE IN BUFFER           
LINKSAVE DATA     0                 TEMPORARY SAVE                              
TEMP1    DATA     0                 TEMPORARY SAVE                              
TEMPSAVE DATA     0                 TEMPORARY SAVE                              
TEMP1A   DATA     0                 TEMPORARY SAVE                              
NDEFS    DATA     0                 NO. DEFS AND DSECTS FOR THIS ROM            
LBAEBC   DATA     0                 TEMPORARY SAVE FOR CRNTEBD                  
FBAEBC   DATA     0                 1ST BYTE ADDR OF EBCDIC FOR                 
*                                       CURRENT ROM.                            
DUPDEF   DATA     0                                                             
SEQNO    DATA     0                 ROM SEQUENCE #                              
*                                                                               
************SCAN DATA********************                                       
SCAN90   DATA     0                 FIELD FLAG                                  
SCAN91   DATA     0                 PARENTHESES FLAG                            
SCAN92   DATA     1                 CONT. CARD FLAG                             
SCAN93   DATA     0                 CHAR. COUNT                                 
SCAN94   DATA     0                 FIELD COUNT                                 
SCAN95   DATA     0                 COUNT OF HEX CHARS.                         
SCAN96   DATA     0                 ADD. OF CARD BUFFER                         
SCAN97   DATA     0                 =0 IF PERIOD IS END CMND                    
*                                   =1 IF PERIOD IS END FILE ID FIELD           
SCAN98   DATA     0                 COL. INDEX AND EXIT PM. R6                  
COLPTR   EQU      SCAN98                                                        
SCAN99   DATA     0                 LINK-RETURN                                 
MODEFLAG DATA     0                 O-UNDECIDED,1-NORMAL,-1-ALTERNATE           
*                                                                               
**************MISC DATA***************************                              
         BOUND    8                                                             
SPARAM   RES      0                                                             
         GEN,16,16 0,BUFF2          SCAN ROUTINE PARAMETER TABLE                
SPARAMF1 DATA      0                F1                                          
SPARAMF2 DATA      0                F2                                          
*                                                                               
CURINDCB DATA     0                 ADDR OF FPT TO READ INPUT WITH              
*                                                                               
LINEIMAG RES      34                SPACE FOR A 132 CHARACTER PRINT LINE        
*                                                                               
         BOUND    8                                                             
BUFF1    RES      256                                                           
BUFF2    RES      20                                                            
BUFF3    RES      256                                                           
BUFF4    RES      256                                                           
%TITLINE EQU      BUFF4             TITLE LINE FOR %ROUTINE PAGE EJECTS         
*%#%#%#%#%#%#%#%#%#%#%#%#%#%#%  TEMP  #%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%          
*                                                                               
         BOUND    8                                                             
LIBFLAG  DATA     0                 PROCESS LIBRARY FLAG                        
EODFLAG  DATA     0                 EOD READ FLAG                               
SQUEZ95  DATA     0                 FLAG FOR COPY THAT SQUEEZE                  
*                                                                               
         BOUND    4                                                             
AREA     DATA     0                 AREA   0,1,2,3,4,5,6,...                    
         DATA     0                 ALTERNATE AREA FOR LIB COPYS                
*                                                                               
*                                                                               
OVNUMBR  DATA     0                 NUMBER OF THE OVERLAY IN CORE               
*                                                                               
BCKEND   DATA     0                 END OF PARTION (BACKGROUND)                 
BPEND    DATA     0                 BEGINNING OF SCRATCH BUFFER                 
BPEND1   DATA     0                 BEGINNING OF SCRATCH BUFFER + 1             
BACKSZE  DATA     0                 SIZE OF BUFFER SPACE IN WORDS               
BCKSZE   DATA     0                 SIZE OF BUFFER SPACE IN BYTES               
*                                                                               
DIRCHAIN DATA     0                 POINTER TO HEAD OF CHAINED DIRE             
ENDCHAIN DATA     0                 POINTER TO TAIL OF CHAINED DIRE             
FREECELL DATA     0                 NEXT FREE WORD IN BKG IN CHAIN BUILDS       
*                                                                               
ERRORSW  DATA     0                 0 IF NO ERRORS; >0 IF FATAL ERROR           
CONESW   DATA     0                 CONTINUE ON ERROR SWITCH                    
*                                   IF > 0 RESUME AT EXEC4 ON ERRORS            
*                                   IF = 0 DO 'WAIT' AND ABORT UNATTEND         
*                                                                               
ERRFCN   DATA     0                 ADDRESS OF ERROR PROCESSOR FUNCTION         
*                                   TABLE                                       
TEMP     DATA     0                 RETURN ADDRESS FROM ERROR PROCESSOR         
*                                                                               
*                                                                               
* AREASWS TABLE:  MEANING OF BYTE SETTINGS                                      
*                 00  => NOT REQUESTED                                          
*                 0F  => REQUESTED BY 'ALL' OPTION                              
*                 FF  => REQUESTED EXPLICITLY                                   
*                                                                               
AREASWS  RES      20                ROOM FOR 80 AREAS                           
AREASWSX EQU      %         END OF AREASWS TABLE                                
         PAGE                                                                   
         SPACE    2                                                             
         BOUND    8                                                             
*                                                                               
AREAASGN DATA     0,0,0      AREA NAME FOR AREA ONLY ASSIGNS                    
*                                                                               
*                                                                               
*                            AREA/FILENAME / DEVICE NAME / OPLABEL              
*                                                                               
*        GETIOID CONTROL TABLE                                                  
         BOUND    8                 FILENAME MUST BE ON DW BOUND                
GIOCT    DATA     0                 FLAG WORD                                   
         DATA     0                 FILE AREA, DEV NAME, OPLB NAME              
         DATA     0,0               FILE NAME, REST OF DEV NAME                 
         DATA     0,0               ACNT NAME                                   
*                                                                               
AREANAME EQU      GIOCT+1                                                       
OPLBASGN EQU      GIOCT+1                                                       
DEVASGN  EQU      GIOCT+1                                                       
FILENAME EQU      GIOCT+2                                                       
ACNTNAME EQU      GIOCT+4                                                       
         TITLE    '** RROOT - CONTEXT FOR % PRINT ROUTNINES **'                 
*  %PRINT DATA                                                                  
*                                                                               
*                                                                               
*                                                                               
%UP      DATA     0         LINES TO UPSPACE BEFORE PRINTING NEXT LINE          
%CP      DATA     1                 CHARACTER POINTER FOR %0  PL                
%PL      EQU      LINEIMAG          NAME OF PRINLINE ELSEWHERE IN RADEDIT       
%PLLEN   EQU      132               MAX VALUE OF %CP, THE PRINT LINE            
*                                                                               
*                                                                               
         BOUND    8                                                             
%7TEMP   DATA     0,0               DOUBLE WORD TEMP                            
%TEMP    RES      8                 CONVERSION WORKSPACE (%8)                   
%TEMPEND EQU      %                END OF TEMP WORKSPACE                        
*                                                                               
*                                                                               
%%#DIG   EQU      (%TEMPEND-%TEMP)*4    MAX # DIGITS IN AN INTEGER              
*                                                                               
%9GETOD  GEN,8,24 X'10',%9TOD       FPT CODE, LOC OF TEXT BUFFER                
%9TOD    TXT      'HHMM  JAN 04,"75'   TEMP SPACE FOR GET DATE CAL              
*                                                                               
*                                                                               
%19@3    DATA     37                LINES REMAINING ON CURRENT PAGE             
%19@4    DATA     0                 ADDR OF TITLE LINE, IF PRESENT              
         TITLE    '** RROOT - SEGMENT 1 CONTEXT (DUMP) **'                      
DAFLG    DATA     0                 DUMP AREA FLAG                              
SRECVAL  DATA     0                 STARTING RECORD VALUE TO DUMP               
ERECVAL  DATA     0                 ENDING RECORD VALUE                         
DAHDR    TEXTC    'DUMP OF AREA '   PAGE HEADER FOR AREA DUMP                   
DFHDR    TEXTC    'DUMP OF FILE '   PAGE HEADER FOR FILE DUMP, PART 1           
DFHDRE   TEXTC    ' IN AREA '       PART 2 OF FILE DUMP HEADER                  
*                                   PRINT IMAGES                                
DCDMP80  TEXT     'ASECTOR XXXXX'   BYTE 1=DOUBLE SPACE                         
DCDMP81  TEXT     'ARECORD XXXXX'                                               
DCDMP82  TEXT     'ASECTOR XXXXX THRU YYYYY CONTAIN ZZZZZZZZ'                   
DCDMP83  TEXT     'ARECORD XXXXX THRU YYYYY CONTAIN ZZZZZZZZ'                   
DCDMP84  DATA,1   X'C0','W','D','X' BYTE 1=SINGLE SPACE                         
         TEXT     'XX                                    '                      
         TEXT     '                                          '                  
DCDMP85  DATA,2   X'C040','  '      BYTE 1=SINGLE SPACE                         
         TEXT     '                  **** WD XXXX THRU YYYY'                    
         TEXT     ' CONTAIN ZZZZZZZZ ****'                                      
*                                                                               
*                                                                               
*                                   FLAGS                                       
DCDMP91  DATA     0                 TEMP STORAGE                                
DCDMP92  DATA     0                 FLAG TO PRINT 'SEC X-Y' LINE                
DCDMP93  DATA     0                 OWRDS PER SECT. OR REC.                     
DCDMP94  DATA     0                 DUPLICATED VALUE                            
DCDMP94A DATA     0                 FLAG THAT NEED NEW DUP. VALUE               
DCDMP95  DATA     0                 WORD COUNT                                  
DCDMP96  DATA     0                 LWA OF SEC/REC                              
DCDMP97  DATA     0                 FWA OF SECT/REC                             
DCDMP98  DATA     0                 R10                                         
         TITLE    '** RROOT - SEGMENT 2 CONTEXT **'                             
         SPACE    2                                                             
MAPSW    DATA     0                 WHICH MAP FUNCTION WAS CALLED:              
*                                    1 ==>  MAP                                 
*                                    0 ==> SMAP                                 
*                                                                               
MAXMASD  DATA     0                 MAXIMUM MASTD INDEX TO SCAN/PRINT           
*                                                                               
*                                                                               
*                                                                               
ISINDEX  DATA     C'IS  '           'IS' AREA NAME & LATER ITS INDEX            
*                                                                               
OSINDEX  DATA     C'OS  '           SAME FOR 'OS' AREA                          
         PAGE                                                                   
         BOUND    8                                                             
*                                                                               
*        DATA BLOCK INTO WHICH THE MASTER DICTIONARY ENTRY FOR AN AREA          
*        OR A DEVICE'S DEVICE INFO IS UNPACKED VIA A GETASN CAL                 
*        THIS IS USED TO MAKE ONLY THE SUBROUTINE 'UNPKMASD' DEPENDENT          
*        ON THE FORMAT OF THE DICTIONARY.                                       
*                                                                               
MASTDICT RES      0          BASE OF DICTIONARY TABLE                           
MASDNAME TEXT     '  AA'            AREA NAME IN FORM '  AA'                    
MASDBOA  DATA     0                 BEGIN SECTOR NUMBER                         
MASDEOA  DATA     0                 END   SECTOR NUMBER                         
MASDSIZE DATA     0                 NUMBER OF SECTORS IN THE AREA               
MASDTPC  DATA     0                 NUMBER OF TRACKS PER CYLINDER               
MASDSPT  DATA     0                 NUMBER OF SECTORS PER TRACK                 
MASDWPS  DATA     0                 NUMBER OF WORDS   PER SECTOR                
MASDWP   DATA     0                 WRITE PROTECTION CODE, 1, 2, ..., 5         
MASDDEVA TXT      'YYNDD   '        DEVICE ADDRESS                              
MASDDCTI DATA     0                 DCT INDEX FOR THE DEVICE                    
MASDMODL DATA     0                 MODEL NUMBER                                
*                                                                               
*                 THE FOLLOWING ARE USED FOR TEMPS WHILE PROCESSING             
*                 AREAS AND AREA INFO BY MAP, SAVE, ETC.                        
*                                                                               
MASDZERO RES      0         START OF WORDS ZEROED BY UNPKMASD                   
MASDLEOF DATA     0                 EOF OF LAST FILE PROCESSED                  
MASDFREE DATA     0                 NEXT FREE SECTOR IN AREA                    
MASDUSED DATA     0                 NUMBER OF SECTORS IN DELETED FILES          
MASDLOST DATA     0                 SECTORS LOST DUE TO TRUNCATIONS             
MASDNDS  DATA     0                 NUMBER OF ADDITIONAL DIRE SECTORS           
MASDNFIL DATA     0                 NUMBER OF FILES IN AREA                     
MASDFRMT DATA     0                 FORMAT OF DIRE; 0 => NEW; >0 => OLD         
*                                                                               
MASDEND  DATA     0                 LAST WORD IN DIRE TO SCAN FOR FILES         
         PAGE                                                                   
*        DATA BLOCK INTO WHICH A FILE DIRECTORY ENTRY IS UNPACKED, ONE          
*        DIRECTORY ITEM PER WORD.   THIS IS USED TO MAKE THIS ROUTINE           
*        THE ONLY DIRECTORY FORMAT DEPENDENT PIECE OF CODE IN THIS              
*        SEGMENT.                                                               
*                                                                               
*                                                                               
         BOUND    8                                                             
DIRENAME TXT      'FILENAME'        NAME OF FILE, LEFT JUSTIFIED                
DIREBOT  DATA     0                 BEGIN SECTOR FOR FILE                       
DIREEOT  DATA     0                 END   SECTOR FOR FILE                       
DIRENSEC DATA     0                 NUMBER OF SECTORS ALLOCATED TO FILE         
DIREFSIZ DATA     0                 FILE SIZE (NUMBER OF RECORDS IN IT)         
DIRERSIZ DATA     0                 RECORD SIZE                                 
DIREGSIZ DATA     0                 GRANULE SIZE                                
DIRERF   DATA     0                 RESIDENT FOREGROUND SWITCH                  
DIREORG  DATA     0                 FILE ORGANIZATION:  0 => UNBLOCKED          
*                                                       1 => BLOCKED            
*                                                       2 => COMPRESSED         
DIRESD   DATA     0                 WRITE MODE (SEQUEN=1; DIRECT=2)             
DIRELEN  DATA     0                 LENGTH OF THE FILE'S DIRE ENTRY             
*                                                                               
DIREXTNT DATA     0                 EXTENT NUMBER                               
DIREESIZ DATA     0                 FILE EXTENSION SIZE                         
DIREACNT TXT      '        '        ACCOUNT NAME, LEFT JUSTIFIED                
DIREFIX  DATA     0                 > 0 ==> DO NOT COMBINE XTENTS               
DIRESTAT DATA     0                 STATUS: 0 => DELETED ENTRY                  
*                                           1 => BAD TRACK ENTRY                
*                                           2 => GOOD FILE ENTRY                
DIREPRIO DATA     0                 PRIORITY FOR SYMBIONT FILES                 
DIREUSEC DATA     0                 NO USED SECTORS (SEC WRT)                   
DIREDATE DATA     0                 DATE FILE LAST WRITTEN                      
DIREYEAR DATA     0                 DECODED DIREDATE                            
DIREMON  DATA     0                 ...                                         
DIREDAY  DATA     0                 ...                                         
DIREHOUR DATA     0                 ...                                         
DIREMIN  DATA     0                 ...                                         
DIREEND  RES      0          END OF THE DIRE TABLE                              
         PAGE                                                                   
         SPACE    2                                                             
*                 DATA AND TABLES FOR LIBRARY COPY (BUILD)                      
*                                                                               
         BOUND    8                 ALL TABLES ARE ORDERED                      
*                                                                               
MODULE   TXT      'MODULE  '                                                    
EBCDIC   TXT      'EBCDIC  '                                                    
DEFREF   TXT      'DEFREF  '                                                    
MODIR    TXT      'MODIR   '                                                    
*                                                                               
*                           SIZE OF FILES IN BYTES AFTER LAST ROM               
MODULSZE DATA     0                 MODULE  (IN RECORDS)                        
EBDICSZE DATA     0                 EBCDIC                                      
DREFSZE  DATA     0                 DEFREF                                      
MODIRSZE DATA     0                 MODIR                                       
*                                                                               
*                           LENGTH LAST READ FROM DISC                          
MODULLEN DATA     0                 MODULE  (IN RECORDS)                        
EBDICLEN DATA     0                 EBCDIC                                      
DREFLEN  DATA     0                 DEFREF                                      
MODIRLEN DATA     0                 MODIR                                       
*                                                                               
*                           MAX SIZE FILE CAN GET AS LIMITED BY EOT             
MODULMAX EQU      %-1               MODULE ENTRY NOT USED                       
EBDICMAX DATA     0                 EBCDIC                                      
DREFMAX  DATA     0                 DEFREF                                      
MODIRMAX DATA     0                 MODIR                                       
         PAGE                                                                   
         SPACE    2                                                             
MFENTRY  RES      0          PROTOTYPE MODIR ENTRY FOR CURRENT ROM              
         DATA     0                 POSIT IN MODULE FILE; NUM RECS              
         DATA     0                 MODULE NAME; THE FIRST DEF IS               
         DATA     0                 USED FOR THIS NAME                          
*                                                                               
*                           BASE OF DATA USED BY 'LMAP' COMMAND                 
MAPTABLE EQU      %-1               BASE  OF MAPLIB TABLE                       
MAPEBCDC DATA     0                 START OF EBCDIC TABLE                       
MAPDEFRF DATA     0                 START OF DEFREF TABLE                       
MAPMODIR DATA     0                 START OF MODIR  TABLE                       
         PAGE                                                                   
         SPACE    2                                                             
DPFLAGS  EQU      %                                                             
NEXTSEC  DATA     0                 NEXT SECTOR TO BE READ                      
ENDSEC   DATA     0                 LAST SECTOR TO BE READ                      
SECTX    DATA     0                 # OF SECTORS IN BUFFER                      
OFFSEC   DATA     0                 OFFSET FROM SECTOR READ TO                  
*                                   SECTOR TO WRITE                             
SECTSIZE DATA     0                 SIZE OF SECTOR, IN BYTES, HW 0              
INMAXS   DATA     0                 LAST SECTOR IN INPUT DEVICE                 
OUTMAXS  DATA     0                 LAST SECTOR ON OUTPUT DEVICE                
*                                                                               
#TOZERO  EQU      %-DPFLAGS                                                     
         TITLE    '** RROOT - SEGMENT 3 CONTEXT **'                             
*                                                                               
*   FLAGS USED IN COPY ROUTINE                                                  
*                                                                               
COPYFLGS EQU      %                                                             
*                                                                               
COPYFLAG DATA     0         DCB PROCESSING: 0 => INPUT, 1 => OUTPUT             
*                                                                               
*                 THE FOLLOWING WORDS MUST BE IN THE SAME ORDER AS              
*                 THE 'KEYWORDS' TABLE.                                         
*                                                                               
* FLAG NAME       VALUE   KEYWORD   MEANING                                     
*                                                                               
VFCFLAG  DATA     0         VFC     VFC REQUIRED FOR OUTPUT                     
BINFLAG  DATA     0         BIN     BINARY I/O                                  
BBCDFLAG EQU      BINFLAG           OLD NAME FOR BINFLAG                        
FBCDFLAG DATA     0         FBCD    CONVERT BCD INPUT TO EBCDIC                 
ASCIFL   DATA     0         ASCI    CONVERT ASCII INPUT TO EBCDIC               
ASCOFL   DATA     0         ASCO    CONVERT EBCDIC OUTPUT TO ASCII              
D8HFLAG  DATA     0         D800    800 BPI DENSITY                             
D16HFLAG DATA     0         D1600   1600 BPI DENSITY                            
ADDFLAG  DATA     0         ADD     ADDING DATA TO END OF DISC FILE             
UPDFLAG  DATA     0         UPD     ADDING DATA TO MIDDLE OF DISC FILE          
CCFLAG   DATA     0         CC      READING 'BANG' CONTROL CARDS                
BLKIFLAG DATA     0         BLKI    READING BLOCKED INPUT TAPE/FILE             
BLKOFLAG DATA     0         BLKO    WRITING BLOCKED OUTPUT TAPE/FILE            
ORGIFLAG DATA     0         ORGI    ORG FOR INPUT TAPE/FILE                     
ORGOFLAG DATA     0         ORGO    ORG FOR OUTPUT TAPE/FILE                    
*                 END OF ORDERED FLAGS                                          
*                                                                               
NFIL     DATA     0         NFIL    NUMBER OF FILES TO COPY                     
INFLAG   DATA     0         IN      INPUT FROM DEVICE/OPLABEL VIA 'IN'          
OUTFLAG  DATA     0         OUT     OUTPUT TO  DEVICE/OPLABEL VIA 'OUT'         
*                                                                               
CREAD    DATA     0                 1 IF INPUT IS FROM 'C' DEVICE               
PNCHFLAG DATA     0                 CARD/PAPER TAPE PUNCH IS OUTPUT DEV         
SIDEVICE DATA     0                 1ST TWO CHARACTERS OF INPUT AND             
SODEVICE DATA     0                 OUTPUT DEVICE NAMES, = DEV CLASS            
*                                                                               
FLAGTOTL DATA     (%-COPYFLGS)      NUMBER OF FLAGS                             
*                                                                               
CDEVICE  DATA     0                 DCT/RFT INDEX FOR C DEVICE                  
         SPACE                                                                  
CON2H00  DATA     0                 SQUEEZE FLAG - SET IF GOING TO H00          
SQUZDATE DATA     0                 SQUEEZE DATE - SET IF GOING TO H00          
         SPACE                                                                  
**********************************************************************          
*                                                                               
*                 DYNAMIC TRACE SWITCH FOR TRACING SQUEEZE                      
*                                                                               
*                           SETTINGS AND ACTIONS OF DEBUG SWITCH                
*                                                                               
*        > 0      COUNT OF NUMBER OF ENTRIES BEFORE STARTING OUTPUT             
*        = 0      TRACE/DEBUG OUTPUT ENABLED; DO ALL 'SNP' ROUTINES             
*        < 0      TRACE/DEBUG OUTPUT INHIBITED; DO NOTHING                      
*                                                                               
DEBUGSW  DATA     -1                KEEP TRACE OFF JUST IN CASE                 
         TITLE    '** RROOT - SEGMENT 4 CONTEXT **'                             
*                                                                               
*                                                                               
*                                                                               
SAVE90   DATA     0                 SW: >0 IF ERRORS READING DISC               
*                                                                               
*                                                                               
*                           SAVE RECORD HEADER: 6 WORDS INCLUDNG CKSM           
SAVE91   RES      0                                                             
         DATA     0                 NWPS // LRA, LRT FLAGS/AREA ID              
         DATA     0                 NO. SECT. IN REC., RAD DEV. NO.             
         DATA     0                 TRUE AREA FWA (RAD/DISK SECTOR #)           
         DATA     0                 SPT; AREA NAME IN EBCDIC                    
         DATA     0                 NUM SECTORS OF ZERO TO WRITE 1ST            
         DATA     0                 CKSM IN 2'S COMPLEMENT                      
*                                                                               
SAVE92   DATA     0                 NO. SECTORS LEFT IN AREA                    
SAVE93   DATA     0                 MAX. NO. SECT. IN LOAD AREA                 
*                                                                               
*                                                                               
REST90   DATA     0                 MAX. NO. WORDS IN LOAD AREA                 
REST91   RES      6                 BUFFER FOR SAVE RECORD HEADERS              
REST92   DATA     0                 NO. SECT. IN AREA TO RESTORE                
REST93   DATA     0                 MAX. NO. SECT. IN LOAD AREA                 
         PAGE                                                                   
         SPACE    2                                                             
ROOTEND  EQU      ((%-EXEC0)+511)/512    # PAGES REQUIRED FOR ROOT              
         END      EXEC0                                                         
