INIT
         IDENT     INIT                                                 INIT         1
         TITLE INITIALIZATION                                           INIT         2
*  FOR A LISTING OF THE SNODEF COMDECK, CALLED BELOW, SEE MAINLUP.      INIT         3
         LIST  -L                                                       INIT         4
*CALL,SNODEF                                                            INIT         5
         LIST  L                                                        INIT         6
*LOWCORE                                                                INIT         7
          EXT       HBCSTAT                                             INIT         8
*                                                                       INIT         9
*  ERROR                                                                INIT        10
         EXT   FILEWD,SJCALL                                            INIT        11
         EXT   MSGOUT                                                   INIT        12
*  MAINLUP                                                              INIT        13
         EXT   LUNDF,LRET,LFRET,LNRET,LEND                              INIT        14
         EXT   END.                                                     INIT        15
*  UTILITY                                                              INIT        18
         EXT   SEARCH                                                   INIT        19
*  IO                                                                   INIT        20
         EXT   ABT.                                                     INIT        21
         EXT   OPEN                                                     INIT        22
*  PROCS                                                                INIT        23
         EXT   CALENDR,TOD,DATE,TIME                                    INIT        24
         EXT   VALID                                                    INIT        25
         EXT   WROVLAY                                                  INIT        26
*  COMPILR                                                              INIT        27
         EXT   PASS1                                                    INIT        28
         EXT   PRIORJ,ST1                                               INIT        29
         EXT   P2TRCS,P2TRCT,P3TRCS,P3TRCT,P4TRCS,P4TRCT                INIT        30
*  INIT                                                                 INIT        31
         ENTRY SNOBOL                                                   INIT        32
         ENTRY STNDREL                                                  INIT        33
         ENTRY STNPRL                                                   INIT        34
         TITLE HEAP STORAGE SKELETON                                    INIT        35
HSBASE   DATA  0                   . (THIS WORD IS XWRD)                INIT        36
         DATA  0                                                        INIT        37
