         TITLE    'CONTEXT-B00,09/14/73,DWG702985'
         SYSTEM   SIG7F
         CSECT    0
         PCC      0                 CONTROL CARDS NOT PRINTED.
CONTEXT@ RES      0                 ORIGIN OF PROCESSOR CONTEXT MODULE.
*
*  DEF'S
*
         DEF      CONTEXT@             =START OF CONTEXT MODULE.
         DEF      STRAYS            AREA HOLDING STRAY DATA BLK PTRS.
         DEF      LBLOCK            LOOP CTRL BLK FOR TRICKY OPERATORS.
         DEF      FDEFPTR           (DB PTR) FUNCTION DESCRIPTOR.
         DEF      XTEMP             (DB PTR) INDEX OR COORDINATE.
         DEF      NILCK             (DB PTR)
         DEF      LFARG             (DB PTR) LEFT ARGUMENT.
         DEF      RTARG             (DB PTR) RIGHT ARGUMENT.
         DEF      RESULT            (DB PTR) RESULT.
         DEF      NSTRAYS           NO.OF STRAY PTRS.
         DEF      DBROOT            PTR TO ROOT DB (LIST OR FUN.DESCR.).
         DEF      DBSERIES          PTR INTO A LIST OR FUN. DESCRIPTOR.
         DEF      GRAFPNTR          (DB PTR) GRAPHICS SPECIAL BLOCK.
         DEF      CURRCS            PTS AT CURRENT CODESTR. DATA BLK +2.
         DEF      STRAYBLK          = SIZE OF TOTAL BLOCK OF STRAY PTRS.
         DEF      OFFSET            OFT USED TO SAVE CURR.CODESTR.OFFSET
         DEF      WHATERR           HOLDS ERROR INFO WHEN ENTERING EXERR
         DEF      XSEGBRK           = LOC OF 'OPBREAK' ONLY DURING
*                                     EXECUTION SEGMENT OPERATION.
         DEF      CXSCRTCH          SCRATCH AREA FOR CODESTRING EXEC.
         DEF      CONSTTYP          INDICATES TYPE OF ACQUIRED CONSTANT.
         DEF      NSPILLED          NO.OF DIGITS SPILLED IN ACQ'ING NO.
         DEF      CONSTAD           DBLWD -- 1ST WD MUST ALWAYS BE ZERO
