               job  First block of diagnostic tape
               ctl  6611
     *
     tapes1    equ  1268   blank indicates the tape loader
     taperd    equ  1288   tape read routine?
     tapes2    equ  gmwm   GM indicates the tape loader
     *
               org  1
    1start     b    enter
               dc   #3
    8          lca  huntlr&4,huntl&4  Restore huntl
   15          b    2409
               dc   #3
               dcw  #7
               dcw  #4
   33huntlr    b    hunt
               org  73
     id        dc   @1T02@
               dc   @C 20@
               org  377
  377indir     b    load2      Indirect to the loader or program
               org  393
  393enter     nop  one,titlsw
  400          h    long       Push start reset for simple search
  404          sw   gmwm,1273
  411          mcw  gm,gmwm
  418          lca  gmwm,bar   Block loading past 1250
  425          b    hunt
     one       dcw  1
     gm        dc   @"@
               dc   #2
  433long      cw   1273,1284  Search for full ID
  440          cw   1289,1290
  447          mcw  blanks,1299
  454          mcw  blanks
  458          b    load
     blanks    dcw  #9
               org  1300
     * Simple hunt for block number -- fits in 1400
 1300hunt      cs   81
 1304          rtw  1,1
 1312          lca  huntl&4,nxprog&4  Redirect chainer to here
 1319          lca  huntl&3,388
 1326          bef  1284
 1331          ber  hunter        Error                    
 1336          b    hunt,80,a     Skip header records      
 1344          bwz  maybe,id-2,2  If no zone, try it       
 1352          b    hunt
 1356maybe     c    id,1276       Desired one?             
 1363          b    wanteq,f
 1368          bu   indir         Enter program if unequal 
 1373          b    hunt
 1377wanteq    bu   hunt
 1382          b    indir         Enter program if equal   
 1386hunter    bsp  1
 1391huntl     b    hunt
               org  1660
               r    1
               h
     * Fancy hunt for block number
               org  3000
 3000load      h
     * Restart here after rewind
 3001loadrs    sw   bar           Put WM under GM at 1250 
 3005          sw   gmwm            and at 1398           
 3009          lca  gmwm,2999     Don't clobber loader!
     * Skip header records -- ones with "A" in column 80
 3016load2     cw   1273           
 3020          lca  1299,3499     Save search criteria
 3027          nop  0,0            
 3034          lca  zero2,count  
 3041loadr     mn   *,bar         Allow reading past 1250
 3048          cs   81             
 3052          rtw  1,1
 3060          bef  loadef
 3065          lca  3499,1299     Restore search criteria
 3072          nop  0,0            
 3079          lca  2999,bar      Restore gmwm at 1250
 3086          b    load2,80,a    Skip header records
     * Found a header record.  Look at ID in the next one. 
 3094          sw   1273                               
 3098          c    id,1276       Desired one?         
 3105          b    loadu,1277,1  Load if unequal
 3113          b    loadq,1277,2  Load if equal
 3121          c    id-2,1274                            
 3128          b    loadu,1277,3  Load if unequal
 3136          b    loadq,1277,4  Load if equal
 3144          b    loadt         Test tape error      
 3148loadu     bu   load2
 3153          b    loadt         Test tape error      
 3157loadq     bu   loadt
 3162          b    load2                              
               dc   #4
 3170loadt     ber  loadrr        Count errors         
 3175          b    goto          Go to the program
 3179          dc   #1
 3180loadrr    a    *-6,count
 3187          b    loadz,count-1,1  Count overflowed to ten?
 3195          bsp  1             Backspace       
 3200          b    loadr         Try again       
 3204loadz     cs   299           Ten read errors 
 3208          lca  blkcnt,280
 3215          lca
 3216          nop
 3217          nop
 3218          mcw  id&1,279      Replace error message by name
 3225          bss  loadnw,e      No error message if ss E on
 3230          w
 3231loadnw    h
     * Skip to a header record -- one with "A" in 80
 3232loadsk    cs   81
 3236          rtw  1,1
 3244          bef  loadef        Rewind and try again
 3249          b    load2,80,a    Check record after header
 3257          b    loadsk        Skip to record with "A" in 80
               dc   #9
               dcw  @PERM READ ERR BLOCK @
     blkcnt    dcw  @xxxxx.@      Should be block count
     * Go to the program
 3296goto2     nop  skipnz
 3300          nop  skipz
 3304          b    indir         Enter program
 3308skipnz    bwz  load2,74,2    Don't load if no zone
 3316          b    indir         Enter program
 3320skipz     bwz  load2,74,b    Don't load if zone
 3328          bwz  load2,74,k
 3336          bwz  load2,74,s
 3344          b    indir         Enter program
               dc   #2
     count     dcw  @xx@
     zero2     dcw  @00@
               dc   #6
 3360loadef    rwd  1
 3365          nop
 3366          b    loadrs
 3370goto         n00
 3375          b    goto2          Go to the program 
 3397          org  3397
     gmwm      dcw  @1"@
     *
     * Load the next program.  This is the card load routine.  It
     * gets modified by the tape load routine.
     *
               org  333
     *
     * Set up for one-field-per-card format and start loading
     *
  333          sw   8,12
  340reload    sw   1
  344          r    1
     *
     * Look for next program -- A in column 80 -- or detail card
     *
  348nxprog    r
  349tptest    bce  *&5,80,a
  357          b    421    Back to detail processing
  361          cs   reload,80
  368          dcw  #1
     *
     * 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.
     *
     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&79    Load second line.
 1233          w               Print second line.
 1234          cs   280        Clear Print Area.
 1238          w    titlex     Print (space) and branch to main program.
               dcw  #8
 1250bar       dc   #1         tape loader puts GMWM here
               dc   #1
 1252titlsw    dc   #1    1 to use title print routine
               end

