************************************************************************
*                                                                      *
*                 INITIALIZATION                                       *
*                                                                      *
*                                                                      *
************************************************************************
         TITLE    'C00 USER DELTA:  8/01/74'
ALPHA    DSECT    0                 DECLARE CONTEST CONTROL SECTION.
*                                  THIS PREVENTS FPT'S FROM BEING
*                                  INSERTED BEFORE DELTAS TEMP STACK
*                                  IN THE CONTEXT AREA
CLOSE%XX COM,12,20 X'041',CLOSE%FPT
EXECUTE  COM,12,20 X'049',5         M:TRTN RETURN FROM TRAP
OPEN%CAL COM,12,20 X'041',OPEN%FPT
PRINT    COM,12,20 X'041',PRNTFPT
SET%ACCESS        ;
         COM,12,20 X'048',ACCESS%FPT    M:SMPRT SET MEMORY PROTECTION
WRITE%UC COM,12,20 X'041',UCWTFPT
*
WRT%UC  CNAME                      WRITES TEXTC MESSAGES
        PROC
        LI,1     AF(1)             BUFFER ADR
        LB,2     AF(1)             BYTE COUNT
        LI,3     1                 BYTE DISPLACEMENT
         WRITE%UC                   WRITE CAL
         PEND
*
         PAGE
DELTA%PROCEDURE   ;
         CSECT    1                 PROTECTION TYPE 1 FOR PROCEDURE
DELTA%BASE        ;
         EQU      %
         DEF      DEL
DEL      EQU      DELTA%BASE
         DEF      T:DTRAP           TRAP ENTRY POINT
         REF      J:JIT
         REF      J:INTENT          ANALZ/MONFIX ENTRY TABLE LOC
         REF      J:EUP,J:TCB,J:CLM
         REF      J:START
         REF      M:XX
         REF      M:UC
         SYSTEM   SIG7FDP                                               00001000
         REF      FPMC
         REF      JX:CMAP
         REF      J:JAC
         REF      J:ABC             ABORT CODE, FIRST BYTE
         SREF     J:ALB             LAST BRANCH ADDRESS
         REF      J:ASSIGN          LIMIT FLAGS IN BITS 23 THRU 31
         REF      ERO               ERROR OVERRIDE ADDRESS
         PAGE
UTSPROC  SET      0
S69PROC  SET      1
         SYSTEM   UTS
         SYSTEM   BPM
*                                                                       00002000
* GIVE EACH ALPHABETIC & NUMERIC CHARACTER ITS EBCDIC VALUE             00003000
*                                                                       00009000
A        EQU      'A'                                                   00010000
B        EQU      'B'                                                   00011000
C        EQU      'C'                                                   00012000
D        EQU      'D'                                                   00013000
E        EQU      'E'                                                   00014000
F        EQU      'F'                                                   00015000
G        EQU      'G'                                                   00016000
H        EQU      'H'                                                   00017000
I        EQU      'I'                                                   00018000
J        EQU      'J'                                                   00019000
K        EQU      'K'                                                   00020000
L        EQU      'L'                                                   00021000
M        EQU      'M'                                                   00022000
N        EQU      'N'                                                   00023000
O        EQU      'O'                                                   00024000
P        EQU      'P'                                                   00025000
Q        EQU      'Q'                                                   00026000
R        EQU      'R'                                                   00027000
S        EQU      'S'                                                   00028000
T        EQU      'T'                                                   00029000
U        EQU      'U'                                                   00030000
V        EQU      'V'                                                   00031000
W        EQU      'W'                                                   00032000
X        EQU      'X'                                                   00033000
Y        EQU      'Y'                                                   00034000
Z        EQU      'Z'                                                   00035000
*                                                                       00036000
*                                                                       00038000
#0       EQU      '0'                                                   00039000
#1       EQU      '1'                                                   00040000
#2       EQU      '2'                                                   00041000
#3       EQU      '3'                                                   00042000
#4       EQU      '4'                                                   00043000
#5       EQU      '5'                                                   00044000
#6       EQU      '6'                                                   00045000
#7       EQU      '7'                                                   00046000
#8       EQU      '8'                                                   00047000
#9       EQU      '9'                                                   00048000
#@       EQU      '%'                                                   00049000
*                                                                       00050000
* MISCELLANEOUS SYMBOLS FOR USE IN DATA, RES, AND BOUND PSEUDO-OPS      00051000
*                                                                       00052000
BT       EQU      1                                                     00053000
HW       EQU      2                                                     00054000
FW       EQU      4                                                     00055000
DW       EQU      8                                                     00056000
ONEPAGE  EQU      2048                                                  00057000
*                                                                       00058000
* SPECIAL SYMBOLS USED IN GENERATING THE SYMBOL TABLE                   00059000
*                                                                       00060000
#%       EQU      '%'                                                   00061000
#S:      EQU      ';'                                                   00062000
         PAGE
*
*                 ENTRY POINTS FROM MONITOR
TRAPENT  B        T:DTRAP
BREAKENT B        T:DBRK
EXITENT  B        ABORTENT
*                                                                       01929000
*                                                                       01955000
* DIFFERENT INITIALIZATION STEPS BEFORE STARTING THE SCANNER            01956000
*                                                                       01957000
*                                                                       01958000
* RESET EVERYTHING - USED FOR FRESH START                               01959000
*                                                                       01960000
DRINIT   LI,0     #CRLF             PUT TTY ON A NOW LINE               01961000
         BAL,1    DRPRTSML                                              01962000
         BAL,7    DUMPBUF           DUMP WAITING PUTPUT
         B        PMESS             GET A NEW COMMAND LINE
* RESET INTERNAL STATE - USED FOR CONTINUING A RELATED SET OF OPERATIONS01964000
*                                                                       01965000
DRINITA  LI,8     0                 RESET MASTER WORD                   01966000
         STW,8    DROPENSW          RESET OPEN REGISTER SWITCH          01966500
*                                                                       01967000
* RESET COUNTS AND FLAGS - USED FOR STARTING A NEW EXPRESSION           01968000
*                                                                       01969000
DRINITB  LI,5     0                 INITIALIZE FIELD NUMBER             01970000
         LI,9     0                 RESET FIELD FLAGS                   01971000
         LI,10    0                 ZERO ELEMENT COUNT                  01972000
         LI,11    0                 ZERO COMMA COUNT                    01973000
         STW,5    FLDREG            RESET FIELD PRESENCE FLAGS
         STW,11   DRLSTOPR          SET LAST ARITHMETIC OPERATOR TO PLUS01973100
         STD,11   DREXPRS           RESET EXPRESSION STORAGE            01973200
         STD,11   DREXPRS+2                                             01973300
*                                                                       01974000
* RESET ARGUMENT PARAMETERS - USED FOR STARTING A NEW TERM              01975000
*                                                                       01976000
DRINITC  LI,3     0                 ZERO VALUE STORAGE REGISTER         01977000
         STD,3    DRCHRBUF          INITIALIZE SYMBOL STORAGE LOCATION  01978000
         STW,3    DOTMODE           INITIALIZE DOTMODE TO 'OFF'
         LD,6     DRSCNSET          INITIALIZE THE SCANNER              01979000
*                                                                       01981000
*                                                                       01982000
         PAGE                                                           01983000
************************************************************************
*                                                                      *
*                                                                      *
*                 COMMAND PARSE                                        *
*                                                                      *
*                                                                      *
************************************************************************
*                                                                       01908000
* REGISTER ASSIGNMENTS DURING INPUT SCANNING PAASE                      01909000
*                                                                       01910000
*   R0  - INPUT CHARACTER                                               01911000
*   R1  - TEMPORARY STORAGE                                             01912000
*   R2  - TEMPORARY STORAGE                                             01913000
*   R3  - VALUE OF CURRENT TERM : IF NON-SYMBOLIC                       01914000
*   R4  - RETURN LINK FOR SUBROUTINE CALLS                              01915000
*   R5  - FIELD NUMBER BEING EVALUATED                                  01916000
*   R6  - COUNT OF CHARACTERS IN CURRENT TERM                           01917000
*   R7  - CONVERSION MODE OF CURRENT TERM                               01918000
*   R8  - FLAGS USED IN COMPUTING CURRENT EXPRESSION                    01919000
*   R9  - BITS SET TO TELL WHICH FIELDS WERE USED IN CURRENT EXPRESSION 01920000
*   R10 - COUNT OF ELEMENTS IN CURRENT EXPRESSION                       01921000
*   R11 - COUNT OF COMMA'S USED IN CURRENT EXPRESSION                   01922000
*   R12 - BIT WORD OF SYMBOL TO BE FOUND OR APPENDED TO TABLE           01923000
*   R13 - VALUE OF SYMBOL IF IT IS BEING ADDED TO TABLE                 01924000
*   R14 - SYMBOL NAME : MAY BE AS MANY AS 8 CHARACTERS LONG             01925000
*   R15 - NAME IS HERE ONLY DURING SEARCHES, OTHERWISE IT IS IN MEMORY  01926000
*                                                                       01927000
*                                                                       01984000
* MAIN SCANNING ROUTINE                                                 01985000
*                                                                       01986000
DRSCAN1  BAL,4    INPTCHAR          GET NEXT CHAR IN MESSAGE
         AI,7     0                 CHECK FOR BEING IN EBCDIC MODE      01988000
         BLEZ     DRINPEBD          YES, IT IS
         CI,0     X'B1'             SPECIAL CHECK FOR BACKSLASH
         BNE      %+3               NO
         LI,4     DRBSLASH          YES,GO TO BCKSLSH RTN AFTER DREVAL
         B        DREVAL            EVALUATE
         CI,0     K80               CHECK CHARACTER TYPE                01991000
         BANZ     DRBUILD,7         IS IT A LETTER OR DIGIT
         CLM,0    DRALPHAS          NO - KEEP CHECKING                  01993000
         BCR,9    DRBUILD,7         CHECK FOR COLON, SHARP, AT SIGN
         CI,0     #DOLLAR           NOT ONE OF THOSE - CHECK DOLLAR SIGN01995000
         BE       DRBUILD,7         IS THAT WHAT IT IS?                 01996000
         CI,8     DRDEFMOD          NO - CHECK FOR SYMBOL DEFINE MODE   01996200
         BANZ     DRDEFCHK          BRANCH IF WE ARE IN THAT MODE
         CI,0     X'4D'             CHECK FOR LEFT PAREN-MODE SET
         BE       CHNGMODE          YES, GO DO IT
         LI,2     K3F               MUST BE A PUNCTUATION CHARACTER     01997000
         AND,2    0                 SCRUB OFF ALL BUT LOW 6 BITS        01998000
         LB,1     DRKEY1,2          GET CORRESPONDING INDEX             01999000
         LH,4     DRPOINT1,1        GET RELATIVE ADR OF ROUTINE
         AI,4     DELTA%BASE        ADD BASE ADR
         CI,1     DRVAL1            CHECK INDEX                         02001000
         BL       DREVAL            SHOULD WE EVALUATE?                 02002000
         B        0,4               NO - GO PROCESS INPUT               02003000
         PAGE                                                           02005000
************************************************************************
*                                                                      *
*                                                                      *
*                 FORMATTING ROUTINES - INPUT & OUTPUT                 *
*                                                                      *
*                                                                      *
************************************************************************
*                                                                       02004000
*                                                                       02006000
* ROUTINE TO INPUT INTEGERS                                             02007000
* THIS ROUTINE HAS TWO ENTRY POINTS                                     02008000
*   DRINPNUM                                                            02009000
*     THIS IS THE INITIAL ENTRY WHEN SCANNING IS STARTED                02010000
*     IF THE INPUT IS A SYMBOL, THE MODE IS AUTOMATICALLY SWITCHED      02011000
*   DRINPINT                                                            02012000
*     THIS IS THE ENTRY FOR INTEGER INPUT                               02013000
*     ANY NON NUMERIC INPUT INDICATES AN ERROR                          02014000
*                                                                       02015000
DRINPNUM AI,6     0                 TEST CHARACTER COUNT                02016000
         BG       DRINPINT          TOO LARGE?                          02017000
         STB,0    DRCHRBFX,6        NO - STORE CHARACTER IN SYMBOL BUFFE02018000
         AI,6     1                 INCREMENT CHARACTER COUNT           02019000
DRINPINT AI,0     -KF0              SUBTRACT EBCDIC BASE VALUE          02020000
         BGEZ     DRCOMPIT          IS THIS CHARACTER A NUMBER?         02021000
         CI,7     #NUMTYPE          NO - CHECK FOR NUMBER TYPE          02022000
         BNE      DRVALERR          IS IT?                              02023000
DRINPSPC LI,7     #SYMTYPE          YES - SET TO SYMBOL TYPE            02024000
         AI,6     0                 TEST SIZE OF SYMBOL                 02025000
         B        DRSYMBLX          GO FINISH CHECKING                  02026000
DRCOMPIT MI,3     10                MULTIPLY CURRENT VALUE BY 10        02027000
         BOV      DRVALERR          DID AN OVERFLOW OCCUR
         AW,3     0                 NO                                  02029000
         BNOV     DRSCAN1           IS TOTAL VALUE CORRECT
         CW,3     DRBIT0            NO, MAX NEGATIVE NUMBER
         BNE      DRVALERR          NO - ERROR
         B        DRSCAN1           YES - OK
*                                                                       02032000
         PAGE                                                           02033000
*                                                                       02034000
* ROUTINE TO HANDLE SYMBOLIC INPUT                                      02035000
*                                                                       02036000
DRINPSYM STB,0    DRCHRBFX,6        PUT NEW CHARACTER IN BUFFER         02037000
         AI,6     1                 INCREMENT CHARACTER INDEX           02038000
DRSYMBLX BLEZ     DRSCAN1           IS THE SYMBOL TOO LONG?             02039000
         B        DRVALERR          YES                                 02040000
         PAGE                                                           02061000
* ROUTINE TO HANDLE HEXADECIMAL INPUT                                   02048000
*                                                                       02049000
DRINPHEX AI,0     -KF0              CONVERT TO HEXADECIMAL              02050000
         BGEZ     DRFIXIT           IS THIS A NUMBER?                   02051000
         CLM,0    DRHEXAS           NO!                                 02052000
         BCS,9    DRVALERR          IS IT A LETTER A-F?                 02053000
         AI,0     KF0-KC1+10        YES - CONVERT TO THE CORRECT VALUE  02054000
DRFIXIT  EQU      %
         CW,3     OVFLW%MASK        CHECK FOR OVERFLOW
         BCS,4    DRVALERR          IS THERE ANY?                       02056000
         SLS,3    4                 SHIFT ACCUMULATED VALUE
         AW,3     0                 ADD NEW CHARACTER                   02058000
         B        DRSCAN1           GO GET MORE                         02059000
*                                                                       02060000
* EBCDIC INPUT ROUTINE                                                  02063000
*                                                                       02064000
DRINPEBD CI,0     #SQUOTE           CHECK FOR SINGLE QUOTE              02065000
         BNE      DRINPEBM          WAS IT?                             02066000
         LI,7     #SPCTYPE          YES - SET MODE FOR SPECIAL INPUT    02067000
         B        DRSCAN1           SCAN FOR PUNCTUATION CHARACTER      02068000
DRINPEBM CW,3     DREBDMSK          CHECK NUMBER OF CHARACTERS INPUT    02069000
         BCS,4    DRVALERR          TOO MANY?                           02070000
         SCS,3    8                 NO - MOVE CURRENT VALUE OVER        02071000
         OR,3     0                 PUT NEW CHARACTER IN STRING         02072000
         B        DRSCAN1           CONTINUE BUILDING THE EBCDIC STRING 02073000
*                                                                       02074000
*                                                                       02266000
* HEXADECIMAL PRINT ROUTINE                                             02274000
*                                                                       02275000
DRPRTHXA LI,0      #PERIOD
         STW,4    TOUT
         BAL,4    TYPOUT
DRPRTHEX LI,1     -X'800'+4         SET UP HEXADECIMAL SHIFT PLUS COUNT 02278000
DRPRTHXM LI,2     0                 CLEAR UPPER REGISTER                02279000
         SLD,2    0,1               MOVE IN ONE CHARACTER               02280000
DRPRTHXO AI,2     0                 CHECK TO SEE IF ZEROES STILL COMING 02281000
         BNEZ     DRPRTHXR          ARE THEY?                           02282000
         AI,1     K100              YES - INCREMENT OUTPUT COUNTER      02282500
         AI,3     0                 CHECK PRINT ITEM                    02283000
         BNEZ     DRPRTHXM          IS ANYTHING LEFT?                   02284000
         LI,1     0                 SET END TEST SO THAT IT FAILS       02284500
         B        DRPRTHXR          NO - GO PRINT A ZERO                02285000
DRPRTHXN LI,2     0                 RESET UPPER REGISTER                02286000
         SLD,2    0,1               MOVE NEXT DIGIT INTO UPPER REGISTER 02287000
DRPRTHXR LB,0     DRDIGITS,2        GET EBCDIC EQUIVALENT               02288000
         BAL,4    TYPOUT
         AI,1     K100              ADVANCE OUTPUT COUNTER              02290000
         BLZ      DRPRTHXN          ARE THERE ANY DIGITS LEFT TO PRINT? 02291000
         B         *TOUT            NO, RETURN
*                                                                       02293000
*                                                                       02294000
* INTEGER PRINT ROUTINE                                                 02295000
*                                                                       02296000
DRPRTINT LI,1     0                 SET DIGIT COUNT=0                   02297000
         STW,4    TOUT
         AI,3     0                 CHECK PARITY OF NUMBER              02298000
         BGEZ     DRPRTINL          WAS IT NEGATIVE?                    02299000
         LI,0     #MINUS            YES - PRINT A MINUS SIGN            02300000
         BAL,4    TYPOUT
         LAW,3    3                 GET ABSOLUTE VALUE OF NUMBER        02302000
DRPRTINL LI,2     0                 ZERO UPPER PART OF NUMBER           02303000
         AI,1     1                 INCREMENT COUNT                     02304000
         DW,2     DRD10             DIVIDE VALUE BY 10                  02305000
         STB,2    DRVALSAV,1        SAVE REMAINDER                      02306000
         BNEZ     DRPRTINL          IF QUOTIENT NON-ZERO, GO SOME MORE  02307000
DRPRTIN1 LB,0     DRVALSAV,1        GET MOST SIGNIFICANT DIGIT LEFT     02308000
         AI,0     KF0               ADD OFFSET TO MAKE IT PROPER EBCDIC 02309000
         BAL,4    TYPOUT
         BDR,1    DRPRTIN1          ANY DIGITS LEFT TO PRINT?           02311000
         B        *TOUT             NO-RETURN
*                                                                       02313000
*                                                                       02314000
* EBCDIC PRINT ROUTINE                                                  02315000
*                                                                       02316000
DRPRTEBD LW,0     3                 MOVE VALUE TO REGISTER 0            02317000
         STW,4    TOUT              SAVE RETURN ADR
         LI,1     4                 SET UP INDEX FOR LOOP               02318000
         LI,15    0
PTEBD10  EQU      %
         CB,15    0                 IF BYTE GOING OUT IS 0 (END OF
         BNE      %+2               MESSAGE TO COC), SUB BLANK (.40)
         OR,0     Y4
*
         SCS,0    8                 PUT DESIRED CHARACTER IN LOWER 8 BIT02319000
         BAL,4    TYPOUT
         BDR,1    PTEBD10
         B        *TOUT             RETURN
*                                                                       02323000
*                                                                       02346000
         PAGE
* ROUTINE TO PRINT A FLOATING POINT NUMBER
*   INPUT
*     R3: SHORT F.P. VALUE; OR 1ST WORD OF LONG F.P. VALUE
*     FLOAT2ND: 2ND WORD OF LONG F.P. VALUE
*   LINK: R4
*   TEMPORARY REGISTERS: R0,R1.  (R3-R11 ARE USED, BUT RESTORED AFTER)
*
*   NOTE: SINCE THIS CODE WAS MOSTLY 'LIFTED' FROM TWO FORTRAN
*         PROCESSORS, THE PARAMETERIZATION OF REGISTERS, CHARACTER
*         VALUES, ETC., DOES NOT FOLLOW THAT TO BE FOUND ELSEWHERE
*         THROUGHOUT DELTA.
*
*
*     REGISTER  DEFS FOR F.P. OUTPUT ROUTINES
*
CHAR     EQU      0                 CHARACTER
1STFPREG EQU      3                 FIRST F.P. REG NO.
X3       EQU      3                 INDEX
LINK     EQU      4                 SUBR LINK (MUST BE 4: TYPOUT)
RL       EQU      5                 SUBR LINK
DPOS     EQU      6                 DIGIT POSITION (+ TO RT OF PT)
DCT      EQU      7                 DIGIT COUNT
XT       EQU      8                 FRACTION TEMP
         OPEN     R
R        EQU      8                 FRACTION TEMP (HI ORDER)
R1       EQU      9                 FRACTION TEMP (LO ORDER)
R2       EQU      10                BINARY EXPONENT
R3       EQU      11                DECIMAL EXPONENT
NTHFPREG EQU      11                LAST F.P. REG NO.
NFPREGS  EQU      NTHFPREG-1STFPREG+1   NUMBER OF F.P. REGS
*
*  FLOATING POINT OUTPUT CONVERSION ROUTINES
*
*
*     PRINT SHORT F.P. VALUE
*
DRPRTFS  LCI      NFPREGS           SAVE ALL F.P. REGS
         PSM,1STFPREG  DELSTK
         LI,CHAR  'E'               SET UP FOR FS PRINT: EXP CHAR = 'E',
         LI,DCT   6                     NUMBER OF DIGITS = 6,
         LI,R1    0                     2ND WORD OF VALUE = 0.
         B        REAL0
*
*     PRINT LONG F.P. VALUE
*
DRPRTFL  LCI      NFPREGS           SAVE ALL F.P. REGS
         PSM,1STFPREG  DELSTK
         LI,CHAR  'D'               SET UP FOR FL PRINT: EXP CHAR = 'D',
         LI,DCT   15                    NUMBER OF DIGITS = 15,
         LW,R1    FLOAT2ND              RETRIEVE 2ND WORD OF VALUE.
REAL0    STW,CHAR EXPCHAR           STORE EXPONENT CHAR ('D' OR 'E')
         STW,DCT  DCOUNT            STORE DIGIT COUNT (6 OR 15)
         STW,3    CENTRAL1          STORE 1ST WORD OF F.P. VALUE
         STW,R1   CENTRAL2          STORE 2ND WORD OF F.P. VALUE
*     SETUP DONE; TEST SIGN OF VALUE
         LCD,XT   CENTRAL1          IF THE NUMBER
         BNEZ     REALJ5              IS ZERO,
REALJ4   LW,CHAR  ='0.0'              OUTPUT '0.0'
         BAL,1    DRPRTSML
         B        REAL22
REALJ5   RES      0
         BLZ      REAL1             IF THE NUMBER IS NEGATIVE,
         STD,XT   CENTRAL1            SAVE THE COMPLEMENT,
         LI,CHAR  C'-'                AND OUTPUT
         BAL,LINK TYPOUT              A MINUS SIGN.
REAL1    CW,XT    =X'00FFFFFF'      IF VALUE IS DIRTY ZERO,
         BANZ     REALJ6
         AI,XT+1  0
         BEZ      REALJ4                TREAT IT LIKE HONEST ZERO.
REALJ6   BAL,LINK UNFLOAT           UNFLOAT AND ROUND THE REAL NUMBER
         LW,XT    PWR10             IF DECIMAL POINT WILL FIT
         BLZ      REAL4               WITHIN THE NUMBER, OUTPUT
         CW,XT    DCOUNT              AS 'F'; ELSE AS 'E'
         BLE      REAL2
*     HERE TO OUTPUT IN 'E' FORMAT
REAL4    MTW,-1   PWR10             ADJUST EXPONENT SO NUMBER
         LI,DPOS  -1                  WILL PRINT AS X.XXX IN 'E' FORMAT
         B        REAL3
*     HERE TO OUTPUT IN 'F' FORMAT.
REAL2    LI,LINK  0
         LCW,DPOS PWR10
         STW,LINK PWR10             CLEAR PWR10 TO INDICATE  'F' FORMAT
REAL3    LD,XT    CENTRAL1
         LW,DCT   DCOUNT
         B        REAL6
*     ELIMINATE LAST DIGIT PRINTED BY MPY BY 10
REAL5    LD,XT    CENTRAL1
         SLD,XT   2
         AD,XT    CENTRAL1
         SLD,XT   1
         AND,XT   =X'7FFFFFFF'
         STD,XT   CENTRAL1          NEW FRACTIONAL PART OF CENTRAL1,2
*     IF ALL OF INTEGRAL PORTION IS OUTPUT, OUTPUT DECIMAL POINT
REAL6    CI,DPOS  0
         BNE      REAL7             NOT CORRECT POSITION FOR DEC. PT.
         LI,CHAR  C'.'              OUTPUT
         BAL,LINK TYPOUT              A DECIMAL POINT.
REAL7    SLD,XT   -2                MPY CENTRAL1,2 BY 10 TO
         AD,XT    CENTRAL1            CONVERT NEXT FRACTIONAL
         SCS,XT   4                   DIGIT TO AN INTEGER
         OR,XT    =C'0'
         LW,CHAR  XT
         BAL,LINK TYPOUT            OUTPUT DIGIT
REAL8    AI,DPOS  1                 BUMP DIGIT POSITION
         BDR,DCT  REAL5             DECREASE COUNT AND RETURN IF MORE
         AI,DPOS  0                 DPOS >= 0.
         BGZ      REAL20            IF IT'S ZERO, WE HAVEN'T OUTPUT
         LI,CHAR  '.'                 THE DECIMAL POINT YET, AND IT'S
         BAL,LINK TYPOUT              TIME TO DO SO NOW.
REAL20   LW,CHAR  EXPCHAR           'D' OR 'E' CHAR FOR EXPONENT
         LW,XT    PWR10             DON'T PRINT 'E' IF 'F' FORMAT
         BEZ      REAL22              WAS USED.
REAL21   BAL,LINK TYPOUT            OUTPUT EXPONENT CHAR
         LCI      NFPREGS           RESTORE F.P. REGS
         PLM,1STFPREG  DELSTK
         LW,3     PWR10             OUTPUT EXPONENT VALUE AS AN
         B        DRPRTINT            INTEGER; THEN EXIT VIA DRPRTINT.
REAL22   LCI      NFPREGS           RESTORE F.P. REGS
         PLM,1STFPREG  DELSTK
         B        0,LINK            EXIT
         PAGE
*
*  UNFLOAT
*
*                 UNPACKS A FLOATING POINT (LONG) NUMBER IN CENTRAL1,2
*                 INTO A FRACTION (IN CENTRAL1,2) AND DECIMAL EXPONENT
*                 (IN PWR10) SUCH THAT
*
*                        X = F*(10**E)
*                        0.1 <= F < 1
*
*                 WHERE, F = (2**(-31))*CENTRAL1(BITS 1-31)
*                           +(2**(-62))*CENTRAL2(BITS 0-30) ,
*                 AND    E = PWR10
*
UNFLOAT  RES      0
         LB,R2    CENTRAL1          HEX EXPONENT, EXCESS X'40'
         SLS,R2   2
         AI,R2    -4*64             CONVERT TO BINARY EXPONENT
         LD,R     CENTRAL1
         SLD,R    8
5Z1      AI,R     0                 NORMALIZE MANTISSA BINARILY
         BLZ      5Z2
         SLD,R    1
         AI,R2    -1
         B        5Z1
5Z2      SLD,R    -1
         LI,R3    0
*
*                 HENCEFORTH, THE VALUE OF THE NUMBER
*                 BEING OPERATED UPON IS
*
*                        F*(10**E)
*
*                 WHERE, F = G*(2**B)
*                        .5 <= G < 1
*                        G = (2**(-31))*R + (2**(-62))*R1(BITS 0-30)
*                        B = R2
*                        E = R3
*
         LI,X3    NTENS             = NUMBER OF TEN POWERS PROVIDED
         BAL,RL   TESTFRAC          TEST RANGE OF FRACTION
         BL       FRACLOW           IF F<.1, FRACTION TOO LOW
*
FRACHIGH STW,R2   ETEMP             SAVE BINARY EXPONENT
         SW,R2    TENE,X3           F>=1, FRACTION TOO HIGH
         CI,R2    -4                SCALE DOWN BY POWER OF TEN,
         BL       5Z3               UNLESS POWER TOO BIG
         STD,R    CENTRAL1          SAVE CURRENT VALUE
         CW,R     TENF,X3           DIVIDE FRAC BY FRAC OF TEN PWR
         BL       5Z4
         SLD,R    -1
         AI,R2    1
5Z4      SLD,R    -1
         DW,R     TENF,X3
         STW,R1   TEMP
         LW,R1    TENF,X3
         SLD,R    -1
         DW,R     TENF,X3
         SLS,R1   1
         LW,R     TEMP
         AW,R3    TENP,X3           ADJUST DECIMAL EXPONENT ACCORDINGLY
         BAL,RL   TESTFRAC          TEST RANGE OF RESULTING FRAC
         BG       FRACHIGH          STILL TOO HIGH, TRY AGAIN
         LD,R     CENTRAL1          TOO LOW, RESTORE OLD VALUE,
         SW,R3    TENP,X3               RESTORE OLD DECIMAL EXPONENT
5Z3      LW,R2    ETEMP             RESTORE OLD BINARY EXPONENT
         BDR,X3   FRACHIGH          TRY SCALING WITH SMALLER TEN PWR
*
FRACLOW  STW,R2   ETEMP             F<.1, TRY SCALING UP
         AW,R2    TENE,X3
         CI,R2    1
         BG       5Z5               UNLESS POWER TOO BIG
         STD,R    CENTRAL1          SAVE CURRENT FRAC
         SLS,R1   -1                MULTIPLY FRAC BY FRAC OF TEN PWR
         MW,R     TENF,X3
         SLD,R    1
         STW,R    ADLOC+1
         LW,R1    CENTRAL1
         MW,R     TENF,X3
         AD,R     ADLOC
         CW,R     =X'20000000'
         BANZ     5Z6
         SLD,R    1
         AI,R2    -1
5Z6      SLD,R    1
         SW,R3    TENP,X3           ADJUST DECIMAL EXPONENT ACCORDINGLY
         BAL,RL   TESTFRAC          TEST RANGE OF FRACTION
         BL       FRACLOW           STILL TOO SMALL, TRY AGAIN
         LD,R     CENTRAL1          TOO BIG, RESTORE OLD FRACTION
         AW,R3    TENP,X3           RESTORE OLD DECIMAL EXPONENT
5Z5      LW,R2    ETEMP             RESTORE OLD BINARY EXPONENT
         BDR,X3   FRACLOW           TRY SCALING WITH SMALLER TEN PWR
*
TESTFRAC CI,R2    0                 IF F>=1,
         BG      *RL                    RETURN WIH LCC=10
         CI,R2    -3                IF F<.1,
         BL      *RL                    RETURN WITH LCC=01
         BG       FRACOK            IF .1<=F<1, GO TO FRACOK
         CD,R     8TENTHS
         BL      *RL
*
FRACOK   LW,X3    R2                AT THIS POINT,  -3<= R2 <=0
         SLD,R    0,X3              SHIFT FRACTION TO PROPER PLACE
         LW,X3    DCOUNT            ROUND BY .5*10**(-DCOUNT)
         CI,X3    6
         BE       5Z8
         AD,R     ROUND15             = .5*10**(-15)
         B        5Z9
5Z8      AD,R     ROUND6              = .5*10**(-6)
5Z9      EQU      %
         BNOV     5Z7               IF ROUND OVERFLOWS FRACTION,
         LD,R     1TENTH                SET F=.1,
         AI,R3    1                     E := E+1
5Z7      RES      0
         STD,R    CENTRAL1          STORE FRACTION
         STW,R3   PWR10                 AND DECIMAL EXPONENT
         B        0,LINK            EXIT
         PAGE
*
*  POWERS OF TEN
*
*        THE POWERS OF TEN USED FOR BUILDING THE DECIMAL EXPONENT
*        ARE DEFINED IN THE TABLES BELOW.  EACH POWER HAS THREE
*        NUMBERS ASSOCIATED WITH IT: THE NUMBER (P) OF THE POWER,
*        PLACED IN THE TENP TABLE; THE FRACTION (F) AND BINARY
*        EXPONENT (E) PLACED IN THE TENF AND TENE TABLES, RESPECTIVELY.
*        THESE QUANTITIES MUST HAVE THE FOLLOWING PROPERTIES:
*
*                 1 <= P <= 13
*                 F*(2**E) = (2**31)*(10**P)
*                 2**30 <= F < 2**31
*
*
*  CURRENTLY USED VALUES:  1, 4, 13.
*
*
TENP     EQU      %-1
         DATA     1,4,13
NTENS    EQU      %-TENP-1
*
TENE     EQU      %-1
         DATA     4,14,44
TENF     EQU      %-1
         DATA     X'50000000'       = 10      *  2**27
         DATA     X'4E200000'       = 10**4   *  2**17
         DATA     X'48C27395'       = 10**13  *  2**(-13)
*
*
         BOUND    8
1TENTH   DATA     X'0CCCCCCC',X'CCCCCCCE'
8TENTHS  DATA     X'66666666',X'66666666'
ROUND6   DATA     X'00000431',X'BDE82D7C'   = .5 * 10**(-6)
ROUND15  DATA     X'00000000',X'00001204'   = .5 * 10**(-15)
*
         CLOSE    R
         PAGE
* ROUTINE TO PRINT AN EXPRESSION                                        02347000
*   INPUT                                                               02348000
*     R2: TYPE OF PRINT OUT DESIRED                                     02349000
*     R3: INPUT                                                         02350000
*     R8: DEFINED SWITCH                                                02351000
*   LINK : R4                                                           02352000
*   TEMPORARY REGISTERS : R0,R1                                         02353000
*                                                                       02354000
DRPTEXP  STW,3    DR#SEMIQ          SAVE VALUE IN ;Q                    02355000
         CI,2     1                 IS SYMBOLIC PRINTOUT REQUESTED
         BG       DRPRTVEC-2,2      NO, GO PRINT IN SPECIFIED FORMAT
*
         STW,4    DRPTEXP#          SAVE RETURN ADDRESS
         STW,3    DRWRDVAL          SAVE VALUE FOR USE LATER            02363000
         STW,2    DRPRTSW           SAVE MODE TYPE FOR ADDRESS PRINTER  02363250
         LI,4     DRPTEXPS          SET UP RETURN ADDRESS FROM DRSYMPT  02363500
         CW,3     DROPBITS          CHECK FOR OPCODE OR REGISTER BITS   02364000
         BAZ      DRPTEXPI          ARE ANY OF THOSE BITS SET
         LB,1     DRWRDVAL          YES - GET OPCODE FIELD              02366000
         AND,1    M7                SCRUB OFF INDIRECT BIT              02367000
         LH,2     DRWRDVAL          GET REGISTER BITS                   02367100
         AND,2    XF0               SCRUB OFF EXTRA BITS                02367200
         SCS,2    -4                RIGHT JUSTIFY THE REGISTER FIELD    02367300
         LW,6     OPCODES,1         USE OP CODE AS AN INDEX
         CW,6     DROPBITS          CHECK FOR ADDRESS OR MNEMONIC
         BANZ     DRMNEMPT          MNEMONIC. PRINT IT
         B        0,6               ADDRESS.  GO THERE.
DRPTEXPS LI,0     #COMMA            PRINT A COMMA                       02374000
         BAL,4    TYPOUT
         LW,3     2                 MOVE REGISTER VALUE TO R3           02375000
         BAL,4    DRPRTINT          PRINT REGISTER VALUE                02376000
DRPTEXPI LI,0     #2SPACE           PRINT 2 SPACES BEFORE THE ADDRESS   02377000
         BAL,1    DRPRTSML                                              02378000
DRPTEXPA LW,3     DRWRDVAL          CHECK TO SEE IF INDIRECT BIT SET    02379000
         BGEZ     DRPTEXPN          IS IT?                              02380000
         LI,0     #ASTRISK          YES - SEND OUT AN ASTERISK          02381000
         BAL,4    TYPOUT
DRPTEXPN AND,3    DRADMSKL          EXTRACT 20 BIT ADDRESS FIELD        02383000
         LI,4     DRPTEXPD          RETURN ADDRESS FROM PRINT ROUTINE   02384000
         CI,8     DRSOPRBT          CHECK FOR SPECIAL ADDRESS - 20 BIT  02385000
         BE       %+5               YES
         LI,2     0                 NO - CLEAR OUT FOR SHIFTING         02387000
         SCD,2    15                MOVE TAG BITS INTO R2               02388000
         STW,2    DRTAGVAL          SAVE INDEX NUMBER                   02389000
         SCS,3    17                FORM WORD ADDRESS
         LW,2     DRPRTSW           GET CURRENT ADR PRINT MODE
         BAL,4    DRPRTADR          PRINT ADDRESS
         LI,0     -1
         STW,0    SYM%TYPE          RESET SYM%TYPE TO 'NOT SET'
DRPTEXPD LW,4     DRPTEXP#          RESTORE RETURN ADDRESS              02397000
         CI,8     DRSOPRBT          CHECK FOR SPECIAL ADDRESS - 20 BIT  02397100
         BAZ      DRPTEXPT          IS IT
         AI,8     -DRSOPRBT         RESET INDICATOR FLAG                02397300
         B        0,4               RETURN                              02397400
DRPTEXPT LW,3     DRTAGVAL          GET TAG VALUE                       02398000
         BEZ      0,4               IS IT ZERO?                         02399000
         LI,0     #COMMA            NO - SEND OUT A COMMA               02400000
         BAL,4    TYPOUT
         LW,4     DRPTEXP#          GET RETURN ADR AGAIN
         B        DRPRTINT          PRINT A DECIMAL NUMBER AND RETURN   02402000
*                                                                       02407000
* THIS CODE HANDLES THE SPECIAL CASES (BYTE,IMMEDIATE,BRANCH,SHIFT)     02408000
*                                                                       02409000
ACLMIMED AI,1     -X'20'            FORM INDEX
         LW,6     IMDOP,1           GET MNEMONIC
         B        SPECFLAG
TBSINST  AI,1     -X'40'            FORM INDEX
         LW,6     TBSOP,1           GET MNEMONIC
         B        SPECFLAG
CMEBS    AI,1     -X'60'            FORM INDEX
         LW,6     BYTOP,1           GET MNEMONIC
SPECFLAG OR,8     DRSOPRFL          SPECIAL OP CODE FLAG
         B        DRMNEMPT          PRINT MNEMONIC
LCFIINST EQU      %
         LI,6     LCFIOP            BASE OF LCFI INSTRUCTIONS
         B        SPCINDX           GET CORRECT MNEMONIC
LCFINST  EQU      %
         LI,6     LCFOP             BASE OF LCF INSTRUCTIONS
         B        SPCINDX           GET CORRECT MNEMONIC
BCRINST  LI,6     BCROP             BASE ADDRESS OF BCR INSTRUCTIONS
         B        %+2
BCSINST  LI,6     BCSOP             BASE OF BCS INSTRUCTIONS
         CI,2     4                 DO WE KNOW ABOUT THIS ONE
         BG       PRNTSYM           NO, GO PRINT BCR OR BCS
         AI,6     1                 ADJUST INDEX INTO BRANCH CODES
SPCINDX  EQU      %
         AW,6     2                 YES, ADD INDEX TO GET SPECIAL CODE
         LI,4     DRPTEXPI          RETURN ADR AVOIDS OUTPUT OF REG.
PRNTSYM  LW,6     0,6               GET MNEMONIC
         B        DRMNEMPT
SHFTINST LI,6     SHFTOP            BASE ADR OF SHIFT INSTRUCTIONS
         LW,0     DRWRDVAL          GET EXPRESSION
         BLZ      PRNTSYM           INDIRECT SET, PRINT 'S ADR'
         AND,0    DRADMSKS          CLEAR OUT ALL BUT ADDRESS PORTION
         CI,0     K600              LEGAL SHIFT TYPE
         BGE      PRNTSYM           NO, PRINT  AS ABOVE
         AI,6     1                 INCREMENT INTO SPECIAL CODES
         SLS,0    -8                GET TYPE OF SHIF
         AW,6     0                 POSITION ADDRESS
         LW,1     SHFTMSK
         LS,0     DRWRDVAL          GET INDEX AND COUNT
         STW,0    DRWRDVAL          SAVE THEM
         B        PRNTSYM           PRINT IT.
*                                                                       02446000
         PAGE
* ROUTINE TO PRINT AN ADDRESS FIELD                                     02447000
*   INPUT                                                               02448000
*     R3 : ADDRESS TO BE PRINTED (AS A BYTE ADDRESS)                    02449000
*   LINK : R4                                                           02450000
*   TEMPORARY REGISTERS : R0,R1,R2                                      02451000
*                                                                       02452000
DRPRTADR EQU      %
         CI,2     1                 SYMBOLIC OUTPUT MODE
         BGE      DRPRTHXA          NO, HEX OUTPUT
         CI,3     100               YES. CHECK VALUE
         BL       DRPRTHXA          LESS THAN X100-YES, PRINT HEX
         STW,4    DRPRTSAV          SVE RETURN ADR
         LI,5     -1
         LW,2     3                 COMPUTE LIMIT FOR
         SW,2     HEX%OFFSET        SYMBOL SEARCH
         AI,2     -1                *
         STD,2    DRSRCHLM          SAVE LIMITS
         LI,0     FINDVAL           SET UP TO SEARCH ON VALUE
         STW,0    WHCHSRCH
         BAL,4    LOC%SRCH          SEARCH ALL BUT SPECIAL SYMBOLS
         LW,2     DRSRCHLM+1        GET ORIGINAL VALUE
         SW,2     DRSRCHLM          COMPUTE OFFSET
         LW,1     K%OUTMODE         IN CSECT MODE
         BGZ      PRTAG60           YES
         CW,2     HEX%OFFSET        NO, CHECK OFFSET
         BLE      PRTAG70
PRTAG50  EQU      %
         LW,3     DRSRCHLM+1        YES - GET ORIGINAL VALUE            02478000
         LI,0     -1
         STW,0    SYM%TYPE          RESET TO 'NOT SET'
         B        DRPRTAGH          GO PRINT AS CONSTANT
PRTAG60  EQU      %
         AI,5     0                 CHECK IF A CSECT TYPE WAS FOUND
         BLZ      PRTAG50           NONE FOUND, PRINT ABSOLUTE
PRTAG70  EQU      %
         LW,9     SYM%ADR           GET POINTER TO SYMBOL
         BAL,4    DRSYMPT           PRINT DESIRED SYMBOL                02483000
         LI,0     #PLUS             SEND OUT A PLUS SIGN                02484000
         BAL,4    TYPOUT
         LW,3     2                 PUT DELTA IN R3                     02486000
DRPRTAGH LW,4     DRPRTSAV          GET RETURN ADDRESS
         B        DRPRTHXA          PRINT AS HEX CONSTANT
*                                                                       02498000
         PAGE
************************************************************************
*                                                                      *
*        ROUTINE FOR OUTPUT OF A SYMBOL                                *
*        THERE ARE TWO ENTRANCES                                       *
*        DRMNEMPT    OUTPUTS UP TO 4 CHARACTER MNEMONIC OP CODE        *
*        DRSYMPT     OUTPUTS UP TO 8 CHARACTER SYMBOL                  *
*                                                                      *
************************************************************************
DRMNEMPT LI,7     0                 ENTRY FOR MNEMONIC OUTPUT
         B        MNSYM10           CONTINUE
DRSYMPT  EQU      %
         LCI      2
         LM,6     *9                SYMBOL TO R6-R7
         SLD,6    8                 SHIFT OFF CODE & BYTE COUNT
MNSYM10  EQU      %
         STD,6    DRTEMPD1          SAVE SYMBOL
         STW,4    TOUT
         LI,1     -8                CHARACTER INDEX
DRSYMPTM LB,0     DRTEMPD1+2,1      GET A CHARACTER                     02338000
         BEZ      *TOUT             IF CHARACTER = 0, RETURN
DRSYMPTX BAL,4    TYPOUT
         BIR,1    DRSYMPTM          ANY CHARACTERS LEFT TO PRINT        02342000
         B        *TOUT
         PAGE
*                                                                       02344000
*                                                                       02640000
* SPECIAL PRINT ROUTINE                                                 02641000
* PRINTS UP TO 4 CHARACTERS STARTING FROM THE RIGHT MOST BYTE           02642000
*   INPUT                                                               02643000
*     R0 : EBCDIC STRING                                                02644000
*   LINK : R1                                                           02645000
*                                                                       02646000
DRPRTSML BAL,4    TYPOUT
         SLS,0    -8                MOVE NEXT CHARACTER INTO POSITION   02648000
         AI,0     0                 CHECK FOR REMAINS                   02649000
         BGZ      DRPRTSML          ANYTHING LEFT
         B        0,1               NO - RETURN                         02651000
*                                                                       02652000
*                                                                       02702000
*                                                                       02703000
* ROUTINE TO TYPE OUT A MESSAGE GENERATED BY A TEXTC                    02704000
*   INPUT (DLMSG)                                                       02704100
*     R1 : WA(MESSAGE)                                                  02704200
*   INPUT (DRPRTMSG)                                                    02705000
*     R1 : BA(MESSAGE)                                                  02706000
*   LINK : R4                                                           02707000
*   TEMPORARIES USED : R0,R2                                            02708000
*                                                                       02709000
DLMSG    SLS,1    2                 FORM BYTE ADDRESS                   02709500
DRPRTMSG LB,2     0,1               GET COUNT                           02710000
         STW,4    TOUT
DRPRTMSM AI,1     1                 ADVANCE THE BYTE INDEX              02711000
         LB,0     0,1               GET A CHARACTER                     02712000
         BAL,4    TYPOUT
         BDR,2    DRPRTMSM          IS COUNT ZERO?                      02714000
         B        *TOUT             YES - RETURN
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
*                 EVALUATION AND SYMBOL TABLE SEARCH ROUTINES          *
*                                                                      *
*                                                                      *
************************************************************************
* EVALUATION ROUTINE                                                    02149000
*                                                                       02150000
*                                                                       02148000
DREVAL   LW,2     3                 GET ACCUMULATED VALUE
         STW,1    CURNOPR           SAVE CURRENT OPERATOR
         LW,15    DOTMODE           PERIOD IN LAST TERM?
         BNEZ     DOTPROC           YES
         CI,7     #SYMTYPE          NO, CHECK TYPE
         BE       DREVLSYM          IS IT A SYMBOL?                     02152000
         CI,6     -DRSYMMAX         CHECK CHARACTER COUNT               02152100
         BNE      DREVLDNE          HAVE ANY CHARACTERS BEEN INPUT?     02152200
         AI,3     0                 NO - CHECK FOR EBCDIC INPUT         02152300
         BNEZ     DREVLDNE          WAS THE EXPRESSION ZERO?            02152400
         STW,1    DRLSTOPR          YES - SAVE OPERATOR FOR NEXT TIME   02152500
         B        0,4               RETURN                              02152600
DOTPROC  LI,15    0                 TURN OFF DOTMODE
         STW,15   DOTMODE
         LW,15    CHARINDX          CHECK IF ANY INPUT BETWEEN DOT
         SW,15    DOTCHAR           AND PUNCTUATION. IF YES,
         CI,15    1                 DOT MEANT HEX, IF NO, IT
         BNE      DREVLDNE          MEANT %
         LW,2     DR#DSIGN          GET CURRENT VALUE OF '%'
DREVLDNE LW,1     CURNOPR           RESTORE CURRENT OPERATOR
         XW,1     DRLSTOPR          EXCHANGE NEW AND OLD OPERATORS
         EXU      DREXUTB1,1        PERFORM CORRECT OPERATION           02154000
DREVLXIT AWM,2    DREXPRS,5         UPDATE CURRENT EXPRESSION CELL
         AI,10    1                 ADVANCE ELEMENT COUNT               02155100
         B        0,4               GO BACK TO CORRECT PLACE            02156000
DREVLSYM EQU      %
         CI,6     DRSYMAXE          CHECK LENGTH OF SYMBOL
         BG       DRERR             TOO LONG, ERROR
         LD,14    DRCHRBUF          GET SYMBOL IN R14-15
         STW,4    DREVLRTN          SAVE RETURN INDEX                   02158000
         LI,0     FINDSYM           SET TOT SEARCH
         STW,0    WHCHSRCH           ON SYMBOLS
         CI,6     DRSYMAXE-4        IS IT TOO BIG TO BE A MNEMONIC
         BG       EVL60             YES
         BAL,4    SRCHCODE          SEARCH MNEMONICS
         CI,0     0                 FIND IT
         BNE      DREVLXX           YES.
         BAL,4    SRCH%SYM          START SEACRCH WITH SPEC SYMBOLS
         B        %+2
EVL60    EQU      %
         BAL,4    LOC%SRCH          SEARCH GLOBAL & INTERNAL ONLY
         STW,0    SYM%CODE          SAVE DEF-UNDEF CODE
         CI,0     0                 CHECK RESULT
         BL       DRERR             NOT FOUND, ERROR
         BG       DREVLXX           FOUND-DEFINED, CONTUNUE
         OR,8     DRUDEFLG          SET UNDEFINED FLAG
         LI,2     0                 UNDEFINED, VALUE = 0
DREVLXX  LW,4     DREVLRTN          RESTORE RETURN INDEX                02162000
         B        DREVLDNE          GO FINISH UP                        02163000
         PAGE
*                                                                       02210000
* ROUTINE TO DO A FINAL EVALUATION AND CREATE A FULL WORD QUANTITY      02211000
*                                                                       02212000
DREVALIT LW,3     DREXPRS           VALUE OF FIELD 0                    02213000
         LI,0     0                 RESET TRUNCATION FLAG
         LW,2     DREXPRS+1         VALUE OF FIELD 1                    02214000
         AND,2    XF                EXTRACT LOW 4 BITS                  02215000
         SCS,2    -12               MOVE INTO PROPER POSITION           02216000
         OR,3     2                 MERGE INTO VALUE ACCUMULATOR        02217000
         LI,1     X'FFFF0'          4 BITS FOR R FIELD
         AND,1    DREXPRS+1
         BEZ      %+2               OK
         AI,0     1                 SET TRUNCATION FLAG
         CI,5     1                 CHECK PRESENCE OF ADDRESS FIELD     02218000
         BLE      DREVEXIT          IS IT THERE
DREVLITN LI,2     KM7               MASK FOR EXTRACTING INDEX NUMBER    02252000
         AND,2    DREXPRS+3         EXTRACT INDEX : LOWER 3 BITS        02253000
         LI,1     X'FFFF8'          3 BITS FOR X FIELD
         AND,1    DREXPRS+3
         BEZ      %+2               OK
         AI,0     1                 SET TRUNCATION FLAG
         CW,8     DRBIT23
         BANZ     SPCHK4            LCI OR LCFI INSTRUCTION
         SLS,2    17                MOVE INTO PROPER POSITION           02254000
         OR,3     2                 MERGE INTO FINAL VALUE              02255000
SPCHK1   CI,8     DRSOPRBT          CHECK FOR 20 BIT ADDRESS
         BAZ      SPCHK2            NO
         LW,2     M20               YES. GET 20 BIT MASK
         B        DREVLITA          SKIP CHECK FOR INDIRECT
SPCHK2   CI,8     SHFTCODE          IS IT A SPECIAL SHIFT OP CODE
         BAZ      SPCHK3            NO
         LI,2     X'7F'             YES. GET SPECIAL MASK
         CI,8     1                 CHECK IF ONLY AN S SHIFT
         BAZ      DREVLITA          OTHER SHIFT, DONT DO INDIRECT
         B        SPCHK3+1          CHECK IF INDIRECT
SPCHK3   LI,2     KADMSKM           MASK FOR 17 BIT ADDRESS FIELD
         CI,8     KASTBIT           IS INDIRECT FLAG SET
         BAZ      %+3               NO
         OR,3     DRBIT0            YES, SET INDIRECT BIT IN WORD
         LI,2     KADMSKM           MAKE SURE WE USE RIGHT MASK
DREVLITA AND,2    DREXPRS+2         EXTRACT DESIRED FIELD SIZE          02257000
         AW,3     2                 MERGE ADDRESS INTO FINAL VALUE
DREVEXIT EQU      %
         CI,0     0                 IS TRUNCATION FLAG SET
         BE       0,4               NO
         LW,0     3                 SAVE EXPRESSION
         WRT%UC   TRUNMSG           OUTPUT TRUNCATION ERROR
         LW,3     0
         B        0,4               AND CONTINUE
SPCHK4   OR,3     2                 MERGE FL VALUE
         LW,2     DREXPRS+2         GET C VALUE
         AND,2    XF
         LI,1     X'FFFF0'          4 BIT FIELD FOR LCFI,LFI,LCI
         AND,1    DREXPRS+2
         BEZ      %+2               OK
         AI,0     1                 SET TRUNCATION FLAG
         CW,8     DRBIT24           IS IT LFI
         BANZ     DREVLITA+1        YES - DON'T SHIFT
         SLS,2    4                 POSITION C VALUE
         B        DREVLITA+1        GO DO FINAL MERGE
         PAGE
*                                                                       02264000
*                                                                       02127000
* ROUTINE TO COMPUTE LIMITS                                             02128000
*   OUTPUT                                                              02129000
*     R2 : LOWER LIMIT                                                  02130000
*     R3 : UPPER LIMIT                                                  02131000
*                                                                       02132000
DRGETLIM EQU      %
         CI,11    1                 CHECK COMMA COUNT
         BG       DRERR             MORE THAN 1, ERROR
         LW,2     DREXPRS           NO - SET UP SKELETON OF LIMITS      02135000
         LW,3     DREXPRS+1         R2 = FIELD 0                        02136000
         AW,3     DREXPRS+3         R3 = FIELD1+FIELD3                  02137000
         LW,0     FLDREG            GET FIELD PRESENCE BITS
         CI,0     DRFD1BIT
         BANZ     DRGTLIMG          DOES FIELD 1 EXIST
         AW,2     DREXPRS+2         NO - ADD FIELD 2 TO LOWER LIMIT     02140000
DRGETLMX EQU      %
         CW,3     YFFFE             LOOK FOR GARBAGE
         BANZ     DRERR             SURE ENOUGH
         CW,2     YFFFE             LOOK SOME MORE
         BANZ     DRERR             THATS IT
         CI,11    0                 MORE THAN ONE FIELD (ANY COMMAS)
         BE       0,4               NO,REUTRN
         CW,2     3                 LOWER LIMIT GREATER THAN UPPER
         BG       DRERR             YES
         B        0,4               RETURN                              02143000
*                                                                       02144000
DRGTLIMG AW,3     DREXPRS+2         ADD FIELD 2 TO UPPER LIMIT          02145000
         B        DRGETLMX          GO FINISH UP                        02146000
         PAGE
************************************************************************
*                                                                      *
*        THIS ROUTINE SEARCHES THE REGULAR AND SPECIAL OP CODE         *
*        MNEMONIC TABLES FOR THE INPUT SYMBOL.  IF IT FINDS IT,        *
*        THE NUMERIC OP CODE VALUE IS RETURNED, PROPERLY POSITIONED    *
*        IN R2.                                                        *
* INPUT                                                                *
*        R14      INPUT SYMBOL                                         *
* OUTPUT                                                               *
*        R2       OP CODE VALUE                                        *
*        R11      FOUND/NOT-FOUND FLAG                                 *
* TEMP                                                                 *
*        R1,R2                                                         *
*                                                                      *
************************************************************************
SRCHCODE LI,1     SPECNENT          # ENTRIES SPECIAL CODES
         CW,14    SPECODES-1,1      THIS IT?
         BE       FOUNDSPC          YES
         BDR,1    %-2               NO
         LI,1     CODENENT          # ENTRIES REGULAR CODES
         CW,14    OPCODES-1,1       THIS IT?
         BE       FOUNDREG          YES
         BDR,1    %-2               NO
         LI,0     0                 SET NOT FOUND FLAG
         B        0,4
FOUNDREG AI,1     -1                ADJUST INDEX
         LW,2     1                 OP CODE TO R2
         SLS,2    24                POSITION IT
         B        FNSHUP+1          SET FLAG AND EXIT
FOUNDSPC AI,1     -1
         LH,2     CODEVAL,1         GET OP CODE VALUE
         CI,1     NOTAGFLD          IMMEDIATE TYPE INSTRUCTION
         BGE      %+3               NO
         OR,8     DRSOPRFL          YES, SET FLAG
         B        FNSHUP
         CI,1     7
         BG       NOTLCINST
         CI,1     5                 TEST FOR LFI, LCI, OR LCFI
         BL       FNSHUP            NEITHER
         BG       %+2               LCI AND LCFI
         OR,8     DRBIT24           LFI IS SPECIAL
         OR,8     DRBIT23           SET FLAG
NOTLCINST EQU     %
         CI,1     SHFTINDX-1        IS IT A SHIFT TYPE INSTRUCTION
         BL       BYTTEST           NO
         BG       %+2               IS IT AN S SHIFT
         OR,8     DRBIT31           YES, SET BIT ONE AS A FLAG
         LI,3     0
         SLD,2    -4                SHIFT TPYE INTO R3
         SLS,2    8                 POSITION OP CODE
         SLD,2    12                MOVE OP CODE AND TYPE INTO POSITION
         OR,8     DRBIT21           SET BIT TO INDICATE SPECIAL SHIFT OP
         B        FNSHUP+1
FNSHUP   SLS,2    16                POSITION OP CODE
         LI,0     4                 SET FOUND FLAG
         B        0,4
BYTTEST  CI,1     BYTINDX           TEST IF BYTE INSTR
         BL       FNSHUP            NO
         OR,8     DRSOPRFL          YES, SET BIT FOR 20-BIT DISP
         B        FNSHUP
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
SRCH%SYM EQU      %
SPEC%SYM EQU      %
         LI,1     NENTSPEC          # WORDS SPEC SYM TABLE
         LI,9     SPECSYM           START ADR    "
         BAL,7    *WHCHSRCH         GO SEARCH
LOC%SRCH EQU      %
GLOBAL%SYMBOLS    ;
         EQU      %
         LI,0     -1                INITIALIZE FLAG TO NOT FOUND
         LW,1     NENTSYM           # WORDS GLOBAL SYMBOLS
         BEZ      INTERNAL%SYM      NONE, CHECK FOR INTERNAL SYMBOLS
         LW,9     SYMBEGIN          START ADR GLOBAL
         BAL,7    *WHCHSRCH         GO SEARCH
INTERNAL%SYM      ;
         EQU      %
         LW,1     NENTINTL          # WORDS INTERNAL SYMBOLS
         BEZ      *4                NONE, RETURN
         LW,9     INTL%SYM%BEGIN    START ADR
         BAL,7    *WHCHSRCH         SEARCH
         B        *4                RETURN
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
FINDSYM  EQU      %
         AW,1     9                 COMPUTE END OF TABLE ADR
         LD,14    DRCHRBUF          GET SYMBOL BEING SEARCHED ON
         SLD,14   -8                SHIFT SYMBOL RIGHT 1 BYTE
         LW,12    14                1ST 3 CHARS TO R12
         LW,13    SYM%MASK          MASK RIGHTMOST 3 BYTES
         LI,2     0                 INITIALIZE VALUE WORD
FSYM10   EQU      %
         CS,12    *9                CHECK 1ST 3 CHARS
         BNE      FSYM30            NO MATCH
         LB,0     *9                YES, GET CODE FOR THIS SYM
         AI,9     1                 BUMP POINTER TO NEXT 4 CHARS
         CW,15    *9                CHECK EM
         BNE      FSYM30-1          NO MATCH
         SLS,0    -6                YES, POSITION CODE IN R0
         AI,9     1                 BUMP POINTER TO VALUE WORD
         LI,1     0                 INIT FOR ADDRESS SHIFT
         CI,0     1                 CHECK CODE
         BL       *4                UNDEFINED, EXIT
         BG       FSYM20            CONSTANT
         LW,3     M19               LOCATION TYPE,GET MASK
         LB,1     *9                GET SYMBOL TYPE
         SLS,1    -3
         LB,1     METATYPE,1        GET CORRESPONDING DELTA FORMAT CODE
         STW,1    SYM%TYPE          SAVE IT
         LB,1     *9                PICK UP RES AND 'T'
         AND,1    X7                SAVE ONLY RESOLUTION
         AI,1     -2                ADJUST FOR ADDRESS SHIFT
         B        FSYM20+1
FSYM20   EQU      %
         LI,3     -1                CONSTANT, GET 32 BIT MASK
         LS,2     *9                GET VALUE FROM VALUE WORD
         SLS,2    0,1               GET WORD RESOLUTION
         B        *4                RETURN TO CALLER
         AI,9     -1                DECREMENT
FSYM30   EQU      %
         AI,9     3                 BUMP POINTER TO NEXT ENTRY
         CW,9     1                 CHECK FOR DONE
         BL       FSYM10            NO
         LI,0     -1                YES, SET NOT FOUND FLAG
         B        *7                RETURN TO SEARCH ROUTINE
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
FINDVAL  EQU      %
         AW,1     9                 COMPUTE END OF TABLE ADR
        LW,13    KILL%BIT          GET 'KILL' BIT
FVAL05   EQU      %
         LI,14    0                 CLEAR VALUE CHECKING WORD
         LB,0     *9                GET CODE FOR THIS ENTRY
         AI,9     2                 BUMP POINTER TO VALUE WORD
         CI,0     X'20'             CHECK IF 'KILL' BIT IS SET
         BANZ     FVAL30            YES, SKIP THIS SYMBOL
         SLS,0    -6
         CI,0     0                 CHECK FOR UNDEF
         BE       FVAL30            UDEF,SKIP IT
         CI,0     2                 IS THIS A LOCATION SYMBOL
         BL       FVAL10            YES, GET 17 BIT MASK
         CW,0     LOC%ONLY          NO, IN LOCATION ONLY MODE
         BE       FVAL30            YES, SKIP IT
         LI,15    -1                GET 32 BIT MASK
        B        FVAL15
FVAL10   EQU      %
         LW,15    M17               GET 17 BIT MASK
FVAL15   EQU      %
         LS,14    *9                GET VALUE FROM VALUE WORD
         CLM,14   DRSRCHLM          COMPARE WITH LIMITS
         BCS,9    FVAL30            NOT IN RANGE
         BCR,12   FVAL40            EQUAL
         CI,0     1                 CHECK IF LOCATION SYMBOL
         BNE      FVAL25            NO, DONT CHECK FOR CSECT TYPE
         LW,3     K%OUTMODE         IN CSECT OUTPUT MODE
         BEZ      FVAL20            NO, CONTINUE
         CI,0     1
         BNE      FVAL30            NO, SKIP IT
         LW,3     CSECT%TYPE        YES, CHECK IF THIS SYM IS CSECT TYPE
         LS,3     *9
         BEZ      FVAL30            NO, SKIP THIS SYMBOL
         LI,5     1                 SET CSECT FOUND FLAG
FVAL20   EQU      %
         CI,0     1                 LOCATION SYMBOL
         BNE      FVAL25            NO, DONT SAVE TYPE
         LB,3     *9                GET SYM TYPE FROM VALUE WORD
         SLS,3    -3
         LB,3     METATYPE,3        CONVERT TO DELTA CODE
         STW,3    SYM%TYPE          SAVE IT
FVAL25   EQU      %
         STW,9    SYM%ADR           SAVE ADR
         STW,14   DRSRCHLM          SAVE VALUE AS NEW UPPER LIMIT
         MTW,-2   SYM%ADR           POINT TO SYMBOL
FVAL30   EQU      %
         AI,9     1                 BUMP ADR POINTER
         CW,9     1                 CHECK FOR DONE
         BL       FVAL05            NOT YET
         B        *7                DONE
FVAL40   EQU      %
         LB,3     *9                GET SYMBOL TYPE FROM
         SLS,3    -3                VALUE WORD AND
         LB,3     METATYPE,3        CONVERT TO DELTA CODE
         STW,3    SYM%TYPE          SAVE IT
         LW,4     DRPRTSAV          GET RETURN ADR FROM DRPRTADR
         AI,9     -2                POINT TO SYMBOL
         B        DRSYMPT           GO PRINT IT
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
*                 PUNCTUATION COMMANDS                                 *
*                                                                      *
*                                                                      *
************************************************************************
*                                                                       01698000
*                                                                       02654000
* ROUTINE TO HANDLE ASTERISK                                            02655000
*                                                                       02656000
DRASTISK CD,6     DRSCNSET          IS IT FIRST OF A FIELD
         BNE      DRMULT            NO, MUST BE MULTIPLICATION
         CI,5     2                 IS IT ADDRESS FIELD2
         BNE      DRERR             NO, NOT GOOD
         AI,10    0                 CHECK ELEMENT COUNT
         BEZ      DRERR             MUST BE NON-ZERO
         CI,8     DRSOPRBT          IS THIS IMMEDIATE
         BANZ     DRERR             YES, CANT BE INDIRECT
         OR,8     DRASTBIT          SET INDIRECT INDICATOR FLAG
         B        DRSCAN1           GO SCAN FOR MORE INPUT
DRMULT   STW,2    DRMULT#           SAVE MULTIPLICAND
         LCW,2    2
         AWM,2    DREXPRS,5         SUBTRACT IT FROM SUM
         BAL,4    INPTCHAR          CHECK IF SHIFT
         CI,0     '*'
         BNE      DRMULT1           NO
         MTW,1    DRLSTOPR          POS SHIFT
         BAL,4    INPTCHAR          CHECK FOR -
         CI,0     '-'
         BNE      DRMULT1           NO
         MTW,1    DRLSTOPR          NEG SHIFT
         B        DRINITC
DRMULT1  MTW,-1   CHARINDX          RESET
         B        DRINITC           SCAN FOR NEXT TERM
*  ROUTINE TO DO MULTIPLY (FROM DREVAL)
DRMULTR  LI,15    1                 RESET MULTIPLIER TO 1
         XW,15    DRMULT#           AND GET CURRENT ONE
         EXU      MVEC,1
         EXU      MVEC1,1
         LW,2     15                PUT RESULT IN 2
         B        *14               RETURN
MVEC     EQU      %-4
         MW,15    2
         NOP
         LCW,2    2
MVEC1    EQU      %-4
         BCS,4    DRERR
         SLS,15   0,2
         SLS,15   0,2
*                                                                       02790000
* ROUTINE TO HANDLE THE BACKSLASH CHARACTER                             02791000
*                                                                       02792000
DRBSLASH EQU      %
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED INPUT
         BANZ     DRERR             YES, ERROR
         BAL,4    DREVALIT          FINAL EXVALUATION
        AND,3    DRADMSKM          EXTRACT ADDRESS FIELD
         STW,3    DR#DSIGN          SAVE ADDRESS
         LI,1     DRINITB           PROPER INITIALIZATION ENTRY
         STW,1    MESSEXIT
         LI,1     0                 SHOW THAT WE ARE IN BACKSLASH MODE  02794200
         STW,1    DROPENER                                              02794400
         MTW,0    DELENT            ANALYZ/MONFIX INTERFACE
        BGZ      DRSLASHD          YES
         LI,1     -1                TURM ON GET-A-PAGE MODE
         STW,1    GTPGMODE
         B        DRSLASHD          OPEN DESIRED REGISTER               02795000
*                                                                       02768000
* ROUTINE TO HANDLE COMMA                                               02769000
*                                                                       02770000
DRCOMMA  CI,5     3                 CHECK FIELD NUMBER                  02771000
         BGE      DRERROR           ARE WE IN THE LAST FIELD?           02772000
         AI,5     1                 NO - ADVANCE FIELD NUMBER           02773000
         AI,11    1                 INCREMENT COMMA COUNT               02774000
DRFLDFIX EQU      %
         LW,1     DRFLDBIT,5        SET PRESENCE BIT FOR THIS FIELD
         STS,1    FLDREG
         B        DRINITC           GO RESET AND SCAN FOR NEXT FIELD    02776000
*                                                                       02666000
* ROUTINE TO HANDLE CARRIAGE RETURN                                     02732000
*                                                                       02733000
DRCRTRN  LI,4     DRINITA
         STW,4    MESSEXIT
         LI,4     MESSAGE
         B        DRCLOSE           GO CLOSE UP THE OPEN REGISTER       02740000
         PAGE                                                           02804000
*                                                                       02847000
* ROUTINE TO CHECK FOR GREATER THAN SIGN WHEN IT IS EXPECTED            02848000
*                                                                       02849000
DRDEFCHK EQU      %
         CI,0     #GTRTHAN          CHECK FOR '>'
         BNE      DRERR             NO, ERROR
SYMDF10  EQU      %
         CI,7     #SYMTYPE          CHECK FOR SYMBOL INPUT
         BNE      DRERR             NO, ERROR
*
         CI,6     DRSYMAXE          CHECK FOR MAX SYMBOL LENGTH
         BG       DRERR
*
         LW,0     MODINPUT          GET TYPE IF INPUT, -1 IF NOT
         CI,0     F%TYPE            CHECK IF F-MODE SPECIFIED
         BE       DRERR             YES, ERROR
         CI,0     K%CONST           CONSTANT TYPE SPECIFIED
         BL       SYMDF15           NO, LOCATION TYPE BY DEFAULT
         LI,5     CONSTYPE          USE CONSTANT SYMBOL CODE
         B        SYMDF30+1         CONTINUE PROCESSING
SYMDF15  EQU      %
         LI,5     LOCTYPE           LOCATION TYPE IS DEFAULT
         LI,1     2
         STB,1    DRVALSAV          SET CODE FOR WORD RESOLUTION
         LW,1     0                 WAS A TYPE SPECIFIED
         BLZ      SYMDF20           NO, CONTINUE
         LB,1     DELTATYP,1        OUTPUT FORMAT CODE
         SCS,1    -5                POSITION TYPE IN WORD
         STS,1    DRVALSAV          STORE IN VALUE WORD
SYMDF20  EQU      %
         BAL,4    INPTCHAR          GET TRAILING CHARACTER
         CI,0     'K'               IS IT 'K'
         BNE      SYMDF30           NO, CONTINUE
         LW,1     CSECT%TYPE        GET CSECT BIT
         STS,1    DRVALSAV          STORE IN CONTROL-VALUE WORD
         B        SYMDF30+1         CONTINUE
SYMDF30  EQU      %
         MTW,-1   CHARINDX          BACK CHAR INPUT INDEX UP BY 1
         LI,0     FINDSYM           SET TO SEARCH ON SYMBOLS
         STW,0    WHCHSRCH
         BAL,4    LOC%SRCH          SEARCH ALL BUT SPECIAL SYMBOLS
*
         LD,14    DRCHRBUF          CHECK IF SYMBOL CONFLICTS
         CI,15    0                 WITH BUILT IN OP-CODES
         BNE      SYMDF31           NO CONFLICT
         LI,1     CODENENT          NO. OF SYMBOLS
         CW,14    OPCODES-1,1
         BE       DRERR             CONFLICT FOUND
         BDR,1    %-2               CONTINUE
         LI,1     SPECNENT          NO. OF SYMBOLS
         CW,14    SPECODES-1,1
         BE       DRERR             CONFLICT FOUND
         BDR,1    %-2               CONTINUE
SYMDF31  EQU      %                 NO CONFLICT WITH DELTA SYMBOLS
         CI,0     0                 CHECK RESULT
         BL       SYMDF50           NOT FOUND
         BE       SYMDF60           UNDEFINED
SYMDF35  EQU      %
         LI,1     -8                INDEX FOR CODE BYTE
         STB,5    *9,1              STORE CODE
         LW,0     DRVALSAV          GET NEW VALUE
         STW,0    *9                STORE IN VALUE WORD IN TABLE
SYMDF40  EQU      %
         LI,0     DRINITB           INITIAL ENTRY LEAVES CURRENT CELL
*                                   OPEN (DISPLAY,SYM DEF ON ONE LINE)
         STW,0    MESSEXIT
         LI,8     0                 CLEAR FLAGS
         B        MESSAGE
SYMDF50  EQU      %
         LD,12    DRCHRBUF          GET SYMBOL
         SLD,12   -8                SHIFT FOR LEADING BYTE COUNT & CODE
         STB,5    12                STORE CODE IN 1ST SYMBOL WORD
         LW,14    DRVALSAV          GET VALUE WORD
         BAL,4    DRSYMAPD          ADD THIS ENTRY TO SYMBOL TABLE
         B        SYMDF40
*                 SATISFY REFERENCES TO THE UNDEFINED SYMBOL
SYMDF60  EQU      %
         CI,5     CONSTYPE          IF CONSTANT SYMBOL, DONT RUN
         BE       SYMDF35           LINK OF UNSATISFIED REFERENCES
         LI,4     0                 CLEAR R4
         LW,11    M17               17 BIT NASK FOR STORING VALUE
         LW,10    DRVALSAV          GET VALUE WORD
         LI,1     -8                INDEX FOR STORING CODE BYTE
         STB,5    *9,1              STORE CODE IN 1ST SYMBOL WORD
         LW,5     M17               ADR MASK FOR LINK ADDRESSES
SYMDF70  EQU      %
         LS,4     *9                LINK ADR TO R4
         STS,10   *9                STORE VALUE
         CI,4     0                 CHECK FOR END OF LINK
         BE       SYMDF40           YES, EXIT
         LW,9     4                 NO, MOVE LINK ADR TO ADR REG
         B        SYMDF70           CONTINUE
*                                                                       02869000
*                                                                       02741000
* ROUTINE TO HANDLE EQUAL                                               02742000
*                                                                       02743000
DREQUAL  AI,10    0                 CHECK FOR PRESENCE OF INPUT         02743100
         BNEZ     DREQUALM          WAS THERE ANY?                      02743200
         LW,3     DR#SEMIQ          NO - GET MOST RECENT QUANTITY TYPED 02743300
         B        DREQUALX          GO FINISH UP COMMAND ACTION         02743400
DREQUALM BAL,4    DREVALIT          FIND VALUE OF INPUT EXPRESSION      02744000
DREQUALX LW,2     MODINPUT   WAS OUTPUT MODE SPECIFIED
         BLZ      %+3        NO, GO TO
         LW,2     OUTMODE    YES, SET R2 TO SPECIFIED MODE
         B        %+2
         LW,2     DREQDFLT   SET R2 TO DEFAULT MODE
         LI,0     #2SPACE           PRINT 2 SPACES BEFORE THE VALUE     02746000
         BAL,1    DRPRTSML                                              02746500
         BAL,4    DRPTEXP           GO PRINT VALUE IN DESIRED MODE      02747000
         LI,0     -1
         STW,0    MODINPUT   TURN OFF MODE INPUT SWITCH
         LI,1     DRINITB           SET RETURN LINK TO RESET SCANNER
         STW,1    MESSEXIT
         LI,1     MESSAGE
         LI,0     #2SPACE           PRINT 2 SPACES AFTER THE VALUE      02747200
         LI,8     0                 CLEAR FLAGS IN REGISTER 8
         B        DRPRTSML                                              02747300
*                                                                       02748000
*                                                                       02840000
* ROUTINE TO HANDLE EXCLAMATION POINT                                   02841000
*                                                                       02842000
DREXCLAM EQU      %
         OR,5     10                CHECK FIELD & ELEMENT COUNTS
         BNEZ     DRERR
         LW,0     DR#DSIGN          GET LOC COUNTER FOR SYMBOL VALUE
         STW,0    DRVALSAV          SAVE IT
         B        SYMDF10
*                                                                       02785000
* ROUTINE TO HANDLE  LINE  FEED                                         02786000
*                                                                       02787000
DRLFEED  BAL,4    DRCLOSE           CLOSE OPEN REGISTER
         LI,3     K80001            INCREMENT FOR LOCATION ADDRESS      02788000
         B        DRLFUARO          REST IS SAME AS IN UP ARROW         02789000
*                                                                       02104000
* SUBROUTINE TO FIND TYPE OF PRINTOUT                                   02105000
*   GOES TO ERROR RECOVERY IF ILLEGAL TYPE REQUESTED                    02106000
*   INPUT                                                               02107000
*      DEFAULT TYPE IN R5                                               02108000
*   OUTPUT                                                              02109000
*      TYPE IN R2                                                       02110000
*                                                                       02111000
*   LINK : R4                                                           02112000
*   TEMPORARY REGISTERS : R0,R2                                         02113000
*                                                                       02114000
DRLPAR   EQU      %
CHNGMODE EQU      %
         BAL,4    INPTCHAR          GET OUTPUT MODE CHARACTER
         LI,2     DRTYPLST          INDEX FOR SEARCH
         MTW,2    DOTCHAR           ALLOWS '.(F/' TO EQUAL '%(F/'
DRGETMMO CB,0     DRTYPCHR,2        CHECK ONE ENTRY                     02118000
         BNE      DRGETAMO          IS IT THIS ONE?                     02119000
         AI,2     -1                COMPUTE CORRESPONDING VALUE
         STW,2    OUTMODE    SAVE SPECIFIED OUTPUT MODE
         STW,2    MODINPUT   SET OUTPUT MODE SWITCH
         B        DRSCAN1
DRGETAMO BDR,2    DRGETMMO          ARE ANY MORE ENTRIES LEFT?          02122000
         B        DRERR             NO - MUST BE A BAD TYPE REQUESTED   02124000
*                                                                       02125000
*                                                                       02668000
* ROUTINE TO HANDLE LESS THAN                                           02669000
*                                                                       02670000
DRLSTHAN CI,8     DRUDEFBT          TEST FOR UNDEFINED IN VALUE         02671000
         BCS,4    DRERR             WAS THERE ONE?                      02672000
         BAL,4    DREVALIT          NO - GO COMPUTE COMPLETE VALUE      02673000
         STW,3    DRVALSAV          SAVE RESULT FOR USE LATER           02674000
         OR,8     DRBIT22    SET FOR SYMBOL DEFINE MODE
         B        DRINITB           GO SCAN FOR SYMBOL NAME             02676000
*                                                                       02677000
*                                                                       02693000
* ROUTINE TO HANDLE PERCENT                                             02694000
*                                                                       02695000
DRPERCNT CI,7     #NUMTYPE          CHECK STATUS OF THE SCANNER         02696000
         BNE      DRERR             IS IT IN THE INITIALIZED STATE?     02697000
         CI,6     -DRSYMMAX         YES - CHECK FOR INPUT               02697100
         BNE      DRERR             IS THE COUNT INITIALIZED?           02697200
         LI,7     #SYMTYPE          YES - SET SCANNER TO SYMBOL MODE    02698000
         B        DRINPSYM          GO FINISH UP AS A SYMBOL TYPE       02699000
*                                                                       02731000
*                                                                       02796000
* ROUTINE TO HANDLE THE PERIOD (DOT)                                    02797000
*                                                                       02798000
DRPERIOD CI,6     -DRSYMMAX         CHECK CHARACTER COUNT
         BNE      DRERR             HAVE ANY CHARACTERS BEEN INPUT?     02801000
         CI,7     #NUMTYPE          NO - CHECK INPUT MODE               02801100
         BNE      DRERR             NOT CORRECT MODE
         LI,15    1                 TURN ON
         STW,15   DOTMODE                   DOTMODE
         LW,15    CHARINDX          SAVE INPUT BUFFER INDEX
         STW,15   DOTCHAR           FOR THE PERIOD
         LI,7     #HEXTYPE          SET INPUT MODE TO HEX
         B        DRSCAN1           CONTINUE SCAN
         PAGE                                                           02839000
************************************************************************
*                                                                      *
*                         STEP MODE ROUTINE                            *
*        THIS ROUTINE EXECUTES THE LAST VALUE TYPED, OPENS AND         *
*        DISPLAYS THE CONTENTS OF THE NEXT LOCATION MAKING IT A        *
*        CANDIDATE FO R EXECUTION.                                     *
*                                                                      *
************************************************************************
DRRPAR   EQU      %
STEPPER  EQU      %
         MTW,0    DELENT            ARE WE INTERFACING WITH MONFIX
         BGZ      DRERR             YES - ERROR
         OR,5     10                CHECK ELEMENT & FIELD COUNTS
         BNEZ     DRERR             NON-ZERO, ERROR
         CI,6     -DRSYMMAX         CHECK IF ANY CHARS INPUT
         BNE      DRERR             YES, ERROR
         LW,0     STEPMODE          ARE WE ALREADY IN STEP-MODE
         BGZ      STEP10            YES
         MTW,1    STEPMODE          NO, SET FLAG
         LW,0     DROPENSW          IS THERE AN OPEN REG
         BGEZ     DRERR             NO, ERROR
STEP10   EQU      %
         LW,1     DR#DSIGN          GET ADR OF OPEN CELL
         STD,1    IAP               STORE IN IA & IAP
         STW,1    BADR              STORE BRANCH ADR
         LI,0     DRINITA           NEW COMMAND INITIALIZATION
         STW,0    MESSEXIT
         B        TRACEXEC          GO ANALYZE & EXECUTE AN INST
DRSHARP  EQU      %
         AI,10    0                 CHECK ELEMENT COUNT
         BGZ      DRERR             MORE THAN 1, ERROR
         CI,6     -DRSYMMAX         ANY CHARS INPUT
         BE       DRERR             NO, ERROR
         CI,7     #SYMTYPE          INPUTTING A SYMBOL
         BNE      DRERR             NO, ERROR
         LD,12    DRCHRBUF          GET INPUT SYMBOL
         SLD,12   -8                SHIFT CLEARS CODE BYTE TO UNDEFINED
         LW,14    DR#DSIGN          VALUE LINKS UNDEFINED SYMBOLS
         LI,4     MESSAGE           RETURN ADR FROM DRSYMAPD
         B        DRSYMAPD          ADD SYMBOL TO SYM TAB
*
         PAGE                                                           02870000
************************************************************************
*                                                                      *
* ROUTINE TO HANDLE THE SLASH COMMAND                                   02872000
*                                                                      *
************************************************************************
DRSLASH  EQU      %
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED INPUT
         BANZ     DRERR             YES,ERROR
         LI,4     DRINITB
         STW,4    MESSEXIT
         AI,10    0                 CHECK FOR INPUT
         BGZ      SLSH10            THERE WAS SOME
         LI,3     KADMSKM           MASK FOR 17 BIT ADDRESS FIELD       02878000
         AND,3    DR#SEMIQ          FIND ADDRESS POINTER IN ;Q          02879000
         LI,0     0
         STW,0    DRUPRLIM          SET UPPER LIMIT
         B        DRSLASHM+1        GO DO IT.
SLSH10   EQU      %
         LW,2     MODINPUT          NONE, WAS OUTPUT MODE SPECIFIED
         BLZ      %+3        NO, GO TO %+3
         LW,2     OUTMODE    YES, USE SPECIFIED MODE
         B        %+2
         LW,2     DRSLDFLT          USE DEFAULT OUTPUT MODE
         STW,2    DRSLSHMD   SAVE SPECIFIED MODE
         LI,2     -1                RESET OUTPUT MODE
         STW,2    MODINPUT
DRSLASHI BAL,4    DRGETLIM   GET LIMITS REQUESTED
         STW,2    DR#DSIGN          SAVE STARTING LOCATION              02888000
         STW,3    DRUPRLIM          SAVE FINAL LOCATION                 02889000
         STW,4    DROPENER          SHOW THAT WE ARE IN SLASH MODE      02889250
         LW,3     DELENT            MUST WE INTERFACE W/MONFIX ?
         BLEZ     DRSLASHM          NO
         BAL,4    COPYINP           YES, SAVE INPUT STRING
         B        DRSLASHM
DRSLSHM1 LW,3     DELENT            ARE WE DEALING W/MONFIX ?
         BLEZ     DRSLASHM          NO
         BAL,4    COPYOUTP          YES, SAVE ADDRESS STRING
DRSLASHM LW,3     DR#DSIGN          PUT STARTING LOCATION IN R3         02889500
         LI,0     0                 SET FLAG TO  ALLOW OUTPUT TO
         STW,0    PRINT%OK          THE PRINTER IF REQUESTED
         LI,0     #2SPACE           PRINT 2 SPACES BEFORE THE VALUE     02890000
         BAL,1    DRPRTSML                                              02891000
         LW,4     DELENT            SPECIAL 'GET' REQUIRED ?
         BLEZ     SLSH20            NO
         LW,4     0,4
         BAL,4    0,4               YES, CALL 'GET' SUBR; VALUE IN R3
         BCS,8    DRERR
         LI,4     0                 GET 2ND WORD (FOR 'L' OUTPUT)
         B        SLSH22
SLSH20   EQU      %
         CI,3     15                CHECK TO SEE IF ITS A REGISTER
         BG       SLSH21            NO
         LW,4     SAVREGS+1,3
         LW,3     SAVREGS,3         YES. GET REGISTER VALUE
         B        SLSH22
SLSH21   LI,4     0
         CI,3     1                 IS ADDRESS AN ODD LOC
         BANZ     %+2               YES - DONT GET 2ND WORD
         LW,4     1,3
         LW,3     0,3               GET CONTENTS OF ADDRESS REQUESTED
SLSH22   STW,4    FLOAT2ND            (IN CASE OF 'L' FORMAT)
         LW,2     DRSLSHMD          GET MOST RECENT PRINT MODE          02893500
         CI,2     F%TYPE            CHECK FOR SYM-TAB CONTROL MODE
         BNE      SLSH30            NO, CONTINUE
         LW,2     SYM%TYPE          YES, IS A SYMB ASSOCIATED WITH ADR
         BGEZ     %+2               YES, USE ITS TYPE FOR OUTPUT MODE
         LI,2     R%TYPE            NO, DEFAULT TO R-TYPE
SLSH30   EQU      %
         BAL,4    DRPTEXP           GO PRINT VALUE IN DESIRED MODE      02894000
         LI,0     #SPACE            OUTPUT A SPACE AFTER EXPRS
         LW,3     DR#DSIGN          GET VALUE OF CURRENT LOCATION INDEX 02895000
         CW,3     DRUPRLIM          CHECK FOR END CONDITION             02896000
         BGE      DRSLASHD          ARE WE DONE?                        02897000
         AI,3     1                 NO - INCREMENT LOCATION INDEX       02898000
         LI,0     #CRLF             GO TO A NEW LINE                    02898200
         BAL,4    TYPOUT
DRSLASHS EQU      %
         AND,3    DRADMSKM          EXTRACT ADDRESS FIELD
         STW,3    DR#DSIGN          SAVE NEW LOCATION INDEX             02900000
         LI,0     2
         STW,0    LOC%ONLY          TURN ON LOC-ONLY MODE
         LW,2     DRADRMOD          GET CURRENT MODE OF LOCATION PRINT  02902750
         BAL,4    DRPRTADR          PRINT LOCATION VALUE IN DESIRED MODE02903000
         MTW,-2   LOC%ONLY          TURN OFF 'LOC-ONLY' MODE
         LI,0     #SLASH            SEND OUT A SLASH
         LI,4     DRSLSHM1          SET RETURN FROM TYPOUT
         LW,1     DROPENER          CHECK OPEN MODE SWITCH
         BNEZ     TYPOUT            PRINT A SLASH
         LI,0     #BSLASH           SEND OUT A SLASH TO THE USERS TTY   02906050
         BAL,4    TYPOUT
DRSLASHD LI,0     #2SPACE           SEND OUT 2 SPACES AFTER THE VALUE   02906200
         BAL,1    DRPRTSML                                              02906400
         LI,0     -1                FLAG TO SHOW A REGISTER IS OPEN     02907000
         STW,0    DROPENSW          SET OPEN SWITCH                     02908000
         B        *SLSHEXIT
*                                                                       02912000
*                                                                       02750000
* ROUTINE TO HANDLE SPACE                                               02751000
*                                                                       02752000
DRSPACE  CI,5     2                 CHECK FIELD NUMBER                  02753000
         BGE      DRINITC           IS IT AT LEAST IN THE ADDRESS FIELD?02754000
         LI,5     2                 NO - SET IT THAT WAY                02755000
         B        DRFLDFIX          GO SET PROPER BIT                   02756000
*                                                                       02810000
* ROUTINE TO HANDLE SINGLE QUOTE                                        02811000
*                                                                       02812000
DRSQUOTE LI,2     #EBDTYPE          SET UP DEFAULT CODE                 02813000
DRQUOTE  CI,7     #NUMTYPE          CHECK STATE OF SCANNER              02814000
         BNE      DRQUOTFD          IS IT IN THE INITIAL MODE?          02815000
         CI,6     -DRSYMMAX         YES - CHECK CHARACTER COUNT         02816000
         BNE      DRERROR           HAVE ANY CHARACTERS BEEN INPUT?     02817000
         LW,7     2                 NO - MUST BE THE DEFAULT CASE       02818000
         B        DRSCAN1           GO SCAN FOR INPUT TERM              02819000
DRQUOTFD CI,7     #SYMTYPE          CHECK TO SEE IF MODE IS SYMBOLIC    02820000
         BE       DRQUOTFR          IS IT?                              02821000
         LI,7     #SPCTYPE          NO - SET FOR SPECIAL INPUT          02821200
         B        DRSCAN1           GO SCAN FOR NEXT CHARACTER          02821400
DRQUOTFR CI,6     -DRSYMMAX+1       CHECK CHARACTER COUNT               02821600
         BNE      DRERROR           WAS ONLY ONE CHARACTER INPUT?       02821800
         LB,0     DRCHRBUF          YES - GET MODE CHARACTER            02822000
         LI,7     DRMODCNT          SET UP LOOP COUNTER                 02823000
DRQUOTFM CB,0     DRMODCHR,7        CHECK A CHARACTER                   02824000
         BNE      DRQUOTFX          ARE THEY THE SAME?                  02825000
         LI,6     0                 YES - RESET CHARACTER COUNTER       02826000
         STW,6    DRCHRBUF          RESET SYMBOL STORAGE                02827000
         LB,7     DRMODVAL,7        GET APPROPRIATE MODE INDEX          02828000
         B        DRSCAN1           GO SCAN SOME MORE                   02829000
DRQUOTFX BDR,7    DRQUOTFM          ANY MORE ENTRIES LEFT TO CHECK?     02830000
         B        DRVALERR          NO - ERROR                          02831000
*                                                                       02832000
*                                                                       02805000
* ROUTINE TO HANDLE DOUBLE QUOTE                                        02806000
*                                                                       02807000
DRDQUOTE EQU      %
         CI,6     -DRSYMMAX         ANY INPUT THIS TERM
         BNE      DRERR             YES, ERROR
         LI,7     #FLTYPE           SET TYPE TO FLOATING
         B        DRSCAN1
*
*        TAB ROUTINE: STORES IN AND CLOSES OPEN REGISTER, DISPLAYS
*                     AND OPENS THE CELL ADDRESSED IN PREVIOUSLY
*                     OPEN CELL.
*
DRTAB    EQU      %
         BAL,4    DRCLOSE           CLOSE PREVIOUSLY OPEN CELL
         LI,0     #CRETRN
         BAL,4    TYPOUT
         LW,3     DR#SEMIQ          GET LAST VALUE TYPED
         LI,2     0                 UPPER LIMIT < CURRENT LOCATION
         STW,2    DRUPRLIM
         LI,4     DRINITB
         STW,4    MESSEXIT
         B        DRSLASHS          REST IS LIKE SLASH
*                                                                       02777000
* ROUTINE TO HANDLE UP ARROW                                            02778000
*                                                                       02779000
DRUPAROW BAL,4    DRCLOSE           CLOSE REGISTER IF IT IS OPEN
         LI,0     #CRETRN           SEND OUT A  CR
         BAL,4    TYPOUT
         LI,3     -1                DECREMENT FOR LOCATION ADDRESS      02780000
DRLFUARO STW,3    DRUPRLIM          MAKE UPPER LIMIT NON-EXISTENT       02781000
         AW,3     DR#DSIGN          FIND NEXT LOCATION TO BE EXAMINED   02782000
         LI,8     0                 RE-RESET MASTER WORD
         LI,4     DRINITB
         STW,4    MESSEXIT
         B        DRSLASHS          GO FINISH AS A SLASH COMMAND        02784000
*                                                                       02912000
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
*                 SEMI-COLON COMMANDS                                  *
*                                                                      *
*                                                                      *
************************************************************************
*                                                                       02914000
* SEMI-COLON DISPATCHER                                                 02915000
DRSCOLON BAL,4    INPTCHAR
         CI,0     K40               SEE IF IT WAS A CONTROL CHARACTER   02918000
         BL       DRERROR           WAS IT
         MTW,1    DOTCHAR           BUMP DOT CHAR POINTER
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED INPUT
         BANZ     DRERR             YES, ERROR
         LI,1     DRINITA
         STW,1    MESSEXIT
         LI,2     KM6               NO - COLLAPSE THE INPUT TABLE       02920000
         AND,2    0                                                     02921000
         LB,2     DRKEY2,2          FIND COMMAND TYPE                   02922000
         LH,4     DRPOINT2,2        GET RELATIVE ADR OF ROUTINE
         BGEZ     %+4               COMMAND IS OK
         MTW,0    DELENT            ARE WE INTERFACING WITH MONFIX
         BGZ      DRERR             YES - ILLEGAL COMMAND
         AI,4     K8000             RESET FLAG BIT
         AI,4     DELTA%BASE        ADD BASE ADR
         CI,2     DRSLIMIT          CHECK TO SEE IF EVALUATION REQUIRED 02924000
         BL       DREVAL            GO EVALUATE IF APPROPRIATE          02925000
         B        0,4               GO TO CORRECT ROUTINE               02926000
*                                                                       02927000
         PAGE                                                           02928000
*                                                                       02929000
* CODE TO HANDLE ;C,;F,;I,;M,;Q,;1,;2                                   02930000
* R1 CONTAINS INDEX TO INDICATE WHICH SPECIAL VALUE IS INVOLVED         02931000
*                                                                       02932000
DRSPCHR  AI,2     -DRSLIMIT         ADJUST INDEX INTO DRPOINT2
         LH,1     DRSPCSYM,2        GET ADRESS OF APPROPRIATE SYMBOL
         AI,1     DELTA%BASE        ADD BASE ADR
         LI,4     DRSPCHRB          SET RETURN LINK AFTER EVALUATION    02934000
         AI,10    0                 CHECK STATUS OF ELEMENT COUNT       02935000
         BNEZ     DREVAL            WAS COUNT ZERO?                     02936000
         CI,7     #NUMTYPE          YES - CHECK STATUS OF SCANNER       02937000
         BNE      DREVAL            IS IT IN THE INITIALIZED STATE?     02938000
         CI,6     -DRSYMMAX         YES - CHECK FOR INPUT               02938100
         BNE      DREVAL            IS THE COUNT INITIALIZED?           02938200
*                                                                       02939000
* ROUTINE TO CREATE A SYMBOL FOR THE SPECIAL VALUES                     02940000
*                                                                       02941000
DRSPCHRA AI,0     #SEMI:2           YES - FORM SPECIAL SYMBOL IN R0     02942000
DRSPCHR% STH,0    DRCHRBUF          SAVE IN SYMBOL STORAGE BUFFER       02943000
         LD,6     DRSCNFIX          FIX UP NECESSARY REGISTERS          02944000
         B        DRSCAN1           GO SCAN SOME MORE                   02945000
*
*
DRSPCHRB CI,8     DRUDEFBT          CHECK FOR UNDEFINED IN VALUE        02946000
         BCS,4    DRERR             WAS THERE ONE?                      02947000
         BAL,4    DREVALIT          NO - GO GET COMPLETE VALUE          02948000
         STW,3    *DRLSTOPR         UPDATE APPROPRIATE VALUE CELL       02949000
         LI,0     #2SPACE           PRINT A COUPLE OF SPACES            02950000
         BAL,1    DRPRTSML                                              02951000
         B        MESSAGE
*                                                                       02953000
         PAGE                                                           02954000
*                                                                       02955000
* ;A ROUTINE : CHANGES ADDRESS PRINT MODE TO ABSOLUTE                   02956000
*                                                                       02957000
DRSEMIA  LI,0     DRMODABS          MODE FOR ABSOLUTE ADDRESSES         02958000
         B        SMR40             SET NEW MODE
*                                                                       02960000
* ;R ROUTINE : CHANGES ADDRESS PRINT MODE TO RELATIVE                   02961000
*                                                                       02962000
DRSEMIR  EQU      %
         AI,10    0                 ANY INPUT
         BEZ      SMR10             NO, CHECK FOR TRAILING CHAR
         BAL,4    DREVALIT          YES, EVALUATE
         STW,3    HEX%OFFSET        SAVE NEW HEX OFFSET
SMR10    EQU      %
         BAL,4    INPTCHAR          GET TRAILING CHAR
         CI,0     'K'               IS IT A 'K'
         BE       SMR20             YES, SET K-MODE
         MTW,-1   CHARINDX          BACK UP INPUT POINTER
         LI,0     0                 TURN OFF
         STW,0    K%OUTMODE         CSECT OUTPUT MODE
         B        SMR30
SMR20    EQU      %
         MTW,1    K%OUTMODE         SET CSECT OUTPUT MODE
SMR30    EQU      %
         LI,0     DRMODREL          MODE FOR RELATIVE OUTPUT ADR
SMR40    EQU      %
         STW,0    DRADRMOD          SET NEW ADDRESS MODE
         STW,0    DRSLSHMD          STORE FOR SLASH-LIKE COMMANDS
         B        MESSAGE
*                                                                       02966000
         PAGE
************************************************************************
*                                                                      *
*        ;B       ROUTINE TO SET UP INSTRUCTION BREAKPOINTS            *
*                                                                      *
************************************************************************
DRSEMIB  LI,1     IBRKADRS-1        GET I BREAK ADDRESSES
         LI,7     2                 I BRK FLAG
         BAL,14   BRKSET            GO TO GENERAL DUMP SET-UP ROUTINE
         B        %+2               FINISH UP BREAK SET
         B        BDMP              CONTINUE DUMP SET UP
         LI,1     -1                INITIALIZE PROCEED COUNT
         STW,1    IBRKPRCD,6
         B        MESSAGE           GET NEXT COMMAND
         PAGE
************************************************************************
*                                                                      *
*        THE FOLLOWING CODE WILL SET,RESET ,OR RELEASE DATA BREAKPOINTS*
*        OR DISPLAY THE ACTIVE DATA BREAKS
*                                                                      *
************************************************************************
DRSEMID  LI,1     DBRKADRS-1        D BREAK BASE ADDRESSES
         LI,7     1                 D BRK FLAG
         BAL,14   BRKSET            GO TO GENERAL DUMP SET-UP ROUTINE
         B        %+2               FINISH SET-UP OF D BREAK
         B        DUMPER            FINISH LINE OF D BREAK TABLE DUMP
*
*                                    OR IF IT ALREADY HAS PROTECTION
*                                    TYPE 01 OR HIGHER (I.E. NOT A DATA
*                                   PAGE), ERROR
         LI,1     -1
         STW,1    DBRKCOND,6        INITIALIZE BREAK CONDITION
         STW,1    DBRKMASK,6        INITILIZE MASK
         BAL,4    INPTCHAR          GET NEXT CHAR
         CI,0     #SPACE            WAS LAST CHAR A SPACE
         BE       MESSAGE           YES, GET NEXT MESSAGE
         CI,0     #CRETRN           WAS IT A CARRIAGE RETURN
         BE       PMESS             GET NEXT CONMAND LINE
         LW,2     0                 SAVE IN R2
         BAL,4    INPTCHAR          GET NEXT CHARACTER
        SLS,0    8                 FORM BACKWARD CONDITIONAL
         OR,2      0
         OR,2     YFFFF             SET UPPER BITS FOR HALF WORD COMPARE
         LI,4     6                  *
         CH,2     CONDTION,4        FIND CONDITION SPECIFIED
         BE       FOUNDIT           *
         BDR,4     %-2               *
         B        DRERR             *
FOUNDIT  LW,2     DBKCNDTN-1,4      GET SPECIFIED CONDITIONAL JUMP
         STW,2    DBRKCOND,6
         CI,5     3                 WAS A MASK INPUT
         BL       MESSAGE           NO
         LW,2     DREXPRS+3         GET MASK
         STW,2    DBRKMASK,6        ENTER IT
         B        MESSAGE
         PAGE                                                           03035000
*                                                                       03036000
* ;G ROUTINE : STARTS A USER PROCESS AT DESIRED LOCATION                03037000
*                                                                       03038000
DRSEMIG  EQU      %
         LW,2     DELENT            ARE WE ABOUT TO ENTER ANALZ ?
         BLEZ     %+3               NO
         LW,2     2,2               YES, USE ANALZ'S SPECIAL ENTRY LOC
         B        DRSG2
         AI,10    0                 WAS AN ADDRESS INPUT
         BNEZ     DRSG1             YES
DRSG4    MTW,0    STEPMODE
         BEZ      DRSG0             NOT IN STEP MODE
         LI,2     0
         STW,2    STEPMODE          RESET STEP MODE FLAG
         LW,2     IA                GET INSTRUCTION ADDRESS
         B        DRSG2
DRSG0    EQU      %
         LW,2     DR#SEMII          GET ;I
         B        DRSG2
DRSG1    EQU      %
         CI,8     DRUDEFBT          CHECHK FOR UNDEFINED ADR INPUT
         BCS,4    DRERR             YES, ERROR
         BAL,4    DREVALIT          EVALUATE ENTIRE EXPRESSION          03040000
         LW,2     3                 MOVE ADR
DRSG2    EQU      %
         MTW,0    INTPMODE          IN TRANSFER BREAK MODE
         BEZ      DRSG3             NO, NORMAL EXECUTION
         STW,2    IA                YES, STORE GO LOC IN IA
         B        INTEX             GO EXECUTE INTERPRETIVELY
DRSG3    EQU      %
         LW,3     DRADMSKM
         STS,2    OLDPSD            STORE IT IN PSD
DRSEMIGB BAL,4    IBRKSET           SET I BREAKS
         LW,6     DR#SEMIC          GET CONDITIONS
         LW,7     DR#SEMIF          GET FLOAT CONTROLS
         SLS,7    28                MERGE CC & FC
         SLD,6    4
         STB,6    OLDPSD            STORE IN GO PSD
         BAL,11   DBRKSET           SET DATA BREAKS
USERGO   LI,6     0                 TURN OFF DELTA'S DELTA-IN-CONTROL
         STW,6    DELTCNTL          FLAG.
         LI,0     -1
         STW,0    IBRKMODE          TURN OFF I BREAK MODE
         STW,0    DBRKMODE          TURN OFF I BREAK MODE
         M:TRAP   (RESTORE,PTC)
         EXECUTE                    START USER UP
         PAGE                                                           03050000
DRSEMIJ  EQU      %
         OR,5     10                CHECK ELEMENT & FIELD COUNTS
         BNEZ     DRERR             NON-ZERO, ERROR
         CI,6     -DRSYMMAX         CHECK IF ANY CHARS INPUT
         BNE      DRERR             YES, ERROR
         LCW,0    SEMIJ             TOGGLE THE SWITCH
         STW,0    SEMIJ             SAVE IT
         B        MESSAGE           GET NEXT COMMAND
*                                                                       03051000
         PAGE
************************************************************************
*                                                                      *
*        ;K ROUTINE - DELETE A SYMBOL OR SYMBOL TABLE(S)               *
*        'SYMBOL NAME';K      REMOVE SPECIFIED SYMBOL FROM TABLE       *
*                     ;K      DELETE GLOBAL & INTERNAL SYMBOL TABLES   *
*                     ;KI     DELETE INTERNAL SYMBOL TABLE             *
*                     ;KG     DELETE GLOBAL SYMBOL TABLE               *
*        WHEN A SYMBOL TABLE IS DELETED, THE PAGES IT OCCUPIES ARE     *
*        RELEASED AND A FLAG IS SET INDICATING THE TABLE HAS BEEN      *
*        RELEASED                                                      *
*                                                                      *
************************************************************************
*                                                                       03053000
DRSEMIK  AI,5     0                 CHECK FIELD NUMBER                  03054000
         BNEZ     DRERR             IS IT ZERO?                         03055000
         AI,10    0                 YES - CHECK ELEMENT COUNT           03056000
         BNEZ     DRERR             IS IT ZERO?                         03057000
         CI,6     -DRSYMMAX         YES - CHECK FOR INPUT               03059500
         BE       DRSEMIKA          HAS ANYTHING BEEN INPUT - NO
         CI,7     #SYMTYPE          YES - IN SYMBOL MODE
         BNE      DRERR             NO, INPUT ERROR
         LI,0     FINDSYM           SET UP TO SEARCH ON SYMBOLS
         STW,0    WHCHSRCH
         BAL,4    LOC%SRCH          SEARCH ALL BUT SPECIAL SYMBOLS
         CI,0     0                 CHECK RESULT
         BL       DRERR             NOT FOUND, ERROR
         BE       MESSAGE           UNDEFINED, IGNORE
         LW,1     KILL%BIT          GET KILL BIT
         AI,9     -2                POINT TO 1ST SYMBOL WORD
         STS,1    *9                STORE IN HIGH BIT OF BYTE COUNT
         B        MESSAGE           GET NEXT MESSAGE
DRSEMIKA EQU      %
         BAL,4    INPTCHAR          GET TRAILING CHARACTER
*
         CI,0     #BLANK            CHECK FOR BLANK
         BNE      KA20              NO
KA10     EQU      %                 RELEASE GLOBAL & INTERNAL
         BAL,15   RELEASE%GLOBAL
KA15     EQU      %
         BAL,15   RELEASE%INTERNAL
         B        MESSAGE           GET NEXT COMMAND
*
KA20     EQU      %
         CI,0     #CRETRN           CHECK FOR CARRIAGE RETURN
         BNE      KA25              NO
         B        KA10              YES, RELEASE GLOBAL & INTERNAL
*
KA25     EQU      %
         CI,0     'G'               CHECK FOR GLOBAL ONLY
         BNE      KA30              NO
*                                   RELEASE GLOBAL ONLY
         BAL,15   RELEASE%GLOBAL
         B        MESSAGE           GET NEXT COMMAND
*
KA30     EQU      %
         CI,0     'I'               CHECK FOR INTERNAL RELEASE
         BNE      DRERR             NO - ILLEGAL CHAR AFTER ;K
         B        KA15
*                                                                       03098000
         PAGE                                                           03099000
*                                                                       03100000
* ;L ROUTINE : SETS BOTH SEARCH LIMITS (LOWER AND UPPER)                03101000
*                                                                       03102000
DRSEMIL  EQU      %
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED INPUT
         BANZ     DRERR             YES, ERROR
         CI,11    1                 CHECK COMMA COUNT
         BNE      DRERR             WERE 2 FIELDS GIVEN                 03107000
         BAL,4    DRGETLIM          YES - GET VALUES OF LIMITS          03108000
         STW,2    DR#SEMI1          SET LOWER LIMIT                     03109000
         STW,3    DR#SEMI2          SET UPPER  LIMIT                    03110000
         B        MESSAGE           GET NEXT COMMAND
*                                                                       03112000
         PAGE                                                           03113000
*                                                                       03114000
* ;N ROUTINE : HANDLES THE NOT WORD SEARCH                              03115000
*                                                                       03116000
DRSEMIN  LW,0     DRNEQTST          INSTRUCTION USED FOR ;N SEARCH      03117000
         B        DRSEMIWC          GO PERFORM SEARCH                   03118000
*                                                                       03119000
* ;W ROUTINE : HANDLES THE WORD SEARCH                                  03120000
*                                                                       03121000
DRSEMIW  LW,0     DREQTST           INSTRUCTION USED FOR ;W SEARCH      03122000
DRSEMIWC STW,0    DRTESTER          SAVE FOR USE IN SEARCH LOOP         03123000
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED INPUT
         BANZ     DRERR             YES, ERROR
         LI,0     0                 INITIALIZE STORE FLAG
         STW,0    STORFLAG
         CI,5     1                 WERE THERE EXACTLY 2 INPUT FIELDS
         BNE      NOSTORE           NO, SEARCH MODE ONLY
         LW,1     DREXPRS+1         GET SUBSTITUTE VALUE
         STW,1    SUBSVAL           SAVE IT
         MTW,1    STORFLAG          SET STORE FLAG
         LW,3     DREXPRS           GET SEARCH VALUE
         B        %+2               CONTINUE
NOSTORE  EQU      %
         BAL,4    DREVALIT          EVALUATE ENTIRE EXPRESSION          03125000
         AND,3    DR#SEMIM          EXTRACT PART OF EXPRESSIN TO BE USED03126000
         STW,3    DRFNDVAL          SAVE VALUE TO BE FOUND              03127000
         LW,3     DR#SEMI1          GET BEGINNING LOC OF SEARCH
         STW,3    DRTEMPS1          SAVE VALUE FOR USE IN SCAN
DRSEMIWM LW,4     DELENT            ARE WE INTERFACING WITH MONFIX
         BLEZ     DRSEMIWX          NO
         LW,4     0,4
         BAL,4    0,4               CALL 'GET' SUBR; VALUE IN R3
         BCS,8    DRERR
         B        %+2
DRSEMIWX LW,3     0,3               GET VALUE TO BE TESTED
         STW,3    DRTEMPS2          SAVE VALUE FOR USE LATER IF NEEDED  03134000
         AND,3    DR#SEMIM          EXTRACT PORTION OF INTEREST         03135000
         CW,3     DRFNDVAL          COMPARE TO SEARCH VALUE             03136000
         EXU      DRTESTER          WAS THE DESIRED RESULT OBTAINED     03137000
         LI,0     0                 SET FLAG TO  ALLOW OUTPUT TO
         STW,0    PRINT%OK          THE PRINTER IF REQUESTED
         LI,0     #CRLF             PUT TTY ON A NEW LINE               03139000
         BAL,4    TYPOUT
         LW,3     DRTEMPS1          GET ADR WHICH PASSED TEST
         STW,3    DR#DSIGN          SET CURRENT VALUE OF %
         LW,0     STORFLAG          ARE WE IN STORE MODE
         BEZ      SRCH1             NO
         LW,0     SUBSVAL           YES, GET SUBSTITUTE VALUE
        LW,1     DR#SEMIM          AND
         STS,0    DRTEMPS2          SET TO PRINT SUBS VALUE
         BAL,11   STSWORD           STORE VALUE THROUGH MASK
SRCH1    EQU      %
         LW,3     DRTEMPS1          GET CURRENT VALUE OF %
         LW,2     DRADRMOD          GET ADDRESS PRINT MODE
         LI,8     0                 FLUSH STATUS BITS                   03142000
         BAL,4    DRPRTADR          PRINT ADDRESS IN APPROPRIATE MODE   03143000
         LI,0     #SLASHSP
         BAL,1    DRPRTSML                                              03145000
         LW,3     DRTEMPS2          GET EXPRESSION WHICH PASSED TEST
         LW,2     DRSLDFLT          GET CURRENT SLASH DEFAULT MODE      03150500
         CI,2     F%TYPE            IN SYM TAB MODE
         BNE      SRCH10            BRANCH IF NO
         LW,2     SYM%TYPE          IS A SYMBOL ASSOCIATED WITH THIS ADR
         BGEZ     %+2               BRANCH IF YES
         LI,2     R%TYPE            DEFAULT TO SYMBOLIC MODE
SRCH10   EQU      %
         BAL,4    DRPTEXP           GO PRINT IN THE DESIRED MODE        03151000
DRSEMIWT MTW,1    DRTEMPS1          ADVANCE LOCATION COUNTER            03152000
         LW,3     DRTEMPS1          GET UPDATED LOCATION VALUE          03153000
DRSEMIWG CW,3     DR#SEMI2          COMPARE TO FINAL VALUE              03154000
         BLE      DRSEMIWM          ARE WE DONE YET?                    03155000
         B        MESSAGE
*                                                                       03157000
         PAGE
DRSEMIO  EQU      %
         LI,14    0                 CONSTANTS
         LI,15    1
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED INPUT
         BANZ     DRERR             YES, ERROR
         BAL,4    DRGETLIM          GET LIMITS
         STD,2    DUMP%LMTS         SAVE THEM
         BAL,7    DUMPBUF           DUMP WAITING OUTPUT
         BAL,11   OPEN%PRNT         OPEN M:XX TO PRINTER
         BAL,11   GET%HEADER        GET TRAILING HEADER INF ANY
,PRNTFPT M:WRITE  M:XX,;            PAGE EJECT & PRINT HEADER
                  (BUF,VFCHAR),;
                  (BTD,3),;         BYTE DISPLACEMENT
                  (WAIT),;
                  (ERR,DRERR),;
                  (ABN,DRERR),;
                  (SIZE,132)
         BAL,4    BLANKBUF          BLANK PRINT BUFFER
         LW,0     FLDREG            ANY FIELDS ENTERED FOR OUTPUT
         BEZ      MESSAGE            NO, EXIT
         MTW,0    DELENT            ANALYZ/MONFIX INTERFACE
         BGZ      SMO20             YES - DONT DUMP REGS
         LI,0     'B'                YES, SET DOUBLE SPACE FORMAT CHAR
         STW,0    VFCHAR
*
         LI,3     SAVREGS           ADDRESSES FOR R0-R7
         LI,10     SAVREGS+7
         BAL,4    LINESET            SET UP BUFFER
         LI,7     0                 RESET OUTPUT ADR TO ZERO
         LI,1     0                 INDEX INTO BUFFER
         BAL,11   CONV
         BAL,4    ZEROUT
         PRINT
*
         LI,0     X'C0'             SINGLE SPACE NEXT LINE
         STW,0    VFCHAR
*
*        REPEAT ABOVE FOR R8 - R15
*
         LI,3     SAVREGS+8
         LI,10    SAVREGS+15
         BAL,4    LINESET
         LI,7     8
         LI,1     0                 INDEX IN BUFFER
         BAL,11   CONV
         BAL,4    ZEROUT
         PRINT
*
SMO20    EQU      %
         LI,0     'B'                SET DOUNBLE SPACE FORMAT CHAR
         STW,0    VFCHAR
         STW,14   ENDOFDMP          RESET END OF DUMP FLAG
*
SMO30    EQU      %
         LW,3     DUMP%LM1          GET START OF THIS LINE
         LW,10    3                 COMPUTE END OF
         AI,10    7                  LINE LOCATION
         CW,10    DUMP%LM2          CHECK FOR END
         BGE      SMO60             YES
         STW,10   DUMP%LM1          NO, COMPUTE START OF
         MTW,1    DUMP%LM1           NEXT LINE
SMO40    EQU      %
         BAL,4    LINESET           GO SET UP THIS LINE
         LW,0     SUM               CHECK LINE SUM
         BNEZ     SMO50             BRANCH IF NOT DUPLICATE LINE
         LI,0     'B'                DUP, SET DOUBLE SPACE
         STW,0    VFCHAR
         B        SMO55             SKIP OUTPUT OF THIS LINE
*
SMO50    EQU      %
         BAL,4    ZEROUT
         PRINT                       PRINT A LINE
         LI,0     X'C0'             SINGLE SPACE VFCHAR
         STW,0    VFCHAR
SMO55    EQU      %
         LW,0     ENDOFDMP          CHECK FOR END
         BEZ      SMO30             NO
         LW,0     VFCHAR             IF VFC CHAR IS 'B', WE HAVE
         CI,0     'B'               BEEN SKIPPING LLINES
         BNE      %+3
         BAL,4    ZEROUT
         PRINT                      YES, PRINT LAST LINE
         BAL,4    BLANKBUF          BLANK OUTPUT BUFFER
         B        MESSAGE           YES, NEXT COMMAND
SMO60    EQU      %
         LW,10    DUMP%LM2          GET LAST LOC REQUESTED
         STW,15   ENDOFDMP          SET END FLAG
         B        SMO40             DO LAST LINE
ZEROUT   EQU      %
         LD,6     OUTBUF
         SLD,6    24
         OR,7     BLNK
         STD,6    OUTBUF
         B        0,4
         PAGE                                                           03158000
DRSEMIP  EQU      %
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED INPUT
         BANZ     DRERR             YES, ERROR
         MTW,0    DBRKMODE          IN DATA BREAK MODE
         BGEZ     DRSG0             YES, CONTINUE AT TRAP + 1
         MTW,0    IBRKMODE          NO, IN I BRK MODE
         BLZ      DRSG4             NO
         AI,10    0                 PROCEED COUNT INPUT
         BEZ      IBRKCONT          NO
         BAL,4    DREVALIT          YES
         AI,3     -1                DECREMENT BY ONE
         LW,5     IBRKNUM           GET CURRENT BREAK NUMBER
         STW,3    IBRKPRCD,5        SAVE PROCEED COUNT
IBRKCONT EQU      %
         MTW,0    INTPMODE          IN TRANSFER BREAK MODE
         BGZ      INTEX             YES, CONTINUE THERE
         BAL,11   BRKINTPT          INTERPRET & SET UP TO EXECUTE BRK
         LI,0     IBRKEXEC          SET UP TO INITIATE USER AT BROKEN
         LW,1     DRADMSKM          INSTRUCTION
         STS,0    OLDPSD
         B        DRSEMIGB          GO OGGO
         PAGE
************************************************************************
*                                                                      *
*        THIS ROUTINE READS GLOBAL AND INTERNAL SYMBOL TABLES FROM     *
*        DISC.  IF NO INPUT PRECEDES ';S', THE GLOBAL SYMBOL TABLE IS  *
*        READ IN.  IF THERE IS INPUT, IT MUST BE A ROM NAME.  THE      *
*        INTERNAL SYMBOL TABLE FOR THAT ROM WILL BE READ IN.   TO GET  *
*        RID OF SYMBOL TABLES, SEE SECTION ';K'.                       *
*        ;S              LOADS GLOBAL SYMBOL TABLE                     *
*        'ROM NAME';S    LOADS SPECIFIED INTERNAL SYMBOL TABLE         *
*        SEQUENCE OF STEPS                                             *
*        1.) GET PAGES REQUIRED IF THEY ARE NOT ALREADY AVAILABLE      *
*        2.) OPEN DCB M:XX FOR FILE I/O IF NOT ALREADY OPEN ON FILE    *
*        3.) SET UP FPT FOR KEYED READ                                 *
*        4.) DO THE READ                                               *
*                                                                      *
************************************************************************
DRSEMIS  EQU      %
         AI,5     0                 CHECK FIELD COUNT
         BNEZ     DRERR             ERROR - MORE THAN 1 FIELD
         AI,10    0                 CHECK ELEMENT COUNT
         BNEZ     DRERR             ERROR - MORE THAN 1 NAME
         CI,6     -DRSYMMAX         ANY CHARACTERS INPUT
         BE       GLOBAL%SYM        NO - GET GLOBAL SYMBOLS
*        READ INTERNAL SYMBOL TABLE                                    *
*        SET UP KEY FOR DISC READ. KEY IS ROM NAME + ZERO BYTE         *
         LI,0     INTLFLAG          SET UP TO SET INTERNAL SYM FLAG IF
         STW,0    SYMBFLAG          OPEN & READ ARE SUCCESSFUL
         STW,5    NENTINTL          RESET # ENTRIES FOR INTL SYMB
         AI,6     DRSYMMAX          CONVERT TO POSITIVE BYTE COUNT
         CI,6     10                CHECK LENGTH OF NAME
         BLE      %+2
         LI,6     10                TRUNCATE IF TOO LONG
         LW,7     6                 SAVE COUNT IN R7 FOR SHIFTING BUF
         AI,6     1                 ADD 1 TO COUNT FOR TRAILING CODE KEY
         LW,15    6                 SAVE COUNT IN R15
         LI,0     X'10'             ADD TRAILING KEY CODE TO NAME
         B        SINT00+1
SINT00   EQU      %
         LB,0     DRCHRBUF,7        GET CHAR IN BUF
         STB,0    DRCHRBUF,6        MOVE IT OVER 1 BYTE
         AI,7     -1                DECREMENT INDICES
         BDR,6    SINT00            LOOP
         STB,15   DRCHRBUF          STORE BYTE COUNT
         BAL,4    CHK%SYM%CHANGE    IF LMN CHANGED, RELEASE OLD SYM
*                                     TABLES, SET UP NEW ONES.
         LW,6     IST               GET INT SYM TAB SIZE/LOC
         BEZ      DRERR             ERROR - NO IST
         LI,9     NENTINTL          # WORDS READ IS STORED *9
         LW,0     INTLFLAG          DO WE ALREADY HAVE INT SYM TAB PAGES
         BNEZ     SINT10            YES DON'T GET AGAIN.
         LH,7     IST
         SLS,7    -1
         AW,7     IST
         AI,7     -1                LAST IST ADDRESS.
         MTW,0    GLBLFLAG          IF WE HAVE GLOBALS,
         BEZ      %+2               BEGIN AT THE NEXT PAGE
         AI,6     X'1FF'            FOLLOWING THEM.
         BAL,11   GET%PAGES
         BCS,8    SINT101           CAN'T GET PAGES...
         LW,6     IST
         MTW,1    *SYMBFLAG         SET PAGES GOTTEN
SINT10   EQU      %
         STW,9    SYMBSIZE          SAVE NENT LOC FOR LATER BUMPING
         LH,7     6                 COUNT TO R7
         SLS,7    -1                SHIFT OFF LOW ORDER BIT
         AND,6    M17               CLEAR UPPER 15 BITS
         STW,6    SYM%BUF           SAVE BUFFER ADDRESS
         SLS,7    2                 FORM BYTE COUNT
         STW,7    SYM%SIZ           SAVE SIZE
         SLS,7    -2                FORM WORDCOUNT
         AW,7     6                 COMPUTE LAST ADDRESS
         AI,7     -1
         STD,6    DRSRCHLM          SAVE START & END ADRS
*
SINT20   EQU      %
         BAL,11   OPEN%FILE         OPEN FILE CURRENT LMN + PASSWORD
         MTW,0    DCB%STAT          DID DCB GET OPEN
         BEZ      DRERR             NO
*                                   READ THE SYMBOL TABLE
,FRDFPT  M:READ   M:XX,;
                  (BUF,*SYM%BUF),;
                  (SIZE,*SYM%SIZ),;
                  (ERR,DRERR),;
                  (ABN,DRERR),;
                  (BTD,0),;
                  (WAIT),;
                  (KEY,DRCHRBUF)
         LW,0     M:XX+13           GET # BYTES READ - RWS
         SLS,0    -2                FORM WORD ADDRESS
         AWM,0    *SYMBSIZE         BUMP APPROPRIATE NENT
         LD,6     DRSRCHLM
*        USED TO SET 01 ACCESS ON SYMBOL TABLE PAGES HERE
         BAL,0    CLOSEXX
         B        MESSAGE           GET NEXT MESSAGE
GLOBAL%SYM        ;                 GET GLOBAL SYMBOL TABLE
         EQU      %
         BAL,4    CHK%SYM%CHANGE    IF LMN CHANGED, RELEASE OLD SYM
*                                     TABLES, SET UP NEW ONES.
         MTW,0    GST               DOES GLOBAL SYMTAB EXIST
         BEZ      DRERR             BRANCH IF NO
         LW,0     GLBLFLAG          GLOBAL SYM TAB READ & NOT RELEASED
         BNEZ     DRERR             YES - ERROR
         LI,0     GLBLFLAG          SET UP TO SET GLOBAL SYM FLAG IF
         STW,0    SYMBFLAG          OPEN & READ ARE SUCCESSFUL
         BAL,11   OPEN%FILE         OPEN FILE TO CURRENT LMN + PASSWORD
         MTW,0    DCB%STAT          DID DCB GET OPEN
         BEZ      DRERR             NO
*                                     THIS IS DONE NOW SO THAT THE
*                                     PROPER LMN WILL BE ESTABLISHED
*                                     IN FILE%NAME.  LMN MAY CHANGE.
*
* READ TREE RECORD TO GET ACTUAL LMN
         M:READ   M:XX,;
                  (BUF,TREEBUF),;
                  (SIZE,16),;
                  (ERR,DRERR),;
                  (ABN,TREEABN),;
                  (BTD,0),;
                  (WAIT),;
                  (KEY,TREE)
TREEABN  LB,1     10
         CI,1     7                 IGNORE EXPECTED LOST DATA ABN
         BNE      DRERR
         LCI      3
         LM,10    TREEBUF+1         MOVE LMN TO KEY BUFFER
         STM,10   DRCHRBUF          FOR THE KEYED FILE READ
         MTB,1    DRCHRBUF          INCREMENT BYTE COUNT
         LB,1     DRCHRBUF          GET NEW BYTE COUNT
         CI,1     11                CHECK LENGTH OF NAME
         BLE      %+2
         LI,1     11                TRUNCATE IF TOO LONG
         LI,0     9
         STB,0    DRCHRBUF,1        ADD MODIFIER BYTE TO KEY
         STB,1    DRCHRBUF          CORRECT BYTE COUNT IN BUFFER
         LI,9     NENTSYM           # WORDS READ IS STORED *9
         LW,6     GST               COUNT & START ADR GLOBAL SYM TAB
         MTW,0    NENTSYM
         BEZ      %+2               IF WE AVE ENTERED SYMBOLS
         AI,6     X'1FF'            DON'T GET THE FIRST GLOBAL
         LH,7     GST               PAGE...
         SLS,7    -1
         AW,7     GST
         MTW,0    INTLFLAG          IF WE HAVE INTERNAL SYMBS
         BEZ      %+4               DONT TRY TO GET THEIR
         MTW,0    IST               FIRST PAGE..
         BEZ      %+2
         AND,7    =X'1FE00'
         AI,7     -1
         BAL,11   GET%PAGES
         BCS,8    SINT101           CAN'T GET PAGES..
         LW,6     GST
         MTW,1    *SYMBFLAG         SET PAGES GOTTEN
         B        SINT10
*
SINT101   EQU     %
         WRT%UC   PAGEASGN
         B        MESSAGE
*
*
CHK%SYM%CHANGE    ;
         EQU      %
         LW,5     DELENT            IF LMN HAS CHANGED (WHICH HAPPENS
         BLEZ     0,4
         LW,5     3,5
         CW,5     OLDELENT            IFF J:DELENT CHANGES),
         BE       0,4
         STW,5    OLDELENT
         BAL,15   RELEASE%GLOBAL    RELEASE OLD GLOBAL SYM TAB,
         BAL,15   RELEASE%INTERNAL  RELEASE OLD INTERNAL SYM TAB,
         B        INIT%SYM%TABS     SET UP ADRS OF NEW ONES, AND EXIT.
         PAGE
*                                                                      *
*        THIS ROUTINE CONVERTS THE CURRENT D OR I BREAK TO TRACE MODE  *
*                                                                      *
************************************************************************
DRSEMIT  LW,0     IBRKMODE          ARE WE IN I BREAK MODE
         BNEZ     DBRKTRAC          NO
         LW,1     IBRKNUM           YES. GET CURRENT BREAK ENTRY #
         LW,3     DRBIT0,1
         STS,3    ITRCTBL           SET I TRACE TABLE
         B        MESSAGE
DBRKTRAC LW,0     DBRKMODE          ARE WE IN D BREAK MODE
         BNEZ     SMT20             NO, CHECK TRANSFER BRK MODE
         LW,1     DBRKNUM           GET BREAK NUMBER
         LW,3     DRBIT0,1
         STS,3    TRACETBL          SET TRACE TABLE
         B        MESSAGE
SMT20    EQU      %
         MTW,0    INTPMODE          IN TRANSFER BREAK MODE
         BLEZ     DRERR             NO, ERROR
         LI,0     1                 YES
         STW,0    TRACMODE          TURN ON TRACE MODE
         PAGE                                                           03184000
*                                                                       03185000
* ;U COMMAND : PRINTS OUT ALL UNDEFINED SYMBOL NAMES                    03186000
*                                                                       03187000
************************************************************************
DRSEMIU  EQU      %
         OR,5     10                CHECK IF ANY INPUT
         BNEZ     DRERR             YES, ERROR
         LI,0     SMU10             SET TO SEARCH ON UNDEFINED SYMBOLS
         STW,0    WHCHSRCH
         BAL,4    LOC%SRCH          SEARCH ALL BUT SPECIAL SYMBOLS
         B        MESSAGE           RETURN
*
*
SMU10    EQU      %                 UNDEFINED SEARCH ROUTINE
         PSW,4    DELSTK
         PSW,7    DELSTK
         AW,1     9                 COMPUTE LAST ADR+1
         LW,8     1                 MOVE IT
SMU20    EQU      %
         LB,0     *9                GET CODE BYTE
         SLS,0    -6                POSITION CODE
         CI,0     0                 CHECK FOR UNDEFINED
         BNE      SMU30             NO
         STW,0    PRINT%OK          SET FLAG TO ALLOW PRINTER OUTPUT
         LI,0     #CRETRN           YES, SEND A CARRIAGE RETURN
         BAL,4    TYPOUT
         BAL,4    DRSYMPT           PRINT THE SYMBOL
SMU30    EQU      %
         AI,9     3                 BUMP POINTER
         CW,9     8                 CHECK FOR DONE
         BL       SMU20             NO
         LI,0     #CRETRN           YES, SEND A CR
         BAL,4    TYPOUT
         PLW,7    DELSTK
         PLW,4    DELSTK
         B        *7                RETURN
         PAGE                                                           03199000
*                                                                       03200000
* ;X ROUTINE : EXECUTES THE INPUT EXPRESSION AS AN INSTRUCTION          03201000
*                                                                       03202000
DRSEMIX  EQU      %
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED INPUT
         BANZ     DRERR             YES, ERROR
         BAL,4    DREVALIT          EVALUATE INPUT EXPRESSION
         STW,3    EXECINST          STORE INST IN EXECUTE AREA
         LI,0     EXECINST          SET GO LOCATION TO EXECUTE AREA
         LI,1     X'1FFFF'
         STS,0    OLDPSD
         LW,0     DR#SEMII
         STW,0    TEMP
         B        DRSEMIGB
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
SEMIY    EQU      %
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED INPUT
         BANZ     DRERR             YES, ERROR
         LI,14    0                 CONSTANTS
         LI,15    1                     "
         BAL,4    INPTCHAR          GET FOLLOWING CHARACTER
         CI,0     'D'               DISPLAY SPECIAL ACTION TABLE
         BE       SEMIYD
         CI,0     'R'               RESET SPECIAL ACTION TABLE
         BE       SEMIYR
         CI,0     'S'               SET SPECIAL ACTION TABLE
         BE       SEMIYS
         CI,0     'T'
         BE       SY10              SET JUMP-TRACE MODE
         STW,14   TRACMODE          INITIALIZE FLAGS
         MTW,-1   CHARINDX          BACK UP INPUT POINTER BY 1
         B        SY10+1            SET JUMP-STOP MODE
SY10     EQU      %
         STW,15   TRACMODE          SET TRACE MODE FLAG
         STW,14   DO%DONT
         STW,14   TRACLOOP
         STW,14   STEPMODE          *
         STW,15   INTPMODE          *
         LW,1     DREXPRS           GET LOCATION FIELD
         CI,5     0                 WAS MORE THAN 1 FIELD INPUT
         BG       SY30              YES
         AI,10    0                 NO, ANY INPUT
         BGZ      SY20              YES
         LW,1     DR#SEMII          NO, GET CURRENT ;I
         B        INTEX+1           START UP TRANSFER BREAK EXECUTION
SY20     EQU      %                 ONLY 1 FIELD INPUT
         CI,1     15                <THAN 15 TURNS OFF TRANSFER MODE
         BG       INTEX+1           >15 STARTS UP AT SPECIFIED LOC
         STW,14   BADR              RESET BRK ADR
         STW,14   INTPMODE          TURN OFF TRANSFER MODE
         B        MESSAGE           GET NEXT COMMAND
SY30     EQU      %                 MORE THAN 1 FIELD INPUT
         LW,0     DREXPRS+1         GET DO-DONT FIELD
         STW,0    DO%DONT           STORE IT
         CI,5     2                 WAS 3RD FIELD INPUT
         BL       SY35              NO, GET LOCATION
         LW,0     DREXPRS+2         YES, GET BDR/BIR DO-DONT FLAG
         STW,0    TRACLOOP          STORE IT
SY35     EQU      %
         CI,1     15                CHECK LOCATION FIELD
         BLE      SY20-2            <15=NULL, GO FROM ;I
         B        INTEX+1           >15 START TRANSFER MODE AT LOC
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
SEMIYR   EQU      %                 RELEASE SPECIAL ACTION LOCATIONS
         CI,5     0                 MORE THAN 1 FIELD INPUT
         BG       SYR10             YES
         AI,10    0                 NO, ANY INPUT AT ALL
         BG       SYR10             YES, GO PROCESS
         LI,7     8                 NO, CLEAR ENTIRE TABLE
         STW,14   TRACSPEC-1,7      ZERO THE ENTRIES
         BDR,7    %-1
         STW,14   TRACNENT          NENT=0
         B        MESSAGE           GET NEXT COMMAND
SYR10    EQU      %                 RELEASE SPECIFIED LOCATIONS
         AI,5     1                 # OF LOCATIONS TO RELEASE
         LW,10    DREXPRS-1,5       GET AN INPUT LOCATION TO RELEASE
         BAL,4    CHKTABL           IS IT IN THE TABLE
         B        SYR20             YES, RELEASE IT
         LI,0     #CRETRN           PUT OUT CR
         BAL,4    TYPOUT
         LW,3     10                NO, OUTPUT ADDRESS
         BAL,4    DRPRTADR
         LI,0     NOTINTAB          OUTPUT 'NOT IN TABLE'
         BAL,4    DLMSG
         B        DRERR             ERROR EXIT
SYR20    EQU      %
         MTW,-1   TRACNENT          DECREMENT # OF ENTRIES
         STW,14   TRACSPEC,7        SET ENTRY TO ZENT
         BDR,5    SYR10+1           LOOP
         B        MESSAGE           DONE, GET NEXT COMMAND
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
SEMIYS   EQU      %                 SET SPECIAL ACTION TABLE
         CI,5     0                 MOVE THAN 1 FIELD INPUT
         BG       SYS10             YES
         AI,10    0                 NO, ANY INPUT AT ALL
         BE       DRERR             NO, ERROR
SYS10    EQU      %
         AI,5     1                 # OF LOCATIONS TO SET
         LI,10    0                 VALUE FOR FREE ENTRY IN TABLE
         BAL,4    CHKTABL           IS THERE A FREE ENTRY
         B        SYS20             YES
         LI,0     TABLFULL          NO, OUTPUT TABLE FULL
         BAL,4    DLMSG
         B        DRERR             ERROR EXIT
SYS20    EQU      %
         LW,0     DREXPRS-1,5       GET INPUT LOCATION
         STW,0    TRACSPEC,7        STORE IT IN TABLE
         MTW,1    TRACNENT          BUMP # OF ENTRIES
         BDR,5    SYS10+2           LOOP
         B        MESSAGE           DONE, GET NEXT COMMAND
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
SEMIYD   EQU      %                 SPECIAL ACTION TABLE DISPLAY
         LI,0     0                 SET FLAG TO  ALLOW OUTPUT TO
         STW,0    PRINT%OK          THE PRINTER IF REQUESTED
         LW,0     TRACNENT          ANYTHING IN TABLE
         BGZ      SYD10-2           YES
         LW,0     NOMESS            NO, OUTPUT 'NONE' AND
         LI,1     MESSAGE           GET NEXT MESSAGE
         B        DRPRTSML
         LW,2     DRADRMOD          GET ADDRESS OUTPUT FORMAT
         STW,14   DRTEMPS1          INITIALIZE INDEX
SYD10    EQU      %
         LW,7     DRTEMPS1          INDEX
         CI,7     8                 CHECK FOR DONE
         BGE      MESSAGE           YES
         LW,3     TRACSPEC,7        NO, GET NEXT ENTRY
         BEZ      SYD20             INACTIVE, GET NEXT
         LI,0     #CRETRN           PUT OUT CR
         BAL,4    TYPOUT
         LW,2     DRADRMOD          GET ADDRESS OUTPUT MODE
         BAL,4    DRPRTADR          OUTPUT LOCATION
         LI,0     #2SPACE           PUT OUT 2 SPACES
         BAL,1    DRPRTSML
SYD20    EQU      %
         MTW,1    DRTEMPS1          BUMP INDEX
         B        SYD10             LOOP
         PAGE                                                           03215000
*                                                                       03216000
* ;Z ROUTINE : CLEARS OUT DESIRED AREA OF CORE                          03217000
*                                                                       03218000
DRSEMIZ  AI,5     0                 CHECK FIELD NUMBER                  03219000
         BEZ      DRERR             1 OR NO FIELDS, ERROR
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED SYMBOL
         BANZ     DRERR             YES, ERROR
         LW,2     DREXPRS           GET LOWER LIMIT
         LW,3     DREXPRS+1         GET UPPER LIMIT
         BAL,4    DRGETLMX          CHECK LOWER LIMIT LQ UPPER LIMIT
         STD,2    DRTEMPD1          SAVE LIMITS
DRSEMIZM EQU      %
         LW,0     DREXPRS+2         GET VALUE TO BE STORED
         LW,3     DRTEMPD1          GET ADDRESS TO STORE IT IN
         BAL,11   STORWORD          STORE IN USER REG OR MEMORY
         MTW,1    DRTEMPD1          INCREMENT LOWER LIMIT               03241000
DRSEMIZG EQU      %
         LW,3     DRTEMPD1          GET ADDRESS
         CW,3     DRTEMPD1+1        COMPARE AGAINST UPPER LIMIT
         BLE      DRSEMIZM          IS ANY MORE LEFT TO BE RESET        03244000
         B        MESSAGE
*                                                                       03246000
         PAGE                                                           03247000
*                                                                       03248000
* ;/ ROUTINE : CHANGES THE DEFAULT TYPE OF THE "SLASH" COMMAND          03249000
*                                                                       03250000
DRSEMISL EQU      %
         LW,0     OUTMODE           GET SPECIFIED MODE
         STW,0    DRSLDFLT          STORE IN SLASH DEFAULT
         STW,0    DRSLSHMD          STORE IN CURRENT SLASH MODE
         B        MESSAGE
*                                                                       03253000
* ;= ROUTINE - CHANGES THE DEFAULT TYPE OF THE "EQUAL" COMMAND          03254000
*                                                                       03255000
DRSEMIEQ EQU      %
         LW,0      OUTMODE          GET NEW MODE
         STW,0    DREQDFLT           UPDATE '=' DEFAULT MODE
         B        MESSAGE
*                                                                       03261000
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
*                 SYSTEM CONTROL :                                     *
*                            BREAK KEY ENTRY & INITIALIZATION          *
*                            TRAPS                                     *
*                            ABORTS                                    *
*                            I & D BREAKPOINT CONTROL                  *
*                            TRANSFER BREAKPOINT CONTROL               *
*                                                                      *
*                                                                      *
************************************************************************
************************************************************************
*                                                                      *
*        THIS CODE HANDLES USER HITTING BREAK KEY                      *
*                                                                      *
************************************************************************
T:DBRK   EQU      %                 BREAK KEY ENTRY FROM SCHEDULER
         LW,15    DELTCNTL          GET DELTA-IN-CONTROL FLAG
         MTW,1    DELTCNTL          SET IT
         M:TRAP   (IGNORE,FX)       IGNORE FIXED POINT TRAPS IN DELTA
         CI,15    0                 DELTA IN CONTROL
         BG       %+2               YES, DON'T STORE PTC
         STD,8    PTC
         MTW,1    FIRSTIME          FIRST TIME INTO DELTA
         BGZ      BRKEYRTN          NO
BRK10    LI,4     BRK30
         MTW,0    DELENT            ANALYZ/MONFIX INTERFACE
         BGZ      CHK%SYM%CHANGE    YES
*
*
INIT%SYM%TABS     ;                 SET UP SYM TBL ADDRESSES
         EQU      %
         STW,4    TEMP              YES:
         BAL,11   OPEN%FILE             OPEN FILE TO LMN,
         LW,4     TEMP
         AI,0     0
         BEZ      BRK15             LMN NOT IN JIT
         M:READ   M:XX,(BUF,HEADBUF),;  READ HEAD RECORD,
                       (SIZE,48),;
                       (ERR,DRERR),;
                       (ABN,DRERR),;
                       (BTD,0),;
                       (WAIT),;
                       (KEY,HEADKEY)
         BAL,0    CLOSEXX               CLOSE FILE,
         LW,0     HEADBUF+7             AND GET GST AND IST WORDS
         LW,1     HEADBUF+8               FROM THE HEAD.
         STW,0    GST               SAVE GST SIZE/LOC
         STW,1    IST               SAVE IST SIZE/LOC
         AND,0    M17               IS THERE A GST ?
         BNEZ      BRK20            YES
BRK15    EQU      %
         LW,0      PUL               GET PROGRAM UPPER LIMIT
         SLS,0    9                 FORM WORD ADR FROM PAGE #
         AI,0     -1
BRK20    EQU      %
         STW,0    SYMBEGIN          SET START ADR FOR DEFINING SYMBOLS
         AND,1    M17
         STW,1    INTL%SYM%BEGIN    SAVE START ADR OF INTL SYM TABLE
         B        0,4               EXIT
*
*
BRK30    EQU      %
         LI,1     X'1FFFF'
         LS,0     OLDPSD            GET USER'S ADDRESS
         STW,0    DR#SEMII          INITIALIZE ;I
         STW,0    DR#DSIGN            AND '%'.
         LI,0     0
         STW,0    OUTCHAR
       LI,1     DELTMSG           PUT OUT 'DELTA HERE'
         LI,4     MESSAGE           EXIT TO MESSAGE
       B        DLMSG
BRKEYRTN LI,1     DRINITA           SET INITIALIZATION POINT
         STW,1    MESSEXIT
         LD,0     STKINIT           INITIALIZE DELTAS INTERNAL
        STD,0    DELSTK            WORKING STACK
         CI,15    0
         BLE      BRK40             DELTA NOT IN CONTROL AT BREAK
         LI,11    BREAKCHK+2        SET UP TO STOP EVERYTHING & RESTART
         B        PULLDELT
BRK40    EQU      %
         MTW,0    DELENT            ARE WE INTERFACING WITH MONFIX
         BGZ      BRK10             YES
         BAL,11   RSTORD            OTHERWISE RESTORE EVERYTHING
         LH,11    DTSTACK+1         LOOK AT SPACE COUNT IN STACK POINTER
         CI,11    2                 ARE THERE 2 ENVIRONMENTS
         BG       BRK50             NO, CONTINUE NORMALLY
         BAL,11   PULLDELT          YES, TRAP OR BREAK ABOUT TO DO ITS
         LI,1     0                 THING WHEN BREAK KEY WAS HIT
         STW,1    DELTCNTL          PULL STACK, OUTPUT MESSAGE, CLEAR
         LCF      DELTPSD           INTERPRETIVE MODE, RESTORE CONDITION
         B        T:DTRAP           GO PROCESS TRAP
BRK50    EQU      %
         LI,1     BRKAT             PUT OUT BREAK MESSAGE
         BAL,4    DLMSG
         LI,2     0                 SYMBOLIC ADDRESS MOFE
         LW,3     DR#SEMII          GET ADDRESS AT BREAK
         BAL,4    DRPRTADR
         B        DRINIT            GO TO CONSOLE
PULLDELT MTW,1    BREAKEY           SET BREAK FLAG
         LI,1     BRKDELT            BUFFER
         LB,2     BRKDELT            BYTE COUNT
         LI,3     1                 BYTE OFFSET
         WRITE%UC                   TYPE OUT MESSAGE
         LI,1     0
         STW,1    INTPMODE          STOP INTERPRETIVE MODE
DELTCONT LI,1     -20               DECREMENT STACK
         MSP,1    DTSTACK           POINTER DOUBLEWORD
         B        *11
         PAGE
*        DATA BREAKPOINT TRAP PROCESSING
*
T:DTRAP  EQU      %
TRAPENTR STCF     TCOND             SAVE CONDITIONS
         LW,15    DELTCNTL          GET DELT-IN-CONTROL FLAG
         MTW,1    DELTCNTL          SET DELTA-IN-CONTROL FLAG
         M:TRAP   (IGNORE,FX)
         STW,15   DIC               SAVE DELTA-IN-CNTL FLAG AT TRAP
         MTW,0    DIC               CHECK PREVIOUS FLAG
         BEZ      USERTRAP          USER WAS IN CONTROL
*
         LI,1     -20               DECREMENT STACK
         MSP,1    DTSTACK
         LCF      TCOND             GET CONDITIONS
         BCR,1    DELTRAP           NOT MEM PROTCT, DELTA TRAPPED
*                                   CHECK IF GETTING A PAGE
         MTW,1    GTPGMODE          TEST & TURN OFF GET PAGE MODE
         BLEZ     TRAP10            YES, GET PAGE
         MTW,1    DBANLZFG          NO, TEST & TURN OFF D-BRK ANLZ FG
         BGZ      DELTRAP           OFF, IT'S A REAL DELTA TRAP
         B        MEMVIOL           ON, CAME FROM D-BRK ANLZ INST IN
*                                     USER TRAP ROUTINE, SO IT'S A
*                                     USER MEMORY VIOLATION.
TRAP10   EQU      %
         LW,7     DELTREGS+3        GET DELT REG R3: ADR REQUESTED
        LW,6     7                 ADR OF PAGE TO GET
         BAL,11   GET%PAGES         GET PAGE
         BCR,8    TRAP20            GOT IT
*                                  COULDNT GET IT
        WRT%UC   PAGEASGN          PUT OUT ERROR MESSAGE
         LD,0     STKINIT           INITIALIZE DELTAS INTERNAL
        STD,0    DELSTK            WORKING STACK
        B        BCHK10            RESET OUTPUT INDEX & RESTART
*
TRAP20   EQU      %
         LCI      0                 RESTORE DELTAS REGS
         LM,0     DELTREGS
         B        *DELTPSD
*
USERTRAP EQU      %
         STD,8    PTC               SAVE USER TRAP INFO
         BAL,11   RESTORE
         LW,1     *DTSTACK          GET TRAP LOCATION
         AI,1     -X'40'            ADJUST TO FORM INDEX
         LC       TCOND             RESTORE TRAP CONDITIONS
         EXU      TRAPS,1           TRANSFER VECTOR TO RIGHT TRAP RTN
*
TRAP40   EQU      %
         BCS,6    ERRCOND           ERROR CONDITION
         BCS,8    IBRKRTRN          NON-EXISTENT, MAY BE I BREAK
         LW,4     DBRKNENT          ARE THERE ANY DATA BREAKS SET ?
         BLEZ     MEMVIOL           NO, DON'T BOTHER CHECKING EFF ADR
         LI,8     -1                YES, SET D-BRK ANLZ FLAG IN CASE
         STW,8    DBANLZFG            ANLZ TRAPS, GOES TO 'MEMVIOL'.
         LI,8     0                 TURN OFF STACK INST
         STW,8    TRAPTEMP          FLAG
         LCI      0                 RESTORE REGS FOR ANALYZE
         LM,0     SAVREGS
         ANLZ,6   *OLDPSD
         BCR,13   BYTE
         BCR,5    WORD
         BCS,1    BYTE1             BYTE IMMEDIATE
         BCR,8    HALF
DOUBLE   SLS,6    1
         STW,6    DBEFADR           BEGINNING WORD ADDRESS
         LB,7     *OLDPSD           GET OP CODE
         AND,7    M7
         CI,7     X'09'             TEST IF PSW
         BE       DBRKPUSH          YES
         CI,7     X'0B'             TEST IF PSM
         BNE      WORD7             NO
DBRKPUSH EQU      %                 STACK INSTRUCTION
         STW,6    TRAPTEMP          A(SPD) TO TRAPTEMP
         LW,6     0,6               GET STACK LOC
         AI,6     1
         STW,6    DBEFADR           SET BEGINNING ADDRESS
         CI,7     X'09'             PSW INSTRUCTION
         BE       WORD6             YES - ONE LOC TO CHECK
         B        WORD2             PSM - MORE THAN ONE TO CHECK
*
*        NORMAL DOUBLEWORD INSTRUCTION HAS TWO WORDS TO CHECK
*
WORD7    EQU      %
         AI,6     1
         B        WORD6
WORD     STW,6    DBEFADR           SAVE EFFECTIVE ADDRESS
         LB,7     *OLDPSD           GET OP CODE
         AND,7    M7
         CI,7     X'2B'             TEST IF STM
         BNE      WORD6             NO
WORD2    LB,7     OLDPSD            GET CC
         SLS,7    -4
         AI,7     -1                COMPUTE NO. OF REGS -1
         BGEZ     %+2
         AI,7     16
         AW,6     7
WORD6    STW,6    DBEFADRX          SET END ADDRESS
         MTW,1    DBANLZFG          RESET ANLZ TRAP FLAG.
         LW,7     PAGE%MASK         MASK FOR CHECKING IF PAGE HAS A BRK
         BAL,4    DBRK%CHK          IS THERE A D-BRK ON THIS PAGE
         B        %+2               NO
         B        WORD3             YES
         LW,6     DBEFADR           CHECK BEGINNING ADDRESS
         BAL,4    DBRK%CHK          IS THERE A D-BRK ON THIS PAGE
         B        %+2               NO
         B        WORD3             YES
         LW,6     TRAPTEMP          STACK INSTRUCTION
         BEZ      MEMVIOL           NO, MEMORY VIOLATION
         BAL,4    DBRK%CHK          IS THERE A D-BRK ON SPD PAGE
         B        MEMVIOL           NO, MEM VIOL
WORD3    EQU      %
         LCI      4                 RESTORE REGISTERS
         LM,4     SAVREGS+4
         MTW,1    ABORTFLG          PROCESSING AN ABORT
         BEZ      WORD3A            YES
         LC       OLDPSD            GET CONDITIONS
         EXU      *OLDPSD           EXECUTE INSTRUCTION
         STCF     0                 SAVE NEW CONDITION CODES
         SLS,0    -28               POSITION
         STW,0    DR#SEMIC          AND STORE AWAY
         B        WORD31
WORD3A   EQU      %                 REEXECUTE CAL1
         LC       OLDPSD
         EXU      *OLDPSD
         STCF     0                 SAVE NEW CONDITION CODES
         SLS,0    -28               POSITION
         STW,0    DR#SEMIC          AND STORE AWAY
         MTW,1    OLDPSD            BUMP PSD
         MTW,1    TRAPTEMP          CHECK DATA BREAKS
         BGZ      DBRKEXIT          NO
         LI,7     8                 HALF WORD DISPLACEMENT OF REC LENGTH
         LH,5     *ABORTDCB,7       GET RECORD LENGTH IN BYTES
         SLS,5    -1                ADJUST
         AI,5     3                 ROUND UP TO NEAREST WORD
         SLS,5    -2                AND MAKE IT A WORD COUNT
         AW,5     DBEFADR           REG 5 = LAST TRANSFER WORD ADR
         STW,5    DBEFADRX
         B        WORD31A
WORD31   MTW,1    OLDPSD            BUMP PSD
         MTW,1    DR#SEMII          BUMP ;I
WORD31A  LW,7     M17               GET MASK FOR FULL ADDRESS
         LW,5     BIGENTRY          LARGEST ENTRY #
WORD4    LW,6     DBEFADR           GET BEGINNING ADDRESS
         CS,6     DBRKLOC,5         CHECK BEG ADDRESS
         BG       WORD4A            NOT THIS ENTRY
         LW,6     DBEFADRX          GET END ADDRESS
         CS,6     DBRKLOC,5         IS D-BRK WITHIN INST RANGE
         BGE      FND               YES
WORD4A   EQU      %
         LW,6     TRAPTEMP          STACK INSTRUCTION
         BEZ      WORD5             NO, CONTINUE LOOP
         CS,6     DBRKLOC,5         D-BRK ON SPD
         BE       FND               YES
         AI,6     1
         CS,6     DBRKLOC,5         D-BRK ON SPD
         BE       FND               YES
WORD5    AI,5     -1                BUMP INDEX
         BGEZ     WORD4             LOOP
         B        DBRKEXIT          NOT FOUND
BYTE     LB,7     *OLDPSD           GET OP CODE
         AND,7    M7
         CI,7     X'77'             IS IT UNPK
         BNE      BYTE2             NO
         LW,7     6                 EFF ADR TO R7
         LH,6     *OLDPSD           GET LENGTH
         SLS,6    -4
         AND,6    M4
         SLS,6    1                 COMPUTE 2L-2
         AI,6     -2
         B        BYTE3
BYTE2    SLS,6    -2
         B        WORD
BYTE1    EQU      %
         LW,7     *OLDPSD           GET INSTRUCTION
         SLS,7    8
         SLS,7    -28               R FIELD
         OR,7     DRBIT31           RU1
         LW,7     SAVREGS,7         GET CONTENTS OF RU1
         LI,6     0
         SLD,6    8                 COUNT TO R6
         SLS,7    -8
BYTE3    AW,6     7                 END BYTE ADDRESS
         SLS,7    -2                BEG WORD ADDRESS
         SLS,6    -2                END WORD ADDRESS
         STW,7    DBEFADR           SAVE BEGINNING ADR
         B        WORD6
HALF     SLS,6    -1
         B        WORD
FND      LS,6     DBRKLOC,5         GET BREAK LOC
         STW,6    DBEFADR           SAVE EFFECTIVE ADDRESS
         STW,5    DBRKNUM           SAVE INDEX AS BRK #
         LW,6     DBRKCOND,5        GET BREAK CONDITION
        BLEZ     DATABRK           NONE SPECIFIED
         LW,8     DBRKVAL,5         GET CONDITIONAL VALUE
         LW,9     DBRKMASK,5        GET CONDITIONAL MASK
         CS,8     *DBEFADR          COMPARE WITH CONTENTS OF BRK LOC
         EXU      DBRKCOND,5        DO SPECIFIED CONDITIONAL TEST
DBRKEXIT EQU      %
         MTW,0    STEPMODE          IS STEPMODE SET
         BGZ      DRSEMIGB          YES, CONTINUE STEPPING
         B        DRSG0             ELSE GO
*
         PAGE
*         DATA BREAKPOINT - CONTROL TO DEBG
*
DATABRK  LW,5     DBRKNUM           GET BREAK #
         LW,1     DRBIT0,5
         LS,1     TRACETBL
         BEZ      RSTOR
         LI,0     TRACEOFF
         STW,0    SLSHEXIT
         B        DMSG              DONT RESTORE I BREAKS,SET BREAK FLAG
RSTOR    LI,0     0                 TURN ON D BREAK MODE
         STW,0    DBRKMODE
         STW,7    DROPENER          SET OPEN SWITCH ON LOC
         LI,4     DRINITB
         STW,4    MESSEXIT
DMSG     BAL,7    DBRKMSG           D BREAK MESSAGE
         LW,3     DBEFADR
         STW,3    DRUPRLIM
         LI,8     0                 CLEAR FLAG REG, NOT MEANINGFUL NOW
         B        DRSLASHS
TRACEOFF LI,0     MESSAGE
         STW,0    SLSHEXIT
         LI,0     0                 SET FLAG TO  ALLOW OUTPUT TO
         STW,0    PRINT%OK          THE PRINTER IF REQUESTED
         BAL,7    DUMPBUF           DUMP THE TRACE MESSAGE
         B        DRSG0             GO GO
*                                                                       03277000
         PAGE
*        TRAP TO 40 WAS TRULY ILLEGAL
MEMVIOL  EQU      %
ERRCOND  EQU      %
       BAL,15   TRAPCNTL          CHECK IF USER HAS TRAP CONTROL
         LB,10    TCOND             GET TRAP CONDITIONS
         SLS,10   -4                 SHIFT OFF FLOATING CONTROLS
         LI,3     4                  INDEX
GTRPTYP  EQU      %
         SCS,10   -1                TEST CC 4,3,2,1 IN THAT ORDER
         AI,10    0
         BGEZ     LOOPTEST           NOT SET
         LW,1     ERMSVEC-1,3        GET APPROPRIATE ERROR MSG ADR
         BAL,4    DRPRTMSG          PUT IT OUT
LOOPTEST BDR,3    GTRPTYP            CHECK NEXT
*
ERR20    EQU      %
         LW,3     DR#SEMII          OUTPUT ERROR ADDRESS
         LI,2     0                 SYMBOLIC PRINT MODE
GOTOMSG  EQU      %
         BAL,4    DRPRTADR          OUTPUT ADDRESS OF TRAP
*
         LW,3     X'2B'             GET MACHINE DEFINITION
         CI,3     X'80'             IS THIS A 560
         BAZ      DRINIT            NO, CONTINUE
         CI,3     X'40'             IS THIS A 560
         BAZ      DRINIT            NO, CONTINUE
*
         LI,1     BA(LASTBRMSG)     GET LAST BRANCH MESSAGE
         BAL,4    DRPRTMSG          PUT IT OUT
         LW,3     J:ALB             ADDRESS OF LAST BRANCH
         LI,2     0                 SYMBOLIC PRINT MODE
         LI,4     DRINIT            RETURN PUTS OUT CR
         B        DRPRTADR          OUTPUT ADDRESS
*
*
DELTRAP  EQU      %
         LD,0     STKINIT           INITIALIZE DELTAS INTERNAL
        STD,0    DELSTK            WORKING STACK
         LI,1     BA(DTRPMSG)       PUT OUT DELT TRAP MSG
         BAL,4    DRPRTMSG
        LW,3     DELTREGS+16       PUT OUT TRAP LOCATION
         BAL,4    DRPRTHXA
         LI,1     BA(DTRPMSG1)      PUT OUT 2ND PART OF TRAP MSG
         BAL,4    DRPRTMSG
         LI,3     X'1FFFF'          PUT OUT DELTA'S LOC
         AND,3    DELTPSD
         BAL,4    DRPRTHXA
        B        BCHK20
         PAGE
TRAPCNTL EQU      %
         LW,1     *DTSTACK          GET TRAP LOC
         AI,1     -X'40'            COMPUTE TRAPFLAG INDEX
         CI,1     7
         BL       %+2
         LI,1     7
         LH,0     TRAPFLAG,1        GET CORRESPONDING TRAP FLAG BIT
         CH,0     PTC               DOES USER HAVE TRAP CONTROL
         BAZ      *15               BRANCH IF NO
*                                  YES
        STW,15   CURNOPR           SAVE EXIT ADR
        BAL,15   DTS#USER          MOVE THE STACK TO USER IF POSSIBLE
         LW,15    J:ALB             ADDRESS OF LAST BRANCH
         STW,15   SAVREGS+7         TO USER REGISTER 7
        LD,0     OLDPSD            GET TRAP PSD
         LB,2     TCOND             STORE TRAP CONDITIONS IN PSD
        STB,2    0
         LW,14    PTC+1             GET USERS TRAP ENTRY POINT
        LI,15    X'1FFFF'
        STS,14   0                 STORE USERS TRAP ENTRY IN PSD
         BAL,11   DBRKRESET         RESET ACCESS CODE TO 00 FOR DATA PAG
         BAL,11   RSTOR20           SET UP
        B        DRSG0                  AND GO
         PAGE
************************************************************************
*                                                                      *
*        RETURN TO DELTA FROM AN INSTRUCTION BREAKPOINT                *
*                                                                      *
************************************************************************
IBRKRTRN EQU      %
         INT,4    TRAPINST          GET ADR PORTION OF TRAP INSTR
         LW,6     TRAPTEMP          GET TRAPPED INST ADDRESS
         CI,5     8                 WAS IT AN I BREAK
         BLE      IBRK10            MAYBE
*
         CLM,6    BADR              WAS IT A TRANSFER BREAK
         BCR,3    TRAC0             YES
         BCR,12   TRAC0             YES
         B        ERRCOND           PRIVIL INSTR
*
IBRK10   EQU      %
         STW,6    IA                SET TRANSFER BREAK IA
         CI,5     0                 WAS IT AN EXECUTE
         BNE      IBRKTEST          NO CHECK LEGALITY
*
         CLM,6    XRETURN           IS IT REALLY AN EXECUTE
         BOL      ERRCOND           NO, ERROR
         LW,0     TEMP
         STW,0    DR#SEMII
         B        MESSAGE           GET NEXT COMMAND
*
IBRKTEST EQU     %
         CW,6     IBRKLOC-1,5
         BNE      ERRCOND
IBRKFND  AI,5     -1                R5 = BREAKPOINT NUMBER
         STW,5    IBRKNUM
         STW,6    ACTBKLOC          SAVE ACTIVE BREAK LOCATION
         STW,6    IA                SET FOR TRANSFER MODE
         LW,5     IBRKNUM           GET BRK #
         LW,10    IBRKPRCD,5        CHECK FOR PROCEED COUNT
         BLZ      NOPROCED          OUTPUT ON THIS BREAK
         MTW,-1   IBRKPRCD,5        DECREMENT PROCEED COUNT
         B        IBRKCONT          CONTINUE USER EXECUTION
NOPROCED EQU      %
         MTW,1    IBRKMODE          TURN ON I BRK MODE
         LI,11    IBRKCONT          CONTINUE POINT FOR TRACE BREAKS
         B        BRKOUTPT          OUTPUT I BREAK MESSAGE
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
INTEX    EQU      %                 ENTRY FOR TRANSFER BREAK EXECUTION
         LW,1     IA                GET CURRRENT IA
         STD,1    IAP               SET FROM ADDRESS AND RESET TO
*                                   THE STD IS BECAUSE ;Y ENTERS AT
*                                   INTEX+1 WITH START LOC IN R1
         LW,0     STEPMODE          CHECK FOR STEP MODE
         BNEZ     TRACEXEC          YES, GO EXECUTE
*
         STW,1    BADR              SAVE START ADR
         BAL,7    BRANCHK           CHECK IF A BRANCH
         BCS,8    INTPT30           BRANCH IF YES
*
         BAL,7    BRANCHK           GET NEXT BRANCH
         BCS,2    DRSG3             NONE,START NORMAL EXECUTION
         BCR,8    BRANCHK           BRANCH IF BRANCH NOT YET FOUND
*
*        WE NOW HAVE NEXT BRANCH OR EXU-BRANCH IN LINE
*
         LW,2     IA                GET START LOC FOR ;G
         LW,1     BADR              GET ADR WHICH MAY CAUSE BRANCH
         STD,1    IAP               SET UP IA & IAP FOR RETURN
         LW,0     BRXPSD            GET SPECIAL RETURN XPSD
         XW,0     0,1               STORE A BREAK & SAVE THE
         STW,0    FORKINST           BRANCHING INTRUCTION
         B        DRSG3             NORMAL EXECUTION THERE
*
*
TRACEXEC EQU      %
         LW,10    IA                GET CURRENT INSTR ADR 'IA'
         STW,10   BADR              SAVE CURRENT ADR
*
         BAL,7    BRANCHK           ANALYZE THE INSTRUCTION
         BCS,8    INTPT30           BRANCH IF A BRANCH
*
         LW,0     *IA               EXECUTE THE NON-BRANCHING
         STW,0    EXCTRAC           INSTRUCTION
         LI,2     EXCTRAC
         B        DRSG3
*
INTPT30  EQU      %
         STW,10   BADR              SAVE BRANCH POINT
*
         LW,3     IA                INSTRUCTION LOC PLUS 1 FOR BAL
         AI,3     1                 AND NO BRANCH CASES
         LW,2     BALREG            REGISTER FIELD FOR ALL CASES
*
         LW,1     TYPE              CONVERT OP CODE TO AN INDEX
         AI,1     -X'64'            FOR SPECIAL ACTION - TRANSFER VECTOR
         LCI      15                SET CC TO INDICATE BRANCH (FOR BAL)
         EXU      BACT,1            DO IT
         BNEZ     BRANCHER          IT WAS A BRANCH
*
NOBRANCH EQU      %
         LI,5     9                 NO BRANCH CODE
         LW,10    3                 INSTRUCTION LOC
NOBNCH10 EQU      %
         STW,10   DR#SEMII          SET INSTRUCTION COUNTER AND
         STW,10   DR#DSIGN          DOLLAR SIGN
         B        TRACRTRN          GO FINISH BRANCH PROCESSING
*
BDRBNCH  EQU      %
         MTW,-1   SAVREGS,2
         BGZ      BRANCHER
         B        NOBRANCH
*
BIRBNCH  EQU      %
         MTW,1    SAVREGS,2
         BLZ      BRANCHER
         B        NOBRANCH
*
BCRBNCH  EQU      %
         CW,2     DR#SEMIC          ARE BRANCH CONDITIONS SATISFIED
         BAZ      BRANCHER          YES
         B        NOBRANCH          NO
*
BCSBNCH  EQU      %
         CW,2     DR#SEMIC          ARE BRANCH CONDITIONS SATISFIED
         BAZ      NOBRANCH          NO
*                                   YES
BRANCHER EQU      %
         LI,5     10                BRANCH CODE
         B        NOBNCH10
*
*
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
TRAC0    EQU      %
         CI,5     11                CHECK RETURN TYPE
         BL       TRACRTRN          BRANCGH OR STEPMODE
         BE       TRAC00            RETURN TO EXECUTE A BRANCH
         B        ERRCOND           PRIVIL INSTR TRAP
TRACRTRN EQU      %
         MTW,1    IA                BUMP CURRENT IA
TRAC00   EQU      %                 RETURN TO EXECUTE BRANCHES ENTRY
TRAC05   EQU      %
         LI,15    1                 SET GO FLAG
         STW,15   GO%FLAG
         AI,5     -9                5=0,NO JUMP; =1, JUMP
*                                   =2, RETURN TO EXECUTE BRANCH
         STW,5    RETRNTYP          SAVE RETURN CODE
         CI,5     2                 IS IT TO EXECUTE BRANCH
         BE       TRAC10            YES, CHECK FOR I BRK & EXIT
         LW,0     IA,5              GET NEW CURRENT INST ADR
*                                   EITHER IA OR BADR
         STW,0    IA                SET IA
         LW,0     STEPMODE          IN STEP MODE
         BNEZ     TRAC40            YES
         CI,5     1                 NO, WAS IT A BRANCHING BRANCH
         BE       TRAC20            YES, DO OUTPUT CHECK & PROCESS
TRAC10   EQU      %                 CHECK FOR I BRK AND EXIT LOGIC
         LI,5     8                 # ENTRIES IN I BRK TABLE
         LW,2     IA                GET CURRENT LOCATION
         CW,2     IBRKLOC-1,5       COMPARE WITH I BRK TABLE
         BE       TRAC15            IT IS AN I BRK
         BDR,5    %-2               NO, LOOP
         MTW,-2   RETRNTYP          NOT AN I BRK, IS IT A RETURN TO
*                                   EXECUTE A BRANCH INSTRUCTION
         BEZ      TRACEXEC          YES, GO DO IT
         BAL,7    DUMPBUF           DUMP TRACE MESSAGE ON SPECIFIED
*                                   DEVICE IN CASE I BRK IS ON
*                                   A DIFFERENT DEVICE
         LW,0     GO%FLAG           NO, CHECK 'GO' FLAG
         BEZ      MESSAGE           NO GO
         B        INTEX             GO EXECUTE NEXT INSTRUCTIONS
TRAC15   EQU      %                 AT AN I BRK
         AI,5     -1                COMPUTE BREAK #
         STW,5    IBRKNUM           SAVE IT
         MTW,1    IBRKMODE          TURN ON I BREAK MODE
         LI,11    INTEX             CONTINUE POINT IF TRACE
         B        BRKOUTPT          OUTPUT BREAK MESSSAGE (I BRK)
TRAC20   EQU      %                 CHECK FOR SPECIAL ACTION THIS BRANCH
         LW,1     TRACNENT          # ENTRIES IN SPECIAL ACTION TABLE
         BEZ      TRAC30            NONE, AUTOMATIC PRINT ON ALL
         LW,10    IAP               GET BRANCHING LOCATION
         LW,0     DO%DONT           0=HONOR ALL BUT SPEC ACTION LOCS
*                                   1=HONOR ONLY SPECIAL ACTION LOCS
         BEZ      TRAC25            ALL
         BAL,4    CHKTABL           WAS THIS BRANCH SPECIFIED
         B        TRAC30            CONTINUE OUTPUT PROCESSING
         B        TRAC10            NO, DONT PRINT, CHECK I BRK & EXIT
TRAC25   EQU      %                 PRINT ALL BUT SPECIFIED LOCATIONS
         BAL,4    CHKTABL           WAS THIS BRANCH SPECIFIED
         B        TRAC10           YES, DONT PRINT, CHECK I BRK & EXIT
*                                   NO,  CONTINUE OUTPUT PROCESSING
TRAC30   EQU      %                 CHECK FOR BDR/BIR AND WHAT TO DO
         LW,0     TYPE              GET OP CODE OF BRANCH
         CI,0     X'66'             WAS IT BDR/BIR
         BG       TRAC35            NO, CONTINUE OUTPUT PROCESS
         LW,0     TRACLOOP          YES,CHECK BDR/BIR TRACE FLAG
         BEZ      TRAC10            DONT PRINT, CHECK FOR IOBRK
TRAC35   EQU      %                 PRINT JUMP MESSAGE
         LW,15    TRACMODE          GET MODE OF INTERPRETIVE EXECUTION
*                                   0=JUMP-STOP ; 1=JUMP-TRACE
         STW,15   GO%FLAG           SET 'GO' FLAG AFETER TRACE MODE
         BEZ      TRAC37            NO OUTPUT ON PRINTER IF
*                                     NOT IN TRACE MODE
         LI,0     0                 SET FLAG TO  ALLOW OUTPUT TO
         STW,0    PRINT%OK          THE PRINTER IF REQUESTED
TRAC37   EQU      %
         LW,3     IAP               GET 'FROM' ADDRESS
         LW,2     DRADRMOD          GET ADR OUTPUT MODE
         BAL,4    DRPRTADR          PRINT ADR
         LW,0     JUMPMESS          PUT OUT JUMP ARROW
         BAL,1    DRPRTSML
         LW,3     IA                GET 'TO' ADR=CURRENT IA
         LW,2     DRADRMOD          ADR OUTPUT MODE
         BAL,4    DRPRTADR          PRINT 'TO' ADDRESS
         LI,0     #CRETRN           OUTPUT   CR
         BAL,4    TYPOUT
         B        TRAC10            CHECK FOR I BRK AND EXIT
*
TRAC40   EQU      %                 STEPMODE
         LI,0     #CRETRN           CR IF STEPMODE
         BAL,4    TYPOUT
         LW,3     IA                GET CURRENT ADR
         STW,3    DROPENER          SET SLASH MODE
         LI,8     0                 CLEAR MEANINGLESS FLAGS BEFORE GO ON
         LI,0     DRINITB           SET INITIALIZATION ENTRY
         STW,0    MESSEXIT          TO ALLOW STORING IN THIS LOC
         STW,3    DRUPRLIM          SET UPPER LIMIT FOR PRINT RTN
         B        DRSLASHS          PRINT ADR AND CONTENTS
         PAGE
*        THIS CODE HANDLES TRAP 42                                     *
STAKOFLW LI,0     BA(STKOVFLW)
         B        TRAPMSG
*        THIS CODE HANDLES TRAPS 41,43,44,45.                          *
UNIMP    LI,0     BA(UNIMPTRP)      MESSAGE ADDRESS
         B        TRAPMSG
FIXARITH LI,0     BA(FIXTRP)
         B        TRAPMSG
FLTFLT   LI,0     BA(FLTTRP)
         B        TRAPMSG
DECFLT   LI,0     BA(DECTRP)
TRAPMSG  STW,0    TRAPMESS          SAVE LOCATION OF TRAP MESSAGE
         BAL,15   TRAPCNTL
         LW,1     TRAPMESS          GET MESSAGE ADDRESS
TRAPOUT  LI,4     LOOPTEST+1        RETURN FROM PRINT MESSAGE
         B        DRPRTMSG          PRINT IT
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
ABORTENT EQU      %                 ALL EXITS FROM REAL-TIME COME HERE
         STB,8    CURNOPR           SAVE RUN STATUS
         LW,0      DELTCNTL         GET DELTA-INCONTROL FLAG
         MTW,1     DELTCNTL          SET         "     "     "
         M:TRAP   (IGNORE,FX)
         CI,0     0                  WAS DELTA IN CONTROL
         BE       ABRT10            NO
          LI,1     -20              YES, BUMP STACK POINTER DOWN
         MSP,1     DTSTACK
         B        ABORT11
ABRT10   EQU      %
         STD,8    PTC               SAVE USER TRAP INFO
         BAL,11   RSTOR1            RESTORE I BREAKS
         BAL,11   ABORT100          CHECK FOR DATA BREAK CUASED ABORT
ABORT11  EQU      %
         LI,1     DRINITA           INITIALIZE TO HAVE FRESH START
         STW,1    MESSEXIT
         LW,2     ERKEY             ERROR MESSAGE KEY X'03000000'
         LI,4     0                 CHECK RUN STATUS BITS
         LW,5     CURNOPR
         SLD,4    2                 MOVE BITS 0 AND 1 TO REG 4
         AI,4     0                 IS EITHER BIT SET
         BEZ      ABRT20            NO, CHECK BIT 5
         OR,2     ERCODES-1,4       YES- PUT CODE AND SUBCODE INTO KEY
         B        ABRT40            GO TO GET ERROR MESSAGE
ABRT20   SLS,5    3                 SHIFT TO POSITION BIT 5 IN 1
         CI,5     0                 IF BIT 5 SET, R1 LESS THAN ZERO
         BGE      ABRT30            NO, BIT 5 NOT SET, GET J:ABC
         LW,1     J:ASSIGN          LIMIT FLAGS
         SLS,1    23                POSITION TO LEFT OF REG 1
         LI,3     9                 USE FOR COUNT AND SUBCODE
ABRT25   LI,0     0                 CHECK BITS 23 THROUGH 31 OF LIMIT
         SLD,0    1                 EXCEEDED FLAGS. IF A ONE BIT SET,
         CI,0     1                 REGISTER 3 WILL CONTAIN THE PROPER
         BE       ABRT27            SUBCODE.
         BDR,3    ABRT25            IF BIT 5 IS SET, ERROR CODE IS B3
ABRT27   OR,3     X'B300'           OR ERROR CODE INTO R3
         OR,2     3                 OR ERROR AND SUBCODES INTO KEY IN 2
         B        ABRT40            GO TO GET ERROR MESSAGE
ABRT30   LB,4     J:ABC             GET ABORT CODE IN 4 IF J:RUST NOT
         LW,5     J:JIT+ERO         SET. GET SUBCODE IN 5
         SLS,5    24                POSITION SUBCODE LEFT JUSTIFIED
         SLD,4    8                 GET CODE AND SUBCODE IN 4
         OR,2     4                 OR ERROR AND SUBCODES INTO KEY IN 2
ABRT40   LW,1     OUTCHAR           ANY OUTPUT WAITING
         BLEZ     %+2               NO
         BAL,7    DUMPBUF           YES- GO DUMP IT
         CW,2     ERKEY             NORMAL EXIT
         BE       ABRT90            YES
         LW,0     DCB%STAT          IS M:XX DCB OPEN
         BEZ      %+2               NO
         BAL,0    CLOSEXX           YES- GO CLOSE IT
         STW,2    ERKEYM            PUT KEY IN MEMORY
         LI,1     10                FOR NUMBER OF TRIES TO OPEN IF BUSY
ABRT50   EQU      %
         CAL1,1   FOPEN
         M:READ   M:XX,(BUF,OUTBUF),(SIZE,120),;
                  (KEY,ERKEYM),(BTD,1),(ABN,ABRT60)
         CAL1,1   FCLOSE            CLOSE DCB
         LW,0     #CRETRN           PUT CARRIAGE RETURN BEFORE MESSAGE
         STB,0    OUTBUF
         LH,1     M:XX+4            GET ACTUAL RECORD SIZE TRANSMITTED
         SLS,1    -1                ADJUST VALUE IN REGISTER
         AI,1     1                 ADD ONE FOR LEADING CARRIAGE RETURN
         STW,1    OUTCHAR           SAVE COUNT FOR DUMP ROUTINE
         BAL,7    DUMPBUF           PRINT MESSAGE
         B        ABRT95            GO PRINT LOCATION
ABRT60   EQU      %                 ABNORMAL IN READING FILE
         CAL1,1   FCLOSE            CLOSE DCB
         B        ABRT80            OUTPUT CODE AND SUBCODE
ABRT70   EQU      %                 ABNORMAL OR ERROR IN OPENING FILE
         SLS,10   -17               CHECK IF FILE WAS BUSY
         CI,10    X'A01'
         BNE      ABRT80            NO, OTHER PROBLEM - PRINT CODES
         BDR,1    ABRT50            YES - TRY 10 TIMES
ABRT80   EQU      %
         LI,1     BA(ABRTCD)        PUT MESSAGE ABORT WITH CODE =
         BAL,4    DRPRTMSG          IN OUTBUF
         LI,1     2
         LB,3     ERKEYM,1          GET CODE FROM KEY
         BAL,4    DRPRTHXA          PUT IN HEX IN OUTBUF
         LI,1     BA(ABRTSC)        GET ADDRESS OF , SUBCODE =  MESSAGE
         BAL,4    DRPRTMSG          PUT IN OUTPUT BUFFER
         LI,1     3                 BYTE FOR SUBCODE
         LB,3     ERKEYM,1          GET SUBCODE
         BAL,4    DRPRTHXA          PUT IN HEX IN OUTBUF
         B        ABRT95            GO PRINT LOCATION
ABRT90   EQU      %
         LI,1     BA(EXIT)
         BAL,4    DRPRTMSG          PUT MESSAGE 'EXIT AT' IN BUFFER
         B        ABRT97
ABRT95   EQU      %
         LI,1     BA(LOCATION)
         BAL,4    DRPRTMSG          ENTER 'LOCATION=' IN BUFFER
ABRT97   LW,3     OLDPSD            GET USER'S PSD
         LI,4     KADMSKM
         AND,3    4                 ISOLATE IA
         MTW,0    STEPMODE          ARE WE IN STEP MODE
         BEZ      %+2               NO
         LW,3     DR#DSIGN          YES, GET CORRECT EXIT ADDRESS
         BAL,4    DRPRTADR          ADD ADDRESS TO BUFFER
         B        DRINIT            START OVER AFTER OUTPUT
ABORT100 EQU      %
         STW,11   ABORTSV           SAVE RETURN LINK
         MTW,0    DBRKNENT          IS A DATA BREAK POINT SET
         BLZ      *11               NO
         LB,1     J:ABC             GET ABORT CODE
         SLS,1    8                 SHIFT IT
         LI,2     WA(ABRTCDT)       GET TABLE ADDRESS
ABORT110 EQU      %
         LW,3     0,2               GET TABLE ENTRY
         BEZ      *ABORTSV          RETURN IF END OF TABLE
         AI,2     1                 NEXT TABLE ENTRY
         CW,3     1                 IS THIS THE ONE
         BNE      ABORT110          NO, LOOK AT NEXT
         LB,7     CURNOPR           GET ABORT STATUS
         CI,7     2                 I/O ERROR
         BAZ      %+2               NO
         MTW,-1   OLDPSD            ELSE STEP PSD BACK TO INST.
         LH,7     *OLDPSD           GET OPERATION
         AND,7    =X'7FF0'
         CI,7     X'0410'           IS IT CAL1,1
         BNE      ABORT140          NO
         LI,4     -1                SET ANLZ FLAG
         STW,4    DBANLZFG
         STW,4    TRAPTEMP
         LCI      0                 RESTORE USER REGS
         LM,0     SAVREGS
         ANLZ,1   *OLDPSD           A(FPT)
         LW,1     *1                WORD 0 OF FPT
         BGZ      ABCONT            NOT INDIRECT IN FPT
         AND,1    M17
         CI,1     16                INDIRECT THROUGH A REGISTER
         BGE      %+2               NO
         AI,1     SAVREGS           POINT TO REGISTERS
         LW,1     *1                A(DCB)
ABCONT   EQU      %
         LI,6     0
         LI,7     X'1FFFF'
         LS,6     2,1               BUFFER
         LW,5     13,1              RWS
         AI,5     3                 ROUND UP A WORD
         SLS,5    -2                BUFFER LENGTH IN WORDS
         AW,5     6                 BUFFER END WORD ADDRESS
         STW,5    DBEFADRX          END ADR
         STW,6    DBEFADR           START ADR
         MTW,1    DBANLZFG          TURN ANLZ FLAG OFF
         LW,7     PAGE%MASK         MASK TO CHECK IF PAGE HAS A BREAK
         BAL,4    DBRK%CHK          CHECK FOR BREAK
         B        ABORT120          NO BREAK
         B        ABORT130          YES
ABORT120 EQU      %
         LW,6     DBEFADRX          CHECK BUFFER END
         BAL,4    DBRK%CHK          CHECK BUFFER END
         B        *ABORTSV          NO, REAL ABORT
ABORT130 EQU      %
         STW,1    ABORTDCB          YES, SAVE DCB ADR
         LI,1     -1                TURN ABORT FLAG
         STW,1    ABORTFLG            NO
         LW,1     SAVREGS+1         SET TO REEXECUTE CAL1
         B        WORD3
*
ABORT140 EQU      %
         SLS,7    -8                OP CODE ONLY
         CI,7     X'04'             IS IT A CAL,N
         BNE      *ABORTSV          NO
         LI,4     0                 RE-EXECUTE CAL1,N BUT
         STW,4    TRAPTEMP          IGNORE DATA BREAKS
         MTW,1    DR#SEMII          INCREMENT LOCATION COUNTER
         B        ABORT130
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
*                 UTILITY ROUTINES                                     *
*                                                                      *
*                                                                      *
************************************************************************
*
*        THIS ROUTINE CHECKS TO SEE IF THE CURRENT USER HAS IN HIS
*        MAP THE PAGE CONTAINING THE ADDRESS IN R10. IF NOT
*        EXIT WITH CC = 2
*
ADRCHK   EQU      %
         LW,1     10                ADDRESS TO BE CHECKED
         AND,1    M17
         SLS,1    -9                PAGE NUMBER
         LOAD,1   JX:CMAP,1         GET PHYSICAL PAGE #
*
         CI,1     FPMC              IS IT THE UNASSIGNED PAGE CODE
         BNE      ADR10             BRANCH IF NO
*
         LCI      2                 UNASSIGNED CODE
         B        *0
*
ADR10    EQU      %
         LCI      0                 ASSIGNED CODE
         B        *0
         PAGE
************************************************************************
*                                                                      *
*        IF A DUMP OF THE I BREAK TABLES WAS REQUESTED, THE GENERALIZED*
*        DUMP ROUTINE WILL COME HERE FOR EACH ACTIVE ENTRY FOR         *
*        SPECIAL PROCESSING APPROPRIATE TO THIS TYPE OF BREAK          *
*                                                                      *
************************************************************************
BDMP     EQU      %
         LW,3     IBRKDPLY,5        DISPLAY REQUESTED FOR THIS ENTRY
         BLZ      TESTBD
         LI,0     18                SPACE OUT TO COLUMN 18
         BAL,4    SPACER
         LW,2     DRADRMOD          GET CURRENT ADDRESS MODE
         BAL,4    DRPRTADR          PRINT DISPLAY ADDRESS
         B        TESTBD
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
BLANKTYP EQU      %
BLANKBUF EQU      %
         LI,1     OUTBUF%SIZE
         LW,2     BLANKS
         STW,2    OUTBUF-1,1
         BDR,1    %-1
         B        *4
         PAGE
************************************************************************
*                                                                      *
*        THIS ROUTINE CHECKS THE INSTRUCTION IN THE LOCATION
*        POINTED TO BY THE CONTENTS OF BADR. IF THE INSTRUCTION
*        IS A BRANCH, THE EFFECTIVE ADR IS RETURNED IN R10 AND CC = 8
*        IF IT IS NOT A BRANCH, BADR IS INCREMENTED AND CC = 4
*                                                                      *
************************************************************************
BRANCHK  EQU      %
         LW,10    BADR
         STW,10   EFADR
         STW,7    EXCTRAC
*
B10      EQU      %
         BAL,0    ADRCHK
         BCS,2    *EXCTRAC
         LI,11    0                 GET OP CODE AND REGISTER FIELDS
         LW,10    *10               IN R10 & R11 RESPECTIVELY
         SLS,10   -20
         SLD,10   -4
         AND,10   M7
*
         CLM,10   OPLMTS            COULD IT BE A BRANCH
         BOL      B50               BRANCH IF NO
*
         CB,10    AWM               IS IT AN AWM
         BE       B50               BRANCH IF YES
*
         CI,10    EXU               IS IT AN EXU
         BNE      B30               MUST BE BRANCH SO BRANCH
*
         LCI      0                 FOLLOW EXU AND SET UP TO
         STM,0    DELTREGS          SAVE DELTA REGS
         LM,0     SAVREGS           ANALYZE OBJECT INSTRUCTION
         ANLZ,10  *EFADR
         STW,10   EFADR
         LCI      8                 RESTORE DELTA REGS
         LM,0     DELTREGS
         B        B10
*                                   BRANCH INSTRUCTION FOUND
B30      EQU      %
         STW,10   TYPE              SAVE OP CODE
         SCS,11   4                 SAVE R-FIELD
         STW,11   BALREG
         LCI      0
         STM,0    DELTREGS          SAVE DELTA REGS
         LM,0     SAVREGS           GET EFFECTIVE ADR TO BE BRANCHED
         ANLZ,10  *EFADR            TO
         LCI      8
         LM,0     DELTREGS          RESTORE DELTA REGS
*
         LCI      8                 BRANCH FOUND EXIT
         B        *EXCTRAC
*
B50      EQU      %
         MTW,1    BADR              INCREMENT CURRENT INSTRUCTION LOC
*
B60      EQU      %
         LCI      4
         B        *EXCTRAC
         PAGE
************************************************************************
*                                                                      *
*        ROUTINE TO OUTPUT I & D BREAKPOINT MESSAGES                   *
*                                                                      *
************************************************************************
BREAK%MESSAGES    ;
         EQU      %
DBRKMSG  LW,13    DBPT              DATA BREAK ENTRY
         LW,3     DR#SEMII
         AI,3     -1                POINT TO TRAPPING INSTR
         B        %+3
IBRKMSG  LW,13    IBPT              I BREAK ENTRY
         LW,3     IBRKLOC,5
BKMS10   EQU      %
         AND,3    DRADMSKM
         STW,7    BRKMSGXT          SAVE RETURN LINK
         LI,0     #CRETRN
         BAL,4    TYPOUT
         LW,0     5                 GET BREAK NUMBER
         AI,0     1
         OR,0     XF0
         BAL,4    TYPOUT
         LW,0     13                GET BEAK MESSAGE
         BAL,1    DRPRTSML
*
         LW,2     DRADRMOD          PRINT INSTRUCTION ADDRESS WHERE
         BAL,4    DRPRTADR          REFERENCE OCCURS
         LI,0     #2SPACE
         BAL,1    DRPRTSML
         B        *BRKMSGXT
*
         PAGE
************************************************************************
*                                                                      *
*        THIS ROUTINE SEARCHES THE I OR D BREAK TABLES FOR ACTIVE      *
*        ENTRIES, SETS UP THE FIRST HALF OR THE OUTPUT LINE, AND DUMPS *
*        THE COMPLETED LINE.                                           *
*        R0,R2,R3 TEMPORARY                                            *
*        R4       LINK TO DRPRTINT, DRPRTADR                           *
*        R5       BREAKPOINT INDEX #                                   *
*        R7       LINK TO DUMPBUF                                      *
*        R10      TEMPORARY                                            *
*        R11      D OR I TRACE TABLE                                   *
*        R14      LINK TO SPECIAL PROCESSING FOR D OR I OPTIONAL SPECS *
*                                                                      *
************************************************************************
BRKDUMP  LW,3     *BRKNENT          CHECK NENT OF BREAK TABLE
         BNEZ     GOGETEM           RETURN IF NONE
         LW,0     NOMESS            PUT OUT NONE MESSAGE
         LI,1     MESSAGE           GO GET NEXT COMMAND AFTER
         B        DRPRTSML          PRINTING MESSAFE
GOGETEM  EQU      %
        MTW,1    CURNOPR           SET SPECIAL RETURN ADR (R14+1)
         LI,5     0                 INDEX FOR SEARCH
         STW,5    DRTEMPS1
GETBKLOC LW,10    *BRKLOC,5         CHECK AN ENTRY
         BEZ      BDMP50          NULL ENTRY, BRANCH TO TEST
         LI,0     #CRETRN           SEND OUT A CARRIAGE RETURN
         BAL,4    TYPOUT
         LW,3     5                 ENTRY # TO R3 FOR PRINTING
         AI,3     1                  CONVERT ENTRY TO BREAK #
         BAL,4    DRPRTINT          PRINT BREAK NUMBER
         LW,11    DRBIT0,5
         LS,11    *TRCTBL
         BEZ      %+3               NOT A TRACE BREAK
         LW,0     TRACOUT           GET TRACE  MESSAGE
         B        %+2               GO TO GO TO PRINT ROUTINE
         LW,0     #3SPACE           PUT OUT 3 SPACES
         BAL,1    DRPRTSML
         LW,2     DRADRMOD          GET CURRENT ADDRESS MODE
         LW,3     10                LOCATION TO R3 FOR PRINTING
         BAL,4    DRPRTADR          PRINT LOCATION AS A SYMBOL
        LW,5     DRTEMPS1          GET BRK #
        B        *CURNOPR          DO SPECIAL PROCESSING
*
*       RETURN HERE AFTER I- OR D- BREAK SPECIAL PROCESSING
*
TESTBD   EQU      %
         LI,0     0                 SET FLAG TO  ALLOW OUTPUT TO
         STW,0    PRINT%OK          THE PRINTER IF REQUESTED
         LI,0     #2SPACE           PUT OUT 2 SPACES
         BAL,1    DRPRTSML          TO END THE LINE
         BAL,7    DUMPBUF           DUMP THIS LINE
BDMP50   EQU      %
         MTW,1    DRTEMPS1          BUMP INDEX
         LW,5     DRTEMPS1          INDEX TO R5
         CI,5     7               DONE YET
         BLE      GETBKLOC          NO
         B        MESSAGE            YES
         PAGE
************************************************************************
*                                                                      *
*        THIS ROUTINE INTERPRETS AND SETS UP IN THE EXECUTE AREA       *
*        THE MOST RECENT INSTRUCTION BREAK.  IF THE INSTRUCTION IS     *
*        A 'BAL', IT IS CONVERTED TO A BRANCH TO THE EFFECTIVE         *
*        ADDRESS AND 'BREAK LOCATION + 1' IS STORED IN THE BAL-REGISTER*
*        IN THE USERS REGISTER TEMP STACK                              *
*                                                                      *
************************************************************************
BRKINTPT EQU      %
         PSW,4    DELSTK            SAVE REGS
         PSW,11   DELSTK
         LCI      0                 GET AND SAVE
         LM,0     SAVREGS            EFFECTIVE ADDRESS
         ANLZ,0   *ACTBKLOC          IN CASE INSTRUCTION
         STW,0    EFADR              IS A 'BAL'
         LW,0     *ACTBKLOC         GET BRK INSTR
         LW,3     OLDPSD            LOCATION OF BREAK
         AND,3    M17
         LI,1     0                 CLEAR R1 TO RECEICVE R-FIELD
         SLS,0    -20               SHIFT R-FIELD TO R1 AND RIGHT
         SLD,0    -4                JUSTIFY OPCODE IN R0
         CI,0     X'6A'             IS IT A BAL
         BNE      BKINT20           NO
         SCS,1    4                 YES, POSITION R-FIELD IN R1
         STW,3    SAVREGS,1         STORE BRK LOC+1 INTO BAL-REG
         MTW,1    SAVREGS,1         IN TEMP STACK
         LW,15    BALBRNCH          EXECUTE 'B *EFADR'
         B        %+2
BKINT20  EQU      %
         LW,15    *ACTBKLOC         GET BRK INTSTRUCTION
         STW,15   IBRKEXEC          SET UP TO EXECUTE BREAK INST
         LW,4     IBRKJUMP          AND CONTINUE
         AW,4     3                 EXECUTION.
         STW,4    IBRKEXEC+1
         PLW,11   DELSTK            RESTORE REGS
         PLW,4    DELSTK
         B        *11               RETURN
         PAGE
BRKOUTPT EQU      %
         PSW,11   DELSTK
         LI,0     BKOUT20           TRACE, SET EXIT FROM SLASH
         STW,0    SLSHEXIT          TO RETURN TO THIS ROUTINE
         LW,5     IBRKNUM            GET BRK #
         LW,1     DRBIT0,5          CHECK AND SAVE
         LS,1     ITRCTBL              TRACE BIT
         STW,1    TMP6
         BEZ      BKOUT10            BRANCH IF NOT TRACE
         LI,0     0                  SET FLAG TO ALLOW OUTPUT TO
         STW,0    PRINT%OK          PRINTER IF REQUESTED
BKOUT10  EQU      %
         BAL,7    IBRKMSG           OUTPUT 1ST PART OF MESSAGE
         LW,5     IBRKNUM           GET BRK #
         LW,3     IBRKDPLY,5        CHECK FOR DISPLAY REQUEST
         BLZ      BKOUT20            NO, EXIT
         STW,3    DROPENER          SET SLASH MODE
         STW,3    DRUPRLIM          SET UPPER LIMIT FOR SLASH DISPLAY
         B        DRSLASHS          OUTPUT DISPLAY.  IF NOT A TRACE,
*                                   SLASH ROUTINE EXITS TO MESSAGE
BKOUT20  EQU      %
         LI,0     MESSAGE           RESET SLASH EXIT
         STW,0    SLSHEXIT
         PLW,11   DELSTK
         MTW,0    TMP6               IS THIS A TRACE BRK
         BEZ      MESSAGE           BRANCH IF NOT
         BAL,7    DUMPBUF           DUMP TRACE OUTPUT
         B        *11
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
BRKSET   EQU      %
         STW,14   CURNOPR           SAVE RETURN ADR IN SPARE CELL
         LI,2     ADRSNENT          # OF ADDRESSES
         LW,0     *1,2              MOVE THE RELEVANT ADDRS INTO
         STW,0    BASEADRS-1,2      THE BASE ADDRESS TABLE
         BDR,2    %-2
         AI,5     0                 WAS MORE THAN 1 FIELD INPUT
         BGZ      CHKNUMB           YES
         LW,15    DREXPRS           NO, CHECK THE INPUT VALUE
         CI,15    8                 WAS IT A BREAK NUMBER
         BLE      RELEASE           YES, GO RELEASE IT
         CI,15    15                DONT ALLOW BREAKS IN REGISTERS
         BLE      DRERR
         B        GETIT             NO, ADR INPUT,GO GET BRK NUMBER
CHKNUMB  LW,6     DREXPRS+1         CHECK INPUT BRK NUMB
         BLZ      DRERR             ERROR
         BEZ      GETIT             0 MEANS GET NEXT AVAILABLE NUMB
         CI,6     8                 CHECK FOR MAX VALUE
         BG       DRERR             BAD
         AI,6     -1                DECREMENT TO FORM ENTRY NUMB
         LW,2     *BRKLOC,6         IS THIS ENTRY ACTIVE
         BGZ      RESET             YESDONT BUMP NENT
         B        %+2
GETIT    BAL,4    GETANUMB          ASSIGN A BREAK NUMBER
BUMPNENT EQU      %
         CI,7     1                 DATA BREAK BEING SET
         BNE      BKST40            BRANCH IF NO
*
         LW,1     DREXPRS           GET ADDRESS
         BAL,11   PAGECHK           IS IT IN A DATA PAGE
         BCS,3    DRERR             BRANCH IF NO
*
BKST40   EQU      %
         MTW,1    *BRKNENT          BUMP NENT
         CW,6     *BIGENT           IS THIS NOW THE LARGEST ENTRY #
         BLE      RESET             NO, GO ON
         STW,6    *BIGENT           YES,RESET BIG ENTRY INDICATOR
RESET    LW,2     DREXPRS           GET BRK LOCATION
         AND,2    DRADMSKM
         STW,2    *BRKLOC,6         SAVE IN THIS ENTRY
INTLZ    LI,0     -1                INITIALIZE REMAINDER OF BRK TABLE
         STW,0    *WORD1,6
         CI,5     2                 WAS THE 3RD FIELD INPUT
         BL       TRACER            NO, CHECK FOR TRACE
         LW,0     DREXPRS+2         YES, GET IT
         STW,0    *WORD1,6          SAVE IT
TRACER   LW,15    DRBIT0,6          GET THE BIT FOR THIS ENTRY
         BAL,4    INPTCHAR          GET NEXT COMMAND CHARACTER
         CI,0     'T'               WAS IT TRACE CODE
         BE       TRC               YES
         MTW,-1   CHARINDX          BACK UP INPUT POINTER
         LI,14    0                 NO, SET TRACE BIT TO FALSE
         STS,14   *TRCTBL
         B        *CURNOPR          RETURN
TRC      STS,15   *TRCTBL           SET TRACE BIT TO TRUE
         B        *CURNOPR          RETURN
         PAGE
GETANUMB LI,6     0                 GET THE NEXT AVAILABLE ENTRY
         LW,2     *BRKLOC,6         IN THE SPECIFIED BREAK TABLE.  IF
         BLEZ     0,4               NONE ARE AVAILABLE, PUT OUT
         AI,6     1                 A QUESTION MARK.
         CI,6     8
         BL       GETANUMB+1
         B        BRKDUMP+2         PUT OUT 'NONE' & GET NEXT MSG
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
CHKTABL  EQU      %                 CHECK FOR OCCURRENCE IN TABLE OF VAL
         LI,7     0                 INDEX
SYSR10   CW,10    TRACSPEC,7        IS CONTENTS OF R10 IN THIS ENTRY
         BE       0,4               YES, RETURN
         AI,7     1                 NO, BUMP INDEX
         CI,7     8                 DONE,
         BL       SYSR10            NO, CHECK NEXT
         B        1,4               YES, NOT FOUND EXIT
         PAGE
*
*        THIS ROUTINE CLOSES DCB M:XX, RESETS THE DCB STATUS
*        FLAG AND EXITS NORMAL (CC = 0) OR ABNORMAL (CC = 8)
*
CLOSEXX  EQU      %
         LI,1     0                 RESET DCB STATUS FLAG TO
         STW,1    DCB%STAT          CLOSED
*
         CLOSE%XX
         LB,10    10
         BNEZ     CLSXX1
*
         LCI      0                 NORMAL EXIT
         B        *0
*
CLSXX1   EQU      %
         LCI      8                 ABNORMAL EXIT
         B        *0
         PAGE
*        R7       CONTAINS WORD TO BE CONVERTED & STORED               *
*        R5 & 6   TEMPS                                                *
*        R11      LINK                                                 *
CONV     EQU      %
         LI,5     8                 MAX DIGITS
CONV10   EQU      %
         LI,6     0                 CLEAR R6 TO RECEIVE DIGITS
         SLD,6    4                 SHIFT HIGH ORDER DIGIT
         LB,0     DRDIGITS,6        GET EBCDIC VALUE
         CB,0     OUTBUF,1           IS THIS CHAR = TO SAME CHAR IN THE
         BE       %+2                PREVIOUS LINE. BRANCH IF YES
         MTW,1    SUM               NO, FLAG LINE AS NOT DUPLICATE
         STB,0    OUTBUF,1          STORE IN OUTPUT BUFFER
         AI,1     1                 BUMP OUTPUT INDEX
         BDR,5    CONV10            LOOP
         AI,1     2                 SKIP 2
         B        *11
         PAGE
*
*        THIS ROUTINE SETS OR RESETS DATA BREAKPOINTS.
*        INVOKED BY RESTORE (RESET) AND ;G (SET)
*
DBRKRESET EQU     %
         LI,10    0                 PROTECTION TYPE 00 - DATA
         B        DBK100
DBRKSET  EQU      %
         LI,10    1                 PROTECTION TYPE 01 - READ & EXECUTE
DBK100   EQU      %
         LI,2     8
DBK150   EQU      %
         LW,12    DBRKLOC-1,2       ACTIVE ENTRY
         BEZ      DBK200            BRANCH IF NO
*
         BAL,15   SET%PRTCT         SET ACCESS
DBK200   EQU      %
         BDR,2    DBK150            LOOP
*
         B        *11
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
* ROUTINE TO CLOSE AN OPEN REGISTER                                     02638030
*                                                                       02638040
DRCLOSE  LI,0     -1                TURN OFF OUTPUT-MODE-SPECIFIED
         STW,0    MODINPUT          FLAG.
         STW,0    SYM%TYPE          TURN OFF SYMBOL TABLE CONTROL MODE
         MTW,0    STEPMODE
         BEZ      DRCL1             NOT IN STEP MODE
         LW,0     IA
         STW,0    DR#SEMII          SET CORRECT INSTRUCTION ADDRESS
         LI,0     0                 TURN OFF GET-A-PAGE MODE.
         STW,0    STEPMODE          TURN OFF STEP MODE
DRCL1    EQU      %
         CI,8     DRUDEFBT          CHECK FOR UNDEFINED INPUT
         BANZ     DRERR             YES, ERROR
         LW,0     DROPENSW          CHECK TO SEE IF A REGISTER IS OPEN
         BEZ      0,4               IS ONE OPEN?                        02638060
         AI,10    0                 CHECK ELEMENT COUNT                 02638062
         BEZ      0,4               WAS ANYTHING TYPED?                 02638064
         STW,4    DRCLSRTN          YES - SAVE RETURN LINK              02638070
         BAL,4    DREVALIT          PERFORM FINAL EVALUATION            02638080
         STW,3    DR#SEMIQ          SAVE INPUT VALUE IN ;Q
         LW,0     DR#SEMIQ          GET VALUE TO STORE
         LW,3     DR#DSIGN          GET STORE ADDRESS
         BAL,11   STORWORD          STORE IN USER REG OR MEMORY
         B        *DRCLSRTN         RETURN                              02638230
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
* ROUTINE TO HANDLE AN INPUT ERROR                                      01930000
*                                                                       01931000
DRERR    LW,0     QUES
         BAL,1    DRPRTSML          PRINT MESSAGE FOR THE USER          01933000
         LW,3     CHARINDX          OUTPUT CHARACTER NUMBER WHEN
         BAL,4    DRPRTINT          ERROR OCCURRED
         LI,0     DRINITA           SET FULL INITIALIZATION
         STW,0    MESSEXIT          ENTRY POINT
         LI,0     -1                TURN OFF OUTPUT-MODE-SPECIFIED
         STW,0    MODINPUT          FLAG
         STW,0    SYM%TYPE          CLEAR SYMBOL TABLE DEFINED MODE
         B        DRINIT
************************************************************************
*                                                                      *
*        THIS ROUTINE ADDS AN ENTRY TO THE TOP OF THE GLOBAL SYMBOL    *
*        TABLE.  IN USER DELTA THE STRUCTURE OF THE SYMBOL TABLES IS   *
*                 DEFINED   SYMBOLS                                    *
*                 GLOBAL    SYMBOLS                                    *
*                 INTERNAL  SYMBOLS                                    *
*        INPUT :  R13-R15  ENTRY TO BE PUT IN TABLE                    *
*        LINK  :  R4                                                   *
*        REG%STERS =                                                   *
*          SET :  R6,R7,R11                                            *
*          USED : R13-R15                                              *
*        IF THE ENTRY BEING ADDED EXTENDS INTO A NEW PAGE, THE PAGE    *
*        IS OBTAINED VIA MONITOR CAL  T:GVP                            *
*                                                                      *
************************************************************************
DRSYMAPD EQU      %
         MTW,0    NENTSYM           IS # ENTRIES = 0
         BNEZ     SYMAD10           NO, WE HAVE AT LEAST 1 PAGE. GO ON.
         LW,6     SYMBEGIN          YES, GET 1ST PAGE FOR SYMBOLS
         LW,7     6                 DEFINED IN DELTA.
         BAL,11   GET%PAGES
SYMAD10  EQU      %
         MTW,-3   SYMBEGIN          ENTRIES ADDED TO LOW ADR SIDE OF
*                                   SYMBOL TABLE
         MTW,3    NENTSYM           BUMP # ENTRIES IN SYMBOL TABLE
         LW,6     SYMBEGIN
         LI,7     X'1FF'
         CS,6     PAGE%BOUND
         BL       SYMAD20
         LW,7     6
         BAL,11   GET%PAGES
         BCR,8    SYMAD20
*
         BAL,1    PAGECHK1          CHECK IF WE ALREADY HAVE PAGE
*
         WRT%UC   PAGEASGN          ERROR MESSAGE
         B        *4
*
SYMAD20  EQU      %
         LCI      3
         STM,12   *SYMBEGIN
         B        *4                RETURN
        PAGE
***********************************************************************
*       THIS ROUTINE MOVES THE USERS ENVIRONMENT FROM DELTAS          *
*        STACK TO THE USERS TCB.  IF THERE IS NO ROOM IN HIS STACK     *
*       OR THE USER DOES NOT HAVE THE PAGES CONTAINING THE STACK      *
*       OR ITS POINTER, TRAP CONTROL WILL REMAIN IN DELTA.            *
***********************************************************************
DTS#USER EQU     %
        LW,2     J:TCB             GET USERS TCB ADR
        BEZ      *CURNOPR          NONE, STAY IN DELTA
        AND,2    M17
       LW,1     2                 CHECK THE PAGE CONTAINING
       BAL,11   PAGECHK           THE STACK POINTER
         BCS,3    *CURNOPR          NOT A USER DATA PAGE, STAY IN DELTA
*
       LW,1     *2                GET LAST ADR IN STACK
        BAL,11   PAGECHK           CHECK IT
         BCS,3    *CURNOPR          NOT USER DATA PAGE
       AI,1     21                COMPUTE NEW LAST ADR
       BAL,11   PAGECHK           CHECK IT
         BCS,3    *CURNOPR          NOT USER DATA PAGE
        LW,0     1,2               GET COUNT OF REMAINING
       LH,0     0                   WORDS IN THE STACK
        CI,0     21                ROOM LEFT
       BL       *CURNOPR          NO, STAY IN DELTA
*
       AI,1     -20               NEXT AVAILABLE ADR IN STACK
       LI,0     0                 DUMMY VALUE FOR 1ST WORD
       LI,13    1                 COUNT OF # WORDS PUSHED
       STW,0    0,1               STORE DUMMY
        CI,1     1                 CHECK FOR EVEN/ODD 1ST ADR
         BCS,4    MOVESTAK          ODD, GO MOVE STACK
         AI,1     1                 BUMP POINTER
        AI,0     -1                EVEN, 2ND DUMMY VALUE
         STW,0    0,1               MAKE 21 WORD ENVIRONMENT
       AI,13    1                 BUMP COUNT
*
MOVESTAK EQU      %
         AI,1     1                 BUMP POINTER
         LCI      10                MOVE PSD & 1ST 8 REGS
        LM,3     OLDPSD
        STM,3    0,1
       LCI      9                 MOVE 2ND 8 REGS & TRAP LOCATION
        LM,3     OLDPSD+10
       STM,3    10,1
         STW,2    SAVREGS           PUT TCB ADDRESS IN R0
         STW,1    SAVREGS+1         POINTER TO PSD GOES IN USER R1
*
        AI,13    19                BUMP USERS STACK BY 20 OR 21
        MSP,13   *2
*                                 DELTAS STACK WILL BE DECREMENTED
*                                 BY THE TRAP RETURN CAL
        B        *15               RETURN
         PAGE
GET%HEADER        ;
         EQU      %
         BAL,4    BLANKBUF          BLANK PRINT BUFFER
         LI,0     '1'               PAGE EJECT FORMAT CHAR
         STW,0    VFCHAR
         LW,2     NUMBCHAR          COMPUTE # OF REMAINING CHARS
         SW,2     CHARINDX          IN INPUT BUFFER
         LI,6     1                 INDEX INTO PRINT BUFFER
GH10     EQU      %
         BAL,4    INPTCHAR          GET NEXT CHAR
         CI,0     X'0D'             TEST FOR CR
         BNE      %+3               NO
         MTW,-1   CHARINDX          DONT INCLUDE CR IN HEADER
         B        *11
         STB,0    OUTBUF+10,6       STORE IN MIDDLE OF PRINT BUFFER
         AI,6     1                 BUMP INDEX
         BDR,2    GH10              LOOP
         LI,2     0                 CR NOT ON INPUT
         STW,2    CHARINDX          INIT TO READ MORE INPUT
*THIS READ PERFORMED WHEN PREVIOUS INPUT WAS TERMINATED BY AN
*ACTIVATION CHAR (E.G. '/') INSTEAD OF A CR.
         M:READ   M:UC,;
                  (BUF,INBUF),;
                  (BTD,0),;
                  (SIZE,80)
         LH,2     M:UC+4
         SLS,2    -1                GET NUM OF CHARS READ
         STW,2    NUMBCHAR
         B        GH10              GO ADD TO PRINT BUFFER
************************************************************************
*                                                                      *
*        THIS ROUTINE GETS OR RELEASES (DEPENDING ON ENTRANCE USED)    *
*        ALL PAGES FROM WORD ADDRESS IN R6 TO THE ADDRESS IN R7        *
*        INCLUSIVE.                                                    *
*        INPUT    R6     ADDRESS IN 1ST PAGE REQUIRED                  *
*                 R7     ADDRESS IN LAST PAGE REQUIRED                 *
*        LINK     R11                                                  *
*                                                                      *
************************************************************************
FREE%PAGES        ;
         EQU      %
         LI,0     X'85'             RELEASE CODE & INDIRECT BIT
         B        GFVP10
GET%PAGES         ;
         EQU      %
         LI,0     X'84'             GET PAGE CODE & INDIRECT BIT
GFVP10   EQU      %
         AND,6    =X'1FE00'
         AND,7    =X'1FE00'
GFVP15   EQU      %
         CW,6     7                 CHECK FOR DONE
         BG       GVP30             YES
         STW,6    GTRLPAGE          * CAL3 DOESNT HANDLE *R6
         STB,0    PAGE%FPT
         CAL1,8   PAGE%FPT          GET OR RELEASE PAGE
        BCS,8    NOPAGE            CANT GET OR DONT HAVE PAGE
GVP20    EQU      %
         AI,6     512
         B        GFVP15            CHECK FOR DONE
NOPAGE   EQU      %
         OR,0     YFF               SET ERROR FLAG
         B        GVP20             CONTINUE SETTING PAGE
*
GVP30    EQU      %
         AI,0     0                 IS ERROR FLAG SET
         BLZ      GVP35             BRANCH IF YES
         LCI      0                 NO
         B        *11
GVP35    EQU      %
         LCI      8                 SET ERROR CONDITION
         B        *11
        PAGE
DBRK%CHK EQU      %
         LW,5     BIGENTRY          LARGEST ENTRY #
         CS,6     DBRKLOC,5         CHECK AGAINST ADR THRU MASK IN R7
         BE       1,4               FOUND EXIT
         AI,5     -1                BUMP INDEX
         BGEZ     %-3               LOOP
         B        0,4               NOT FOUND EXIT
         PAGE
************************************************************************
*                                                                      *
*        IF A DUMP OF THE BREAK TABLE WAS REQUESTED, THE GENERAL       *
*        DUMP ROUTINE WILL RETURN HERE FOR EACH ACTINE ENTRY FOR       *
*        SPECIAL PROCESSING APPROPRIATE TO THIS TYPE OF BREAK          *
*                                                                      *
************************************************************************
DUMPER   LW,3     DBRKCOND,5        IS THIS A CONDITIONAL BREAK
         BLZ      TESTBD            NO. RETURN TO BRKDUMP
         LI,0     18                SPACE TO COLUMN 18
         BAL,4    SPACER
         LI,4     6
         CW,3     DBKCNDTN-1,4      FIND CONDITION TYPE
         BE       FNDCOND           FOUND IT. YES
         BDR,4    %-2               NO
         B        DRERR
FNDCOND  LH,0     CONDTION,4        GET MNEMONIC FOR CONDITION
         AND,0    BLNKUPER          SET UPPER HALF WORD TO BLANKS
         SCS,0    8                 POSITION MNEMONIC BETWEEN BLANKS
         BAL,1    DRPRTSML          STORE IN OUTBUF
         LW,3     DBRKVAL,5         GET SPECIFIED VALUE
         BAL,4    DRPRTHXA          PUT IT OUT
         LW,3     DBRKMASK,5        GET MASK
         CI,3     -1
         BE       TESTBD            DONT OUTPUT IF NOMINAL VALUE
         LI,0     31                SPACE TO COLUMN 31
         BAL,4    SPACER
         LI,4     TESTBD            RETURN FROM HEX PRINT
         B        DRPRTHXA          PUT OUT THE NASK
         PAGE
************************************************************************
*                                                                      *
*        ROUTINE TO SET AND RESTORE INSTRUCTION BREAKPOINTS            *
*                                                                      *
************************************************************************
IBRKSET  LI,13    -1                INITIALIZE TO SET BREAKS
         LI,1     7
         B        BKST5
IBRKRSTR LI,13    1                 SET UP TO RESTORE BREAK INSTR
         LI,1     0                 TABLE INDEX
BKST5    EQU      %
         LW,6     IBRKNENT          *
         BLEZ     0,4               RETURN IF NO I BREAKS
LOOPSTRT LW,3     IBRKLOC,1         *
         BEZ      BKST20            TEST FOR END
         AI,13    0                 *
         BLZ      BKST10            SET IT
         LW,15    IBRKINST,1        RESTORE BROKEN INSTRUCTION
         B        BKST15            STORE IT
BKST10   EQU      %
         MTW,0    INTPMODE          IN TRANSFER BREAK MODE
         BEZ      BKST12            NO, DONT CHECK FOR T BRK
         CW,3     ACTBKLOC          DONT PUT I BRK ON LOC THAT CAUSED
*                                   THE ACTIVE I BRK
         BE       BKST20            ACTIVE BRK LOC
         CW,3     BADR              CHECK FOR
         BE       BKST20               TRANSFER BREAK XPSD
BKST12   EQU      %
         LW,15    0,3               GET INSTR
         STW,15   IBRKINST,1        SAVE IT
         LW,15    IBRKXPSD          SET I BREAK
         AW,15    1                 FLAG ADR FIELD WITH BREAK #
BKST15   EQU      %
         STW,15   0,3               *
BKST20   EQU      %
         AW,1     13                BUMP INDEX
         BLZ      0,4
         CI,1     8                 DONE
         BL       LOOPSTRT          NO
         B        0,4               RETURN
*
*        R3       CONTAINS START LOC                                   *
*        R10      CONTAINS END LOC                                     *
*        R4       LINK                                                 *
LINESET  EQU      %
     PSW,4       DELSTK
         LI,1     0                 INDEX INTO BUFFER
         STW,14   SUM               ZERO LINE SUM WORD
         LW,7     3                 OUTPUT START LOC FOR THIS LINE
         BAL,11   CONV
         STW,14   SUM               SET DUP LINE INDICATOR
         LW,4     3
         SLS,4    2
         LW,5     MOVTRANS
         MBS,4    0
         LI,4     BA(OTT)
         LW,5     MOVTRANS
         TBS,4    0
LINE10   EQU      %
         LW,4     DELENT            ARE WE INTERFACING WITH MONFIX
         BLEZ     LINE11            NO
         LW,11    3                 SAVE LOCATION
         LW,4     0,4               LOCATION OF GET SUBR
         BAL,4    0,4               GET NEXT WORD - RETURNED IN R3
         BCS,8    DRERR
         LW,7     3
         LW,3     11                RESTORE LOCATION
         B        %+2
LINE11   EQU      %
         LW,7     0,3               GET NEXT WORD
         BAL,11   CONV              CONVERT & STORE IN OUTPUT BUFFER
         CI,1     50
         BNE      %+2
         AI,1     1
         AI,3     1                 BUMP LOC
         CW,3     10                CHECK FOR DONE ON LINE
         BLE      LINE10            NO
         PLW,4    DELSTK
         B        0,4               YES
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
OPEN%PRNT         ;
         EQU      %
         LW,1     M:XX
         CW,1     =X'00200000'      TEST IF OPEN
         BAZ      OPEN%PR           BRANCH IF NOT
         LI,1     X'600'            TEST IF OPEN TO PRINTER
         CS,1     M:XX+1
         BE       OPEN%PRT          YES
         BAL,0    CLOSEXX
OPEN%PR  EQU      %
         CAL1,1   LO%FPT
OPEN%PRT EQU      %
         M:DEVICE M:XX,(VFC)        SET VERTICAL FORMAT CONTROL - PRINTE
         LI,0     PRNT%TYPE
OPEN%OUT EQU      %
         STW,0    DCB%STAT
         B        *11               RETURN
*
OPEN%FILE         ;
         EQU      %
         LW,0     DCB%STAT
         CI,0     FILE%TYPE         XX OPEN TO FILE
         BE       *11               BRANCH IF YES
*
         BL       %+2               BRANCH IF CLOSED
         BAL,0    CLOSEXX
*
         LW,1     =X'02010202'      INITIALIZE ACCT OPT CONTROL WORD
         LI,7     J:CLM             JIT LOC OF ACCT, PASS, NAME
         LW,2     DELENT            ARE WE INTERFACING WITH ANALZ
         BLEZ     %+2               NO
         LW,7     3,2               YES-GET ADR OF ACCT, PASS, NAME
         LCI      7
         LM,2     0,7               FETCH ACCT TO REGS 2,3
*                                         PASSWORD TO REGS 4,5
*                                         NAME TO REGS 6,7,8
         LW,0     6
         BEZ      OPEN%OUT          NAME NOT PRESENT
         AI,4     0                 IS THERE A PASSWORD ?
         BEZ      OPEN70            NO
         STD,4    PASSWORD            PUT IT IN FPT,
         AI,1     -X'00010000'        AND SET UP TO USE IT.
OPEN70   LCI      3
         STM,1    FILE%ACCT         PUT ACCT OPT WORD, ACCT NAME,
         STM,6    FILE%NAME           AND FILE NAME INTO FPT
*
         OPEN%CAL                   OPEN THE DCB
*
         LI,0     FILE%TYPE         SET FLAG TO INDICATE FILE DCB M:XX
         B        OPEN%OUT
         PAGE
*        THIS ROUTINE EXAMINES THE USERS ACCESS IMAGE FOR THE PAGE
*        CONTAINING THE ADDRESS IN R1. IT RETURNS WITH TATT ACCESS
*        IN CC3 AND CC4.
PAGECHK  EQU      %
         LCI      3
         PSM,2    DELSTK
*
         LW,3     1                 FORM PAGE # OF
         SLS,3    -9                SPECIFIED ADDRESS
         LI,2     0
         DW,2     DRBIT27
         LW,4     J:JAC,3           GET WORD CONTAINING ACCESS FOR THE
*                                   PAGE SPECIFIED BY USER
         AW,2     2                 *
         AI,2     -26               * ISOLATE ACCESS CODE INTO POSITION
         SLS,4    0,2               *
         AND,4    =X'30'            CLEAR OTHER BITS
         STB,4    11                SAVE FOR LOADING CONDITIONS
*
         LCI      3
         PLM,2    DELSTK
*
         LC       11                LOAD ACCESS IN CC3-4
         B        *11               RETURN
         PAGE
*        THIS ROUTINE CHECKS THE SYMBOL TABLE PAGE REQUESTED AGAINST
*        EXISTING SYMBOL TABLE PAGES.  IF IT ALREADY EXISTS, WE CAN
*        IGNORE THE ERROR RETUNRN FROM GETPAGE CAL
PAGECHK1 EQU      %
         B        1,1               TAKE ERROR EXIT...
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
RELEASE  AI,10    0                 WAS ANYTHING INPUT
         BEZ      BRKDUMP           NO, DUMP THE BREAK TABLE
         LI,10    0                 ACCESS CODE 0 = DATA
         LW,3     DREXPRS           YES,WAS IT A BREAK NUMB
         BGZ      SPECRELS          YES, GO RELEASE THAT BREAK
ALLOFF   LI,4     8                 NO, RELEASE ALL BREAKS
         B        %,7               R7 = 1-DBRK, 2-IBRK
         B        %+2               RESET ACCESS ON BRK PAGE
         B        RLS10             DONT MUCK UP THE ACCESS
         LW,12    *BRKLOC-1,4       GET BRK LOC
         BEZ      RLS20             NOT SET, SKIP
         BAL,15   SET%PRTCT         RESERT ACCESS TO 0
RLS10    EQU      %
         STW,3    *BRKLOC-1,4       ZERO OUT BREAK LOCATIONS
RLS20    EQU      %
         BDR,4    ALLOFF+1
         STW,3    *BRKNENT          ETC.
         STW,3    *BIGENT
         STW,3    *TRCTBL
         B        MESSAGE           RETURN
*
SPECRELS CI,3     8                 WAS IT A LEGAL BREAK NUMB
         BG       DRERR             NO
         AI,3     -1                FORM ENTRY NUMB
         LW,12    *BRKLOC,3       GET BRK LOC
         BEZ      DRERR           BRK NOT SET
         B        %,7               R7 = 1-DBRK, 2-IBRK
         B        %+2               RESET ACCESS ON BRK PAGE
         B        RLS40             DONT MUCK UP THE ACCESS
         BAL,15   SET%PRTCT         RESET ACCESS TO 0
RLS40    EQU      %
         LI,0     0
         STW,0    *BRKLOC,3         ZERO BREAK LOCATION
         MTW,-1   *BRKNENT          DECREMENT NENT
         LW,1     DRBIT0,3          CLEAR TRACE BIT
         STS,0    *TRCTBL
         CW,3     *BIGENT           IS BIGGEST ENTRY BEING RELEASED
         BG       DRERR             TOO BIG, ERROR
         BL       MESSAGE           NOT BIG ENTRY
         AI,3     0                 IF BIG ENTRY IS ZERO, DONT LOOK
         BEZ      MESSAGE           FOR THE NEXT BIGGEST ENTRY
         LW,4     *BRKLOC-1,3       SEARCH FOR NEXT ACTIVE ENTRY LOWER
         BGZ      %+3               GOT ONE
         BDR,3    %-2
         B        %+2
         AI,3     -1                FORM ENTRY NUMB
         STW,3    *BIGENT           STORE IN BIG ENTRY
         B        MESSAGE           RETURN
************************************************************************
*                                                                      *
*        THIS ROUTINE RELEASES GLOBAL SYMBOL TABLE PAGES AND RE-INITIAL*
*        -IZES THE GLOBAL SYMBOL TABLE                                 *
*                                                                      *
************************************************************************
RELEASE%GLOBAL    ;
         EQU      %
         MTW,0    GLBLFLAG          ALREADY RELEASED
         BEZ      *15               YES, EXIT
         LW,6     SYMBEGIN          GET START ADDRESS OF GLOBAL SYMBOLS
*                                                                      *
         LI,14    0
         STW,14   GLBLFLAG          SET PRESENCE FLAG TO FALSE FOR GLBL
         STW,14   NENTSYM           SET # WORDS FOR GLOBAL TO ZERO
         LW,8     GST               SYTART ADR GLOBAL SYM TAB
         LW,9     M17               GET ADR MASK
         STS,8    SYMBEGIN          RE-INITIALIZE START ADR GLOBAL SYMB
*                                                                      *
         LW,7     IST
         CW,14    INTLFLAG          CHECK IF INTERNAL STILL ACTIVE
         BE       %+2
         AI,7     -511              DON'T RELEASE PAGE WITH INT SYMBOLS
GLBL10   EQU      %
         AI,7     -1                COMPUTE CORRECT LAST ADR IN SYM TAB
         BAL,11   FREE%PAGES
         B        *15
        B        *15               IGNORE AN ERROR RETURN
************************************************************************
*                                                                      *
*        THIS ROUTINE RELEASES THE INTERNAL SYMBOL TABLE PAGES         *
*                                                                      *
************************************************************************
RELEASE%INTERNAL  ;
         EQU      %
         MTW,0    INTLFLAG          ALREADY RELEASED
         BEZ      *15               YES, EXIT
         LI,14    0
         STW,14   INTLFLAG          SET INT SYMB FLAG TO 'RELEASED'
         STW,14   NENTINTL          SET # WORDS INT SYMB TO ZERO
         LW,6     IST               COUNT & START ADR INTERNAL SYMB TAB
         LH,7     6                 COUNT TO R7
         SLS,7    -1                POSITION CORRECTLY
         AND,6    M17               CLEAR UPPER 15 BITS
         AW,7     6                 LAST SYM TAB ADR + 1
         CW,14    GLBLFLAG          CHECK IF GLOBAL STILL ACTIVE
         BE       %+2
         AI,6     511               DON'T RELEASE PAGE WITH GLBL SYMBOLS
*
         B        GLBL10
         PAGE                                                           03278000
RESTORE  EQU      %
         LC       TCOND             GET TRAP STATUS
         BCS,7    RSTORD            NOT I BREAK, CONTINUE
         LW,0     *OLDPSD           SAVE TRAPPING INSTR FOR
         STW,0    TRAPINST          I BRK ANALYSIS
         LW,0     OLDPSD            ADDRESS OF TRAPPED INST
         AND,0    M17
         STW,0    TRAPTEMP          SAVE IT
         LB,0     TRAPINST          WHAT CAUSED TRAP
         AND,0    M7
         CI,0     X'67'             WAS IT AN EXECUTE INST
         BNE      RSTORD            NO
         LCI      0
         STM,0    DELTREGS          SAVE DELTAS REGS
         LM,0     SAVREGS           AND RESTORE USER REGS
         ANLZ,6   TRAPINST          GET THE ADDRESS
         LW,0     0,6               OF THE POSSIBLE BREAK
         STW,0    TRAPINST          TRAPPING INST
         STW,6    TRAPTEMP          TRAPPING ADDR
         LCI      0
         LM,0     DELTREGS          GET BACK DELTAS REGS
RSTORD   LW,0     STEPMODE
         BNEZ     RSTOR1            BRANCH IF IN STEPMODE
*
         LW,0     INTPMODE          ARE WE IN INTERPRETIVE MODE
         BEZ      RSTOR1            NO
         LW,0     FORKINST          RESTORE TRANSFER BREAK INSTR
         LW,1     BADR              * THIS CODE SHOULD BE MADE         *
         STW,0    0,1               * CONSISTENT WITH T BREAK LOGIC    *
RSTOR1   EQU      %
         STW,11   RSTRTRN           SAVE RETURN LINK
         BAL,11   DBRKRESET         RESET ACCESS CODE TO 00 FOR DATA PAG
         LW,11    RSTRTRN           GET RETURN LINK
         BAL,4    IBRKRSTR          RESTORE INSTRUCTION BREAKPOINTS
         LD,0     OLDPSD
RSTOR20  EQU      %
         LB,2     0
         SLD,2    -4                RIGHT JUSTIFY CC IN R2              03288000
         STW,2    DR#SEMIC          PUT VALUE OF CC IN PROPER PLACE     03289000
         LI,2     0                 CLEAR AGAIN                         03290000
         SLD,2    4                 MOVE FC INTO R2                     03291000
         STW,2    DR#SEMIF          PUT VALUE OF FC IN PROPER PLACE     03292000
         LI,2     KADMSKM           GET 17 BIT MASK                     03293000
         AND,2    0                 EXTRACT INSTRUCTION ADDRESS         03294000
         CI,2     IBRKEXEC          CHECK IF IBRK EXECUTION TRAPPED
         BNE      RST40             BRANCH IF NO
*
         LW,2     ACTBKLOC          USE IBRK LOC
         B        RST50
*
RST40    EQU      %
         CI,2     EXCTRAC           CHECK IF STEPMODE COUSED TRAP
         BNE      RST50             BRANCH IF NO
*
         LW,2     IA                USE STEPMODE LOCATION
*
RST50    EQU      %
         STW,2    DR#SEMII          SAVE VALUE OF IA IN PROPER PLACE    03295000
         LB,2     1                 GET WRITE KEY BYTE
         STW,2    DR#SEMI4          SAVE IT
         LI,2     1                 BYTE OFFSET
         LB,2     0,2               GET MAP/MASTER BYTE
         SLS,2    -4                SHIFT OFF GARBAGE
         STW,2    DR#SEMI3          SAVE GOODIES
         B        DBRKRESET         RESET DATA BREALS
*
*
SET%PRTCT         ;
         EQU      %
         LW,13    M17               ADR MASK
         STS,12   SET%PRTCT%ADR     STORE LOC IN FPT
         STB,10   SET%PRTCT%TYPE    STORE ACCESS TYPE IN FPT
         SET%ACCESS                 SET IT
         B        *15               RETURN
************************************************************************
*                                                                      *
*        THIS ROUTINE SPACES OUT TO THE COLUMN SPECIFIED IN R0         *
*                                                                      *
************************************************************************
SPACER   LI,2      #SPACE
         LW,1     OUTCHAR           GET CURRENT CHARACTER INDEX
         B        TESTSPC           TEST IT
INSERT   STB,2    OUTBUF,1          STORE A SPACE
         AI,1     1                 BUMP INDEX
TESTSPC  CW,1     0                 IS IT EQUAL TO SPECIFIED COLUMN
         BL       INSERT            NO
         STW,1    OUTCHAR           SAVE NEW CHARACTER INDEX
         B        0,4               RETURN
*                                                                       02638020
************************************************************************
*                                                                      *
*        THIS ROUTINE STORES INPUT VALUE INTO USERS REGISTER STACK     *
*        OR INTO SPECIFIED MEMORY LOCATION
*
*        R0   CONTAINS VALUE TO BE STORED
*        R1   CONTAINS STORE-MASK (ONLY USED WITH 'STSWORD' ENTRY)
*        R3   CONTAINS THE ADDRESS TO STORE INTO
*                                                                      *
************************************************************************
STORWORD EQU      %
         LI,1     -1                SET MASK = ALL 1'S
STSWORD  EQU      %                 STORE-SELECTIVE ENTRY (SEE ;W)
         LW,2     DELENT            ARE WE TO STORE VIA ANALZ/MONFIX ?
         BLEZ     DOSTSWRD          NO, STORE NORMALLY
         STD,0    STWSAVE           YES, SAVE VALUE AND MASK
         BAL,4    COPYINP           ADD ON INPUT STRING
         MTB,-1   STRNGBUF          KNOCK OFF TERMINATION CHARACTER
         LD,0     STWSAVE           R0=VALUE, R1=MASK
         LI,2     STRNGBUF          R2=STRING LOC, R3=ADDRESS
         LW,4     DELENT
         LW,4     1,4
         BAL,4    0,4               CALL 'PUT' SUBROUTINE
         BCS,8    DRERR
         LI,0     0                 WIPE OUT STRING
         STB,0    STRNGBUF
         B       *11                RETURN
DOSTSWRD EQU      %                 DO NORMAL STORE
         CI,3     15
         BG       %+3               IS IT A REGISTER ADR ?
         STS,0    SAVREGS,3         YES, STORE IN USER'S REG STACK
         B        *11                 AND EXIT.
         CI,3     DELTA%DATA        NO, IS IT IN DELTA'S AREA
         BGE      ILEGSTOR          IF SO, ILLEGAL
         STS,0    0,3               NO, STORE IN MEMORY
         B        *11                 AND EXIT
ILEGSTOR LI,1     BA(ILSTRMSG)      YES, PRINT ERROR MESSAGE
         BAL,4    DRPRTMSG
         BAL,4    DRPRTHXA
         B        MESSAGE
         PAGE
*        THIS ROUTINE SETS ACCESS OF 01 ON PAGES FROM ADR IN R6        *
*        TO THE ADDRESS IN R7                                          *
SYMPRTCT EQU      %
         LW,12    6                 START ADR TO R12
         LI,10    1                 ACCESS CODE 01
SYMP10   EQU      %
         CW,12    7                 CHECK FOR DONE
         BG       *11               YES
         BAL,15   SET%PRTCT         NO, SET IT
         BCS,12   *11               ERROR    ****
         AI,12    512               COMPUTE ADR FOR NEXT PAGE
         B        SYMP10            GO CHECK FOR DONE
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
*                 I/O ROUTINES :                                       *
*                            INTERNAL - CHARACTER TO/FROM BUFFERS      *
*                            EXTERNAL - BUFFERS TO/FROM DEVICES        *
*                                                                      *
*                                                                      *
************************************************************************
         PAGE                                                           03306000
************************************************************************
*        THE FOLLOWING IS THE CODE FOR MESSAGE ORIENTED OUTPUT         *
*                                                                      *
************************************************************************
PMESS    EQU      %
         LI,1     Y07               BUFFER ADDRESS
         LI,2     1                 BYTE COUNT
         LI,3     0                 BYTE DISPLACEMENT
         WRITE%UC                   ISSUE PROMPT
*
         LI,6     0
         STW,6    CHARINDX          INITIALIZE SCAN POINTER
         M:READ   M:UC,;
                  (BUF,INBUF),;
                  (BTD,*6),;
                  (SIZE,80)
         LH,0     M:UC+4            GET # BYTES READ - ARS
         SLS,0    -1                SHIFT FOR CORRECT COUNT
         STW,0    NUMBCHAR          SAVE IT
MESSAGE  NOP      0                 SPACE FOR A BRANCH TO TIMER
         BAL,4    BREAKCHK          CHECK FOR A BREAK
CHKOUTPT LW,1     OUTCHAR           GET OUTPUT BUF INDEX
         BLEZ     %+2               NO
         BAL,7    DUMPBUF           YES. DUMP IT.
         LW,1     CHARINDX          ANY MORE COMMANDS IN THE
         CW,1     NUMBCHAR          CURRENT COMMAND LINE.
         BGE      PMESS             NO. GET NEXT LINE
         LI,4     -1
         STW,4    SYM%TYPE          TURN OFF SYMBOL TABLE CONTROL MODE
         BAL,4    INPTCHAR          YES. CHECK NEXT CHARACTER
         CI,0     #SPACE            IS IT A SPACE?
         BE       %-2               YES, KEEP CHECKING
         MTW,-1   CHARINDX          NO, BACK UP THE POINTER
         B        *MESSEXIT         EXIT FROM MESSAGE ROUTINE
************************************************************************
*                                                                      *
*        THIS CODE DUMPS THE OUTPUT BUFFER(IF THERE IS ANYTHING IN IT) *
*        ON THE SPECIFIED DEVICE                                       *
*                                                                      *
************************************************************************
DUMPBUF  EQU      %
         LCI      8                 SAVE REGS
         PSM,0    DELSTK
         PSW,11   DELSTK
         BAL,4    BREAKCHK          CHECK IF BREAK KEY HIT
         LW,0     SEMIJ             CHECK OUTPUT DEVICE
         AW,0     PRINT%OK            SWITCHES
         BGEZ     DMP20             TELETYPE
         MTW,1    PRINT%OK          RESERT PRINT FLAG
         BAL,11   OPEN%PRNT         OPEN M:XX TO LO
         LI,0     X'C0'             FORMAT CHAR - SINGLE SPACE
         STW,0    VFCHAR
         PRINT                      DO IT
         B        DMP30
DMP20    EQU      %
         LI,1     OUTBUF            BUFFER
         LW,2     OUTCHAR           COUNT
         LI,3     0                 BYTE OFFSET
,UCWTFPT M:WRITE  M:UC,;
                  (BUF,*1),;
                  (SIZE,*2),;
                  (BTD,*3)
DMP30    EQU      %
         LI,0     0
         STW,0    OUTCHAR           RESET OUTPUT BUFFER POINTER
         BAL,4    BLANKBUF          BLANK OUTPUT BUFFER
         PLW,11   DELSTK            RESTORE REGS
         LCI      8
         PLM,0    DELSTK
         B        *7                RETURN
         PAGE
BREAKCHK EQU      %
         MTW,0    BREAKEY           TEST BREAK FLAG
         BEZ      *4                NO BREAK
BCHK10   EQU      %
         LI,0     0                 ERASE WAITING OUTPUT
         STW,0    OUTCHAR
         STW,0    BREAKEY           RESET BREAK FLAG
BCHK20  EQU      %
         LI,0     DRINITA           SET TO FULL INITIALIZE AFTER GETTING
         STW,0    MESSEXIT          NEXT COMMAND LINE
         B        DRINIT            SEND A CR AND GET NEXT COMMAND LINE
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
TYPOUT   EQU      %
         PSW,4    DELSTK            SAVE REGS
         PSW,7    DELSTK
         LW,4     SEMIJ             CHECK PRINTER/TELETYPE SWITCH
         AW,4     PRINT%OK
         BGEZ     TYP20             TELETYPE
         CI,0     #CRETRN           PRINTER, CHECK FOR  CR
         BNE      TYP20             NO, ADD TO BUFFER
         BAL,7    DUMPBUF           YES, DUMP THE LINE & IGNORE  CR
         LI,7     0                 RESET PRINTER SWITCH
         STW,7    PRINT%OK          AFTER THIS DUMPBUF CALL
         B        TYP40             EXIT
TYP20    EQU      %
         LW,4     OUTCHAR           GET POINTER
         STB,0    OUTBUF,4          ADD A CHARACTER TO OUTPUT BUFFER
         MTW,1    OUTCHAR           BUMP POINTER
TYPCHAR  CI,4     79                IS TYPEWRITER LINE FULL
         BL       TYP40
         BAL,7    DUMPBUF           YES. PUT OUT THE FULL LINE
TYP40    EQU      %
         PLW,7    DELSTK            RESTORE REGS
         PLW,4    DELSTK
         B        0,4
*        FETCH A CHARACTER FROM THE INPUT BUFFER
*
INPTCHAR LW,1     CHARINDX     INDEX INTO INBUF FOR NEXT CHARACTER
         LB,0     INBUF,1
         CW,1     NUMBCHAR     CHECK FOR LAST CHAR IN BUFFER
         BGE      DRERR      AT END OF MESSAGE
         MTW,1    CHARINDX   INCREMENT CHARACTER INDEX
         B        0,4          RETURN
*                                                                       01963000
         PAGE
*
*     STRING COLLECTION ROUTINES USED IN CONNECTION
*     WITH 'MONFIX' INTERFACE.
*
COPYINP  LI,1     0                 SOURCE INDEX
         LB,2     STRNGBUF          DEST INDEX
CPYINP10 CW,1     NUMBCHAR          ANY MORE CHARS ?
         BGE      CPYINP20          NO, STOP
         LB,0     INBUF,1           YES, GET NEXT CHAR
         AI,1     1                 BUMP SOURCE INDEX
         CI,2     79                IS THERE ROOM FOR IT IN STRING BUF?
         BGE      CPYINP20          NO, STOP
         AI,2     1                 YES, BUMP DEST INDEX,
         STB,0    STRNGBUF,2        PUT CHAR IN BUF
         B        CPYINP10          CONTINUE
CPYINP20 STB,2    STRNGBUF          DONE, SAVE NEW STRING LENGTH
         B        0,4               RETURN
*
*
COPYOUTP LI,1     0                 INIT SOURCE/DEST INDEX
CPYOUT10 CW,1     OUTCHAR           ANY MORE CHARS ?
         BGE      CPYOUT20          NO, STOP
         LB,0     OUTBUF,1          YES, GET NEXT CHAR
         AI,1     1                 BUMP INDEX
         STB,0    STRNGBUF,1        COPY CHAR TO STRING BUF
         B        CPYOUT10          CONTINUE
CPYOUT20 STB,1    STRNGBUF          DONE, SAVE NEW STRING LENGTH
         B        0,4               RETURN
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
*                 CONSTANT DATA                                        *
*                                                                      *
*                                                                      *
************************************************************************
*                                                                       00065000
* COM DEFINITIONS USED IN GENERATING THE SYMBOL TABLE                   00066000
*                                                                       00067000
*                                                                       00071000
BIT1     COM,16,8,8  0,X'A4',0                                          00068000
OPCODE   COM,8,8,8,8 AF(1),AF(2),AF(3),AF(4)
COD      COM,4,4,4,4 AF(1),AF(2),AF(3),AF(4)
         BOUND    FW
************************************************************************
*        TABLE OF SPECIAL MNEMONICS                                    *
************************************************************************
SPECODES EQU      %
IMDOP    OPCODE   A,I
         OPCODE   C,I                                                   00225000
         OPCODE   L,I                                                   00228000
         OPCODE   M,I                                                   00231000
NOTAGFLD EQU      %-SPECODES
LCFIOP   EQU      %
         OPCODE   N,O,P
         OPCODE   L,F,I
         OPCODE   L,C,I
         OPCODE   L,C,F,I
LCFOP    EQU      %
         OPCODE   N,O,P
         OPCODE   L,F
         OPCODE   L,C
         OPCODE   L,C,F
BCROP    OPCODE   B,C,R
         OPCODE   B
         OPCODE   B,G,E                                                 00790000
         OPCODE   B,L,E                                                 00793000
         OPCODE   B,E                                                   00796000
         OPCODE   B,A,Z
BCSOP    OPCODE   B,C,S
         OPCODE   B,C,S
         OPCODE   B,L
         OPCODE   B,G                                                   00802000
         OPCODE   B,N,E                                                 00805000
         OPCODE   B,A,N,Z
         OPCODE   B,G,E,Z                                               00817000
         OPCODE   B,L,E,Z                                               00823000
         OPCODE   B,E,Z                                                 00808000
         OPCODE   B,L,Z                                                 00820000
         OPCODE   B,G,Z                                                 00814000
         OPCODE   B,N,E,Z                                               00811000
BYTINDX  EQU      %-SPECODES
TBSOP    OPCODE   T,T,B,S
         OPCODE   T,B,S
BYTOP    OPCODE   C,B,S
         OPCODE   M,B,S                                                 00441000
         OPCODE   E,B,S                                                 00447000
SHFTOP   OPCODE   S
SHFTINDX EQU      %-SPECODES
         OPCODE   S,L,S
         OPCODE   S,L,D                                                 00772000
         OPCODE   S,C,S                                                 00775000
         OPCODE   S,C,D                                                 00778000
         OPCODE   S,A,S                                                 00781000
         OPCODE   S,A,D                                                 00784000
SPECNENT EQU      %-SPECODES
*        THIS TABLE IS ONLY FOR GOING FROM SYMBOL TO VALUE AND
*        IS PARALLEL TO TABLE SPECODES
         BOUND    FW
CODEVAL  COD      2                  AI
         COD      2,1                CI
         COD      2,2                LI
         COD      2,3                MI
         COD      0,2               NOP
         COD      0,2,1             LFI
         COD      0,2,2             LCI
         COD      0,2,3             LCFI
         COD      7,0               NOP
         COD      7,0,1             LF
         COD      7,0,2             LC
         COD      7,0,3             LCF
         COD      6,8                BCR
         COD      6,8                B
         COD      6,8,1              BGE
         COD      6,8,2              BLE
         COD      6,8,3              BE
         COD      6,8,4             BAZ
         COD      6,9                BCS
         COD      6,9                BCS NOT USED
         COD      6,9,1              BL
         COD      6,9,2              BG
         COD      6,9,3              BNE
         COD      6,9,4             BANZ
         COD      6,8,1              BGEZ
         COD      6,8,2              BLEZ
         COD      6,8,3              BEZ
         COD      6,9,1              BLZ
         COD      6,9,2              BGZ
         COD      6,9,3              BNEZ
         COD      4                  TTBS
         COD      4,1                TBS
         COD      6                 CBS
         COD      6,1               MBS
         COD      6,3               EBS
         COD      2,5                S
         COD      2,5                SLS
         COD      2,5,0,1            SLD
         COD      2,5,0,2            SCS
         COD      2,5,0,3            SCD
         COD      2,5,0,4            SAS
         COD      2,5,0,5            SAD
*                                                                       00108000
* STANDARD OPERATION CODES                                              00109000
*                                                                       00110000
         BOUND    FW
OPCODES  EQU      %
         OPCODE   #@,#0,#0
         OPCODE   #@,#0,#1
         DATA     LCFIINST
         OPCODE   #@,#0,#3
         OPCODE   C,A,L,#1                                              00126000
         OPCODE   C,A,L,#2                                              00129000
         OPCODE   C,A,L,#3                                              00132000
         OPCODE   C,A,L,#4                                              00135000
         OPCODE   P,L,W
         OPCODE   P,S,W
         OPCODE   P,L,M                                                 00147000
         OPCODE   P,S,M                                                 00150000
         OPCODE   #@,#0,C                                               00153000
         OPCODE   #@,#0,D                                               00156000
         OPCODE   L,P,S,D                                               00550000
         OPCODE   X,P,S,D                                               00553000
         OPCODE   A,D                                                   00168000
         OPCODE   C,D                                                   00171000
         OPCODE   L,D                                                   00174000
         OPCODE   M,S,P                                                 00177000
         OPCODE   #@,#1,#4                                              00180000
         OPCODE   S,T,D                                                 00183000
         OPCODE   #@,#1,#6                                              00186000
         OPCODE   #@,#1,#7                                              00189000
         OPCODE   S,D                                                   00195000
         OPCODE   C,L,M                                                 00198000
         OPCODE   L,C,D                                                 00201000
         OPCODE   L,A,D                                                 00204000
         OPCODE   F,S,L                                                 00207000
         OPCODE   F,A,L                                                 00210000
         OPCODE   F,D,L                                                 00213000
         OPCODE   F,M,L                                                 00216000
         DATA,FW  ACLMIMED
         DATA,FW  ACLMIMED
         DATA,FW  ACLMIMED
         DATA,FW  ACLMIMED
         OPCODE   S,F                                                   00234000
         DATA,FW  SHFTINST
         OPCODE   #@,#2,#6                                              00240000
         OPCODE   #@,#2,#7                                              00243000
         OPCODE   C,V,S                                                 00249000
         OPCODE   C,V,A                                                 00252000
         OPCODE   L,M                                                   00255000
         OPCODE   S,T,M                                                 00258000
         OPCODE   #@,#2,C                                               00261000
         OPCODE   #@,#2,D                                               00264000
         OPCODE   W,A,I,T                                               00556000
         OPCODE   L,R,P                                                 00559000
         OPCODE   A,W                                                   00276000
         OPCODE   C,W                                                   00279000
         OPCODE   L,W                                                   00282000
         OPCODE   M,T,W                                                 00285000
         OPCODE   #@,#3,#4                                              00288000
         OPCODE   S,T,W                                                 00291000
         OPCODE   D,W                                                   00294000
         OPCODE   M,W                                                   00297000
         OPCODE   S,W                                                   00303000
         OPCODE   C,L,R                                                 00306000
         OPCODE   L,C,W                                                 00309000
         OPCODE   L,A,W                                                 00312000
         OPCODE   F,S,S                                                 00315000
         OPCODE   F,A,S                                                 00318000
         OPCODE   F,D,S                                                 00321000
         OPCODE   F,M,S                                                 00324000
         DATA,FW  TBSINST
         DATA,FW  TBSINST
         OPCODE   #@,#4,#2                                              00336000
         OPCODE   #@,#4,#3                                              00339000
         OPCODE   A,N,L,Z                                               00342000
         OPCODE   C,S                                                   00345000
         OPCODE   X,W                                                   00348000
         OPCODE   S,T,S                                                 00351000
         OPCODE   E,O,R                                                 00357000
         OPCODE   O,R                                                   00360000
         OPCODE   L,S                                                   00363000
         OPCODE   A,N,D                                                 00366000
         OPCODE   S,I,O                                                 00562000
         OPCODE   T,I,O                                                 00565000
         OPCODE   T,D,V                                                 00568000
         OPCODE   H,I,O                                                 00571000
         OPCODE   A,H                                                   00384000
         OPCODE   C,H                                                   00387000
         OPCODE   L,H                                                   00390000
         OPCODE   M,T,H                                                 00393000
         OPCODE   #@,#5,#4                                              00396000
         OPCODE   S,T,H                                                 00399000
         OPCODE   D,H                                                   00402000
         OPCODE   M,H                                                   00405000
         OPCODE   S,H                                                   00411000
         OPCODE   #@,#5,#9                                              00414000
         OPCODE   L,C,H                                                 00417000
         OPCODE   L,A,H                                                 00420000
         OPCODE   #@,#5,C                                               00423000
         OPCODE   #@,#5,D                                               00426000
         OPCODE   #@,#5,E                                               00429000
         OPCODE   #@,#5,F                                               00432000
         DATA,FW  CMEBS
         DATA,FW  CMEBS
         OPCODE   #@,#6,#2                                              00444000
         DATA,FW  CMEBS
         OPCODE   B,D,R                                                 00450000
         OPCODE   B,I,R                                                 00453000
         OPCODE   A,W,M                                                 00456000
         OPCODE   E,X,U                                                 00459000
         DATA,FW  BCRINST
         DATA,FW  BCSINST
         OPCODE   B,A,L                                                 00471000
         OPCODE   I,N,T                                                 00474000
         OPCODE   R,D                                                   00574000
         OPCODE   W,D                                                   00577000
         OPCODE   A,I,O                                                 00580000
         OPCODE   M,M,C                                                 00583000
         DATA     LCFINST
         OPCODE   C,B
         OPCODE   L,B
         OPCODE   M,T,B
         OPCODE   S,T,C,F                                               00504000
         OPCODE   S,T,B                                                 00507000
         OPCODE   P,A,C,K                                               00510000
         OPCODE   U,N,P,K                                               00513000
         OPCODE   D,S                                                   00519000
         OPCODE   D,A                                                   00522000
         OPCODE   D,D                                                   00525000
         OPCODE   D,M                                                   00528000
         OPCODE   D,S,A                                                 00531000
         OPCODE   D,C                                                   00534000
         OPCODE   D,L                                                   00537000
         OPCODE   D,S,T                                                 00540000
CODENENT EQU      %-OPCODES
*
*        THE FOLLOWING TABLE IS USED IN THE INTERPRETIVE EXECUTION
*        OF BRANCHING INSTRUCTIONS (SEE ROUTINE INTEX-TRACEXEC)
*
BACT     EQU      %
         B        BDRBNCH           BDR
         B        BIRBNCH           BIR
         B        DRERR             AWM
         B        DRERR             EXU
         B        BCRBNCH           BCR
         B        BCSBNCH           BCS
         STW,3    SAVREGS,2         BAL
*                                                                       00993000
*                                                                      *
TT       EQU      DELTA%BASE        BASE ADR OF DELTA FOR COMPUTING
*                                   RELATIVE ADDRESSES OF SEMI- AND PUNC
*                                   -TUATION ROUTINES
DRSPCSYM EQU      %                                                     01426000
         DATA,HW  DR#SEMIQ-TT       ;Q                                  01428000
         DATA,HW  DR#SEMII-TT       ;I                                  01429000
         DATA,HW  DR#SEMIC-TT       ;C                                  01430000
         DATA,HW  DR#SEMIF-TT       ;F                                  01431000
         DATA,HW  DR#SEMIM-TT       ;M                                  01432000
         DATA,HW  DR#SEMI1-TT       ;1                                  01433000
         DATA,HW  DR#SEMI2-TT       ;2                                  01434000
         DATA,HW  DR#SEMI3-TT       ;3
         DATA,HW  DR#SEMI4-TT       ;4
         PAGE                                                           01435000
*                                                                       01436000
* PUNCTUATION DISPATCH TABLE                                            01437000
* HALF WORD TABLE OF ADDRESS POINTERS                                   01438000
*                                                                       01439000
         BOUND    FW                                                    01440000
*                                                                       01441000
DRPOINT1 EQU      %                 BEGINNING OF TABLE                  01442000
DRPSPACE DATA,HW  DRSPACE-TT        SPACE                               01443000
DRPADDER DATA,HW  DRINITC-TT        PLUS                                01444000
DRPMINUS DATA,HW  DRINITC-TT        MINUS                               01445000
DRPCOMMA DATA,HW  DRCOMMA-TT        COMMA                               01445500
DRPASTIK DATA,HW  DRASTISK-TT       ASTERISK
DRPCRTRN DATA,HW  DRCRTRN-TT        CARRIAGE RETURN                     01446000
DRPLFEED DATA,HW  DRLFEED-TT        LINE FEED                           01447000
DRPUAROW DATA,HW  DRUPAROW-TT       UP ARROW                            01448000
DRPBSLSH DATA,HW  DRBSLASH-TT       BACKSLASH                           01449000
DRPSLASH DATA,HW  DRSLASH-TT        SLASH                               01450000
DRPEQUAL DATA,HW  DREQUAL-TT        EQUAL                               01453000
DRPLSTHN DATA,HW  DRLSTHAN-TT       LESS THAN                           01453250
DRPTAB   DATA,HW  DRTAB-TT          TAB
DRVAL1XX EQU      %                 END OF EVALUATING PUNCTUATION       01453500
DRPPEROD DATA,HW  DRPERIOD-TT       PERIOD                              01454000
DRPGRTHN DATA,HW  DRERR-TT          GREATER THAN - MUST BE AN ERROR     01455500
DRPLBRKT DATA,HW  DRLBRKET-TT       LEFT BRACKET                        01456000
DRPAMPER DATA,HW  DRAMPRSD-TT       AMPERSAND                           01457000
DRPEXCLM DATA,HW  DREXCLAM-TT       EXCLAMATION                         01458000
DRPLFPAR DATA,HW  CHNGMODE-TT
DRPRTPAR DATA,HW  DRRPAR-TT         RIGHT PARENTHESIS                   01459000
DRPSCOLN DATA,HW  DRSCOLON-TT       SEMICOLON                           01460000
DRPRBRKT DATA,HW  DRRBRKET-TT       RIGHT BRACKET                       01461000
DRPPERCT DATA,HW  DRPERCNT-TT       PERCENT SIGN                        01463000
DRPUSCRE DATA,HW  DRUNDSCR-TT       UNDERSCORE                          01464000
DRPSQUOT DATA,HW  DRSQUOTE-TT       SINGLE QUOTE                        01465000
DRPDQUOT DATA,HW  DRDQUOTE-TT       DOUBLE QUOTE                        01466000
DRXX     DATA,HW  DRERR-TT          ERROR EXIT                          01467000
DRPQUEST DATA,HW  DRERR-TT
*                                                                       01470000
         PAGE                                                           01471000
*                                                                       01472000
* SEMI-COLON COMMAND DISPATCH TABLE                                     01473000
* HALF WORD TABLE OF ADDRESS POINTERS                                   01474000
*                                                                       01475000
         BOUND    FW                                                    01476000
*                                                                       01477000
DRPOINT2 EQU      %                                                     01478000
DRPSEMIB DATA,HW  DRSEMIB-TT+K8000
DRPSEMID DATA,HW  DRSEMID-TT+K8000
DRPSEMIG DATA,HW  DRSEMIG-TT
DRPSEMIL DATA,HW  DRSEMIL-TT
DRPSEMIN DATA,HW  DRSEMIN-TT
DRPSEMIO DATA,HW  DRSEMIO-TT        ;O
DRPSEMIP DATA,HW  DRSEMIP-TT+K8000
DRPSEMIR DATA,HW  DRSEMIR-TT        ;R                                  01492000
DRPSEMIW DATA,HW  DRSEMIW-TT
DRPSEMIX DATA,HW  DRSEMIX-TT+K8000
DRPSEMIY DATA,HW  SEMIY-TT+K8000
DRPSEMIZ DATA,HW  DRSEMIZ-TT
DRSLIMIT EQU      HA(%)-HA(DRPOINT2)  EVALUATE FOR ABOVE ROUTINES
DRPSEMIQ DATA,HW  DRSPCHR-TT        ;Q                                  01478100
DRPSEMII DATA,HW  DRSPCHR-TT+K8000
DRPSEMIC DATA,HW  DRSPCHR-TT+K8000
DRPSEMIF DATA,HW  DRSPCHR-TT+K8000
DRPSEMIM DATA,HW  DRSPCHR-TT        ;M                                  01478500
DRPSEMI1 DATA,HW  DRSPCHR-TT        ;1                                  01478600
DRPSEMI2 DATA,HW  DRSPCHR-TT        ;2                                  01478700
DRPSEMI3 DATA,HW  DRSPCHR-TT+K8000
DRPSEMI4 DATA,HW  DRSPCHR-TT+K8000
DRPSEMIA DATA,HW  DRSEMIA-TT        ;A                                  01479000
DRPSEMIE DATA,HW  DRERR-TT
DRPSEMIJ DATA,HW  DRSEMIJ-TT        ;J  CHANGE OUTPUT DEVICE
DRPSEMIK DATA,HW  DRSEMIK-TT        ;K                                  01486000
DRPSEMIS DATA,HW  DRSEMIS-TT        ;S
DRPSEMIT DATA,HW  DRSEMIT-TT+K8000
DRPSEMIU DATA,HW  DRSEMIU-TT        ;U                                  01494000
DRPSEMIV DATA,HW  DRERR-TT
DRPSMISL DATA,HW  DRSEMISL-TT       ;/                                  01501000
DRPSMIEQ DATA,HW  DRSEMIEQ-TT       ;=                                  01502000
DRPSMISP DATA,HW  DRSEMISP-TT       ;SPACE                              01503000
DRPSMIER DATA,HW  DRERR-TT          ILLEGAL SEMI-COLON COMMAND          01504000
*                                                                       01505000
         PAGE                                                           01506000
*                                                                       01507000
* INDEXES TO THE PUNCTUATION DISPATCH TABLE                             01508000
* VALUE DETERMINES THE TYPE OF EVALUATION(IF ANY), WHICH IS REQUIRED    01509000
*                                                                       01510000
#T1      EQU      HA(DRPOINT1)      USED TO FORM DELIMITER INDEX        01511000
DRDELBAD EQU      HA(DRXX)-#T1      PUNCTUATION ERROR INDEX             01513000
*                                                                       01514000
         BOUND    FW                                                    01515000
*                                                                       01516000
DRKEY1   EQU      %                                                     01517000
         DATA,BT  HA(DRPSPACE)-#T1  BLANK                               01518000
         DATA,BT  DRDELBAD          --                                  01519000
         DATA,BT  DRDELBAD          --                                  01520000
         DATA,BT  DRDELBAD          --                                  01521000
         DATA,BT  DRDELBAD          --                                  01522000
         DATA,BT  HA(DRPTAB)-#T1    TAB
         DATA,BT  DRDELBAD          --                                  01524000
         DATA,BT  DRDELBAD          --                                  01525000
         DATA,BT  DRDELBAD
         DATA,BT  DRDELBAD          --                                  01527000
         DATA,BT  HA(DRPBSLSH)-#T1  BACKSLASH                           01528000
         DATA,BT  HA(DRPPEROD)-#T1  PERIOD                              01529000
         DATA,BT  HA(DRPLSTHN)-#T1  LESS THAN                           01530000
         DATA,BT  HA(DRPCRTRN)-#T1  CARRIAGE RETURN
         DATA,BT  HA(DRPADDER)-#T1  PLUS                                01532000
         DATA,BT  HA(DRPLBRKT)-#T1  LEFT BRACKET                        01533000
         DATA,BT  DRDELBAD
         DATA,BT  DRDELBAD          --                                  01535000
         DATA,BT  DRDELBAD          --                                  01536000
         DATA,BT  DRDELBAD          --                                  01537000
         DATA,BT  DRDELBAD          --                                  01538000
         DATA,BT  HA(DRPLFEED)-#T1  LIME FEED
         DATA,BT  DRDELBAD          --                                  01540000
         DATA,BT  DRDELBAD          --                                  01541000
         DATA,BT  DRDELBAD          --                                  01542000
         DATA,BT  DRDELBAD          --                                  01543000
         DATA,BT  HA(DRPEXCLM)-#T1  EXCLAMATION POINT                   01544000
         DATA,BT  DRDELBAD          --                                  01545000
         DATA,BT  HA(DRPASTIK)-#T1  ASTERISK                            01546000
         DATA,BT  HA(DRPRTPAR)-#T1  RIGHT PAREN                         01547000
         DATA,BT  HA(DRPSCOLN)-#T1  SEMICOLON                           01548000
         DATA,BT  HA(DRPRBRKT)-#T1  RIGHT BRACKET                       01549000
         DATA,BT  HA(DRPMINUS)-#T1  MINUS                               01550000
         DATA,BT  HA(DRPSLASH)-#T1  SLASH                               01551000
         DATA,BT  DRDELBAD          --                                  01552000
         DATA,BT  DRDELBAD          --                                  01553000
         DATA,BT  DRDELBAD          --                                  01554000
         DATA,BT  HA(DRPLFEED)-#T1  LINE FEED                           01555000
         DATA,BT  DRDELBAD          --                                  01556000
         DATA,BT  DRDELBAD          --                                  01557000
         DATA,BT  DRDELBAD          --                                  01558000
         DATA,BT  DRDELBAD          --                                  01559000
         DATA,BT  HA(DRPUAROW)-#T1  UP ARROW
         DATA,BT  HA(DRPCOMMA)-#T1  COMMA                               01561000
         DATA,BT  HA(DRPPERCT)-#T1  PERCENT SIGN                        01562000
         DATA,BT  HA(DRPUSCRE)-#T1  UNDERSCORE                          01563000
         DATA,BT  HA(DRPGRTHN)-#T1  GREATER THAN                        01564000
         DATA,BT  HA(DRPQUEST)-#T1  QUESTION MARK                       01565000
         DATA,BT  DRDELBAD          --                                  01566000
         DATA,BT  DRDELBAD          --                                  01567000
         DATA,BT  DRDELBAD          --                                  01568000
         DATA,BT  DRDELBAD          --                                  01569000
         DATA,BT  DRDELBAD          --                                  01570000
         DATA,BT  DRDELBAD          --                                  01571000
         DATA,BT  DRDELBAD          --                                  01572000
         DATA,BT  DRDELBAD          --                                  01573000
         DATA,BT  DRDELBAD          --                                  01574000
         DATA,BT  DRDELBAD          --                                  01575000
         DATA,BT  DRDELBAD          --                                  01576000
         DATA,BT  DRDELBAD          --                                  01577000
         DATA,BT  DRDELBAD          --                                  01578000
         DATA,BT  HA(DRPSQUOT)-#T1  SINGLE QUOTE                        01579000
         DATA,BT  HA(DRPEQUAL)-#T1  EQUAL                               01580000
         DATA,BT  HA(DRPDQUOT)-#T1  DOUBLE QUOTE                        01581000
*                                                                       01582000
         PAGE                                                           01583000
*                                                                       01584000
* INDEXES TO THE SEMI-COLON DISPATCH TABLE                              01585000
* VALUE DETERMINES THE TYPE OF EVALUATION (IF ANY), WHICH IS REQUIRED   01586000
*                                                                       01587000
#T2      EQU      HA(DRPOINT2)      USED TO FORM SEMICOLON INDEX        01588000
*                                                                       01589000
DRSMIBAD EQU      HA(DRPSMIER)-#T2  SEMICOLON ERROR INDEX               01590000
*                                                                       01591000
         BOUND    FW                                                    01592000
*                                                                       01593000
DRKEY2   EQU      %                                                     01594000
         DATA,BT  HA(DRPSMISP)-#T2  ;SPACE                              01595000
         DATA,BT  HA(DRPSEMIA)-#T2  ;A                                  01596000
         DATA,BT  HA(DRPSEMIB)-#T2  ;B                                  01597000
         DATA,BT  HA(DRPSEMIC)-#T2  ;C                                  01598000
         DATA,BT  HA(DRPSEMID)-#T2  ;D *** TEMPORARY CARD ***           01599000
         DATA,BT  HA(DRPSEMIE)-#T2  ;E                                  01600000
         DATA,BT  HA(DRPSEMIF)-#T2  ;F                                  01601000
         DATA,BT  HA(DRPSEMIG)-#T2  ;G                                  01602000
         DATA,BT  DRSMIBAD          --                                  01603000
         DATA,BT  HA(DRPSEMII)-#T2  ;I                                  01604000
         DATA,BT  DRSMIBAD          --                                  01605000
         DATA,BT  DRSMIBAD          --                                  01606000
         DATA,BT  DRSMIBAD          --                                  01607000
         DATA,BT  DRSMIBAD          --                                  01608000
         DATA,BT  DRSMIBAD          --                                  01609000
         DATA,BT  DRSMIBAD          --                                  01610000
         DATA,BT  DRSMIBAD          --                                  01611000
         DATA,BT  HA(DRPSEMIJ)-#T2  ;J
         DATA,BT  HA(DRPSEMIK)-#T2  ;K                                  01613000
         DATA,BT  HA(DRPSEMIL)-#T2  ;L                                  01614000
         DATA,BT  HA(DRPSEMIM)-#T2  ;M                                  01615000
         DATA,BT  HA(DRPSEMIN)-#T2  ;N                                  01616000
         DATA,BT  HA(DRPSEMIO)-#T2  ;O  PRINTER DUMP
         DATA,BT  HA(DRPSEMIP)-#T2  ;P                                  01618000
         DATA,BT  HA(DRPSEMIQ)-#T2  ;Q                                  01619000
         DATA,BT  HA(DRPSEMIR)-#T2  ;R                                  01620000
         DATA,BT  DRSMIBAD          --                                  01621000
         DATA,BT  DRSMIBAD          --                                  01622000
         DATA,BT  DRSMIBAD          --                                  01623000
         DATA,BT  DRSMIBAD          --                                  01624000
         DATA,BT  DRSMIBAD          --                                  01625000
         DATA,BT  DRSMIBAD          --                                  01626000
         DATA,BT  DRSMIBAD          --                                  01627000
         DATA,BT  HA(DRPSMISL)-#T2  ;/                                  01628000
         DATA,BT  HA(DRPSEMIS)-#T2  ;S
         DATA,BT  HA(DRPSEMIT)-#T2  ;T                                  01630000
         DATA,BT  HA(DRPSEMIU)-#T2  ;U                                  01631000
         DATA,BT  HA(DRPSEMIV)-#T2  ;V  SAVE ON TAPE
         DATA,BT  HA(DRPSEMIW)-#T2  ;W                                  01633000
         DATA,BT  HA(DRPSEMIX)-#T2  ;X                                  01634000
         DATA,BT  HA(DRPSEMIY)-#T2  ;Y                                  01635000
         DATA,BT  HA(DRPSEMIZ)-#T2  ;Z                                  01636000
         DATA,BT  DRSMIBAD          --                                  01637000
         DATA,BT  DRSMIBAD          --                                  01638000
         DATA,BT  DRSMIBAD          --                                  01639000
         DATA,BT  DRSMIBAD          --                                  01640000
         DATA,BT  DRSMIBAD          --                                  01641000
         DATA,BT  DRSMIBAD          --                                  01642000
         DATA,BT  DRSMIBAD          --                                  01643000
         DATA,BT  HA(DRPSEMI1)-#T2  ;1                                  01644000
         DATA,BT  HA(DRPSEMI2)-#T2  ;2                                  01645000
         DATA,BT  HA(DRPSEMI3)-#T2  F;3
         DATA,BT  HA(DRPSEMI4)-#T2  ;4
         DATA,BT  DRSMIBAD          --                                  01648000
         DATA,BT  DRSMIBAD          --                                  01649000
         DATA,BT  DRSMIBAD          --                                  01650000
         DATA,BT  DRSMIBAD          --                                  01651000
         DATA,BT  DRSMIBAD          --                                  01652000
         DATA,BT  DRSMIBAD          --                                  01653000
         DATA,BT  DRSMIBAD          --                                  01654000
         DATA,BT  DRSMIBAD          --                                  01655000
         DATA,BT  DRSMIBAD          --                                  01656000
         DATA,BT  HA(DRPSMIEQ)-#T2  ;=                                  01657000
         DATA,BT  DRSMIBAD          --                                  01658000
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
         BOUND    FW
CONDTION EQU      %
        DATA,HW  0,'QL','SL','QE'
        DATA,HW  'QN','QG','RG'
         BOUND    FW
DBKCNDTN BGE      DATABRK           CODE WHICH PERFORMS COMPARISON
         BG       DATABRK           FOR CONDITIONAL D BREAKS
         BE       DATABRK           THE ORDER IS THE REVERSE OF
         BNE      DATABRK           THE CONDITION TABLE ABOVE,
         BLE      DATABRK           BUT IS CORRECT.
         BL       DATABRK
DBRKADRS EQU      %
         DATA,FW  DBRKLOC-1
         DATA,FW  DBRKLOC
         DATA,FW  DBRKVAL
         DATA,FW  DBRKNENT
         DATA,FW  TRACETBL
         DATA,FW  BIGENTRY
*
*        TRANSLATION TABLE DELTA FORMAT CODES -> META-SYM CODES
*
DELTATYP EQU      %
         DATA,1   0,0,2,3,7,1,6
         BOUND    4
*                                                                       01104000
* TABLE USED FOR BIT TESTING                                            01105000
* NOTE : THE ODERING OF THIS TABLE MUST NOT BE CHANGED                  01106000
*                                                                       01107000
DRBITS   EQU      %                                                     01109000
DLBITS   EQU      %                                                     01108000
DRBIT0   DATA,4   X'80000000'                                           01110000
DRBIT1   DATA,4   X'40000000'                                           01111000
DRBIT2   DATA,4   X'20000000'                                           01112000
DRBIT3   DATA,4   X'10000000'                                           01113000
DRBIT4   DATA,4   X'8000000'                                            01114000
DRBIT5   DATA,4   X'4000000'                                            01115000
DRBIT6   DATA,4   X'2000000'                                            01116000
DRBIT7   DATA,4   X'1000000'                                            01117000
DRBIT8   DATA,4   X'800000'                                             01118000
DRBIT9   DATA,4   X'400000'                                             01119000
DRBIT10  DATA,4   X'200000'                                             01120000
DRBIT11  DATA,4   X'100000'                                             01121000
DRBIT12  DATA,4   X'80000'                                              01122000
DRBIT13  DATA,4   X'40000'                                              01123000
DRBIT14  DATA,4   X'20000'                                              01124000
DRBIT15  DATA,4   X'10000'                                              01125000
DRBIT16  DATA,4   X'8000'                                               01126000
DRBIT17  DATA,4   X'4000'                                               01127000
DRBIT18  DATA,4   X'2000'                                               01128000
DRBIT19  DATA,4   X'1000'                                               01129000
DRBIT20  DATA,4   X'800'                                                01130000
DRBIT21  DATA,4   X'400'                                                01131000
DRBIT22  DATA,4   X'200'                                                01132000
DRBIT23  DATA,4   X'100'                                                01133000
DRBIT24  DATA,4   X'80'                                                 01134000
DRBIT25  DATA,4   X'40'                                                 01135000
DRBIT26  DATA,4   X'20'                                                 01136000
DRBIT27  DATA,4   X'10'                                                 01137000
DRBIT28  DATA,4   X'8'                                                  01138000
DRBIT29  DATA,4   X'4'                                                  01139000
DRBIT30  DATA,4   X'2'                                                  01140000
DRBIT31  DATA,4   X'1'                                                  01141000
*                                                                       01143000
************************************************************************
*                                                                      *
* THE FOLLOWING TRANSFER VECTOR IS USED FOR INPUT SWITCHING             01395000
* NOTE : THE DEBUGGER IS VERY SENSITIVE TO THE ORDERING OF THIS TABLE   01396000
*** DO NOT REARRANGE UNDER ANY CIRCUMSTANCES ***                        01397000
*                                                                      *
************************************************************************
DRBUILD  EQU      %                                                     01399000
DREBCDIC B        DRINPEBD          READ IN AS AN EBCDIC VALUE          01400000
DRSYMBOL B        DRINPSYM          READ IN AS A SYMBOL                 01401000
DRINTGER B        DRINPINT          READ IN AS AN INTEGER               01402000
DRHEXAD  B        DRINPHEX          READ IN AS A HEXADECIMAL            01404000
DRNUMBER B        DRINPNUM          READ IN AS A NUMBER                 01405000
DRSPCINP B        DRVALERR          SPECIAL ERROR ENTRY                 01406000
*                                                                       01407000
*                                                                       01813000
* TABLE OF EBCDIC VALUES FOR THE HEXADECIMAL DIGITS                     01814000
*                                                                       01815000
DRDIGITS EQU      %                                                     01816000
         DATA,BT  '0'                                                   01817000
         DATA,BT  '1'                                                   01818000
         DATA,BT  '2'                                                   01819000
         DATA,BT  '3'                                                   01820000
         DATA,BT  '4'                                                   01821000
         DATA,BT  '5'                                                   01822000
         DATA,BT  '6'                                                   01823000
         DATA,BT  '7'                                                   01824000
         DATA,BT  '8'                                                   01825000
         DATA,BT  '9'                                                   01826000
         DATA,BT  'A'                                                   01827000
         DATA,BT  'B'                                                   01828000
         DATA,BT  'C'                                                   01829000
         DATA,BT  'D'                                                   01830000
         DATA,BT  'E'                                                   01831000
         DATA,BT  'F'                                                   01832000
*                                                                       01833000
*                                                                       01760000
* BYTE ARRAY OF POSSIBLE MODE CHARACTERS                                01761000
*                                                                       01762000
         BOUND    FW                                                    01763000
DRMODCHR EQU      %                                                     01765000
         DATA,BT  0                 DUMMY ENTRY - NOT USED              01766000
         DATA,BT  'I'               INTEGER                             01767000
         DATA,BT  'O'               OCTAL                               01768000
         DATA,BT  'X'               HEXADECIMAL                         01769000
         DATA,BT  'C'               EBCDIC                              01770000
DRMODCNT EQU      BA(%)-BA(DRMODCHR) COUNT OF POSSIBLE MODES            01771000
*                                                                       01772000
* BYTE ARRAY OF POSSIBLE MODE VALUES                                    01773000
* INDEX OF CHARACTER IN THE MODE ARRAY GIVES POSITION OF VALUE HERE     01774000
*                                                                       01775000
         BOUND    FW                                                    01776000
DRMODVAL EQU      %                                                     01778000
         DATA,BT  0                 DUMMY ENTRY - NOT USED              01779000
         DATA,BT  #INTTYPE          INTEGER                             01780000
         DATA,BT  #HEXTYPE          HEXADECIMAL                         01782000
         DATA,BT  #EBDTYPE          EBCDIC                              01783000
         BOUND    FW
*                                                                       01784000
*                                                                       01700000
* TRANSFER VECTOR FOR DISPATCHING TO THE APPROPRIATE PRINT ROUTINE      01701000
* INDEXED BY OUTPUT TYPE VALUE                                          01702000
*                                                                       01703000
DRPRTVEC EQU      %
         B        DRPRTFS
         B        DRPRTFL
         B        DRPRTEBD          EBCDIC                              01706500
         B        DRPRTINT          INTEGER (SIGNED)                    01710000
         B        DRPRTHXA
         B        DRERR
*                                                                       01512000
DRTYPCHR EQU      %                                                     01686000
         DATA,BT  0                 DUMMY ENTRY - NOT USED              01687000
         DATA,BT  'R'               RELATIVE                            01688000
         DATA,BT  'A'               ABSOLUTE                            01689000
         DATA,BT  'S'
         DATA,BT  'L'
         DATA,BT  'C'               EBCDIC                              01689500
         DATA,BT  'I'               INTEGER                             01693000
         DATA,BT  'X'               HEXADECIMAL                         01691000
         DATA,BT  'F'
         DATA,BT  'K'               CONSTANT SYMBOL TYPE
DRTYPCNT EQU      BA(%)-BA(DRTYPCHR) NUMBER POSSIBLE OUTPUT TYPES       01696000
DRTYPLST EQU      DRTYPCNT-1        INDEX TO LAST ELEMENT OF TYPE ARRAYS01696500
         BOUND    FW
*                                                                       01695000
ERMSVEC  DATA,FW  BA(DRNOTOPR)
         DATA,FW  BA(DRNOTMEM)
         DATA,FW  BA(DRPRIVIL)
         DATA,FW  BA(DRMEMPRO)
IBRKADRS EQU      %
         DATA,FW  IBRKLOC-1
         DATA,FW  IBRKLOC
         DATA,FW  IBRKDPLY
         DATA,FW  IBRKNENT
         DATA,FW  ITRCTBL
         DATA,FW  IBRKBGEN
*
*                 TRANSLATION TABLE FOR CONVERTING FROM METASYMBOL
*                 SYMBOL TYPES TO DELTAS OUTPUT FORMAT CODES
*
METATYPE EQU      %
         DATA,1   0,5,2,3,0,0,6,4
*
         BOUND    4
*
* TABLE OF ABORT CODES CAUSED BY USER SETTING DATA BREAK POINT
*
ABRTCDT  DATA     X'4A00'
         DATA     0                 END OF TABLE FLAG
*
         BOUND    4
*
*                 TRAP FLAG BITS IN BYTE 0 OF J:USENT IN JIT WHEN
*                 USER HAS TRAP CONTROL
*
TRAPFLAG EQU      %
         DATA,2   X'0040',X'0020',X'0010',2,8,4,X'0080',X'0100'
         BOUND    4
*                                                                       01777000
*        TRANSFER VECTOR FOR TRAP CONTROL
*                                                                       01764000
TRAPS    EQU      %
         B        TRAP40            TRAP 40
         B        UNIMP             TRAP 41
         B        STAKOFLW          TRAP 42
         B        FIXARITH          TRAP 43
         B        FLTFLT            TRAP 44
         B        DECFLT            TRAP 45
*                                                                       01711000
*                                                                       01785000
WTPTCT   EQU      %                 WRITE PROTECT CODES FOR THE
*                                   FOUR USER PAGES
         DATA,FW  X'40'
         DATA,FW  X'10'
         DATA,FW  4
         DATA,FW  1
*                                                                       01419000
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
*                                                                       01659000
         PAGE                                                           01660000
*                                                                       01661000
* THE FOLLOWING INSTRUCTIONS ARE EXECUTED WHEN BUILDING AN EXPRESSION   01662000
*                                                                       01663000
DREXUTB1 EQU      %                                                     01664000
DRBLANKX NOP                        BLANK (SPACE)                       01665000
DRPLUSX  NOP                        PLUS                                01666000
DRMINUSX LCW,2    2                 MINUS
DRCOMMAX NOP                        COMMA                               01667500
         BAL,14   DRMULTR           MULTIPLICATION
         BAL,14   DRMULTR           POS SHIFT
         BAL,14   DRMULTR           NEG SHIFT
*                                                                       01668000
* THE FOLLOWING INSTRUCTIONS ARE EXECUTED WHEN FORMING AN ADDRESS VALUE 01669000
*                                                                       01670000
DREXUTB2 EQU      %                                                     01671000
         NOP                        BYTE ADDRESS                        01672000
         SLS,3    -1                HALFWORD ADDRESS                    01673000
         SLS,3    -2                WORD ADDRESS                        01674000
         SLS,3    -3                DOUBLEWORD ADDRESS                  01675000
*                                                                       01676000
* MISCELLANEOUS INSTRUCTIONS USED IN DEBUG                              01677000
*                                                                       01678000
*                                                                       01680000
DRNEQTST BE       DRSEMIWT          BRANCHES IF VALUES ARE EQUAL        01681000
DREQTST  BNE      DRSEMIWT          BRANCHES IF VALUES ARE NOT EQUAL    01682000
*                                                                       01683000
         PAGE                                                           01684000
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
*                                                                       01425000
#:       EQU      X'8000'           BIT TO INDICATE SPECIAL SYMBOL      00831000
#ASTRISK EQU      '*'                                                   00850000
#BELL    EQU      X'03'                                                 00851000
#BLANK   EQU      ' '               BLANK
#BSLASH  EQU      X'B1'
#COMMA   EQU      ','                                                   00852000
#CRETRN  EQU      X'D'
#CRLF    EQU      #CRETRN
#DOLLAR  EQU      '%'                                                   00853000
#DOLLAR2 EQU      X'5B00'                                               00869000
#DQUOTE  EQU      '"'                                                   00863000
#EBDTYPE EQU      DREBCDIC-#S3      INDEX FOR EBCDIC INPUT              01412000
#FLTYPE  EQU      2                 SHORT FLOATING INPUT CODE
#GTRTHAN EQU      '>'                                                   00854000
#HEXTYPE EQU      DRHEXAD-#S3       INDEX FOR HEXADECIMAL INPUT         01416000
#INTTYPE EQU      DRINTGER-#S3      INDEX FOR INTEGER INPUT             01414000
#LNFEED  EQU      8
#LSSTHAN EQU      '<'                                                   00855000
#MINUS   EQU      '-'                                                   00856000
#NUMTYPE EQU      DRNUMBER-#S3      INDEX FOR NUMBER INPUT              01417000
#PERIOD  EQU      '.'                                                   00857000
#PLUS    EQU      '+'                                                   00855500
#QUESTN  EQU      '?'                                                   00858000
#SEMI:   EQU      ';'                                                   00859000
#SEMI:2  EQU      X'5E00'                                               00871000
#SLASH   EQU      '/'                                                   00860000
#SLASHSP EQU      ' /'                                                  00872000
#SPACE   EQU      ' '                                                   00861000
#SPCTYPE EQU      DRSPCINP-#S3      INDEX FOR EBCDIC CLEAN-UP ROUTINE   01418000
#SPQUEST EQU      ' ?'
#SQUOTE  EQU      ''''                                                  00862000
#SYMTYPE EQU      DRSYMBOL-#S3      INDEX FOR SYMBOL INPUT              01413000
#S3      EQU      DRBUILD                                               01410000
#S4      EQU      DREXUTB1                                              01807000
#2SPACE  EQU      '  '                                                  00868000
ACSPTCT  DATA     X'40100401'
AWM      DATA     X'66000000'
BALBRNCH B        *EFADR            EXECTD INSTEAD OF BAL ON I BRK
BALJMP   B        *BADR             EXECTD INSTEAD OF BAL ON TRACES
BLANKS   DATA,FW  '    '
BLNK     DATA     X'00404040'
BLNKUPER DATA,FW  X'4040FFFF'
MOVTRANS DATA     X'2000005E'+BA(OUTBUF)
TABLE    CNAME
         PROC
LF       SET      %
TAB%     SET      %
         DO1      64
         TEXT     '....'
S%       SET      %
ALIST    SET      S:PT(AF)
ALIST    SET      S:UT(ALIST)
IX       DO       NUM(ALIST)
AA       SET      ALIST(IX)&X'FF'
         ORG,1    AA+BA(TAB%)
         DATA,1   ALIST(IX)
         FIN
         ORG      S%
         PEND
OTT      TABLE    'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',;
                  '  #%%&''()*:=-@[\+;  <> ,.?/'
         BOUND    DW
BRNCHS   DATA     X'64000000',X'6A000000'
BRXPSD   DATA     X'1400000B'       RETURN TO EXECUTE BRANCHES
BXPSD    DATA     X'1400000A'
         BOUND    DW
CAL      DATA     X'04000000',X'07000000'
CONSTYPE EQU      X'80'             CONSTANT SYMBOL CODE
CSECT%TYPE        ;
         EQU      DRBIT11           BIT INDICATING CSECT TYPE IN VALUE
*                                   WORD OF SYMBOL TABLE
DATTRAP  XPSD,2   OLDPSD            TRAP CONTROL AT 40
DELENT   EQU      J:INTENT          DELTA ENTRY TABLE LOC, FOR USE IN
*                                     INTERFACING WITH ANALZ/MONFIX;
*                                     J:INTENT POINTS TO A 4-WORD TBL:
*                                           0 - LOC OF 'GET' SUBR
*                                           1 - LOC OF 'PUT' SUBR
*                                           2 - ENTRY LOC FOR ';G'
*                                           3 - NAME/ACCOUNT/PASSWORD
*                                                 TABLE LOCATION.
*                                     WORD #3 POINTS TO A 7-WORD TABLE:
*                                           ACCOUNT NAME (2 WDS)
*                                           PASSWORD (2 WDS)
*                                           LMN NAME (3 WDS, TEXTC)
DRADMSKL EQU      M20                                                   01722000
DRADMSKM EQU      M17                                                   01721000
DRADMSKS EQU      DRADMSKM          NO MORE 16 BIT ADDRESSES
         BOUND    DW                                                    01786000
DRALPHAS DATA,FW  ':','@'           RANGE OF SPECIAL ALPHABETIC DIGITS  01788000
DRAMPRSD EQU      DRNOCODE                                              01944000
DRASTBIT EQU      DRBIT18           BIT USED TO INDICATE INDIRECT ADDR  01726500
DRBLKOPR EQU      DRBLANKX-#S4      CODE  FOR SPACE OPERATOR            01808000
DRCOMOPR EQU      DRCOMMAX-#S4      CODE FOR COMMA OPERATOR             01810500
DRCONBIT EQU      DRBIT5            BIT USED TO TEST FOR CONSTANTS      01726000
DRDEFMOD EQU      K200              INDICATOR FOR SYMBOL DEFINE MODE    01096500
DRDEFTST DATA,FW  1                 USED TO TEST STATE OF SCANNER       01751000
DRD10    DATA,FW  10                VALUE USED AS RADIX IN INTEGER PRINT01754000
DRERROR  EQU      DRERR                                                 01936000
DREBDMSK EQU      YFF                                                   01742000
DRFD0BIT EQU      8                 BIT TO INICATE FIELD 0 WAS USED     01735000
DRFD1BIT EQU      4                 BIT TO INICATE FIELD 1 WAS USED     01736000
DRFD2BIT EQU      2                 BIT TO INICATE FIELD 2 WAS USED     01737000
DRFD3BIT EQU      1                 BIT TO INICATE FIELD 3 WAS USED     01738000
DRFLDBIT EQU      DRBIT28                                               01728000
DRFLDBTS EQU      DRBIT28           USES STANDARD BIT ARRAY SHOW USAGE  01729000
DRFULLWD EQU      DRBIT30           BIT TO INDICATE FULL WORD VALUE     01732000
*                                                                       01796000
         BOUND    DW
DRHEXAS  DATA,FW  KC1-KF0           SPECIAL CHECK FOR THE CHARACTER A   01789000
         DATA,FW  KC6-KF0           SPECIAL CHECK FOR THE CHARACTER F   01789500
DRLBRKET EQU      DRNOCODE                                              01943000
DRMASKBT EQU      DRBIT24           USES  STANDARD BIT ARRAY FOR MASKING01727000
*                                                                       01798000
DRMODABS EQU      1                 VALUE FOR ABSOLUTE ADDRESS MODE
DRMODREL EQU      0                 VALUE FOR RELATIVE ADDRESS MODE
DRNEGOPR EQU      DRMINUSX-#S4      CODE FOR MINUS OPERATOR             01810000
DRNOCODE EQU      DRERR                                                 01936500
DRNOVAL  EQU      DRBIT29           FLAG TO SHOW SYMBOL IS NOT IN TABLE 01731000
DROPBITS EQU      Y7FF                                                  01724000
DRPLSOPR EQU      DRPLUSX-#S4       CODE FOR PLUS OPERATOR              01809000
DRRBRKET EQU      DRNOCODE                                              01946000
*                                                                       01802000
         BOUND    DW
DRSCNFIX EQU      %                 RESETS SCANNER AFTER SEMI-COLON
         DATA     DRSYMAXE-6,#SYMTYPE SPECIAL SYMBL AS TERM IN CMND LINE
*                                                                       01804000
         BOUND    DW
DRSCNSET DATA,FW  -DRSYMMAX,#NUMTYPE USED TO INITIALIZE THE SCANNER     01794000
DRSEMISP EQU      DRNOCODE                                              01952000
DRSOPRBT EQU      X'800'            VALUE TO CHECK FOR 20 BIT ADDRESS
DRSOPRFG EQU      DRBIT20           BIT USED TO SET 20 BIT
DRSOPRFL EQU      DRBIT20           ADDRESS MODE
DRSYMAXE EQU      -DRSYMMAX+8       MAX LENGTH EVALUATABLE SYMBOLS
DRSYMMAX EQU      12                MAX CHARS TO CHAR BUFFER
DRTMPEVL EQU      DRCHRBFX          USED TO SAVE A CONDITION CODE       01805000
DRUDEFBT EQU      X'10'             BIT TO SHOW AN UNDEFINED            01740000
DRUDEFLG EQU      DRBIT27           BIT WORD FOR UNDEFINED FLAG
DRUNDSCR EQU      DRNOCODE                                              01948000
DRVALERR EQU      DRERR                                                 01935000
DRVAL1   EQU      HA(DRVAL1XX)-#T1  INDEX FOR DECIDING WHEN TO EVALUATE 01801000
ERKEY    DATA     X'03000000'       ERROR MESSAGE FILE KEY
ERCODES  DATA     X'B402'           CODES AND SUBCODES FOR ERR/ABRT
         DATA     X'B401'
         DATA     X'B403'
EXU      EQU      X'67'
F%TYPE   EQU      7                 SYM TAB CONTROLS OUTPUT FORMAT
FILE%TYPE         ;
         EQU      1                 DCB M:XX OPEN TO FILE
HEADKEY  TEXTC    'HEAD'            KEY FOR READING HEAD RECORD
IBRKJUMP B        1
IBRKXPSD DATA     X'14000001'       NON-EXISTENT INST FOR BREAK
K%CONST  EQU      8                 CONSTANT SYMBOL MODE SPECIFICATION
KILL%BIT EQU      DRBIT2            BIT IN BYTE COUNT THAT FLAGS A
LOCTYPE  EQU      X'40'             LOCATION SYMBOL CODE
*                                   SYMBOL AS 'KILLED'
         BOUND    DW
OPLMTS   DATA     X'64',X'6A'
OUTBUF%SIZE       ;
         EQU      33                SIZE OF OUTPUT BUFFER
OVFLW%MASK        ;
         DATA     X'F0000000'       MASK TO CHECK FOR HEX OVERFLOW
PAGE%BOUND        ;                 CONSTANT USED TO DETERMINE IF ADDING
         DATA     X'1FD'            A SYMBOL HAS MOVED THE TOP OF THE
*                                   SYMBOL TABLE TO A NEW PAGE
PAGE%MASK         ;                 MASK USED TO CHECK IF A MEMORY VIOL-
         DATA     X'1FE00'          ATION HAS OCCURRED IN A PAGE THAT
*                                   HAS A DATA BREAK ON IT.
PRNT%TYPE         ;
         EQU      2                 DCB M:XX OPEN TO PRINTER
PUL     EQU      J:EUP             END OF USERS PROGRAM
R%TYPE   EQU      0                 RELATIVE ADDRESS OUTPUT MODE
SHFTCODE EQU      X'400'            CODE MEANS SPECIAL SHIFT OP CODE
*                                   IN EVALUATION
        BOUND    8
STKINIT DATA     DELSTK+1          USED TO INITIALIZE DELTAS
        DATA,2   20,0              WORKING STACK
SYM%MASK EQU      M24               MASK FOR 1ST 3 CHARS IN SYMBOL TABLE
TEMPS    EQU      DELTREGS          TEMPORARY STOREAGE
         BOUND    8
XRETURN  DATA     EXECINST+1,EXECINST+3
         BOUND    8
TREE     TEXTC    'TREE'
         PAGE
KADMSKM  EQU      KM17                                                  01080000
KADMSKS  EQU      KM14                                                  01079000
KASTBIT  EQU      K2000             INDICATOR FOR INDIRECT ADDRESS      01099000
KCHKDIF  EQU      K400              ALLOWABLE OFFSET FROM SYMBOL        01092000
KCONSBIT EQU      K400              TEST FOR CONSTANT SYMBOL VALUE      01093000
KDEFMOD  EQU      K4000             INDICATOR FOR SYMBOL DEFINE MODE    01100000
KFULLWD  EQU      K80               INDICATOR FOR FULL WORD VALUE       01095000
KSOPRBT  EQU      K1000             INDICATOR FOR SPECIAL OPCODES       01098000
KUDEFLG  EQU      K8000             INDICATOR FOR UNDEFINED SYMBOL      01101000
*                                                                       00995000
* DEFINITIONS OF ADDRESSES USED IN IMMEDIATE INSTRUCTIONS               00996000
*                                                                       00997000
K0       EQU      0                                                     00998000
K1       EQU      1                                                     00999000
K2       EQU      2                                                     01000000
K3       EQU      3                                                     01001000
K4       EQU      4                                                     01002000
K5       EQU      5                                                     01003000
K6       EQU      6                                                     01004000
K7       EQU      7                                                     01005000
K8       EQU      8                                                     01006000
K9       EQU      9                                                     01007000
KA       EQU      X'A'                                                  01008000
KB       EQU      X'B'                                                  01009000
KC       EQU      X'C'                                                  01010000
KF       EQU      X'F'                                                  01011000
K10      EQU      X'10'                                                 01012000
K13      EQU      X'13'                                                 01013000
K19      EQU      X'19'                                                 01014000
K20      EQU      X'20'                                                 01015000
K3F      EQU      X'3F'                                                 01016000
K40      EQU      X'40'                                                 01017000
K60      EQU      X'60'                                                 01018000
K6C      EQU      X'6C'                                                 01019000
K77      EQU      X'77'                                                 01020000
K7F      EQU      X'7F'                                                 01021000
K80      EQU      X'80'                                                 01022000
K84      EQU      X'84'                                                 01023000
KC1      EQU      X'C1'                                                 01023500
KC6      EQU      X'C6'                                                 01023750
KF0      EQU      X'F0'                                                 01024000
KFF      EQU      X'FF'                                                 01025000
K100     EQU      X'100'                                                01026000
K102     EQU      X'102'                                                01027000
K180     EQU      X'180'                                                01028000
K1FF     EQU      X'1FF'                                                01029000
K200     EQU      X'200'                                                01030000
K400     EQU      X'400'                                                01031000
K600     EQU      X'600'                                                01033000
K700     EQU      X'700'                                                01034000
K800     EQU      X'800'                                                01035000
K1000    EQU      X'1000'                                               01036000
K1200    EQU      X'1200'                                               01037000
K2000    EQU      X'2000'                                               01038000
K3FFF    EQU      X'3FFF'                                               01039000
K4000    EQU      X'4000'                                               01040000
K7FFF    EQU      X'7FFF'                                               01041000
K8000    EQU      X'8000'                                               01042000
DRDEFBIT EQU      K8000                                                 01043000
K8402    EQU      X'8402'                                               01044000
KA000    EQU      X'A000'                                               01045000
KA400    EQU      X'A400'                                               01046000
KE000    EQU      X'E000'                                               01047000
KFF00    EQU      X'FF00'                                               01048000
KFFFF    EQU      X'FFFF'                                               01049000
K10000   EQU      X'10000'                                              01050000
K1C000   EQU      X'1C000'                                              01051000
K1F8FF   EQU      X'1F8FF'                                              01052000
K1FF00   EQU      X'1FF00'                                              01053000
K1FFFF   EQU      X'1FFFF'                                              01054000
K20000   EQU      X'20000'                                              01055000
K40000   EQU      X'40000'                                              01056000
K80000   EQU      X'80000'                                              01057000
K80001   EQU      X'80001'                                              01058000
KN1      EQU      -1                                                    01059000
KN6      EQU      -6                                                    01060000
KN8      EQU      -8                                                    01061000
KN100    EQU      -X'100'                                               01063000
KN400    EQU      -X'400'                                               01063500
*                                                                       01064000
*                                                                       01066000
* DEFINITIONS OF IMMEDIATE ADDRESSES USED AS MASKS                      01067000
*                                                                       01068000
KM1      EQU      K1                                                    01069000
KM2      EQU      K3                                                    01070000
KM3      EQU      K7                                                    01071000
KM4      EQU      KF                                                    01072000
KM6      EQU      K3F                                                   01072500
KM7      EQU      K7F                                                   01073000
KM8      EQU      KFF                                                   01074000
KM9      EQU      K1FF                                                  01075000
KM14     EQU      K3FFF                                                 01076000
KM17     EQU      K1FFFF                                                01077000
*                                                                       01102000
* M IS USED FOR MASKS                                                   01144000
*                                                                       01145000
M3       DATA,4   X'7'                                                  01148000
M4       DATA,4   X'F'                                                  01149000
M6       DATA,4   X'3F'                                                 01150000
M7       DATA,4   X'7F'                                                 01151000
M8       DATA,4   X'FF'                                                 01152000
M11      DATA,4   X'7FF'                                                01153000
M12      DATA     X'FFF'
M15      EQU      M16
M16      DATA,4   X'FFFF'
M17      DATA,4   X'1FFFF'                                              01156000
M19      DATA     X'7FFFF'
M20      DATA,4   X'FFFFF'                                              01157000
M24      DATA     X'FFFFFF'
*                                                                       01160000
* X IS USED FOR RIGHT JUSTIFIED HEX                                     01161000
*                                                                       01162000
XF0      DATA,4   X'F0'                                                 01165000
XE0000   DATA,4   X'E0000'                                              01167000
*                                                                       01171000
X7       EQU      M3                                                    01714000
XF       EQU      M4                                                    01715000
X3F      EQU      M6                                                    01716000
X7F      EQU      M7                                                    01717000
XFF      EQU      M8                                                    01718000
X7FF     EQU      M11                                                   01719000
*                                                                       01173000
* Y IS USED FOR LEFT JUSTIFIED HEX                                      01174000
*                                                                       01175000
Y4       DATA     X'40000000'
Y07      DATA     X'7000000'
Y7FF     DATA,4   X'7FF00000'                                           01200000
YFF      DATA,4   X'FF000000'                                           01203000
YFFFF    DATA,4   X'FFFF0000'                                           01204000
YFFFE    DATA,4   X'FFFE0000'
*                                                                       01392000
         PAGE                                                           01834000
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
*                                                                       01835000
* MESSAGES OUTPUT TO THE USER VIA THE DRPRTMSG ROUTINE                  01836000
*                                                                       01837000
ABRTCD   TEXTC    '
ABORT WITH CODE =  '
ABRTSC   TEXTC    ', SUBCODE =  '
BRKAT    TEXTC    '
BRK AT '
BRKDELT  TEXTC    '
BRK IN DELTA'
DECTRP   TEXTC    '
DECIMAL FAULT AT '
DELTMSG TEXTC    '
DELTA HERE
'
DRMEMPRO TEXTC    '
MEM PROTECT FAULT AT '
DRNOTMEM TEXTC    '
NONEXIST MEM REF AT '
DRNOTOPR TEXTC    '
NONEXIST INSTR AT '
DRPRIVIL TEXTC    '
PRIVIL INSTR AT '
LASTBRMSG TEXTC   '
LAST BRANCH TAKEN FROM '
TRUNMSG  TEXTC    '
**TRUNCATION  '
DTRPMSG  TEXTC    '
TRAP '
DTRPMSG1 TEXTC    ' IN DELTA AT '
EXITMS   TEXTC    '
EXIT '
FIXTRP   TEXTC    '
FIX ARITH OVFLW AT '
FLTTRP   TEXTC    '
FLOAT FAULT AT '
ILSTRMSG TEXTC    '
ILLEGAL STORE ATTEMPTED INTO '
NOFIL    TEXTC    '
CANT OPEN FILE '
NOPGM    TEXTC    '
NO USER PROGRAM
'
NOREC    TEXTC    '
CANT FIND '
NOTINTAB TEXTC    ' NOT IN TABLE'
PAGEASGN TEXTC    '
CANT GET PAGE
'
STKOVFLW TEXTC    '
STACK LIMIT FAULT AT '
TABLFULL TEXTC    '
TABLE FULL'
UNIMPTRP TEXTC    '
UNIMP INSTR AT '
EXIT     TEXTC    '
EXIT AT '
LOCATION TEXTC    '
LOCATION = '
*                                                                       01849000
* MESSAGES OUTPUT TO THE USER VIA THE DRPRTSML ROUTINE                  01850000
*                                                                       01851000
ATMSG    TEXT     ' TA '
DBPT     DATA,FW  ' >D;'
DRMESS1  DATA,FW  '   /'            MESSAGE FOR USE BY OUTPUT SECTION   01853000
DROKMESS DATA,FW  'KO '             MESSAGE USED TO REQEUST CONFIRMATION01853100
DR4SPACE DATA,FW  '    '            CONSTANT OF 4 EBCDIC SPACES         01852000
IBPT     DATA,FW  ' >B;'
JUMPMESS DATA     ' >- '
NOMESS   DATA,FW  'ENON'
QUES     DATA,FW  X'00406F15'
TRACOUT  DATA,FW  ' T '
#3SPACE  DATA,FW  '   '
SHFTMSK  DATA     X'000E00FF'       M FOR INDEX AND COUNT (SHIFT)
*                                                                       01857000
PCH      RES      50                PURE PROCEDURE PATCH AREA
         DEF      PCH
         PAGE
************************************************************************
*                                                                      *
*                                                                      *
*                 VARIABLE DATA - USERS CONTEXT                        *
*                                                                      *
*                                                                      *
************************************************************************
         USECT    ALPHA             ALPHA IS CSECT OF TYPE 00
DELTA%DATA        ;                 BASE OF DELTA'S CONTEXT
         EQU      %
VDUC     EQU      %                 VARIABLE DATA USERS CONTEXT DEF
         DEF      VDUC              FOR PATCHING
DTSTACK  DATA     %+1               DELTA'S TEMP STACK
         GEN,16,16 X'2A',0
DTS      EQU      %                  DELTAS TEMP STACK
         DATA     0,-1              BLOCK CONTROL WORDS
OLDPSD   DATA     X'00F00000',0     USER'S PSD
SAVREGS  RES      16                USERS REGISTERS
TRAPLOC  RES      2                  TRAP LOCATION
DELTPSD  RES      2                 DELTAS PSD
DELTREGS RES      17                DELTAS REGISTERS
************************************************************************
*                                                                      *
*                 FPT'S                                                *
*                                                                      *
************************************************************************
*        FPT FOR SET ACCESS PROTECTION                                 *
ACCESS%FPT        ;
         EQU      %
SET%PRTCT%ADR     ;
         GEN,8,24 X'0A',0
SET%PRTCT%TYPE    ;
         DATA     0
LO%FPT   EQU      %                 FPT FOR PRINT OPEN
         GEN,8,24 X'14',M:XX
         DATA,2   4,0,0,'LP'
         BOUND    4
         PAGE
************************************************************************
*                                                                      *
*        FPT FOR OPEN CAL ON DCB M:XX FOR FILE I/O                     *
*                                                                      *
************************************************************************
         BOUND    8                 THIS BOUND AND RES FORCES 'PASSWORD'
*                                   TO A DOUBLEWORD BOUNDARY
OPEN%FPT EQU      %
         GEN,8,24 X'14',M:XX
         GEN,8,24 X'C3',1
         DATA     DRERR             ERROR & ABNORMAL ADDRESSES
         DATA     DRERR
         DATA     2
         DATA     1                 INPUT FILE MODE
FILE%OPT EQU      %
         DATA     X'01000303'
FILE%NAME         ;
         EQU      %
         RES      3
FILE%ACCT         ;
         EQU      %
         DATA     X'2000002'        ACCOUNT # WILL BE FILLED IN BY
         DATA     0,0               IOSYM FROM ACCOUNT # IN JIT
         DATA     X'03010202'
PASSWORD RES      2
************************************************************************
*                                                                      *
*        FPT FOR CLOSE CAL ON DCB M:XX                                 *
*                                                                      *
************************************************************************
CLOSE%FPT         ;
         EQU      %
         GEN,8,24 X'15',M:XX
         DATA     0
         PAGE
************************************************************************
*                                                                      *
*    FPTS FOR OPENING AND CLOSING ERROR MESSAGE FILE THROUGH M:XX      *
*                                                                      *
************************************************************************
FOPEN    GEN,8,24 X'14',M:XX        FPT TO OPEN ERROR MESSAGE FILE
         DATA     X'C7480001'
         DATA     ABRT70            ERROR ADDRESS
         DATA     ABRT70            ABNORMAL ADDRESS
         DATA     2                 KEYED FILE
         DATA     2                 DIRECT ACCESS
         DATA     1                 IN MODE
         DATA     2                 SAVE
         DATA     4                 MAX KEY SIZE
         DATA     X'01000202'       FILE NAME COMING
         TEXTC    'ERRMSG'          FILE NAME
         DATA     X'02010101'       ACCOUNT COMING, LAST ITEM IN FPT
         TEXT     ':SYS'            ACCOUNT NUMBER
*
FCLOSE   GEN,8,24 X'15',M:XX        FPT LIST TO CLOSE ERROR MESSAGE FILE
         DATA     X'80000000'
         DATA     2                 SAVE THE FILE
************************************************************************
*                                                                      *
*        FPT FOR GET- AND RELEASE- PAGE CAL                            *
*                                                                      *
************************************************************************
PAGE%FPT EQU      %
         DATA     GTRLPAGE
************************************************************************
*                                                                      *
*        TABLE OF LOCATION AND CONSTANT SYMBOLS                        *
*                                                                      *
************************************************************************
************************************************************************
SPC%OP   CNAME
         PROC
         BOUND    FW
         DATA,BT  X'80'
         DATA,BT  AF(1),AF(2),0
         DATA     0
         PEND
************************************************************************
*                                                                      *
*                                                                      *
************************************************************************
SPECSYM  EQU      %
         SPC%OP   #%
DR#DSIGN DATA,FW  0                                                     00083000
         SPC%OP   #S:,Q
DR#SEMIQ DATA,FW  0                                                     00086000
         SPC%OP   #S:,I
DR#SEMII DATA,FW  0                                                     00089000
         SPC%OP   #S:,C
DR#SEMIC DATA,FW  0                                                     00092000
         SPC%OP   #S:,M
DR#SEMIM DATA,FW  -1                                                    00095000
         SPC%OP   #S:,#1
DR#SEMI1 DATA,FW  0                                                     00098000
         SPC%OP   #S:,#2
DR#SEMI2 DATA     X'1FFFF'
         SPC%OP   #S:,#3
DR#SEMI3 DATA     0                 MAP/MASTER BYTE
         SPC%OP   #S:,#4
DR#SEMI4 DATA     0                 WRITE KEY BYTE
         SPC%OP   #S:,F
DR#SEMIF DATA,FW  0                                                     00104000
NENTSPEC EQU      %-SPECSYM
         PAGE
         BOUND    FW
ABORTSV  RES,FW   1                 RETURN LINK SAVE DURING ABORT
ABORTDCB RES,FW   1                 SAVE ADR OF ABORT CAUSING DCB HERE
ABORTFLG DATA     0                 SPECIAL ABORT PROCESSING FLAG
ACSPRTCT RES,FW   1                 USER ACCESS PROTECTIN SAVED HERE
ACTBKLOC RES      1                 LOCATION OF ACTIVE BREAK
ADR%FORMAT        ;                 SAVE OUTPUT FORMAT HERE
         RES      1
BALREG   RES      1
BASEADRS EQU      %
         RES,FW   1
BRKLOC   RES,FW   1
WORD1    RES,FW   1
BRKNENT  RES,FW   1
TRCTBL   RES,FW   1
BIGENT   RES,FW   1
ADRSNENT EQU      %-BASEADRS
BIGENTRY DATA,4   0                 LARGEST ENTRY # OF ACTIVE DATA BREAK
BREAKEY  DATA,FW  0                 =1,USER HIT BREAK KEY
BRKMSGXT RES,FW   1                 RETURN LOC FROM BRK MSG ROUTINE
CHARINDX DATA,FW  0                 CHAR INDEX FOR COMMAND LINE SCAN
CURNOPR  RES,FW   1                 CURRENT ARITH OPERATOR (DREVAL)
DBANLZFG DATA     0                 DATA BREAK ANLZ TRAP FLAG
DBEFADR  RES,4    1                 EFFECTIVE ADDRESS CAUSING BREAK
DBRKMODE DATA,FW  -1                NEG MEANS NOT IN D BREAK MODE
DBRKNENT DATA,FW  0                 ENTRIES   IN DATA BREAKPOINT TABLE
DBRKNUM  DATA,FW  0                 # OF D BREAK CAUSING THE TRAP
DCB%STAT DATA     0                 CURRENT STATUS OF M:XX DCB
*                                   =0, CLOSED
*                                   =1, OPEN TO FILE (CURRENT LMN)
*                                   =2, OPEN TO PRINTER - DEVICE,LO
         BOUND    8
DELSTK   EQU      %
         DATA     %+1               TEMP STACK FOR INTERNAL
         DATA,2   20,0              PROCESSING IN DELTA
         RES      20
DELTCNTL DATA,FW  0                 =1,IN DELTA WHEN BRK KEY HIT
DIC      DATA     0                 PREVIOUS DELTA-IN-CONTROL FLAG
DO%DONT  DATA     0                 SPECIAL ACTION FLAG FOR TRANSFER
*                                   BREAKPOINTS
DOTCHAR  RES,FW   1                 POSITION OF DOT IN COMMAND LINE
DOTMODE  DATA,FW  0                 >0 MEANS CURRENT TERM PRECEEDED BY 9
DBEFADRX RES      1                 END LOC OF INST CAUSING BREAK
DRADRMOD DATA,FW  0                 VALUE OF ADDRESS PRINT MODE
         BOUND    DW
DRCHRBUF RES,BT   DRSYMMAX          RESERVE SPACE FOR BUILDING A SYMBOL 00909000
DRCHRBFX EQU      %                 SYMBOL USED WHEN INPUTTING TO BUFFER00910000
         BOUND    FW                                                    00912000
DRCLSRTN RES,FW   1                 STORAGE FOR RETURN LINK FROM DRCLOSE00934500
DREQDFLT DATA     6                 '=' DEFAULT OUTPUT NMODE
DREVLRTN RES,FW   1                 STORAGE FOR RETURN LINK FROM EVAL   00929000
         BOUND    DW
DREXPRS  RES,FW   4                 STORAGE FOR EXPRESSION FIELDS       009
DRFNDVAL RES,FW   1                 VALUE BEING SEARCHED FOR            00922000
DRLSTOPR RES,FW   1                 STORAGE FOR LAST ARITHMETIC OPERATOR00930000
DRMULT#  DATA     1
DROPENER DATA,FW  1                 SWITCH : NON-ZERO MEANS SLASH MODE  00931750
DROPENSW RES,FW   1                 SWITCH TO TELL IF A REGISTER IS OPEN00932000
DRPRTSAV RES,FW   1                 STORAGE FOR RETURN LNK FROM DRPRTADR00933000
DRPRTSW  RES,FW   1                 STORAGE FOR ADDRESS PRINT MODE      00931000
DRPTEXP# RES,FW   1                 STORAGE FOR RETURN LINK FROM DRPTEXP00934000
DRRESMOD DATA,FW  2                 CURRENT ADDRESS RESOLUTION MODE     00918000
DRSLDFLT DATA     F%TYPE            SLASH DEFAULT MODE
DRSLSHMD DATA     F%TYPE            STORAGE FOR MOST RECENT PRINT MODE
         BOUND    DW                                                    00947000
DRSRCHLM RES,DW   1                 STORAGE FOR SEARCH LIMITS           00954000
DRTAGVAL RES,FW   1                 STORAGE FOR INDEX FROM PRINT VALUE  00938000
         BOUND    DW
DRTEMPD1 RES,DW   1                 TEMP
DRTEMPS1 RES,DW   1                 TEMP
DRTEMPS2 RES,DW   1                 TEMP
DRTESTER RES,FW   1                 STORAGE FOR TEST USED IN SEARCHES   00937000
DRUPRLIM RES,FW   1                 STORAGE FOR END TEST ON RANGE LOOK  00939000
DRVALSAV RES,BT   12                BYTE STACK FOR INTEGER PRINT ROUTINE00914000
         BOUND    FW                                                    00916000
DRWRDVAL RES,FW   1                 STORAGE FOR WORD TO BE PRINTED      00940000
DUMP%LMTS         ;
         EQU      %
DUMP%LM1 RES      1
DUMP%LM2 RES      1
EFADR    RES      1
ENDOFDMP RES      1                 END OF DUMP FLAG
ERKEYM   RES      1                 ERROR MESSAGE FILE KEY
         BOUND    DW
EXCTRAC  RES      1
         DATA     X'14000009'
EXECINST RES,FW   1                 INSTRUCTIONS EXECUTED HERE
         DATA     X'14000000'       RETURN TO DELTA AFTER EXECUT INST
         DATA     X'14000000'       PLUS 2 RETURN
         DATA     X'14000000'       PLUS 3 RETURN
SYMBFLAG RES      1                 USED FOR SETTING GLOBAL OR INTERNAL
*                                   SYMBOL TABLE IN-CORE-FLAGS
EXUMODE  DATA     0
FIRSTIME DATA,FW  -1                FIRST TIME INTO DELTA FLAG
FLDREG   RES      1                 FIELD PRESENCE INDICATORS
FORK     DATA     0
FORKINST RES      1
GLBLFLAG DATA     0                 PRESENCE FLAG FOR GLOBAL SYMBOLS
*                                   =0 GLOBAL SYM PAGES RELEASED
*                                   =1 GLOBAL SYM TABLE IN CORE
GO%FLAG  RES      1                 EXECUTION FLAG FOR T BRK RETURN
GST      RES      1                 GLOBAL SYMBOL TABLE SIZE/LOC
GTPGMODE DATA,FW  0                 GET-A-PAGE MODE,SET NBY BACKSLASH
         BOUND    DW
IAP      RES      1
IA       RES      1
BADR     DATA     0
         DATA     EXCTRAC+1         USED TO CHECK FOR TRANSFER BREAK
*                                   WHEN A PRIVIL INSTR TRAP OCCURS
GTRLPAGE RES      1                 USED IN GET & RELEASE PAGE ROUTINE
HEADBUF  EQU      STRNGBUF+1        BUFFER FOR READING HEAD RECORD
HEX%OFFSET        ;                 MAX OFFSET FOR A VALUE TO BE OUTPUT
         DATA     X'50'             AS SYMB+OFFSET RATHER THAN ABSOLUTE
IBRKBGEN DATA,FW  0                 LARGEST I BREAK ENTRY
IBRKEXEC RES,FW   2                 BROKEN INSTRUCTIONS ARE EXECUTED
*                                   HERE.
IBRKMODE DATA,FW  -1                NEG MEANS NOT IN I BREAK MODE
IBRKNENT DATA,FW  0                 # OF ENTRIES IN I BREAK TABLE
IBRKNUM  DATA,FW  0                 # OF CURRENT I BREAK
INBUF    RES,FW   20                INPUT BUFFER
INTL%SYM%BEGIN    ;                 START ADR OF INTERNAL SYMBOL TABLE
         RES      1
INTLFLAG DATA     0                 PRESENCE FLAG INTERNAL SYMBOL TABLE
*                                   CF. GLBLFLAG FOR VALUE-MEANING
INTPMODE DATA     0                 TRANSFER BREAK MODE FLAG
IST      RES      1                 INTERNAL SYMBOL TABLE SIZE/LOC
ITRCTBL  DATA,FW  0                 I BREAK TRACE TABLE
K%OUTMODE         ;                 =0,FALSE   =1,TRUE
         DATA     0                 OUTPUT NEAREST CSECT TYPE SYMB +
*                                   OFFSET UNLESS VALUE IS EXACTLY THAT
*                                   OF A SYMBOL
LOC%ONLY DATA     0                 FLAG FOR OUTPUTTING ONLY LOCTION SYM
MESSEXIT DATA,FW  WA(DRINITA)       EXIT AFTER MESSAGE COMES IN
         BOUND    DW
MODINPUT DATA,FW  -1         FLAG INDICATIONG THAT OUTPUT MODE
*                            HAS BEEN SPECIFIED
NENTINTL DATA     0                 # WORDS IN ACTIVE INTL SYMBOL TABLE
NENTSYM  DATA,FW  0                 # OF ENTRIES IN SYMBOL TABLE
NUMBCHAR DATA,FW  0                 # OF CHARACTERS  IN COMMAND LINE
OLDELENT DATA     0                 OLD CONTENTS OF J:DELENT
VFCHAR   DATA     X'C0'             PRINTER FORMAT CHAR - SINGL SPACE
         BOUND    8
OUTBUF   RES      33
OUTCHAR  DATA,FW  0                 POINTS TO NEXT AVAILABLE BYTE IN
*                                   OUTPUT BUFFER
OUTMODE  DATA,FW  0          SPECIFIED OUTPUT MODE
PRINT%OK DATA     0                 =0, PRINTER OK IF SELECTED
*                                   =1, FORCE TO TELETYPE
RSTRTRN  RES,FW   1                 STORAGE FOR RETURN LINK FROM RESTORE
RETRNTYP RES      1                 TEMP FOR RETURN CODE IN TRANSFER
*                                   BREAK PROCESSING
SEMIJ    DATA     1                 PRINTER-TELETYPE OUTPUT SWITCH
SLSHEXIT DATA,FW  MESSAGE           EXIT FROM SLASH ROUTINE
STEPMODE DATA     0
STORFLAG RES      1
STRNGBUF DATA,BT  0                 STRING BUF (FOR MONFIX INTERFACE)
         RES,BT   79                  A LA 'TEXTC'
         BOUND    DW
STWSAVE  RES,FW   2                 TEMPS USED BY STORWORD
SUBSVAL  RES      1
SUM      RES      1                 LINE SUM TO CHECK FOR ZERO LINES
SYMBSIZE RES      1                 ADR OF NENT CELL TO BUMP
*                                   IN PRINTER DUMP
SYM%ADR  RES      1                 ADDRESS OF SYMBOL IN SYMBOL TABLE
SYMBEGIN RES      1                 START LOC GLOBAL SYMBOL TABLE
SYM%BUF  RES      1                 BUFFER ADR FOR READ OF SYM TABLES
SYM%CODE RES      1                 SYMBOL CODE SAVED HERE
*                                   =0, UNDEFINED
*                                   =1, LOCATION
*                                   =2, CONSTANT
SYM%SIZ  RES      1                 BUF SIZE FOR READ OF SYM TABLES
SYM%TYPE RES      1                 TYPE FOR MOST RECENT LOCATION SYMBOL
TCOND    RES,FW   1                 CONTAINS CONDITIONS ON TRAPS
         BOUND    DW
TMP6     RES,FW   1
TOUT     RES,FW   1                 TEMP
TRACETBL DATA,FW  0                 BITS 0-7 ARE TRACE INDICATORS
TRACLOOP DATA     0                 0=IGNORE BDR/BIR IN TRACE
*                                   1=TRACE BDR/BIR
TRACMODE DATA     0                 0=JUMP-STOP MODE
*                                   1=JUMP-TRACE MODE
         BOUND    8
PTC      DATA     0,0
TRACNENT DATA     0                 # OF ENTRIES IN SPECIAL ACTION TABLE
TRACSPEC EQU      %                 SPECIAL ACTION TABLE FOR
         DO       8                 TRANSFER MODE
         DATA     0
         FIN
TRAPINST RES      1                 'RESTORE' STORES TRAPPING INSTR
TRAPTEMP RES      1                 AND TRAPPING ADDRESS
*                                   HERE IN CASE ANALYSIS IN I, T, OR X
*                                   BREAK RETURNS IS REQUIRED
TRAPMESS RES,FW   1
TYPE     RES      1
WHCHSRCH RES      1                 POINTS TO VALUE OR SYMBOL SEARCH RTN
         BOUND    DW
*
         PAGE
*
*     CONTEXT FOR F.P. OUTPUT ROUTINES
*
         BOUND    8
ADLOC    DATA     0,0               FIRST WORD MUST BE ZERO
CENTRAL1 DATA     0                 HIGH ORDER WORD OF FLTG NUMBER
CENTRAL2 DATA     0                 LOW  ORDER WORD OF FLTG NUMBER
ETEMP    RES      1                 EXPONENT IN REAL
DCOUNT   RES      1                 TOTAL DIGITS TO PRINT IN REAL
EXPCHAR  RES      1                 EXPONENT CHAR
FLOAT2ND RES      1                 2ND WORD OF LONG F.P. VALUE
PWR10    RES      1                 TEMP IN REAL
TEMP     RES      1                 TEMP IN REAL
         PAGE
************************************************************************
*        DATA BREAKPOINT TABLE
************************************************************************
         BOUND    FW
DBRKLOC  EQU      %
         DO       8
         DATA,FW  0
         FIN
DBRKCOND EQU      %
         DO       8
         DATA,FW  -1
         FIN
DBRKVAL  RES,FW   8
DBRKMASK EQU      %
         DO       8
         DATA,FW  X'FFFFFFFF'
         FIN
         PAGE
************************************************************************
*        INSTRUCTION BREAKPOINT TABLE                                  *
************************************************************************
         BOUND    FW
IBRKLOC  EQU      %
         DO       8
         DATA,FW  0
         FIN
IBRKINST RES,FW   8
IBRKDPLY EQU     %
         DO       8
         DATA     -1
         FIN
IBRKPRCD RES,FW   8
TREEBUF  RES      4                 TREE RECORD BUFFER
END%DATA EQU      %                 END OF DELTA'S CONTEXT
************************************************************************
         USECT    DELTA%PROCEDURE   PUT LITERALS IN PROCEDURE CSECT
         END      T:DBRK