*                                    2ND WD EITHER CONTAINS PTR TO THE
*                                    BEGINNING OF A NO. OR (AFTER ACQ
*                                    DIGITS WITHIN THAT NO.) A 'DIGIT
*                                    VALUE' (RANGE IS 0 THRU 18).
         DEF      MAXCOL            MAX. COLUMNS ACCEPTED ON INPUT.
         DEF      HICOL             INDICATES HI COLUMN IN IMAGE.
         DEF      ERRCOL            BYTE ADDR.OF ERR COLUMN IN IMAGE.
         DEF      LINKCS            LINK TO CODESTRINGER.
         DEF      CONSTKEY          BYTE ADDR.OF 1ST CHAR OF CONSTANT.
         DEF      OFFSETK           PTR TO CODESTR.DESIG. BEFORE CONST.
         DEF      IMAGE             INTERNAL CHAR IMAGE OF LINE.
         DEF      SYMT              SYMBOL TABLE PTR.
         DEF      NAMEPTR           PTR INTO SYMBOL TABLE (AN OFFSET).
         DEF      SYMTSIZE          # ENTRIES (DBLWDS) IN SYMBOL TABLE.
         DEF      NSYMTWDS          # WORDS IN SYMBOL TABLE.
         DEF      NAMLIMIT          = MAX # CHARS USED IN A NAME.
         DEF      NAMEWDSZ          = MAX # WORDS NEEDED TO HOLD A NAME.
         DEF      NAMEWDS           HOLDS # WORDS USED BY A NAME.
         DEF      LOCNEED           NEW COMMON LOCATION NEEDED.
         DEF      NEWBOUND          NEW DYNAMIC BOUNDARY NEEDED.
         DEF      FREETOTL          TOTAL AMT OF FREE DYNAMIC.
         DEF      FREETBL           FREE TABLE (2-WD ITEMS--LOC & SIZE).
         DEF      MAXFRENS          MAX # FREE TABLE ENTRIES (DBLWDS).
         DEF      FBOUNDS           TBL OF FREE BOUNDARIES IN GARB.COLL.
         DEF      FAQMS             TBL OF FREE ACCUMULATIONS TO FBOUNDS
         DEF      NR2MOVE           NO.OF REGIONS TO MOVE IN GARB.COLL.
         DEF      BLKWANTD          SIZE OF NEW DATA BLOCK WANTED.
         DEF      DREFSAVE          REG SAVE AREA WHILE DE-REFERENCING.
         DEF      GARBSAVE          REG SAVE AREA FOR GARB.COLL. ET AL.
         DEF      GCTEMP            TEMP FOR GARBAGE COLLECTOR.
         DEF      LINKGC            LINK HOLDER FOR GARBAGE COLLECTOR.
         DEF      LINKWS            LINK HOLDER FOR WORKSPACE MGMTS.
         DEF      LINKOLAY          LINK HOLDER FOR OVERLAY SWITCHING.
         DEF      OLDMODE           HOLDS MODE INFO DURING FUN DEFN.    U03-0004
         DEF      QUIETFLG          = 0 IF SAVED MSG TO BE DISPLAYED.
         DEF      CATCHTBL          CATCH-COMMAND TABLE.
         DEF      OBSFLAG           OBSERVE-COMMAND FLAG.
         DEF      OBSERVE           OBSERVATION SETTING (0=NO & -1=YES)
         DEF      OBSAVE            REG.SAVE AREA DURING AN OBSERVATION.
         DEF      BACKUP            COPY SYM TBL RE-SCAN FLAG.
         DEF      BLANKCNT          # HOLES LEFT IN ACTIVE SYM TBL.
         DEF      COPYBASE          LOC OF COPY DATA REGION IN COPY WS.
         DEF      COPYHOME          LOC OF COPY DATA REGION IN ACTIVE WS
         DEF      COPYSAVE          16 WD SAVE AREA ON DBLWD BOUND.
         DEF      COPYSIZE          # WDS COPY DYN. OR COPY DATA REGION.
         DEF      CORVSFIL          = 0 (CORE-COPY) = -1 (FILE-COPY).
         DEF      CSYMT             LOC OF COPIED SYM TBL.
         DEF      DISPLAC           HOLDS DISPLACEMENT VALUE.
         DEF      LINKCY            LINK HOLDER FOR COPY WORK.
         DEF      LINKWY            LINK HOLDER WHILE WINDOWING.
         DEF      NAMERKEY          KEY FOR NAME RECORD ACCESS.
         DEF      GOSTATE           PTR TO GO-STATE IN STATE-INDICATOR.
         DEF      BRNVAL            BRANCH VALUE FOR ERR-CTRL.
         DEF      ERRORID           INTERNAL I.D. FOR ERROR.
         DEF      ELINK             LINK HOLDER FOR ERR HANDLING.
         DEF      EREGS             REG SAVE AREA DURING ERR-CTRL TEST.
         DEF      ERRLOC            HOLDS ERROR LOC (CURRLINO,NAMEPTR).
         DEF      ERRNUM            HOLDS ERROR NUMBER.
         DEF      STRAPOPT          4013 STRAP OPTION,NO. OF CHARS.
 SPACE 3
*
*  PARAMETERS
*
 SPACE
MAXCOL   EQU      131               MAX. NO.OF COLUMNS OF INPUT ACCEPTED
*                                     (INCLUDING THE CARRIAGE RETURN).
 SPACE
MAXFRENS EQU      32                MAX. NO.OF FREE-TABLE ENTRIES.
 SPACE
NAMLIMIT EQU      77                MAX. NO.OF CHARS USED IN A NAME.
 SPACE
NAMEWDSZ EQU      (NAMLIMIT+3)**-2  MAX. NO.OF WDS TO HOLD A NAME.
 SPACE 3
*
*  DOUBLEWORD BOUNDARY DEPENDENT CONTEXT
*
         BOUND    8
*
*    (NON-OVERLAYABLE DOUBLEWORD CONTEXT)
*
CONSTAD  DATA     0                 MUST BE ZERO.
         RES      1                 TEMP FOR ACQUIRING A CONSTANT.
 SPACE
