               JOB  TEST CHARACTER & BRANCH                                0050B
               ctl  6611
     *
     * Stuff in the preamble -- not in one-field-per-card format
     *
               org  333
     *
     * Set up for one-field-per-card format and begin loading
     *
  333start     sw   8,12
  340reload    sw   1
  344          r    1
     *
     * Look for next program -- A in column 80
     *
  348nxprog    r
  349tptest    bce  *&5,80,a
  357          b    421    What's going to be at 421?
  361          cs   reload,80
  368          dcw  #1
     *
     tapes1    equ  1268   blank indicates the tape loader
     taperd    equ  1288   tape read routine?
     tapes2    equ  1398   GM indicates the tape loader
     *
     * Stuff that is in one-field-per-card format
     *
               ORG  377
  377          BIN  init,          USE WHEN TESTS ARE RUN FROM TAPE
               ORG  385
  385          B    taperd           ,,
  389init      NOP  0                ,,
  393          MCW  tptest&11,init&3 ,,
  400begin     CS   332            START TEST
  404          CS
  405          BCE  titlpr,titlsw,1  BR TO TITLE PRINT ROUTINE IF 1 IN S52
  413          org  titlex
  413          cs   80             CLEAR READ AREA
  417bnx       b    nxprog         BRANCH TO PROGRAM CHAINING ROUTINE
  421first     sw   1,78           LOAD PRINT AREA
  428          lca  80,299           ,,
  435          lca  72,272           ,,
  442          sw   202,241          ,,
  449          mcw  250,*&1        MOVE B OR N OP INTO 456
  456          dcw  @ @            B OP FOR EQUAL CHAR-N OP FOR UNEQ CHAR
  457          dc   testeq
  460          mcw  202,*&8        MOVE D MODIFIER TO TEST CHARAC OP
  467scope     bce  errpr1,224,X   TEST UNEQUAL CHARACTERS
  475          bce                   ,,
  476          bce                   ,,
  477          bss  scope,B        B ON TO SCOPE
  482          b    result         BRANCH TO LOAD RESULT COMMENT
  486testeq    mcw  202,*&8        MOVE D MODIFIER TO TEST CHARAC OP
  493scope2    bce  iseq,222,X     TEST EQUAL CHARACTERS
  501          bss  scope2,B       B ON TO SCOPE
  506          b    errpr2         BRANCH TO ERROR PRINT ROUTINE
  510iseq      bss  scope2,B       B ON TO SCOPE
  515result    lca  247,267        LOAD RESULT COMMENT
  522          bss  prntok,C       C ON TO CORRECT PRINT ROUTINE
  527          bin  last,          BRANCH TO SENSE D
               org  895
  895errpr1    bss  scope,B        B ON TO SCOPE
  900errpr2    lca  error,285      BEGIN ERROR PRINT ROUTINE
  907          bss  errhlt,E       E ON TO ERROR STOP
  912          w    last           ERROR PRINT
  916errhlt    h    last           ERROR STOP
  920          dcw  #1             WORD MARK
               org  950
  950prntok    lca  blank,285      CORRECT PRINT ROUTINE
  957          w                     ,,
  958last      bss  first,D        D ON TO REPEAT
  963          cs   280            CLEAR
  967          cs   80               ,,
  971          bin  bnx,           BRANCH TO READ NEXT RECORD
               org  hdrs-10
 1110error     dcw  @ERROR@        CONSTANTS
 1115blank     dcw  @     @          ,,
 1120          org  hdrs
 1120          dcw  @D MODIFIER          @     ,,
 1140          dcw  @B FIELD CHARACTERS  @     ,,
 1160          dcw  @RESULT SHOULD BE    @     ,,
 1180          dcw  @RESULT IS           @     ,,
     *
     * Title print routine.  Notice that in the original format,
     * the title and ID are in CC 49-77 of the last card -- the one
     * that transfers control to the program.
     *
     titlsw    equ  1252   1 to use title print routine
     hdrs      equ  1120   All programs put headers in 1120-1199
     titlex    equ  413    All routines must return here after title
     *
               org  1200
 1200titlpr    w                 Print (space).
 1201          sw   49           Set WM for Title and Block No.
 1205          lca  77,277       Load Title and Block No. in Print Area.
 1212          w                 Print Title and Block No.
 1213          cs   277          Clear Print Area
 1217          w                 Print (space).
 1218          cw   hdrs&20,hdrs&40  Clear Word Marks in second
 1225          cw   hdrs&60      line stored information.
 1229          lca  hdrs&69,270  Load second line.
 1236          w                 Print second line.
 1237          cs   270          Clear Print Area.
 1241          w    titlex       Print (space) and branch to main program.
 1245          dcw  #1
               org  titlsw
 1252          dcw  1
               end  start