*  DUMMY FREE BLOCK                                                     INIT        38
         VFD   5/FRETYP,19/0,18/0,18/*  . F3 MUST BE SET                INIT        39
 STNDREL EQU   3                                                        INIT        40
FREELEN$ SET   5                   . SPACE FOR END OF FL AND STACK      INIT        41
                                   . BUT WE PLAY IT SAFE                INIT        42
*                                                                       INIT        43
*                                                                       INIT        44
*        PREDEFINED I/O ASSOCIATED VARIABLES                            INIT        45
*                                                                       INIT        46
         VFD   5/VARTYP,19/5,18/3,18/0 INPUT                            INIT        47
INPSVD   VFD   5/INTY,1/0,18/80,18/0,18/0                               INIT        48
         DATA  5LINPUT                                                  INIT        49
FREELEN$  SET      FREELEN$+1      . NULL FOR INPUT                     INIT        50
         VFD   5/VARTYP,19/6,18/3,18/0 OUTPUT                           INIT        51
OUTPSVD  VFD   5/OUTTY,1/0,18/1R ,18/0,18/0                             INIT        52
         DATA  6LOUTPUT                                                 INIT        53
FREELEN$  SET      FREELEN$+1      . NULL FOR OUTPUT                    INIT        54
*                                                                       INIT        55
*                                                                       INIT        56
*        PREDEFINED LABELS                                              INIT        57
*                                                                       INIT        58
         VFD   5/LBLTYP,19/6,18/3,18/0                                  INIT        59
         VFD   5/LRETY,55/LRET                                          INIT        60
         DATA  6LRETURN                                                 INIT        61
                                                                        INIT        62
         VFD   5/LBLTYP,19/7,18/3,18/0                                  INIT        63
         VFD   5/LFRETY,55/LFRET                                        INIT        64
         DATA  7LFRETURN                                                INIT        65
                                                                        INIT        66
         VFD   5/LBLTYP,19/7,18/3,18/0                                  INIT        67
         VFD   5/LNRETY,55/LNRET                                        INIT        68
         DATA  7LNRETURN                                                INIT        69
                                                                        INIT        70
         VFD   5/LBLTYP,19/3,18/3,18/0                                  INIT        71
         VFD   5/LENDTY,55/LEND                                         INIT        72
         DATA  3LEND                                                    INIT        73
*                                                                       INIT        74
*                                                                       INIT        75
*        PREDEFINED PATTERN VALUED VARIABLES                            INIT        76
*                                                                       INIT        77
PATTERN  MACRO NAME                                                     INIT        78
         LOCAL FIRST,LAST,CLENGTH                                       INIT        79
         VFD   5/VARTYP,1/0,18/CLENGTH,18/LAST+1-FIRST+2,18/0           INIT        80
         VFD   1/1,41/0,18/=X_NAME_PM                                   INIT        81
         PERMSTR NAME,FIRST,LAST,CLENGTH                                INIT        82
FREELEN$ SET   FREELEN$+1                                               INIT        83
         ENDM                                                           INIT        84
*                                                                       INIT        85
          PATTERN  ABORT                                                INIT        86
          PATTERN  ARB                                                  INIT        87
          PATTERN  BAL                                                  INIT        88
          PATTERN  FAIL                                                 INIT        89
          PATTERN  FENCE                                                INIT        90
          PATTERN  REM                                                  INIT        91
*                                                                       INIT        92
*                                                                       INIT        93
*        PREDEFINED PROCEDURES                                          INIT        94
*                                                                       INIT        95
PROC     MACRO NAME,ENDQ,ENTRY,NRET                                     INIT        96
         LOCAL FIRST,LAST,CLENGTH,NR                                    INIT        97
         VFD   5/CALLTYP,1/0,18/CLENGTH,18/LAST+1-FIRST+2,18/0          INIT        98
         IFC   NE,/ENTRY//                                              INIT        99
ENTR     MICRO 1,,/ENTRY/                                               INIT       100
         ELSE                                                           INIT       101
ENTR     MICRO 1,,/Q_NAME/                                              INIT       102
         ENDIF                                                          INIT       103
         IFC   NE,/NRET//                                               INIT       104
NR       EQU   1                                                        INIT       105
         ELSE                                                           INIT       106
NR       EQU   0                                                        INIT       107
         ENDIF                                                          INIT       108
         VFD   1/1,1/LASTPROC,1/NR,9/0,18/=X_ENDQ,12/*-HSBASE+LAST+1-FIRINIT       109
,ST+2,18/=X_'ENTR'                                                      INIT       110
         PERMSTR NAME,FIRST,LAST,CLENGTH                                INIT       111
         ENDM                                                           INIT       112
*                                                                       INIT       113
LASTPROC SET   1                   . THIS BIT IS SET FOR ALL BUT LAST   INIT       114
*                                                                       INIT       115
STNPRL   EQU   *-HSBASE                                                 INIT       116
*                                                                       INIT       117
         PROC  CODE,CMPLQ,QCMPL                                         INIT       118
         PROC  APPLY,CMPLQ,,NRET                                        INIT       119
          IFNE     TRCFLG,0,1                                           INIT       120
          PROC     TRC,TRCQ                                             INIT       121
         PROC  ITEM,ITEMQ,,NRET                                         INIT       122
         PROC  FAMILY,SELCTQ,QBASE                                      INIT       123
         PROC  SELECTOR,SELCTQ,QSELCT                                   INIT       124
         PROC  PARAM,PARAMQ                                             INIT       125
         PROC  RIGHT,RIGHTQ                                             INIT       126
         PROC  LEFT,RIGHTQ                                              INIT       127
         PROC  FIRST,RESTQ                                              INIT       128
         PROC  REST,RESTQ                                               INIT       129
         PROC  NEXTVAR,NEXTVQ,QNEXTV                                    INIT       130
          PROC     FREEZE,FREEZEQ                                       INIT       131
          PROC     ALPHABET,ALPHAQ,QALPHA                               INIT       132
         PROC  STLIMIT,MAXLNQ,QSTLIM                                    INIT       133
         PROC  STCOUNT,MAXLNQ,QSTCNT                                    INIT       134
          PROC     MAXLNGTH,MAXLNQ,QMAXLN                               INIT       135
         PROC  PROTOTYPE,PROTQ,QPROT                                    INIT       136
          PROC     DATA,DATAQ                                           INIT       137
          PROC     LGT,LGTQ                                             INIT       138
          PROC     FNCLEVEL,FLVQ,QFLV                                   INIT       139
          PROC     DATATYPE,DTQ,QDT                                     INIT       140
         PROC  TYPE,DTQ                                                 INIT       141
          PROC     EORLEVEL,EORLQ,QEORL                                 INIT       142
         PROC  ENDGROUP,EFRWQ,QENDFIL                                   INIT       143
          PROC     REWIND,EFRWQ                                         INIT       144
          PROC     DETACH,IOQ                                           INIT       145
          PROC     INPUT,IOQ                                            INIT       146
          PROC     OUTPUT,IOQ                                           INIT       147
          PROC      EOI,EOIQ                                            INIT       148
         PROC  TIME,TDCQ,QCLOCK                                         INIT       149
          PROC     DATE,TDCQ                                            INIT       150
         PROC  CLOCK,TDCQ,QTIME                                         INIT       151
          IFNE     TSS,0,1                                              INIT       152
          PROC     IN,INQ                                               INIT       153
          IFNE     TSS,0,2                                              INIT       154
          PROC     OUT,REMARKQ,QREMARK                                  INIT       155
          IFNE     ,,1                                                  INIT       156
          PROC     REMARK,REMARKQ                                       INIT       157
          PROC     ARRAY,ARRAYQ                                         INIT       158
          PROC     CONVERT,CNVTQ,QCNVT                                  INIT       159
          PROC     IDENT,COMPQ                                          INIT       160
          PROC     DIFFER,COMPQ                                         INIT       161
          PROC      DEFINE,DEFINEQ                                      INIT       162
          PROC     ARBNO,ARBNOQ                                         INIT       163
          PROC     ANCHOR,ANCHORQ                                       INIT       164
          PROC     TRIM,TRIMQ                                           INIT       165
          PROC     ANY,ANYQ                                             INIT       166
          PROC     NOTANY,ANYQ                                          INIT       167
         PROC  BREAK,ANYQ                                               INIT       168
         PROC  SPAN,ANYQ                                                INIT       169
         PROC  EQ,EQQ                                                   INIT       170
         PROC  NE,EQQ                                                   INIT       171
         PROC  GT,EQQ                                                   INIT       172
         PROC  GE,EQQ                                                   INIT       173
         PROC  LT,EQQ                                                   INIT       174
         PROC  LE,EQQ                                                   INIT       175
          PROC     RTAB,PATQ                                            INIT       176
          PROC     TAB,PATQ                                             INIT       177
          PROC     RPOS,PATQ                                            INIT       178
          PROC     POS,PATQ                                             INIT       179
          PROC     LEN,PATQ                                             INIT       180
         PROC      SIZE,SIZEQ                                           INIT       181
         PROC  GRAB,IFQ                                                 INIT       182
         PROC  HBC,IFQ                                                  INIT       183
*                                                                       INIT       184
LASTPROC SET   0                   . THE LAST PROC IN THIS LIST IS NEXT INIT       185
         PROC  IF,IFQ                                                   INIT       186
*                                                                       INIT       187
*                                                                       INIT       188
*  INITIAL FILE BLOCK SKELETONS                                         INIT       189
*                                                                       INIT       190
INFILE   VFD   5/FILTYP,55/0       . HEAP BLOCK HEADER                  INIT       191
          VFD       2/1,40/0,18/1  . INPUT FILE, REFERENCE COUNT        INIT       192
         DATA  0LINPUT             . FET : LFN                          INIT       193
         BSSZ  4                   .       FIRST,IN,OUT,LIMIT           INIT       194
*                                                                       INIT       195
OUTFILE  VFD   5/FILTYP,55/0       . HEAP BLOKC HEADER                  INIT       196
          VFD       1/1,41/0,18/2  . WRITE DONE, REF COUNT              INIT       197
         DATA  0LOUTPUT            . FET : LFN                          INIT       198
         BSSZ  4                   .       FIRST,IN,OUT,LIMIT           INIT       199
OUTLEN   EQU   *-OUTFILE                                                INIT       200
*                                                                       INIT       201
*                                                                       INIT       202
*  THIS CODE COMPLETES THE INITIALIZATION OF HEAP STORAGE BY MOVING THE INIT       203
* INITIAL CONTENTS OF THE OUTPUT FILE BLOCK TO ITS CORRECT LOCATION.    INIT       204
* OVERLAYING NO LONGER NEEDED INITIALIZATION CODE.  THE INPUT AND OUTPUTINIT       205
* FILES ARE OPENED, ADDITIONALLY.                                       INIT       206
*                                                                       INIT       207
FIXFILES STREAM OUTSTRM            . DESTINATION FOR OUTPUT BLOCK TO B2 INIT       208
         SB1   OUTLEN-1            . (NUMBER OF WORDS TO MOVE) - 1      INIT       209
FIXFLP   SA1   OUTFILE+B1                                               INIT       210
         BX6   X1                                                       INIT       211
         SA6   B2+B1                                                    INIT       212
         SB1   B1-1                                                     INIT       213
         PL    B1,FIXFLP                                                INIT       214
                                                                        INIT       215
*  NOW OPEN THE INPUT AND OUTPUT FILES.                                 INIT       216
*                                                                       INIT       217
         STREAM INSTRM                                                  INIT       218
         RJ    OPEN                                                     INIT       219
         STREAM OUTSTRM                                                 INIT       220
         RJ    OPEN                                                     INIT       221
*                                                                       INIT       222
*  TRANSFER CONTROL TO THE COMPILER:                                    INIT       223
         SB1   0                   . INITIALIZE PASS 2 STATE TO ST1     INIT       224
         JP    PASS1               . START THE COMPILATION              INIT       225
                                                                        INIT       226
FIXERR   IFGE  *,INFILE+1+1+FET.LEN+101B                                INIT       227
         ERR FIXFILES MAY CLOBBER ITSELF                                INIT       228
FIXERR   ENDIF                                                          INIT       229
         EJECT                                                          INIT       230
         TITLE INITIALIZATION CODE                                      INIT       231
*  THIS CODE PERFORMS MISCELLANEOUS INITIALIZATION DUTIES, INCLUDING:   INIT       232
*                                                                       INIT       233
* 1) MOVING THE FIELD LENGTH SIZE, PLACED IN REGISTER  A0  BY SCOPE,    INIT       234
*    INTO A CELL FOR THE STORAGE MANAGER.                               INIT       235
*                                                                       INIT       236
* 2) PROCESSING THE CONTROL STATEMENT.                                  INIT       237
*                                                                       INIT       238
* 3) INITIALIZING THE OUTPUT FILE (USED BY THE INTERPRETOR AND THE      INIT       239
*    COMPILER) AND THE INPUT FILE (USED BY THE COMPILER).               INIT       240
*                                                                       INIT       241
* 4) PLACING THE CURRENT TIME ADN DATE, FETCHED FROM SCOPE, INTO THE    INIT       242
*    COMPILER-S LISTING TITLE LINE.                                     INIT       243
                                                                        INIT       244
SNOBOL   SX6   A0                  . SAVE INITIAL FL                    INIT       245
         SA6   FIELDLN             .  FOR THE STORAGE MANAGER           INIT       246
         RJ    GN                  . SKIP PROGRAM NAME                  INIT       247
*                                                                       INIT       248
*                                                                       INIT       249
*                                                                       INIT       250
*  THE MAINLOOP COLLECTS A PARAMETER OF THE FORM: KEYWORD OF KEYWORD=VALINIT       251
* IT SETS X3 TO THE KEYWORD AND X6 TO THE VALUE (DEFAULT = 0).          INIT       252
*                                                                       INIT       253
CCLOOP   RJ    GN                  . RETURNS PARAM. IN X6, DELIM. IN X2 INIT       254
         BX3   X6                                                       INIT       255
         BX6   X6-X6                                                    INIT       256
         IFNCH =,CCX               . USE DEFAULT VAL UNLESS DELIM IS =  INIT       257
         RJ    GN                  . GET VALUE                          INIT       258
CCX      MX0   CHSIZ                                                    INIT       259
         BX2   X0*X3               . FIRST CHARACTER OF KEYWORD TO X2   INIT       260
         LX2   CHSIZ                                                    INIT       261
*                                                                       INIT       262
         IFCH  I,CCINP             . INPUT FILE                         INIT       263
         IFCH  L,CCOUTP            . LISTING FILE                       INIT       264
         IFCH  O,CCOUTP            . =O= IS SYNONYM FOR =L=             INIT       265
         IFCH  B,CCBUFF            . BUFFER SIZE                        INIT       266
         IFCH  F,CCFLLIM           . FIELD LENGTH LIMIT                 INIT       267
         IFCH  E,CCEOVLY           . ERROR OVERLAY RESIDENCY            INIT       268
          IFCH      H,CCHBC                                             INIT       269
         IFNE  TRCFLG,0                                                 INIT       270
         IFCH  Q,CCDBG             . MACHINE LANGUAGE TRACE CONTROL     INIT       271
         ENDIF                                                          INIT       272
         IFCH  T,CCTRC             . COMPILER INTERMEDIATE OUTPUT       INIT       273
         IFCH  J,CCUPPER           . PATCH UPPER HALFWORD               INIT       274
         IFCH  K,CCLOWER           . PATCH LOWER HALFWORD               INIT       275
         IFCH  R,CCFREQ            . FREQUENCY FOR MEMORY-STATE CHECKER INIT       276
         IFCH  S,CCSTAT            . SPECIAL STATUS WORD                INIT       277
         IFCH  V,CCOVLAY                                                INIT       278
*                                                                       INIT       279
         BX7   X3                                                       INIT       280
         SA7   UKWRD                                                    INIT       281
         SX5   UKMESS                                                   INIT       282
         CALL  CCERR,B2,CCLOOP     . (NON FATAL ERROR)                  INIT       283
*                                                                       INIT       284
UKMESS   DATA  10HUNKNOWN KE                                            INIT       285
         DATA  10HYWORD, IGN                                            INIT       286
         DATA  10HORED-                                                 INIT       287
UKWRD    DATA  0                                                        INIT       288
*                                                                       INIT       289
*                                                                       INIT       290
*        INPUT FILE (DEFAULT IS 'INPUT')                                INIT       291
*                                                                       INIT       292
CCINP    SB1   INFILE+FI.FET+FET.LFN                                    INIT       293
         JP    CCFILCHK                                                 INIT       294
*                                                                       INIT       295
*                                                                       INIT       296
*        OUTPUT FILE (DEFAULT IS 'OUTPUT'; L=0 MEANS NO LISTING)        INIT       297
*                                                                       INIT       298
CCOUTP   SB1   OUTFILE+FI.FET+FET.LFN                                   INIT       299
         BX2   X0*X6               . EXTRACT FIRST CHARACTER            INIT       300
         LX2   6                   .  OF VALUE WORD                     INIT       301
         IFNCH 0,CCFILCHK                                               INIT       302
         SX6   0                   . SUPPRESS                           INIT       303
         SA6   P1ERFLG             .  LISTING                           INIT       304
*                                                                       INIT       305
*                                                                       INIT       306
CCFILCHK ZR    X6,CCLOOP           . USE DEFAULT FILE NAME              INIT       307
         SA6   IFWRD                                                    INIT       308
         RJ    VALID               . SAVES B1,B7,X0,A1-X1, SETS X6 TO   INIT       309
         ZR    X6,CCFCHKE          .   ZERO IF NOT A GOOD FILE NAME     INIT       310
         SA6   B1                                                       INIT       311
         JP    CCLOOP                                                   INIT       312
*                                                                       INIT       313
CCFCHKE  SX5   IFMESS              . ILLEGAL FILE NAME                  INIT       314
         CALL  CCERR,B2,CCLOOP     . (NON FATAL ERROR)                  INIT       315
*                                                                       INIT       316
IFMESS   DATA  10HILLEGAL FI                                            INIT       317
         DATA  10HLE NAME, D                                            INIT       318
         DATA  10HEFAULT ASS                                            INIT       319
         DATA  10HUMED-                                                 INIT       320
IFWRD    DATA  0                                                        INIT       321
*                                                                       INIT       322
*                                                                       INIT       323
*        BUFFERSIZE DECLARATION (MUST BE NOT LESS THAN 101B).           INIT       324
*                                                                       INIT       325
CCBUFF   CALL  OCT2BIN             . (OCTAL) STRING IN X6 => BINARY     INIT       326
         SX6   X7-101B             .  IN X7                             INIT       327
         NG    X6,CCBFSZE                                               INIT       328
         SA7   BUFFSIZ                                                  INIT       329
         JP    CCLOOP                                                   INIT       330
*                                                                       INIT       331
CCBFSZE  SX7   101B                                                     INIT       332
         SA7   BUFFSIZ                                                  INIT       333
         SX5   BSMESS                                                   INIT       334
         CALL  CCERR,B2,CCLOOP     . (NON FATAL ERROR)                  INIT       335
*                                                                       INIT       336
BSMESS   DIS   ,?BUFFER SIZE TOO SMALL, 101B ASSUMED.?                  INIT       337
*                                                                       INIT       338
*                                                                       INIT       339
*        FIELD LENGTH LIMIT DECLARATION                                 INIT       340
*                                                                       INIT       341
CCFLLIM  CALL  OCT2BIN             . (OCTAL) STRING IN X6 => BINARY     INIT       342
         SA7   FLDLM               .  IN X7                             INIT       343
         JP    CCLOOP                                                   INIT       344
*                                                                       INIT       345
*                                                                       INIT       346
*        ERROR OVERLAY RESIDENCY (SYSTEM LIBRARY IF NO 'E' PARAMETER;   INIT       347
*                                 FROM FILE  F  IF 'E=F' PARAMETER;     INIT       348
*                                 FROM FILE  SNOJOB  IF 'E' PARAMETER). INIT       349
*                                                                       INIT       350
CCEOVLY  SA2   FILEWD              . PARAMETER WORD FOR FILE LOAD       INIT       351
         BX7   X2                                                       INIT       352
         SA7   SJCALL+1                                                 INIT       353
         SB1   SJCALL                                                   INIT       354
         JP    CCFILCHK                                                 INIT       355
*                                                                       INIT       356
*                                                                       INIT       357
*  H PARAMETER CONTROLS HEAP BLOCK COMPACTION                           INIT       358
*  ZERO MEANS TO NOT DO ANY HBC                                         INIT       359
*  PHASES 1-5 ARE: 10B,20B,40B,100B,200B                                INIT       360
*                                                                       INIT       361
*  EACH FLAG CAN BE SET INDEPENDENTLY OF THE OTHERS                     INIT       362
*                                                                       INIT       363
CCHBC     CALL      OCT2BIN                                             INIT       364
          SA7       HBCSTAT                                             INIT       365
          JP        CCLOOP                                              INIT       366
         IFNE  TRCFLG,0                                                 INIT       367
*                                                                       INIT       368
*                                                                       INIT       369
*        MACHINE LANGUAGE TRACING CONTROL                               INIT       370
*                                                                       INIT       371
CCDBG    TRACE                     . TURN ON TRACE                      INIT       372
         TRACE LIST                .   WITH LISTING                     INIT       373
         JP    CCLOOP                                                   INIT       374
         ENDIF                                                          INIT       375
*                                                                       INIT       376
*                                                                       INIT       377
*        COMPILER INTERMEDIATE OUTPUT                                   INIT       378
*                                                                       INIT       379
CCTRC    SA2   P2TRCS              . PASS2 TRACE SOURCE                 INIT       380
         SA3   P3TRCS              . PASS3                              INIT       381
         BX6   X2                                                       INIT       382
         BX7   X3                                                       INIT       383
         SA6   P2TRCT              . PASS2 TRACE TARGET                 INIT       384
         SA7   P3TRCT              . PASS3                              INIT       385
         SA2   P4TRCS              . PASS4 TRACE SOURCE                 INIT       386
         BX6   X2                                                       INIT       387
         SA6   P4TRCT              .             TARGET                 INIT       388
         JP    CCLOOP                                                   INIT       389
*                                                                       INIT       390
*                                                                       INIT       391
*  KLUDGE PATCH FACILITY                                                INIT       392
*  A PARAMETER OF THE FORM: (J OR K)AAAAAA=VVVVVVVVVV, WHERE THE A-S ANDINIT       393
*  V-S ARE OCTAL DIGITS, IMPLIES REPLACING THE UPPER OR LOWER HALF      INIT       394
*  (CORRESPONDING TO J OR K RESPECTIVELY) OF THE CELL ADDRESSED BY      INIT       395
*  AAAAAA WITH VVVVVVVVVV.  BEWARE; NO CHECKING IS DONE.                INIT       396
CCUPPER  SB2   30                  . FLAG UPPER HALFWORD                INIT       397
         JP    CCPATCH                                                  INIT       398
CCLOWER  SB2   0                   . FLAG LOWER HALFWORD                INIT       399
CCPATCH  SA6   CCPATMP             . SAVE VVVVVVVVVV                    INIT       400
         BX6   -X0*X3                                                   INIT       401
         LX6   CHSIZ               . LEFT JUSTIFY AAAAAA IN X6          INIT       402
         CALL  OCT2BIN             . LEAVES BINARY IN X7                INIT       403
         SA1   X7                  . FETCH ADDRESSED WORD               INIT       404
         SA2   CCPATMP                                                  INIT       405
         BX6   X2                                                       INIT       406
         CALL  OCT2BIN             . CONVERT VALUE (SAVES A1/X1, B2)    INIT       407
         MX5   60-30                                                    INIT       408
         LX1   X1,B2               . RIGHT JUSTIFY SELECTED HALFWORD    INIT       409
         BX6   X5*X1               . CLEAR OLD VALUE                    INIT       410
         BX6   X6+X7               .   AND INSERT NEW ONE               INIT       411
         LX6   X6,B2               . REPOSITION THE WORD                INIT       412
         SA6   A1                  .   AND REPLACE IN MEMORY            INIT       413
         JP    CCLOOP              . DONE                               INIT       414
CCPATMP  DATA  0                                                        INIT       415
*                                                                       INIT       416
*                                                                       INIT       417
*        FREQUENCY FOR MEMORY-STATE CHECKS                              INIT       418
*                                                                       INIT       419
CCFREQ   CALL  OCT2BIN             . STRING IN X6 => BINARY IN X7       INIT       420
         SA7   FREQWD                                                   INIT       421
         JP    CCLOOP                                                   INIT       422
*                                                                       INIT       423
*                                                                       INIT       424
*        STATUS WORD                                                    INIT       425
*                                                                       INIT       426
CCSTAT   CALL  OCT2BIN             . STRING IN X6 => BINARY IN X7       INIT       427
         SA7   STATWD                                                   INIT       428
         JP    CCLOOP                                                   INIT       429
*                                                                       INIT       430
*                                                                       INIT       431
*  WRITE ABSOLUTE OVERLAY ON SPECIFIED FILE (DEFAULT = 'SNOBOL')        INIT       432
*                                                                       INIT       433
CCOVLAY  SA4   =0LSNOBOL                                                INIT       434
         ZR    X6,CCOVLAY1         . USE DEFAULT FILE NAME              INIT       435
         SA6   IFWRD                                                    INIT       436
         RJ    VALID                                                    INIT       437
         ZR    X6,CCFCHKE          . INVALID FILE NAME SPECIFIED        INIT       438
         BX4   X6                                                       INIT       439
CCOVLAY1 SA2   =0LSNOBOL           . PROGRAM NAME                       INIT       440
         SX3   SNOBOL              . ENTRY POINT                        INIT       441
         SX5   LIMIT               . LWA+1 TO WIRTE                     INIT       442
         RJ    WROVLAY                                                  INIT       443
         JP    END.                . TERMINATE EXECUTION                INIT       444
*                                                                       INIT       445
*                                                                       INIT       446
*  OCT2BIN  CONVERTS AN OCTAL STRING, IN X6, TO A BINARY INTEGER, IN X7.INIT       447
* IT USES, ADDITIONALLY, X4 AND X5, AND RETURNS TO THE ADDRESS IN B1,   INIT       448
* UNLESS IT FINDS A NONOCTAL DIGIT (IN WHICH CASE IT JUMPS TO 'CCERROR')INIT       449
                                                                        INIT       450
OCT2BIN  SX7   0                   . INITIALIZE RESULT                  INIT       451
         SA6   NOWRD                                                    INIT       452
OCT2BINL BX5   X0*X6               . EXTRACT                            INIT       453
         BX6   -X0*X6              .  NEXT CHARACTER                    INIT       454
         ZR    X5,OCT2BINR         . DONE                               INIT       455
         LX5   6                                                        INIT       456
         LX6   6                                                        INIT       457
         LX7   3                   . OLD TOTAL * 8                      INIT       458
         SX5   X5-1R0                                                   INIT       459
         NG    X5,OCTERR           . ALPHABETIC CHARACTER               INIT       460
         SX4   X5+1R0-1R8                                               INIT       461
         PL    X4,OCTERR           . SPECIAL CHARACTER                  INIT       462
         BX7   X7+X5                                                    INIT       463
         JP    OCT2BINL                                                 INIT       464
OCT2BINR JP    B1                  . RETURN                             INIT       465
*                                                                       INIT       466
OCTERR   SX5   NOMESS              . NON OCTAL CHARACTER IN NUMBER      INIT       467
         CALL  CCERR,B2,ABT.       . (FATAL ERROR)                      INIT       468
*                                                                       INIT       469
NOMESS   DATA  10HNON OCTAL                                             INIT       470
         DATA  10HCHARACTER                                             INIT       471
         DATA  10HIN NUMBER,                                            INIT       472
         DATA  10HABORTING-                                             INIT       473
NOWRD    DATA  0                                                        INIT       474
*                                                                       INIT       475
*                                                                       INIT       476
*  CCERR:      ISSUE CONTROL CARD ERROR MESSAGE                         INIT       477
*                                                                       INIT       478
*  PARAMETERS: X5 = MESSAGE ADDRESS, B2 = RETURN                        INIT       479
*                                                                       INIT       480
CCERR    SA1   1                   . MAKE SURE                          INIT       481
         NZ    X1,CCERR            .   RA+1 IS CLEAR                    INIT       482
         SX6   CCEMESS                                                  INIT       483
         CALL  MSGOUT                                                   INIT       484
         SX6   X5                                                       INIT       485
         CALL  MSGOUT,,B2                                               INIT       486
*                                                                       INIT       487
CCEMESS  DIS   ,?SNOBOL CONTROL CARD ERROR.?                            INIT       488
*                                                                       INIT       489
*                                                                       INIT       490
MAXFLERR SX5   MFMESS              . MAX FL HAS BEEN EXCEEDED           INIT       491
         CALL  CCERR,B2,ABT.       . (FATAL ERROR)                      INIT       492
*                                                                       INIT       493
MFMESS   DIS   ,?THE MAXIMUM FIELD LENGTH HAS BEEN EXCEEDED.?           INIT       494
*                                                                       INIT       495
*                                                                       INIT       496
*  GN  GETS THE NEXT WORD FROM THE CONTROL CARD AND RETURNS IT IN X6.  AINIT       497
* WORD IS A SEQUENCE OF LETTERS, DIGITS, AND ASTERISKS, FOLLOWED BY A   INIT       498
* DELIMITER CHARACTER, WHICH  GN  RETURNS IN X2.  IF THE DELIMITER IS   INIT       499
* ')' OR '.', THEN THE NEXT TIME  GN  IS CALLED, IT IMMEDIATELY         INIT       500
* TRANSFERS TO 'CCEND'.                                                 INIT       501
*  A PERIOD IS ASSUMED IF THERE IS NO CONTROL CARD TERMINATOR.          INIT       502
                                                                        INIT       503
GN       BSSZ  1                   . ENTRY/EXIT                         INIT       504
         SA1   GNDATA                                                   INIT       505
         NG    X1,CCEND            . LAST CALL ENCOUNTERED END OF CC    INIT       506
         UX5   B2,X1               . SHIFT COUNT TO B2, WORD PTR TO X5  INIT       507
         SA1   X5                  . FETCH NEXT IMAGE WORD              INIT       508
         SX0   CHMASK                                                   INIT       509
         SX6   0                   . INITIALIZE OUTPUT BUFFER           INIT       510
         SB3   60-CHSIZ            . INITIALIZE OUTPUT COUNTER          INIT       511
*                                                                       INIT       512
GNGETC   PL    B2,GNGETC1          . STILL CHARACTERS IN X1             INIT       513
         SX5   X5+1                                                     INIT       514
         SA1   X5                                                       INIT       515
         SB2   60-CHSIZ                                                 INIT       516
*                                                                       INIT       517
GNGETC1  AX2   X1,B2                                                    INIT       518
         BX2   X0*X2               . NEXT CHARACTER                     INIT       519
         SB2   B2-CHSIZ                                                 INIT       520
*                                                                       INIT       521
         ZR    X2,GNENDCC          . END OF CONTROL CARD                INIT       522
         SX7   X2-1R+                                                   INIT       523
         PL    X7,GNDELIM          . NOT A LETTER OR A DIGIT            INIT       524
GNAPPEND LX2   X2,B3               . NOTE B3 MUST BE NON-NEGATIVE       INIT       525
         BX6   X6+X2                                                    INIT       526
         SB3   B3-CHSIZ                                                 INIT       527
         JP    GNGETC                                                   INIT       528
*                                                                       INIT       529
GNDELIM  IFCH  ( ),GNGETC          . IGNORE BLANKS                      INIT       530
*                                                                       INIT       531
         IFCH  .,GNENDCC           . DOT IS CONTROL CARD TERMINATOR     INIT       532
         IFCH  ),GNENDCC           .   (LIKEWISE RIGHT PAREN.)          INIT       533
*                                                                       INIT       534
         PX7   B2,X5                                                    INIT       535
         SA7   GNDATA                                                   INIT       536
         JP    GN                                                       INIT       537
*                                                                       INIT       538
GNENDCC  SX7   -1                                                       INIT       539
         SA7   GNDATA                                                   INIT       540
         SX2   1R.                                                      INIT       541
         JP    GN                                                       INIT       542
*                                                                       INIT       543
*                                                                       INIT       544
GNDATA   VFD   12/2000B+60-CHSIZ,30/0,18/70B                            INIT       545
*                                                                       INIT       546
*                                                                       INIT       547
CCEND    BSS   0                                                        INIT       548
                                                                        INIT       549
         CALL  CALENDR             . DATE => X6                         INIT       550
         SA6   DATE                . STORE INTO COMPILER TITLE          INIT       551
         CALL  TOD                 . TIME OF DAY => X6                  INIT       552
         LX6   60-2*6              . LEFT JUSTIFY IT                    INIT       553
         SA6   TIME                                                     INIT       554
*                                                                       INIT       555
*                                                                       INIT       556
*  NOW WE CREATE TWO HEAP BLOCKS OF TYPE FILE, ONE FOR INPUT AND ONE FORINIT       557
* OUTPUT.  THE FIRST BLOCK WILL START AT 'BUFFBASE', AND THE SECOND WILLINIT       558
* FOLLOW IMMEDITELY.  THE LENGTHS DEPEND ON  C(BUFFSIZE).  THE VARIABLESINIT       559
*  INSTRM  AND OUTSTRM  ARE SET TO POINT TO WORD 0 OF THEIR RESPECTIVE  INIT       560
* BLOKCS, AND THE VARIABLE  FILLIST  IS SET TO POINT TO A CHAIN OF THE  INIT       561
* BLOCKS, LINKED THROUGH THERI  F2 FIELDS.                              INIT       562
*  THE OUTPUT FIEL BLOCK CAN'T BE INITIALIZED YET, SINCE THE FILE BLOCKSINIT       563
* OVERLAY THE INITIALIZATION CODE.  THUS THE ARRAY  OUTFILE  IS INITIALIINIT       564
* AND LATER IS MOVED TO THE CORRECT LOCATION BY THE CODE  FIXFILES.     INIT       565
                                                                        INIT       566
         SA1   BUFFSIZ                                                  INIT       567
         SX2   1+1+FET.LEN+X1      . LENGTH(HEADER+REF COUNT+FET+BUFFER)INIT       568
         IX6   X2+X2                                                    INIT       569
         SX6   INFILE+X6                                                INIT       570
         SA6   MAXHS               . INITIALIZE MAXHS                   INIT       571
         SX6   FILTYP                                                   INIT       572
         LX6   1+18+18                                                  INIT       573
         BX6   X6+X2               . PUT BYPASS INTO SVD                INIT       574
         LX6   18                                                       INIT       575
         SX3   INFILE+X2           . OUTPUT FILE BLOCK FOLLOWS INPUT    INIT       576
         BX7   X6+X3               . HEACER FOR INPUT FILE LINKS TO     INIT       577
         SA7   INFILE                                                   INIT       578
         SA6   OUTFILE             . HEADER FOR OUTPUT FILE LINKS TO ZERINIT       579
         SX6   INFILE                                                   INIT       580
         SA6   INSTRM                                                   INIT       581
         SA6   FILLIST                                                  INIT       582
         LX6   18                                                       INIT       583
         SA2   INPSVD                                                   INIT       584
         BX6   X2+X6                                                    INIT       585
         SA6   A2                                                       INIT       586
         SX6   X3                                                       INIT       587
         SA6   OUTSTRM                                                  INIT       588
         LX6   18                                                       INIT       589
         SA2   OUTPSVD                                                  INIT       590
         BX6   X2+X6                                                    INIT       591
         SA6   A2                                                       INIT       592
         SX6   INFILE+FI.BUF       . START OF INPUT BUFFER              INIT       593
         SA6   INFILE+FI.FET+FET.IN                                     INIT       594
         SA6   INFILE+FI.FET+FET.OUT                                    INIT       595
         SX5   FET.SZ              . PSEUDO FET LENGTH                  INIT       596
         LX5   18                                                       INIT       597
         BX7   X5+X6                                                    INIT       598
         SA7   INFILE+FI.FET+FET.FRST                                   INIT       599
         IX6   X6+X1               . FIRST + LENGTH = LIMIT             INIT       600
         SA6   INFILE+FI.FET+FET.LIM                                    INIT       601
*                                                                       INIT       602
         SX6   X3+FI.BUF           . START OF OUTPUT BUFFER             INIT       603
         SA6   OUTFILE+FI.FET+FET.IN                                    INIT       604
         SA6   OUTFILE+FI.FET+FET.OUT                                   INIT       605
         BX7   X5+X6               . PSEUDO FET LENGTH                  INIT       606
         SA7   OUTFILE+FI.FET+FET.FRST                                  INIT       607
         IX6   X6+X1               . FIRST + LENGTH = LIMIT             INIT       608
         SA6   OUTFILE+FI.FET+FET.LIM                                   INIT       609
*                                                                       INIT       610
*                                                                       INIT       611
*  NOW CHECK THAT A SUFFICIENT FL EXISTS, REQUESTING MORE IF NECESSARY, INIT       612
* BUT NOT MORE THAN  FLDLM .  THE VALUE OF THE SYMBOL  FREELEN$ IS THE IINIT       613
* INITIAL AMOUNT OF LIST STORAGE NEEDED;  MAXHS  CONTAINS               INIT       614
* THE ADDRESS OF THE FIRST CELL NOT NEEDED BY STATIC STORAGE.           INIT       615
*                                                                       INIT       616
         SA1   FIELDLN             . CURRENT FL                         INIT       617
         SA2   MAXHS                                                    INIT       618
         SX6   X2+FREELEN$         . NECESSARY FL                       INIT       619
         IX1   X1-X6                                                    INIT       620
         PL    X1,FL.OK            . CURRENT IS SUFFICIENT              INIT       621
         SA1   FLDLM               . FL LIMIT                           INIT       622
         IX1   X1-X6                                                    INIT       623
         NG    X1,MAXFLERR         . MAX FL HAS BEEN EXCEEDED           INIT       624
          SA2      RFLP                                                 *******      1
          BX7      X6+X2                                                *******      2
          RMT                                                           *******      3
RFLP      VFD      24/0LRFLP,36/0                                       *******      4
          RMT                                                           *******      5
         SA7   1                                                        INIT       630
+        SA1   1                                                        INIT       631
         NZ    X1,*                                                     INIT       632
*                                                                       INIT       633
*                                                                       INIT       634
FL.OK    BSS   0                   ...                                  INIT       635
          EJECT                                                         INIT       636
PRE3     SA2   FIELDLN                                                  INIT       637
         SB1   -1                                                       INIT       638
         SB7   X2                                                       INIT       639
         SX7   HSBASE                                                   INIT       640
         SX6   HSBASE+2            . INITIALIZE DUMMY FREE BLOCK        INIT       641
         SA6   FHBLRP                                                   INIT       642
         SA1   X6                                                       INIT       643
         LX6   36                                                       INIT       644
         BX6   X1+X6                                                    INIT       645
         SA6   X1                                                       INIT       646
         SA7   MINHS               . INITIALIZE MINHS                   INIT       647
         SB4   X7+STNDREL                                               INIT       648
INIT1    SA1   B4                  . LOOP TO FIND HASH CODES FOR        INIT       649
         BX0   X1                  .  STANDARD VARIABLES AND PROCEDURES INIT       650
         AX1   18                                                       INIT       651
         SX5   A1                                                       INIT       652
         SB4   X1+B4                                                    INIT       653
         AX1   18                                                       INIT       654
         SB5   A1+2                . FWA OF THE NAME                    INIT       655
         SB3   X1                                                       INIT       656
         EQ    B3,B0,INIT4                                              INIT       657
         RJ    SEARCH                                                   INIT       658
         BX7   X5+X2                                                    INIT       659
         NG    X2,INIT1A           . UPDATE HASH CHAIN                  INIT       660
         NG    X3,INIT1A                                                INIT       661
         LX7   30                                                       INIT       662
 INIT1A  SA7   A2                                                       INIT       663
         AX0   55                                                       INIT       664
         SX0   X0-VARTYP+37B       . BRANCH IF FUNCTION OR LABEL        INIT       665
         NZ    X0,INIT1                                                 INIT       666
         SA1   X5+1                                                     INIT       667
         NG    X1,INIT3            . BRANCH IF ARB, BAL, REM  ETC.      INIT       668
         BX7   X7-X7                                                    INIT       669
         SB7   B7+B1                                                    INIT       670
         SA7   B7                                                       INIT       671
         SX0   SSTY                                                     INIT       672
         SX6   B7                                                       INIT       673
         LX0   55                  . INPUT OR OUTPUT INITIALIZED TO     INIT       674
         LX6   18                  .  A NULL STRING VALUE               INIT       675
         SX7   B7                                                       INIT       676
         BX7   X7+X6                                                    INIT       677
         SB7   B7+B1                                                    INIT       678
         BX7   X7+X0                                                    INIT       679
         SX6   B7                                                       INIT       680
         SA7   B7                                                       INIT       681
         BX6   X6+X1                                                    INIT       682
INIT2    SA6   A1                                                       INIT       683
         EQ    INIT1                                                    INIT       684
 INIT3   SB7   B7+B1                                                    INIT       685
         MX0   12                                                       INIT       686
         LX1   48                                                       INIT       687
         BX7   X0*X1                                                    INIT       688
         LX7   60-18               . SHIFT INTO LS PATTERN WORD FORM    INIT       689
         SA7   B7                                                       INIT       690
         SX6   B7                                                       INIT       691
         SX7   B7                                                       INIT       692
         LX6   18                                                       INIT       693
         SX0   PSTY                                                     INIT       694
         LX0   55                                                       INIT       695
         BX6   X7+X6                                                    INIT       696
         BX6   X0+X6                                                    INIT       697
         EQ    INIT2                                                    INIT       698
*  SET UP THE COMPILER STORAGE                                          INIT       699
INIT4    SA1   MAXHS               . SET DURING FILE INITIALIZATION     INIT       700
         BX7   X1                                                       INIT       701
         SA7   MAXSTAT             . CURRENT TOP OF COMPILER HS         INIT       702
         BX6   X6-X6                                                    INIT       703
         SX7   B7+B1                                                    INIT       704
         SA7   COMPB7                                                   INIT       705
         SA6   X7                  . LAST WORD OF FL                    INIT       706
         BX6   -X7                                                      INIT       707
         SA6   MAXSTAK             . NOTE NEGATIVE REPRESENTATION       INIT       708
         SX7   X7+B1                                                    INIT       709
         BX6   X6-X6                                                    INIT       710
         SA6   X7                  . BOTTOM OF THE STACK                INIT       711
         SA7   PRGBASE             . BASE FOR THE OBJECT PROGRAM        INIT       712
         SA7   MINSTAK                                                  INIT       713
*  PREPARE FOR COMPILATION                                              INIT       714
         SB6   X7                                                       INIT       715
         SX7   PRIORJ                                                   INIT       716
         LX7   36                                                       INIT       717
         SB6   B0-B6                                                    INIT       718
         SA5   BGP3STK                                                  INIT       719
         SA0   BGP2STK                                                  INIT       720
         SA7   A5                                                       INIT       721
         SB7   B0                  . INITIALIZE PASS 2 OPSIT            INIT       722
         JP    FIXFILES                                                 INIT       723
*                                                                       INIT       724
*                                                                       INIT       725
LIMIT    END   SNOBOL                                                   INIT       726