FREETBL  DO1      MAXFRENS          FREE TABLE -- FOR EACH ENTRY:
         DATA     0,0               EVEN WD= LOC OF FREE BLK, ODD= SIZE.
*                             NOTE--UNUSED ENTRIES MUST CONTAIN ZEROES.
 SPACE 2
IMAGE    RES      256**-2           IMAGE BUFFER (HI FOR OUTPUT WORK).
 SPACE 2
*  BLOCK OF 'STRAY' DATA BLOCK PTRS.  THIS BLOCK MUST CONTAIN ALL CELLS
*    THAT MAY REFERENCE A DATA BLK (EXCEPT FOR DATA BLK PTRS IN: THE
*    SYMBOL TABLE, THE EXECUTION STACK, OR OTHER DATA BLOCKS).
*
*  NOTE:  IT IS ABSOLUTELY NECESSARY THAT 'STRAY' CELLS CONTAIN ZERO
*    WHEN NOT ACTUALLY REFERENCING A DATA BLOCK.
*
STRAYS   RES      0  (STARTS ORDINARY STRAY DATA BLK POINTERS).
LBLOCK   EQU      STRAYS            LOOP CTRL BLK FOR TRICKY OPERATORS
FDEFPTR  DATA     0                 FUNCTION DESCRIPTOR.
XTEMP    DATA     0                 INDEX OR COORDINATE.
NILCK    DATA     0
LFARG    DATA     0                 LEFT ARG.
RTARG    DATA     0                 RIGHT ARG.
RESULT   DATA     0                 RESULT.
NSTRAYS  EQU      %-STRAYS          =NO.OF ORDINARY STRAY DB PTRS.
 SPACE 2
*
*  (INSERT UNIQUE STRAY DATA BLK PTRS. HERE)
*
DBROOT   DATA     0                 ROOT PTR FOR LIST OR FUNC.DESCRIPTOR
DBSERIES DATA     0                 PTR INTO A LIST OR FUNC.DESCRIPTOR
GRAFPNTR DATA     0                 GRAPHICS SPECIAL BLOCK.
CURRCS   DATA     0                 PTS AT CURRENT CODESTRING DATA BLK,
*                                     AT ITS 'OFFSET' WD--I.E. HDR + 2.
 SPACE 2
STRAYBLK EQU      %-STRAYS          TOTAL SIZE OF STRAY BLOCK.
*
*  END OF STRAY DATA BLOCK POINTER REGION.  ****************************
*
 SPACE 3
EREGS    RES      8                 R1 - R6 SAVED DURING ERR-CTRL TEST.
ERRLOC   EQU      EREGS+6           ERR LOC (CURRLINO,NAMEPTR) OR 0,JUNK
ERRNUM   EQU      EREGS+7           LATEST RECORDED ERROR NUMBER OR 0.
 SPACE
ERRORID  RES      1                 ERROR I.D. (INTERNAL).
 SPACE
ELINK    RES      1                 LINK HOLDER DURING ERR HANDLING.
 SPACE
GOSTATE  RES      1                 GO-STATE FOR STATE-INDIC CLEARANCE.
 SPACE
BRNVAL   RES      1                 ERR-CTRL BRANCH VALUE OR NEGATIVE.
 SPACE
OFFSET   RES      1                 OFTEN CONTAINS BYTE OFFSET TO LATEST
*                                     BYTE SCANNED IN CODESTRING.
*
WHATERR  RES      1                 HOLDS ERROR INFO WHEN DIAGNOSTIC IS
*                                     NEEDED, SEE FOR INSTANCE 'EXERR'.
*
LINKOLAY RES      1                 LINK HOLDER FOR OVERLAY SWITCHING.
*
LINKCS   RES      1                 LINKAGE TO CODESTRINGER.
*
ERRCOL   RES      1                 BYTE ADDR.OF ERR COLUMN IN IMAGE.
*
HICOL    RES      1                 INDICATES HI COLUMN IN IMAGE.
*
CONSTKEY RES      1                 BYTE ADDR.OF 1ST CHAR OF CONSTANT.
*
OFFSETK  RES      1                 PTR TO CODESTR.DESIG. BEFORE CONST.
*
SYMT     RES      1                 PTS AT 1ST WD OF SYMBOL TABLE.
*
NAMEPTR  RES      1                 PTR INTO SYM TBL (AN OFFSET).
*
SYMTSIZE RES      1                 HOLDS # DBLWD ENTRIES IN SYMBOL TBL.
*
NSYMTWDS RES      1                 TWO TIMES SYMTSIZE.
*
FREETOTL DATA     0                 HOLDS TOTAL AMT OF FREE SPACE GIVEN
*                                     BY THE FREE TABLE ENTRIES.
LINKGC   RES      1                 LINKAGE FOR GARBAGE COLLECTOR.
*
LINKWS   RES      1                 LINKAGE FOR WORKSPACE MGMT ROUTINES.
 SPACE
CXSCRTCH RES      4
 SPACE
CONSTTYP RES      1
 SPACE
NSPILLED RES      1
 SPACE
NAMEWDS  RES      1                 TEMP FOR ACQNAME
 SPACE
FBOUNDS  RES      MAXFRENS+1        BOUNDS FOR GARBAGE COLLECTION.
FAQMS    RES      MAXFRENS+1        ACCUMS FOR GARBAGE COLLECTION.
 SPACE
NR2MOVE  RES      1                 # REGIONS TO MOVE FOR GARB. COLL.
 SPACE
GCTEMP   RES      1                 TEMP FOR GARBCOLL
 SPACE
XSEGBRK  DATA     0                 USED TO DETECT BREAK DURING
*                                     EXECUTION SEGMENT OPERATION.
 SPACE                                                                  U03-0006
OLDMODE  RES      1                 HOLDS MODE INFO DURING FUN DEFN.    U03-0007
 SPACE
QUIETFLG RES      1                 = 0 IF SAVED MSG TO BE DISPLAYED.
 SPACE
CATCHTBL DATA     -1                CATCH TABLE: VAR.NAME PTR # 1
         RES      1                              FUN.NAME PTR # 1
         DATA     -1                             VAR.NAME PTR # 2
         RES      1                              FUN.NAME PTR # 2
 SPACE
OBSFLAG  DATA     0                 OBSERVE-CMD FLAG (0=NO & NEG.=YES).
OBSERVE  RES      1                 OBSERVATION SETTING (0=NO & -1=YES).
OBSAVE   RES      16                REG.SAVE AREA DURING AN OBSERVATION.
 SPACE
         BOUND    8    SOME COPY CONTEXT
COPYSAVE RES      16        COPY    REG SAVE & SCRATCH.
BACKUP   RES      1         COPY    COPY SYM TBL RE-SCAN FLAG.
BLANKCNT RES      1         COPY    # HOLES LEFT IN ACTIVE SYM TBL.
COPYBASE RES      1         COPY    LOC OF COPY DATA REGION IN COPY WS.
COPYHOME RES      1         COPY    LOC OF COPY DATA REGION IN ACTIVE WS
COPYSIZE RES      1         COPY    # WDS COPY DYN. OR COPY DATA REGION.
CORVSFIL RES      1         COPY    = 0 (CORE-COPY) = -1 (FILE COPY).
CSYMT    RES      1         COPY    LOC OF COPIED SYM TBL.
DISPLAC  RES      1         COPY    HOLDS DISPLACEMENT VALUE.
LINKCY   RES      1         COPY    LINK HOLDER FOR COPY WORK.
LINKWY   RES      1         COPY    LINK HOLDER WHILE WINDOWING.
NAMERKEY RES      1         COPY    KEY FOR NAME RECORD ACCESS.
 SPACE
GARBSAVE RES      16                REG SAVE FOR GARBCOLL & OTHERS.
 SPACE
DREFSAVE RES      6                 REG SAVE FOR DREF.
 SPACE
LOCNEED  RES      1                 LOC NEEDED FOR EXPANDING COMMON.
NEWBOUND EQU      LOCNEED           LOC NEEDED FOR EXPANDING DYNAMIC.
 SPACE
BLKWANTD RES      1                 SIZE OF NEW DATA BLK FOR ALOCBLK.
STRAPOPT DATA     7                 DEFAULT 7-CHAR READ ON GRAF INPUT.
 PAGE
************************************************************************
 SPACE 2
Z        SET      %-CONTEXT@        SIZE OF CONTEXT MODULE IN HEX.
 SPACE
Z        SET      Z+Z/10*6+Z/100*96+Z/1000*1536  SIZE IN DECIMAL.
 SPACE 2
         END

