1401 Test Tape Loader

The first record on the IBM diagnostics tape contains a loader for the programs on the tape. After the initial load, it halts at 400 (I-address register 404) with the A-address register 433. Pushing start results in another halt at 3000 (I-star 3001). Then if 1277 is

1 The program is loaded if 73-76 ≠ 1273-1276

2 The program is loaded if 73-76 = 1273-1276

3 The program is loaded if 73-74 ≠ 1273-1274

4 The program is loaded if 73-74 = 1273-1274

Else The program isn’t loaded.

This is a routine that checks for errors and starts over at the beginning of the tape when the end-of-file is noticed. It occupies 3000-3498. Pushing start reset and then start after the halt at 400 causes positions 73-76 of tape records after headers to be compared with 1273-1276. It only checks program codes that have no zone in the second character (74). If sense switch F is on, it runs the first program that matches. If sense switch F is off, it runs the first program that doesn’t match. This loader fits on 1400-character machines.

1401 Test Tape and Decks — Revised

Programs can be stacked in the card reader, or run from tape. When run from tape, a program that selects which programs to run, called the chain loader, decides which programs to run based upon parameters pre-loaded into core. When run from cards, the chain loader simply loads the next program. The following are assumed to be in 181-199 when a program, including the tape chain loader, runs:

181  / for “run if target ID not equal to test ID,”

S for “run if target ID equal to test ID,” T for “run if target ID less than test ID,” U for “run if target ID greater than test ID,” Blank for “run everything.” B … G for “run if the specified sense switch is on.”

182  Last digit of address of target and test IDs: 3, 4, 5 or 6. Run everything if blank.
183-186 Target ID.
187-189 Top address to clear, max 3999, use 3999 if last character blank.
190  Print headers if not blank.
191-199 Programs can look here for options.

These can be loaded either from the console switches, or by a one-card loader:

  1     SW   8,12
  8     SW   19
 12     SW   26,30
 19     SW   37,44
 26     SW   45
 30     LCA  63,199         LOAD PARAMETERS
 37     MN   2,81           CLOBBER GM IN CASE LOADING FROM CARDS
 44     H
 45     DCW  #1    181      D MODIFIER FOR TARGET ID TEST
 46     DC   #1    182      LAST DIGIT OF ADDRESS FOR TARGET, 3-6
 47-50  DC   #4    183-186  TARGET ID
 51-53  DC   #3    187-189  TOP ADDRESS TO CLEAR, USE 3999 IF BLANK
 54     DC   #1    190      HEADER PRINTER PRINTS IF NOT BLANK
 55-63  DC   #12   188-199  PROGRAMS CAN LOOK HERE FOR OPTIONS

....5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80
,008012,019,026030,037044,045L063199D002081./#ididTTThBCDEFGHIJ  PARAMS     01 A
1      1   1      1      1   1      1      11

It is intended that this would be loaded from the card reader. When it halts, the tests would be loaded either from cards or tape. Core locations 1-80 are cleared before a program is run no matter whether it is run from cards or tape. If programs are run from tape, 100-180 and 200 to the address in 187-189 are also cleared. If 189 is blank, 3999 is used for the top address. If run from cards, core (including the parameter area from 181-199) is cleared if the clear storage cards (the first two produced by Autocoder) are included in the run deck, and not cleared otherwise. The clear storage cards should not be included ahead of the chain loader. Otherwise, every program will be run. Each test block consists of the test program header record, the test program, and its detail records. The first two detail records, which are present even if the program needs no other detail records, are the page headings that are printed if 190 is not blank. Header records are actually little programs that run in 1-80. All other programs are loaded into 201. The last address loaded is limited by the origin of the program that writes programs on tape – 3694 – but programs can use core at higher addresses, for example, for tape input/output areas. When run from cards, several decks can be stacked in the card reader. Each test program loads the next one. Program headers have A in column 80, ID in 73-76, C in 79 for the chain loader, T in 79 for test programs, E in 79 for the end-of-file program, an optional title in 49-71, and the following in 1-27 if it’s not an end-of-file program and the clear storage cards produced by Autocoder are included:

  1  SW   8,15
  8  SW   26,30
 15  B    26
     ORG  26
 26  R    1
 26  DCW  #1
....5...10...15...20...25...30
,008015,026030B026       1001
1      1      1          1   1

which works with all clear routines produced by Autocoder or SPS, or the following in 1-40, which only works for Autocoder programs, if the clear storage cards are removed:

  1  SW   8,15
  8  SW   36,40
 15  B    36
 36  R    1
 26  DCW  #1
....5...10...15...20...25...30...35...40
,008015,036040B036                 1001
1      1      1                    1   1

The program that writes programs onto tape replaces 1-30 by

  1  RTW  1,201
  9  BER  21
 14  CS   ###,80
 21  BSP  1
 26  H    1
 30  DCW  #1

....5...10...15...20...25...30
L%U1201RB018L/###080U%U1B.001
1       1    1      1    1   1

The ### is filled from the entry address on the END card of the program’s object deck. If the header is an end-of-file program, the following is expected in 1-36:

 1  SW   8,15
 8  SW   22,27
15  SW   31,32
22  RWD  1
27  NOP  99
31  H
32  B    1
36  DC   #1
....5...10...15...20...25...30...35.
,008015,022027,031032U%U1RN099.B001
1      1      1      1    1   11

Each program has a routine that reads and prints its page headings if 190 is not blank, and reads its detail records or the header record for the next program. It reads from cards if there are any. Then if there are no cards and 81 is a group mark (the tape drive deposits a group mark in 81 if the program is loaded from tape) it reads them from tape. If a header has A in column 80 the detail-reading routine branches to 1.

    *
    * Halts:
    * 99 in A-star and B-star if no more detail records and no header.
    *    Pushing start tries again.  If reading detail from tape it
    *    is nonetheless possible to read more detail from cards here.
    * 86 in A-star and B-star if tape error.  Pushing start tries again.
    *    It is possible to read more detail from cards here.
    *
              org  336            At 336 to allow chaining CS to W
    headpr    equ  190            Print first two detail if not blank.
336 headct    dcw  0              How many detail read?  Print first 2.
337 taperr    bsp  1              Backspace
342           nop  86             86 if tape error
346           h                   Halt with 86 in A-star and B-star
347 detail    sw   1,81           1 for header, 81 under GM if tape
354           blc  nocard         No cards left?
359           r    testhd         Read a detail or header card
363 nocard    bce  tapehd,81,"    Tape load puts GM in 81
371           b    finis
375 tapeof    bsp  1
380 finis     nop  99             99 if no tape or EOF
384           h                   Halt with 99 in A-star and B-star
385           b    detail         Try again
389 tapehd    rtw  1,1            Read a detail or header tape record
397           ber  taperr         Error?
402           bef  tapeof         Eof?
407 testhd    bce  1,80,a         Execute if a header
415           bce  cont,headct,2  Headers printed yet?
423           bce  skiphd,headpr,  Skip header printing?
431           lca  77,277         Print the first two headers
438           w

 439           cs
 440           cs
 441           w
 442 skiphd    a    *-6,headct
 449           b    detail
 453 cont      equ  *&1
     * Continue here after reading detail

The CONT label is where the program continues if the next record does not have A in column 80. If the program is run from tape, but one wants to read some detail records from cards and then read more from tape, put the following one-card program after the detail records read from cards:

  1  SW   8,15
  8  SW   22,29
 15  LCA  33,358  LCA  33,DETAIL&11
 22  CS   347,80  CS   DETAIL,80
 29  B    363     B    NOCARD
....5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80
,008015,022029L033358/347080B363
1      1      1      1      1

Loading programs onto tape

To write programs on tape, put the program to write programs on tape at the head of the deck. Then put a copy of the chain loader header and chain loader program ahead of each test block. Finally, put an end-of-file header at the end of the deck. The program that loads programs onto tape reads heading cards, programs and detail cards, and writes them to tape. The headers are modified as described above. All records on the tape are written with word marks. The sequence of records for a program block is

Header record Header records are read into 1-80, with word marks. This results in a group mark in 81. The header record loads the program.

Program Programs are written from 201 to their group mark with a word mark, and read into 201 with word marks when they are run. They should therefore not depend upon initializations of core below 201. Also, the parameter block that the chain loader and header printer use, and options that programs might find useful, are in 181-199.

Detail records Other than the page headings, these are optional.

The end-of-file header is not followed by a program or detail records. The sequence of program blocks on the tape is

Chain loader This program reads further on the tape and decides which programs to load and execute. It uses specifications in 181-186 to decide.

Test program This is the program that actually does the tests.

Program Listing – Write Chain Tape

 CLEAR STORAGE 1     ,008015,019026,030,034041,045,053,0570571026                                                 1
 CLEAR STORAGE 2     L068112,102106,113/101099/I99,027A070028)027B0010270B0261,001/001113I0                       2
 BOOTSTRAP           ,008015,022029,036040,047054,061068,072/061039              ,0010011040                      3
                           WRITE CHAIN TAPE                                                               PAGE    1
  SEQ PG LIN  LABEL  OP    OPERANDS                                            SFX CT  LOCN  INSTRUCTION TYPE  CARD
  101                JOB   WRITE CHAIN TAPE

102         *
103         * READ PROGRAM HEADERS, PROGRAMS AND DETAIL CARDS, AND WRITE THEM
104         * ON TAPE 6.  EVERYTHING IS WRITTEN WITH WORD MARKS, SO PROGRAMS
105         * NEED TO READ DETAIL RECORDS WITH WORD MARKS, AND NOT EXPECT
106         * WORD MARKS THEY SET TO BE PRESERVED.  THERE'S A WORD MARK IN 1
107         * FOR DETAIL RECORDS.
108         *
109         * PROGRAM HEADERS HAVE  A  IN COLUMN 80, ID IN 73-76,  C IN 79 FOR
110         * THE CHAIN LOADER, H IN 79 FOR THE PAGE HEADING PRINTING PROGRAM, T
111         * IN 79 FOR TEST PROGRAMS, E IN 79 FOR THE END-OF-FILE PROGRAM, AN
112         * OPTIONAL TITLE IN 49-71, AND THE FOLLOWING IN 1-27 IF IT'S NOT AN
113         * END-OF-FILE PROGRAM:
114         *
115         * ....5...10...15...20...25..
116         * ,008015,022026N0000001001
117         * 1      1      1      1   1
118         *
119         * ON THE TAPE, 1-27 ARE REPLACED BY
120         *
121         * ....5...10...15...20...25..
122         * L%U1201RB018LB###U%U1B.001
123         * 1       1    1   1    1   1
124         *
125         * THE ### IS FILLED FROM THE ENTRY ADDRESS ON THE END CARD OF THE
126         * PROGRAM'S OBJECT DECK.
127         *
128         * IF IT IS AN END-OF-FILE PROGRAM, THE FOLLOWING IS EXPECTED IN 1-36:
129         *
130         * ....5...10...15...20...25...30...35.
131         * ,008015,022027,031032U%U1RN099.B001
132         *
133         * THE SOURCE CODE FOR THIS IS AT THE END OF THIS DECK.
134         *
135         * THE PROGRAM IS WRITTEN ON THE TAPE FROM 201 UP TO ITS GMWM, AND
136         * IS READ BACK INTO 201.  THIS IS TO PRESERVE THE PARAMETER BLOCK
137         * AT 181-199.  THUS, THE PROGRAM SHOULDN'T BOTHER TO LOAD ANYTHING
138         * BELOW THAT.  IN PARTICULAR, IT SHOULDN'T DEPEND UPON INITIALIZING
139         * THE INDEX REGISTERS.
140         *
141         * PROGRAM DECKS ARE IN AUTOCODER FORMAT.
142         * THE PROGRAM CANNOT HAVE A GMWM WITHIN IT.  IF IT HAS NONE AT THE
143         * END, THE ONE JUST BEFORE "HEADER" WILL SERVE.
144         *
145         * THE ENTRY POINT FOR EVERY PROGRAM IS TAKEN FROM THE /XXX080 CARD
146         * AT THE END OF ITS DECK.
147         *
148         * HALTS IDENTIFIED BY A/B-STAR CONTENTS:
149         * 111 => TAPE WRITE ERROR, START WRITES BLANK TAPE AND RETRIES
150         * 666 => FIRST CARD IS NOT A HEADER, START READS ANOTHER
151         * 999 => DONE, START LOOPS ON THE HALT
152         *
153         SYSTP  EQU   %U6                                                         %U6
154         *
155         START  R                                                              1  0333  1                    4
156                BCE   HEADER,80,A   IS IT A HEADER                             8  0334  B G26 080 A          4
157                NOP   666                                                      4  0342  N 666                4
158                H                                                              1  0346  .                    4
159                B     START                                                    4  0347  B 333                4
160         *
161         * THIS GMWM IS FOR WRITING DETAIL RECORDS.
162         *
163                ORG   81                                                                 0081
164                DCW   @"@                                                      1  0081                       5
165         *
166         * THIS GMWM IS FOR WRITING HEADERS.
167         *
168                ORG   181                                                                0181
169                DCW   @"@                                                      1  0181                       6
170         *
171         * SOME CONSTANTS
172         *
173                ORG   3692                                                               3692
174         GMWM   DCW   @"@                                                      1  3692                       7
175                ORG   *&X00                                                              3700
176                ORG   *-100                                                              3600
177         BCLEAR EQU   *                                                           3599
178                ORG   GMWM&1                                                             3693
179         KCLEAR DSA   BCLEAR                                                   3  3695  E99                  7
180         * TAPE LOADER TO PUT IN THE HEADER THAT'S WRITTEN ON TAPE
181                RTW   1,201                                                    8  3696  L %U1 201 R          7
182                BER   21                                                       5  3704  B 021 L              7
183         ENTRY  CS    345,80                                                   7  3709  / 345 080            7
184                BSP   1                                                        5  3716  U %U1 B              7
185                H     1                                                        4  3721  . 001                7
186         TAPLDR DCW   #1                                                       1  3725                       8

187         *
188         * SAVE THE HEADER IN 101-180
189         *
190         HEADER SW    1,201        SET UP FOR AUTOCODER FORMAT, CLEAR          7  3726  , 001 201            8
191                LCA   80,180                                                   7  3733  L 080 180            8
192                BCE   WHEAD,79,E   END-FILE RECORD?                            8  3740  B H82 079 E          8
193         *
194         * LOAD AN AUTOCODER-FORMAT PROGRAM INTO LOW MEMORY.  ALL LOAD
195         * CARDS HAVE "1040" IN 68-71.
196         *
197                MCW   KCLEAR,CLEAR&3                                           7  3748  M F95 G62            8
198                CS    GMWM-1                                                   4  3755  / F91                8
199         CLEAR  CS    0-0                                                      4  3759  / 000                8
200                SW    CLEAR&1                                                  4  3763  , G60                9
201                A     @I0@,CLEAR&2  SUBTRACT 100 FROM CLEAR ADDRESS            7  3767  A I99 G61            9
202                CW    CLEAR&1                                                  4  3774  ) G60                9
203                BW    CLEAR,201    CLEAR MORE IF NOT ALL DONE                  8  3778  V G59 201 1          9
204         SKIP   R                  SKIP CLEAR CORE CARDS                       1  3786  1                    9
205                BCE   LOAD,68,1    BOOTSTRAP CARD?                             8  3787  B G99 068 1          9
206                B     SKIP                                                     4  3795  B G86                9
207         LOAD   MCW   RBACK,71     SETUP TO COME BACK TO LOADR                 7  3799  M H23 071           10
208                B     1            RUN BOOTSTRAP CARD TO SET WORD MARKS        4  3806  B 001               10
209         LOADL  MCW   RBACK,71     SETUP TO COME BACK TO LOADR                 7  3810  M H23 071           10
210                B     40           LOAD THE CARD                               4  3817  B 040               10
211         RBACK  DSA   LOADR                                                    3  3823  H24                 10
212         LOADR  BCE   LOADZ,40,/                                               8  3824  B H40 040 /         10
213                BCE   LOADL,68,1   LOAD THE CARD                               8  3832  B H10 068 1         11
214         *
215         * THE WHOLE PROGRAM HAS BEEN READ.  WRITE THE HEADER.
216         *
217         LOADZ  MCW   43,ENTRY&3                                               7  3840  M 043 G12           11
218                CS    80           CLEAR AUTOCODER LOADER'S WORD MARKS         4  3847  / 080               11
219                LCA   TAPLDR,130   OVERLAY THE HEADER'S CARD LOADER            7  3851  L G25 130           11
220                CHAIN 5                                                                             MACRO
221                LCA                                                            1  3858  L           GEN     11
222                LCA                                                            1  3859  L           GEN     11
223                LCA                                                            1  3860  L           GEN     11
224                LCA                                                            1  3861  L           GEN     12
225                LCA                                                            1  3862  L           GEN     12
226                B     WHEAD                                                    4  3863  B H82               12
227         WHEADE BSP   SYSTP                                                    5  3867  U %U6 B             12
228                NOP   111                                                      4  3872  N 111               12
229                H                                                              1  3876  .                   12
230                SKP   SYSTP        WRITE BLANK TAPE                            5  3877  U %U6 E             12
231         WHEAD  WTW   SYSTP,101    WRITE THE HEADER                            8  3882  L %U6 101 W         13
232                BER   WHEADE       ERROR                                       5  3890  B H67 L             13
233                BCE   DONE,179,E   END FILE PROGRAM?                           8  3895  B I84 179 E         13
234                B     LOADW                                                    4  3903  B I22               13
235         *
236         * ERROR HANDLER FOR WRITING THE PROGRAM
237         *
238         LOADE  BSP   SYSTP        ERROR HANDLER                               5  3907  U %U6 B             13
239                NOP   111                                                      4  3912  N 111               13
240                H                                                              1  3916  .                   13
241                SKP   SYSTP                                                    5  3917  U %U6 E             14
242         *
243         * WRITE THE PROGRAM
244         *
245         LOADW  WTW   SYSTP,201    WRITE THE PROGRAM                           8  3922  L %U6 201 W         14
246                BER   LOADE                                                    5  3930  B I07 L             14
247                SW    1            SO PROGRAMS CAN ASSUME IT                   4  3935  , 001               14
248         *
249         * WRITE DETAIL CARDS WITH WORD MARKS.
250         *
251         DETAIL R                                                              1  3939  1                   14
252                BCE   HEADER,80,A  IS IT A HEADER?                             8  3940  B G26 080 A         14
253         DETLW  WTW   SYSTP,1                                                  8  3948  L %U6 001 W         14
254                BER   DETLE                                                    5  3956  B I65 L             15
255                B     DETAIL                                                   4  3961  B I39               15
256         DETLE  BSP   SYSTP                                                    5  3965  U %U6 B             15
257                NOP   111                                                      4  3970  N 111               15
258                H                                                              1  3974  .                   15
259                SKP   SYSTP                                                    5  3975  U %U6 E             15
260                B     DETLW                                                    4  3980  B I48               15
261         *
262         * WRITE AN END-OF-FILE PROGRAM
263         *
264         DONE   WTM   SYSTP                                                    5  3984  U %U6 M             16
265         DONEL  NOP   999                                                      4  3989  N 999               16
266                H                                                              1  3993  .                   16
267                B     DONEL                                                    4  3994  B I89               16
268                LTORG                                                                    3998
                   DCW   @I0@                                                     2  3999              LIT     16
269                JOB   END-OF-FILE PROGRAM
270         *

271         * THE END-OF-FILE PROGRAM
272         *
273                ORG   1                                                                  0001
274                SW    A,B                                                      7  0001  , 008 015           17
275         A      SW    C,D                                                      7  0008  , 022 027           17
276         B      SW    E,F                                                      7  0015  , 031 032           17
277         C      RWD   1                                                        5  0022  U %U1 R             17
278         D      NOP   099                                                      4  0027  N 099               17
279         E      H                                                              1  0031  .                   17
280         F      BIN   1,                                                       5  0032  B 001               17
281                JOB
282                END   START                                                             / 333 080
SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS
A           8    B          15    BCLEAR   3599    C          22    CLEAR    3759    D          27    DETAIL   3939
DETLE    3965    DETLW    3948    DONE     3984    DONEL    3989    E          31    ENTRY    3709    F          32
GMWM     3692    HEADER   3726    KCLEAR   3695    LOAD     3799    LOADE    3907    LOADL    3810    LOADR    3824
LOADW    3922    LOADZ    3840    RBACK    3823    SKIP     3786    START     333    SYSTP   %U6      TAPLDR   3725
WHEAD    3882    WHEADE   3867

Program Listing – Chain Loader

CLEAR STORAGE 1     ,008015,019026,030,034041,045,053,0570571026                                                 1
CLEAR STORAGE 2     L068112,102106,113/101099/I99,027A070028)027B0010270B0261,001/001113I0                       2
BOOTSTRAP           ,008015,022029,036040,047054,061068,072/061039              ,0010011040                      3
                         CHAIN LOADER                                               CHAIN               PAGE    1
SEQ PG LIN  LABEL  OP    OPERANDS                                            SFX CT  LOCN  INSTRUCTION TYPE  CARD
101                JOB   CHAIN LOADER
102         *
103         * IF RUN FROM CARDS, JUST LOAD THE NEXT PROGRAM.
104         *
105         * OTHERWISE, LOAD THE PROGRAM SELECTED BY PARAMETERS IN
106         * 181-186.  CLEAR FROM 100-180 AND 200 TO THE ADDRESS IN
107         * 187-189.  IF 189 IS BLANK, USE 3999 FOR THE TOP ADDRESS
108         * TO CLEAR
109         *
110         * STOPS:
111         * 86 IN A-STAR AND B-STAR ON READ ERRORS.
112         * 99 IN A-STAR AND B-STAR ON END OF FILE.
113         *
114         * FIELDS IN HEADER RECORDS
115         *
116         ISHEAD EQU   80  A = FOR HEADER                                          0080
117         HEADTP EQU   79  T = TEST, C = CHAIN, H = PRINT, E = EOF                 0079
118         HEADID EQU   76                                                          0076
119         *
120         * RESERVED MEMORY TO CONTROL THE CHAIN LOADER AND EACH PROGRAM.
121         * THE LOW-ORDER DIGIT OF THE ADDRESS OF TARGID MUST BE SIX.
122         *
123         TARGEQ EQU   181  / FOR 'RUN TARGET IF UNEQUAL,'                         0181
124         *                 S FOR 'RUN TARGET IF EQUAL,'
125         *                 T FOR 'RUN IF TARGET ID LESS THAN TEST ID,'
126         *                 U FOR 'RUN IF TARGET ID GREATER THAN TEST ID,'
127         *                 B...G FOR 'RUN IF THE SPECIFIED SENSE SWITCH
128         *                       IS ON.'
129         *                 BLANK FOR UNCONDITIONAL
130         TARGNC EQU   182  LAST DIGIT OF TARGET ADDRESS 3-6                       0182
131         TARGID EQU   186  TARGET ID                                              0186
132         TOPADR EQU   189  TOP ADDRESS TO CLEAR, MAX 3999                         0189
133         *
134                ORG   201                                                                0201
135         *
136         * LOAD THE PROGRAM.  CLEAR CORE, EXCEPT FOR PARAMETER AREA, FIRST.
137         *
138                ORG   201                                                                0201
139         LOAD   SW    300             DONE WHEN THIS IS CLEARED                4  0201  , 300                4
140                LCA   TOP4K,CLEAR&3   DEFAULT TOP ADDRESS TO CLEAR             7  0205  L 263 234            4
141                BCE   CLEARL,TOPADR,  USE DEFAULT IF PARAMETER BLOCK BLANK     8  0212  B 227 189            4
142                MCW   TOPADR,CLEAR&4                                           7  0220  M 189 235            4
143         CLEARL CW    CLEAR&1                                                  4  0227  ) 232                4
144         CLEAR  CS    0-0            CLEAR A HUNDRED                           4  0231  / 000                4
145                SW    CLEAR&1                                                  4  0235  , 232                4
146                A     @I0@,CLEAR&2   SUBTRACT A HUNDRED                        7  0239  A 265 233            5
147                BW    CLEARL,300     MORE TO DO?                               8  0246  V 227 300 1          5
148                CS    1,299          CLEAR ME AND RUN THE HEADER               7  0254  / 001 299            5
149         TOP4K  DSA   3999                                                     3  0263  I99                  5
150                LTORG *                                                                  0264
                   DCW   @I0@                                                     2  0265              LIT      5
151         *
152         * START HERE

153         *
154         START  BCE   TAPE,81,"  TAPE LOAD DEPOSITS GM IN 81                   8  0266  B 282 081 "          5
155                SW    1                                                        4  0274  , 001                5
156                R     1                                                        4  0278  1 001                6
157         TAPE   LCA   GM,81        DON'T CLOBBER THE LOADER                    7  0282  L 452 081            6
158                CW    GM           SO THE HEADER CAN READ OTHER PROGRAMS       4  0289  ) 452                6
159         *
160         * SKIP TO A HEADER
161         *
162         SKIP1  RTW   1,1          READ A RECORD                               8  0293  L %U1 001 R          6
163                BER   SKIPER       OOPS, IT'S AN ERROR                         5  0301  B 323 L              6
164                BEF   SKIPEF       END OF FILE                                 5  0306  B 337 K              6
165                BCE   HEADER,ISHEAD,A  IT'S A HEADER                           8  0311  B 351 080 A          7
166                B     SKIP1        GO GET ANOTHER ONE                          4  0319  B 293                7
167         *
168         * ERROR WHILE HUNTING FOR A HEADER RECORD
169         *
170         SKIPER BSP   1            BACKSPACE                                   5  0323  U %U1 B              7
171         SKIPQ  NOP   86                                                       4  0328  N 086                7
172                H                                                              1  0332  .                    7
173                B     SKIP1        TRY AGAIN                                   4  0333  B 293                7
174         *
175         * END OF FILE WHILE HUNTING FOR A HEADER RECORD
176         *
177         SKIPEF RWD   1            REWIND                                      5  0337  U %U1 R              7
178                NOP   99                                                       4  0342  N 099                8
179                H                                                              1  0346  .                    8
180                B     SKIP1        TRY AGAIN                                   4  0347  B 293                8
181         *
182         * HEADER RECORD.
183         *
184         HEADER BCE   SKIP2,HEADTP,C   SKIP CHAIN LOADERS                      8  0351  B 415 079 C          8
185                BCE   SKIPEF,HEADTP,E  END OF FILE RECORD                      8  0359  B 337 079 E          8
186                BCE   LOAD,TARGNC,     TARGET ADDRESS DIGIT IS BLANK           8  0367  B 201 182            8
187                MN    TARGNC,HEADC&3   SET UP COMPARE                          7  0375  D 182 406            9
188                MN    TARGNC,HEADC&6                                           7  0382  D 182 409            9
189                SW    TARGEQ,TARGID-3                                          7  0389  , 181 183            9
190                MCW   TARGEQ,HEADB&4  SET UP BRANCH STATUS                     7  0396  M 181 414            9
191         HEADC  C     HEADID,TARGID   TEST FOR TARGET                          7  0403  C 076 186            9
192         HEADB  BIN   LOAD,*       BRANCH TO HEADER IF COMPARE SUCCEEDS        5  0410  B 201 *             10
193         SKIP2  RTW   1,1          SKIP PROGRAM RECORD                         8  0415  L %U1 001 R         10
194                BER   SKIP2E       OOPS, IT'S AN ERROR                         5  0423  B 437 L             10
195                BEF   SKIPEF       END OF FILE                                 5  0428  B 337 K             10
196                B     SKIP1        HUNT FOR HEADER                             4  0433  B 293               10
197         SKIP2E BSP   1            BACKSPACE                                   5  0437  U %U1 B             10
198                NOP   86                                                       4  0442  N 086               10
199                H                                                              1  0446  .                   11
200                BIN   SKIP2,                                                   5  0447  B 415               11
201         *
202         GM     DCW   @"@                                                      1  0452                      11
203         *
204                END   START                                                             / 266 080
SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS
CLEAR     231    CLEARL    227    GM        452    HEADB     410    HEADC     403    HEADER    351    HEADID     76
HEADTP     79    ISHEAD     80    LOAD      201    SKIP1     293    SKIP2     415    SKIP2E    437    SKIPEF    337
SKIPER    323    SKIPQ     328    START     266    TAPE      282    TARGEQ    181    TARGID    186    TARGNC    182
TOP4K     263    TOPADR    189

1-6 Lengths of up to five instructions in test

7-45 Instructions to implement test

46-52 A field

53-66 B field

67-80 Correct result

A test can consist of up to seven instructions, provided the last one is an unconditional branch (which it almost certainly will be), since a five-character branch with a blank D-modifier doesn’t need a word mark. The infrastructure sets word marks in 46, 56 and 76. Then it sets a word mark in 7, and thereafter up to six more according to the lengths given in 1-6. The test is run by branching to 7. The test should return to WORKED if the test succeeds, and FAILED if it fails (see the listing below).

Program Listing – Infrastructure for one-card tests

CLEAR STORAGE 1     ,008015,022026,030037,044,049,053053N000000N00001026                                         1
CLEAR STORAGE 2     L068116,105106,110117B101/I9I#071029C029056B026/B001/0991,001/001117I0?                      2
BOOTSTRAP           ,008015,022029,036040,047054,061068,072/061039              ,0010011040                      3
                         TEST INFRASTRUCTURE                                                            PAGE    1
SEQ PG LIN  LABEL  OP    OPERANDS                                            SFX CT  LOCN  INSTRUCTION TYPE  CARD
101                JOB   TEST INFRASTRUCTURE
102         *
103         * SENSE SWITCHES:
104         * B ON FOR TIGHTEST LOOP -- FOR SCOPING
105         * C ON TO PRINT CORRECT RESULTS
106         * D ON TO LOOP OVER TEST PLUS PRINTING
107         * E ON TO HALT ON ERROR INSTEAD OF PRINTING
108         *
109         * DETAIL FORMAT:
110         * 1-6   LENGTHS OF UP TO SIX INSTRUCTIONS IN TEST
111         * 7-45  INSTRUCTIONS TO IMPLEMENT TEST
112         * 46-52 A FIELD OR D MODIFIER
113         * 53-66 B FIELD
114         * 67-80 CORRECT RESULT
115         *
116         * HALTS:
117         * 086 IN A-STAR AND B-STAR IF TAPE READ ERROR
118         * 099 IN A-STAR AND B-STAR IF TEST FAILURE
119         *
120                ORG   333                                                                0333
121         *
122         * PAGE HEADING
123         *
124         START  CS    332                                                      4  0333  / 332                4
125                CS                                                             1  0337  /                    4
126                MCW   @A/D----@,207         201-207                            7  0338  M 619 207            4
127                MCW   @B-------------@,229  216-229                            7  0345  M 633 229            4
128                MCW   @SHOULD BE-----@,249  236-249                            7  0352  M 647 249            4
129                MCW   @ACTUAL--------@,269  256-269                            7  0359  M 661 269            4
130                MCW   @STATUS@,281          276-285                            7  0366  M 667 281            5
131                W                                                              1  0373  2                    5
132                CS                                                             1  0374  /                    5
133                CS                                                             1  0375  /                    5
134         *
135         * READ A TEST AND EXECUTE IT
136         *
137         READIT BCE   TAPEIN,81,"  TAPE LOAD PUTS GM IN 81                     8  0376  B 402 081 "          5
138                CS    80           START FRESH                                 4  0384  / 080                5
139                R     GOTIT                                                    4  0388  1 415                5
140         TAPERR BSP   1                                                        5  0392  U %U1 B              6
141                NOP   86           HALT 86 FOR TAPE ERROR                      4  0397  N 086                6
142                H                                                              1  0401  .                    6
143         TAPEIN RT    1,1                                                      8  0402  M %U1 001 R          6
144                BER   TAPERR                                                   5  0410  B 392 L              6
145         *
146         * GOT A DETAIL RECORD.  PRINT IT IF 1 IS *
147         *
148         GOTIT  BCE   PRNTDR,1,*                                               8  0415  B 427 001 *          6
149         HOOK   B     SETUP                                                    4  0423  B 446                6
150         PRNTDR SW    1        PRINT THE DETAIL RECORD                         4  0427  , 001                7
151                MCW   80,280                                                   7  0431  M 080 280            7
152                W                                                              1  0438  2                    7
153                CS    READIT,280                                               7  0439  / 376 280            7
154         *
155         * SET WORD MARKS FOR UP TO SIX INSTRUCTIONS
156         *
157         SETUP  MCW   @07@,SW&3    REFRESH CHANGED INSTRUCTIONS                7  0446  M 669 472            7
158                MCW   @1@,ADD&3                                                7  0453  M 670 480            7
159                SW    6                                                        4  0460  , 006                7
160                CHAIN 5                                                                             MACRO
161                SW                                                             1  0464  ,           GEN      8
162                SW                                                             1  0465  ,           GEN      8
163                SW                                                             1  0466  ,           GEN      8
164                SW                                                             1  0467  ,           GEN      8
165                SW                                                             1  0468  ,           GEN      8
166         SW     SW    0-0          SET WORD MARK UNDER INSTRUCTION             4  0469  , 000                8
167                SW    SW&1                                                     4  0473  , 470                8
168         ADD    A     0-0,SW&3     BUMP WHERE TO SET WORD MARK                 7  0477  A 000 472            9
169                CW    SW&1                                                     4  0484  ) 470                9
170                BCE   DONESW,ADD&3,7  DONE SETTING WORD MARKS?                 8  0488  B 507 480 7          9
171                A     *-6,ADD&3    BUMP INSTRUCTION WIDTH COUNTER              7  0496  A 496 480            9
172                B     SW           GO SET ANOTHER WORD MARK                    4  0503  B 469                9
173         *
174         * DONE SETTING WORD MARKS UNDER INSTRUCTIONS
175         * SET WORD MARKS FOR A, B, CORRECT AND ID FIELDS
176         * MOVE FIELDS TO PRINT AREA
177         *

178         DONESW SW    46,53        SET WORD MARKS FOR A, B                     7  0507  , 046 053            9
179                SW    67             AND SHOULD BE FIELDS                      4  0514  , 067               10
180                MCW   52,207       LOAD A FIELD TO PRINT AREA                  7  0518  M 052 207           10
181                MCW   66,229            B FIELD                                7  0525  M 066 229           10
182                MCW   80,249            SHOULD BE                              7  0532  M 080 249           10
183         *
184         * RUN THE TEST
185         *
186                B     7                                                        4  0539  B 007               10
187         *
188         * RETURN  HERE FOR SUCCESS
189         *
190         WORKED BSS   7,B          TIGHT LOOP FOR SCOPING                      5  0543  B 007 B             10
191                BSS   PRNTOK,C     PRINT CORRECT RESULT                        5  0548  B 557 C             10
192                B     TESTD                                                    4  0553  B 574               11
193         PRNTOK MCW   @OK@,277                                                 7  0557  M 672 277           11
194         PRNTIT MCW   66,269       ACTUAL RESULT                               7  0564  M 066 269           11
195                W                                                              1  0571  2                   11
196                CS                                                             1  0572  /                   11
197                CS                                                             1  0573  /                   11
198         TESTD  BSS   7,D          LOOSE LOOP -- TEST & PRINT                  5  0574  B 007 D             11
199                B     READIT       GO DO ANOTHER TEST                          4  0579  B 376               12
200         *
201         * RETURN HERE FOR FAILURE
202         *
203         FAILED BSS   7,B          TIGHT LOOP FOR SCOPING                      5  0583  B 007 B             12
204                BSS   ERRHLT,E     ERROR HALT?                                 5  0588  B 604 E             12
205                MCW   @ERROR@,280                                              7  0593  M 677 280           12
206                B     PRNTIT                                                   4  0600  B 564               12
207         ERRHLT NOP   99           HALT 99 FOR TEST FAILURE                    4  0604  N 099               12
208                H                                                              1  0608  .                   12
209                B     TESTD                                                    4  0609  B 574               13
                   DCW   @A/D----@                                                7  0619              LIT     13
                   DCW   @B-------------@                                        14  0633              LIT     13
                   DCW   @SHOULD BE-----@                                        14  0647              LIT     13
                   DCW   @ACTUAL--------@                                        14  0661              LIT     14
                   DCW   @STATUS@                                                 6  0667              LIT     14
                   DCW   @07@                                                     2  0669              LIT     14
                   DCW   @1@                                                      1  0670              LIT     14
                   DCW   @OK@                                                     2  0672              LIT     14
                   DCW   @ERROR@                                                  5  0677              LIT     14
210                END   START                                                             / 333 080
SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS
ADD       477    DONESW    507    ERRHLT    604    FAILED    583    GOTIT     415    HOOK      423    PRNTDR    427
PRNTIT    564    PRNTOK    557    READIT    376    SETUP     446    START     333    SW        469    TAPEIN    402
TAPERR    392    TESTD     574    WORKED    543

Program Listing – Test examples

* Test BCE equal and unequal                                               0050
840000b5430538b583                           8      8             BRANCH
811400b5830551bbb543                         1       24           NO BRANCH
* Test BWZ equal and unequal                                               0060
840000v543054bb583                           B       A            BRANCH
811140v583056Bvvvb543                        B      *KT4          NO BRANCH
* Test Compare and branch unequal                                          0100
754000c049056b543/b583                         h7     hh          UNEQUAL
754000c049056b583/b543                         rw     rw          EQUAL
754000c049057b543/b583 uneq because b longer   rw      rw         UNEQUAL
* Test load chain
714750L057157L)153C155076B583/B543           111111111111         1111111111
714750L057157L)153C155076B583/B543           akt4 akt4            akt4 akt4

Program Listing – Test examples output

A/D----        B-------------      SHOULD BE-----      ACTUAL--------      STATUS
* TEST BCE EQUAL AND UNEQUAL                                               0050
8              8                   BRANCH              8                   OK
1               24                 NO BRANCH            24                 OK
* TEST BWZ EQUAL AND UNEQUAL                                               0060
B               A                  BRANCH               A                  OK

B              *KT4                NO BRANCH           *KT4                OK
* TEST COMPARE AND BRANCH UNEQUAL                                          0100
  H7             HH                UNEQUAL               HH                OK
  RW             RW                EQUAL                 RW                OK
  RW              RW               UNEQUAL                RW               OK
* TEST LOAD CHAIN                                      NOT MEANINGFUL      0110
1111111        11111               1111111111          11111               OK
AKT4 AK        T4                  AKT4 AKT4           T4                  OK

To take over the test infrastructure with a bigger program than will fit on one card: followed by an autocoder-format deck, without clear or bootstrap cards. After reporting the status of a test, the infrastructure still reads a detail record, sets word marks as above, and returns to 7 to process each detail record. So the first five columns should have 400000, and 7-10 should have a branch into the loaded test. If the word marks are not wanted, change the branch to SETUP at HOOK to branch to the test. The test should nonetheless set a word mark at 7, and plant a branch to the test there, because the loops on sense switches B and D return to 7. To halt with 777 in A-star and B-star when everything is done (as opposed to waiting on an empty card reader:

414000n777.b007                                        Halt when done      9999

Listing of Tests

There is a program that lists the one-card tests. Output produced from above input is below. It shows the word marks under the code.

CODE                                        A/D         B                     EXPECT
..10...15...20...25...30...35...40...45     ...50..     .55...60...65.     ..70...75...80
 * TEST BCE EQUAL AND UNEQUAL                                               0050
B5430538B583                                8           8                  BRANCH
1       1   1
B5830551BBB543                              1            24                NO BRANCH
1       111   1
 * TEST BWZ EQUAL AND UNEQUAL                                               0060
V543054BB583                                B            A                 BRANCH
1       1   1
V583056BVVVB543                             B           *KT4               NO BRANCH
1       1111   1
 * TEST COMPARE AND BRANCH UNEQUAL                                          0100
C049056B543/B583                              H7          HH               UNEQUAL
1      1    1   1
C049056B583/B543                              RW          RW               EQUAL
1      1    1   1
C049057B543/B583 UNEQ BECAUSE B LONGER        RW           RW              UNEQUAL
1      1    1   1
 * TEST LOAD CHAIN                                      NOT MEANINGFUL      0110
L057157L)153C155076B583/B543                1111111     11111              1111111111
1      11   1      1    1
L057157L)153C155076B583/B543                AKT4 AK     T4                 AKT4 AKT4
1      11   1      1    1

Yet another test infrastructure

A small program prints page headings, prints test results, tests sense switches, loads tests, and reads detail records and runs tests. Records with a 12 zone in 80 and * in column 1 are simply printed. Header cards that have * in column 1 contain:

1-72 Comment.

73-77 Test block ID.

78-80 Sequence number

The test block ID is copied to 292-296 and the sequence number is copied to 298-300. The comment is copied to 201-272. Then if 190 is not blank, the print area is printed. Each test program is taken from a card with a 12 zone in column 80, but not * in column 1. Header cards that do not have * in 1 contain:

1-7 Lengths of instructions.

8-72 Test program and title.

73-77 Test block ID.

78-80 Sequence number

The test block ID is copied to 292-296 and the sequence number is copied to 298-300. The test program and title in 8-72 are copied to 201-266 and 401-466 with word marks set as indicated by 1-7. Then if 190 is not blank, the print area is printed, with word marks. After the test program is loaded, the infrastructure reads detail records, which do not have a 12 zone in column 80. Detail records have six fields, which are copied to the print area:

Card  Print
Columns Columns Contents
1-20  201-220 A field or D modifier
21-40  222-241 B field
243-262 Test result
41-60  264-283 Correct result
61-72  302-313 Comment
73-77  292-296 Test block ID
78-80  298-300 Sequence number

After the detail record is loaded, the infrastructure branches to 401. Test programs should develop the result in the print area, and then branch to the infrastructure at one of the following addresses:

Address Label  Function
669  FAILED  The test failed; rerun if SSB is on for scoping, else do error processing.
674  FAILNS  The test failed; don’t test SSB; do error processing. Presumably the test

program tests SSB for a tighter scoping loop. 636 WORKED The test worked; rerun if SSB is on for scoping, else do successful test

processing.

641 WORKNS The test worked; don’t test SSB; do successful test processing, Presumably the test program tests SSB for a tighter scoping loop. 699 COMPAR Compare the test result in 243-262 to the correct result in 264-283, and

branch to FAILED or WORKED depending upon whether the result is unequal or not.

715 COMPNS Compare the test result in 243-262 to the correct result in 264-283, and branch to FAILNS or WORKNS depending upon whether the result is unequal or not.

706 TEST Branch to FAILED or WORKED depending upon whether the unequal

indicator is set.

722 TESTNS Branch to FAILNS or WORKNS depending upon whether the unequal indicator is set.

Sense switches are used as follows:

B If on, execute a tight loop around the test, for scope analysis.

C If on, print correct test results.

D If on, repeat the test without reading another detail record. This is useful for catching erratic errors.

E If on, halt on failures instead of printing.

F, G Not used by the infrastructure.

When the infrastructure starts, it tests three instructions superficially, to make sure they work well enough to run the infrastructure. If any fail, the infrastructure halts. The infrastructure also halts if a tape error occurs while reading records from tape, or if a test fails and SSE is on. The halts are identified by having the following values in the A- and B-address registers:

001 BWZ cannot reliably detect a 12 zone.

002 Compare appears not to work.

003 Add appears not to work.

086 Tape error when reading a record from tape.

099 Test failure.

Program Listing – Infrastructure for one-card tests

BOOTSTRAP NO CLEAR  ,008015,022029,036040,047054,061068,072/061039              ,0010011040                      3
                         INFRASTRUCTURE FOR ONE-CARD TESTS.                                             PAGE    1
SEQ PG LIN  LABEL  OP    OPERANDS                                            SFX CT  LOCN  INSTRUCTION TYPE  CARD
101                JOB   INFRASTRUCTURE FOR ONE-CARD TESTS.
102         *
103         * FIRST CARD OF A TEST BLOCK:
104         *
105         * 1-7   WIDTHS OF UP TO SIX INSTRUCTIONS
106         * 8-72  CODE TO BE LOADED STARTING AT 401, FOLLOWED BY A TITLE.
107         *       THE WORD MARK AT 401 IS SET AUTOMATICALLY.  ONE IS NOT
108         *       NEEDED AT THE END IF IT IS A BRANCH INSTRUCTION WITH A
109         *       BLANK D MODIFIER.
110         * 73-77 TEST BLOCK ID
111         * 78-80 SEQUENCE NUMBER PLUS 12-ZONE IN 80
112         *
113         * DETAIL CARDS:
114         *
115         *  1-20 A OR D FIELD.  THIS IS PRINTED IN 201-220.
116         * 21-40 B FIELD.  THIS IS PRINTED IN 222-241.
117         * 41-60 CORRECT RESULT.  THIS IS PRINTED IN 264-283.
118         * 61-72 COMMENT.  THIS IS PRINTED IN 302-313 (IF YOUR PRINTER
119         *       HAS 132 COLUMNS).
120         * 73-77 TEST BLOCK ID.  THIS IS PRINTED IN 292-296.
121         * 78-80 SEQUENCE NUMBER.  THIS IS PRINTED IN 298-300.
122         *
123         RA     EQU   20   READER AREA A FIELD                                    0020
124         RB     EQU   40   READER AREA B FIELD                                    0040
125         RCORR  EQU   60   READER AREA CORRECT RESULT FIELD                       0060
126         RCOMM  EQU   72   READER AREA COMMENT                                    0072
127         RID    EQU   77   READER AREA ID                                         0077
128         RSEQ   EQU   80   READER AREA SEQUENCE FIELD                             0080
129         *
130         PA     EQU   220  PRINTER AREA A FIELD                                   0220
131         PB     EQU   241  PRINTER AREA B FIELD                                   0241
132         PRES   EQU   262  PRINTER AREA RESULT FIELD                              0262
133         PCORR  EQU   283  PRINTER AREA CORRECT RESULT FIELD                      0283
134         PSTAT  EQU   290  PRINTER AREA TEST STATUS FIELD                         0290
135         PID    EQU   296  PRINTER AREA ID                                        0296
136         PSEQ   EQU   300  PRINTER AREA SEQUENCE FIELD                            0300
137         PCOMM  EQU   313  PRINTER AREA COMMENT                                   0313
138         *
139         * HEADER PROCESSING:
140         * 7-72 IS PUT INTO 401-465 AND 201-265.  WORD MARKS ARE SET AS
141         * INDICATED IN 1-6.  THE TEST BLOCK ID IN 73-77 IS PUT INTO
142         * 292-296.  IF 190 IS NOT BLANK THE HEADER IS PRINTED, WITH
143         * WORD MARKS.

144         *
145         * DETAIL PROCESSING:
146         * WORD MARKS ARE SET IN 1, 21, 41, 61, 73 AND 78.  THE DETAIL
147         * FIELDS ARE LOADED INTO THE PRINT AREA.  THE B FIELD IS ALSO
148         * LOADED INTO 243-262, WHICH IS THE RESULT FIELD.  CONTROL
149         * BRANCHES TO 401.  AT THE END OF PROCESSING, CONTROL SHOULD
150         * BRANCH TO
151         * FAILED (669) IF THE TEST FAILED,
152         * FAILNS (674) IF THE TEST FAILED AND NO SCOPING (SS B) TEST
153         *   SHOULD BE DONE,
154         * WORKED (636) IF THE TEST WORKED,
155         * WORKNS (641) IF THE TEST WORKED AND NO SCOPING (SS B) TEST
156         *   SHOULD BE DONE,
157         * COMPAR (699) IF THE INFRASTRUCTURE IS TO COMPARE THE RESULT
158         *   FIELD (243-262) TO THE CORRECT RESULT FIELD (264-283) AND
159         *   BRANCH TO FAILED OR WORKED DEPENDING UPON WHETHER THE
160         *   RESULT IS UNEQUAL OR EQUAL,
161         * TEST (706) IF THE LOADED CODE HAS DONE A COMPARE AND THE
162         *   UNEQUAL INDICATOR IS TO BE TESTED AS FOR COMPAR,
163         * COMPNS (715) AS FOR COMPAR, BUT NO SCOPING (SS B) TEST SHOULD
164         *   BE DONE,
165         * TESTNS (722) AS FOR TEST, BUT NO SCOPING (SS B) TEST SHOULD
166         *   BE DONE.
167         *
168         * HALTS (INDICATED BY CONTENTS OF A-ADDR AND B-ADDR):
169         * 001 -- BWZ CANNOT RELIABLY DETECT A 12 ZONE.
170         * 002 -- COMPARE APPEARS NOT TO WORK.
171         * 003 -- ADD APPEARS NOT TO WORK.
172         * 086 -- TAPE ERROR IF TEST READ FROM TAPE.
173         * 099 -- TEST FAILED.
174         *
175         * SENSE SWITCHES:
176         * B -- TIGHT LOOP AROUND TEST, FOR SCOPING
177         * C -- PRINT CORRECT RESULTS
178         * D -- REPEAT ENTIRE TEST WITH SAME DETAIL -- USEFUL FOR ERRATIC
179         *      ERRORS
180         * E -- HALT IF ERROR
181         * F -- NOT USED BY THE INFRASTRUCTURE
182         * G -- NOT USED BY THE INFRASTRUCTURE
183         *
184         * START WITH SOME SELF TESTS.
185         * VERIFY THAT BWZ CAN DETECT A 12 ZONE:
186         *
187         START  BWZ   V2,*,B        GOOD IF BRANCH                             8  0333  V 350 340 B          4
188         V1     NOP   001           001 = BCE FAILED                           4  0341  N 001                4
189                H                                                              1  0345  .                    4
190                B     START                                                    4  0346  B 333                4
191         V2     BWZ   V1,START&7,K  BAD IF BRANCH -- START&7 HAS 12 ZONE       8  0350  V 341 340 K          4
192         *
193         * VERIFY THAT COMPARE CAN DETECT UNEQUAL FIELDS.  THIS IS ONLY
194         * NEEDED TO VERIFY THAT ADD WORKS CORRECTLY.
195         *
196                C     V2&7,START&7                                             7  0358  C 357 340            4
197                BU    C2            GOOD IF UNEQUAL BRANCH                     5  0365  B 379 /              4
198         C1     NOP   002           002 = COMPARE / BRANCH UNEQUAL FAIL        4  0370  N 002                5
199                H                                                              1  0374  .                    5
200                B     START                                                    4  0375  B 333                5
201         C2     C     V2&7,V2&7                                                7  0379  C 357 357            5
202                BU    C1            BAD IF UNEQUAL BRANCH                      5  0386  B 370 /              5
203                B     ADDTST        SKIP CODE LOAD AREA                        4  0391  B 467                5
204         *
205         * TEST CODE IS LOADED HERE.
206         *
207                ORG   401                                                                0401
208         CODE1  EQU   *&1                                                         0401
209         CODE   DS    65                                                          0465
210                DS    1             IN CASE LAST IS B NEEDING BLANK D             0466
211         *
212         * VERIFY THAT ADD WORKS WELL ENOUGH TO SET THE WORD MARKS.
213         *
214         ADDTST LCA   @200@,203                                                7  0467  L 962 203            6
215                A     *-6,203                                                  7  0474  A 474 203            6
216                C     203,@201@     IS 200 & 1 EQUAL TO 201?                   7  0481  C 203 965            6
217                BU    S1            FAIL IF UNEQUAL                            5  0488  B 497 /              6
218                B     DETAIL        START THE TEST SEQUENCES                   4  0493  B 506                6
219         S1     NOP   003                                                      4  0497  N 003                6
220                H                                                              1  0501  .                    6
221                B     START                                                    4  0502  B 333                7
222         *
223         * READ A RECORD FROM CARD OR TAPE.  TAPE INPUT IS INDICATED
224         * BY A GM IN 81.  SE PUT A WM UNDER IT SO LONG RECORDS WILL
225         * NOT CLOBBER US.  A  IN COLUMN 80 IS A HEADER.  OTHERWISE
226         * BRANCH TO 401 TO EXECUTE THE TEST.
227         *
228         DETAIL SW    81            IN CASE OF GM THERE                        4  0506  , 081                7

229         READIT BCE   TAPEIN,81,"   TAPE LOAD PUTS GM IN 81                    8  0510  B 541 081 "          7
230                CS    80            START FRESH                                4  0518  / 080                7
231                CS    332                                                      4  0522  / 332                7
232                CS                                                             1  0526  /                    7
233                R     GOTIT                                                    4  0527  1 554                7
234         TAPERR BSP   1                                                        5  0531  U %U1 B              8
235                NOP   86            HALT 86 FOR TAPE ERROR                     4  0536  N 086                8
236                H                                                              1  0540  .                    8
237         TAPEIN RT    1,1                                                      8  0541  M %U1 001 R          8
238                BER   TAPERR                                                   5  0549  B 531 L              8
239         *
240         * GOT A RECORD.
241         *
242         GOTIT  BWZ   HEADER,80,B   HEADER?                                    8  0554  V 731 080 B          8
243         *
244         * DETAIL RECORD
245         *
246                SW    RA-19,RB-19                                              7  0562  , 001 021            8
247                SW    RCORR-19,RCOMM-11                                        7  0569  , 041 061            9
248                SW    RID-4,RSEQ-2                                             7  0576  , 073 078            9
249                LCA   RA,PA         A FIELD                                    7  0583  L 020 220            9
250                LCA   RB,PB         B FIELD                                    7  0590  L 040 241            9
251                LCA   RCORR,PCORR   CORRECT RESULT FIELD                       7  0597  L 060 283            9
252                MCW   RID,PID       ID FIELD                                   7  0604  M 077 296           10
253                LCA   RSEQ,PSEQ     SEQUENCE NUMBER FIELD                      7  0611  L 080 300           10
254                MCW   RCOMM,PCOMM   COMMENT                                    7  0618  M 072 313           10
255         SCOPE  LCA   RB,PRES       ACTUAL RESULT FIELD STARTS AS B            7  0625  L 040 262           10
256                B     CODE1         RUN THE TEST                               4  0632  B 401               10
257         *
258         * RETURN HERE FOR SUCCESS
259         *
260         WORKED BSS   SCOPE,B      TIGHT LOOP FOR SCOPING                      5  0636  B 625 B             10
261         * RETURN HERE FOR SUCCESS BUT NO SCOPING TEST
262         WORKNS BSS   PRNTOK,C     PRINT CORRECT RESULT                        5  0641  B 650 C             11
263                B     TESTD                                                    4  0646  B 660               11
264         PRNTOK MCW   @OK@,PSTAT-4                                             7  0650  M 967 286           11
265         PRNTIT W                                                              1  0657  2                   11
266                CS                                                             1  0658  /                   11
267                CS                                                             1  0659  /                   11
268         TESTD  BSS   SCOPE,D      LOOSE LOOP -- TEST & PRINT                  5  0660  B 625 D             11
269                B     READIT       GO DO ANOTHER TEST                          4  0665  B 510               12
270         *
271         * RETURN HERE FOR FAILURE
272         *
273         FAILED BSS   SCOPE,B      TIGHT LOOP FOR SCOPING                      5  0669  B 625 B             12
274         * RETURN HERE FOR FAILURE BUT NO SCOPING TEST
275         FAILNS BSS   ERRHLT,E     ERROR HALT?                                 5  0674  B 690 E             12
276                MCW   @ERROR@,PSTAT-1                                          7  0679  M 972 289           12
277                B     PRNTIT                                                   4  0686  B 657               12
278         ERRHLT NOP   99           HALT 99 FOR TEST FAILURE                    4  0690  N 099               12
279                H                                                              1  0694  .                   12
280                B     TESTD                                                    4  0695  B 660               13
281         *
282         * RETURN HERE TO COMPARE B TO CORRECT AND ANNOUNCE
283         * ERROR IF UNEQUAL.
284         *
285         COMPAR C     PRES,PCORR                                               7  0699  C 262 283           13
286         TEST   BU    FAILED                                                   5  0706  B 669 /             13
287                B     WORKED                                                   4  0711  B 636               13
288         *
289         * RETURN HERE TO COMPARE B TO CORRECT AND ANNOUNCE
290         * ERROR IF UNEQUAL, WITHOUT SCOPING TEST
291         *
292         COMPNS C     PRES,PCORR                                               7  0715  C 262 283           13
293         TESTNS BU    FAILNS                                                   5  0722  B 674 /             13
294                B     WORKNS                                                   4  0727  B 641               13
295         *
296         * RECORD IS A HEADER.
297         *
298         HEADER BCE   PRNTHD,1,*    PRINT HEADERS WITH * IN 1                  8  0731  B 916 001 *         14
299                SW    8             WORD MARKS UNDER FIRST INSTRUCTION         4  0739  , 008               14
300                CHAIN 7               AND WIDTHS                                                    MACRO
301                SW                                                             1  0743  ,           GEN     14
302                SW                                                             1  0744  ,           GEN     14
303                SW                                                             1  0745  ,           GEN     14
304                SW                                                             1  0746  ,           GEN     14
305                SW                                                             1  0747  ,           GEN     14
306                SW                                                             1  0748  ,           GEN     15
307                SW                                                             1  0749  ,           GEN     15
308                LCA   72,CODE-200   CODE (7-72) TO PRINT AREA                  7  0750  L 072 265           15
309                LCA   72,CODE       CODE (7-72) TO EXECUTE AREA                7  0757  L 072 465           15
310                MCW   @01@,SWADDR#2  REFRESH CHANGED INSTRUCTIONS              7  0764  M 974 976           15
311                MCW   @01@,ADD&3                                               7  0771  M 974 789           15
312         SWLOOP BCE   DONESW,ADD&3,8  ALREADY SET SEVEN WORD MARKS             8  0778  B 826 789 8         15
313         ADD    A     1-0,SWADDR    ADD LENGTH TO  SW  ADDRESS                 7  0786  A 001 976           16

314                MCW   SWADDR,SW1&3  PLUG OFFSET INTO                           7  0793  M 976 810           16
315                MCW   SWADDR,SW2&3    SW  INSTRUCTIONS                         7  0800  M 976 814           16
316         SW1    SW    200-0                                                    4  0807  , 200               16
317         SW2    SW    400-0                                                    4  0811  , 400               16
318                A     *-6,ADD&3     BUMP WIDTH COUNTER                         7  0815  A 815 789           16
319                B     SWLOOP        GO SET ANOTHER WORD MARK?                  4  0822  B 778               17
320         *
321         * DONE SETTING WORD MARKS.  FINISH THE HEADER.
322         *
323         DONESW BCE   DETAIL,190,   NO HEADER IF 190 IS BLANK                  8  0826  B 506 190           17
324                SW    RID-4,RSEQ-2                                             7  0834  , 073 078           17
325                MCW   RID,PID       TEST ID TO PRINT AREA                      7  0841  M 077 296           17
326                MCW   RSEQ,PSEQ     SEQUENCE NUMBER TO PRINT AREA              7  0848  M 080 300           17
327                W                                                              1  0855  2                   17
328                WM                                                             2  0856  2 )                 17
329                CS                                                             1  0858  /                   18
330                CS                                                             1  0859  /                   18
331                MCW   @--A/D FIELD---------@,PA                                7  0860  M 996 220           18
332                MCW   @--B FIELD-----------@,PB                                7  0867  M '16 241           18
333                MCW   @--ACTUAL RESULT-----@,PRES                              7  0874  M '36 262           18
334                MCW   @--CORRECT RESULT----@,PCORR                             7  0881  M '56 283           18
335                MCW   @STATUS@,290                                             7  0888  M '62 290           18
336                MCW   @-ID--@,PID                                              7  0895  M '67 296           19
337                MCW   @SEQ@,PSEQ                                               7  0902  M '70 300           19
338                W                                                              1  0909  2                   19
339                CS                                                             1  0910  /                   19
340                CS                                                             1  0911  /                   19
341                B     DETAIL         READ A DETAIL RECORD                      4  0912  B 506               19
342         *
343         * PRINT HEADERS WITH * IN 1
344         *
345         PRNTHD BCE   DETAIL,190,   NO HEADER IF 190 IS BLANK                  8  0916  B 506 190           19
346                SW    RID-4,RSEQ-2                                             7  0924  , 073 078           20
347                MCW   RID,PID       TEST ID TO PRINT AREA                      7  0931  M 077 296           20
348                MCW   RSEQ,PSEQ     SEQUENCE NUMBER TO PRINT AREA              7  0938  M 080 300           20
349                SW    1                                                        4  0945  , 001               20
350                MCW   RCOMM,272                                                7  0949  M 072 272           20
351                W     READIT                                                   4  0956  2 510               20
                   DCW   @200@                                                    3  0962              LIT     20
                   DCW   @201@                                                    3  0965              LIT     21
                   DCW   @OK@                                                     2  0967              LIT     21
                   DCW   @ERROR@                                                  5  0972              LIT     21
                   DCW   @01@                                                     2  0974              LIT     21
            SWADDR DCW   #02                                                      2  0976              AREA    21
                   DCW   @--A/D FIELD---------@                                  20  0996              LIT     21
                   DCW   @--B FIELD-----------@                                  20  1016              LIT     22
                   DCW   @--ACTUAL RESULT-----@                                  20  1036              LIT     23
                   DCW   @--CORRECT RESULT----@                                  20  1056              LIT     24
                   DCW   @STATUS@                                                 6  1062              LIT     24
                   DCW   @-ID--@                                                  5  1067              LIT     24
                   DCW   @SEQ@                                                    3  1070              LIT     24
352                END   START                                                             / 333 080
SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS  SYMBOL  ADDRESS
ADD       786    ADDTST    467    C1        370    C2        379    CODE      465    CODE1     401    COMPAR    699
COMPNS    715    DETAIL    506    DONESW    826    ERRHLT    690    FAILED    669    FAILNS    674    GOTIT     554
HEADER    731    PA        220    PB        241    PCOMM     313    PCORR     283    PID       296    PRES      262
PRNTHD    916    PRNTIT    657    PRNTOK    650    PSEQ      300    PSTAT     290    RA         20    RB         40
RCOMM      72    RCORR      60    READIT    510    RID        77    RSEQ       80    S1        497    SCOPE     625
START     333    SW1       807    SW2       811    SWADDR    976    SWLOOP    778    TAPEIN    541    TAPERR    531
TEST      706    TESTD     660    TESTNS    722    V1        341    V2        350    WORKED    636    WORKNS    641

Program Listing – Test examples

* A/D field replaces * in BCE                                           0050  0A
7854574M001415B425021*B408BB674B408BM060262B641    BCE test equal       0050  0B
                                       branch                          0050  03
"                   "                   branch                          0050  04
* A/D field replaces * in BCE                                           0050  1A
7811740M001415B669023*BBM060262B636                BCE test unequal     0050  1B
1                    24                 no branch                       0050  15
1                   8/-                 no branch                       0050  16
7554000C002022B401BB636/B669 Compare and branch unequal -- equal fails  0100  1F
                    1                  UNEQUAL                         0100  17

Program Listing – Test examples output

* A/D FIELD REPLACES * IN BCE                                                              0050   0A
M001415B425021*B408BB674B408BM060262B641    BCE TEST EQUAL                                 0050   0B
1      1       1    1   1    1      1   1
--A/D FIELD--------- --B FIELD----------- --ACTUAL RESULT----- --CORRECT RESULT---- STATUS -ID-- SEQ
                                           BRANCH               BRANCH               OK     0050   03
"                    "                    BRANCH               BRANCH               OK     0050   04
* A/D FIELD REPLACES * IN BCE                                                              0050   1A
M001415B669023*BBM060262B636                BCE TEST UNEQUAL                               0050   1B
1      1       111      1   1
--A/D FIELD--------- --B FIELD----------- --ACTUAL RESULT----- --CORRECT RESULT---- STATUS -ID-- SEQ
1                     24                  NO BRANCH            NO BRANCH            OK     0050   15
1                    8/-                  NO BRANCH            NO BRANCH            OK     0050   16
C002022B401BB636/B669 COMPARE AND BRANCH UNEQUAL -- EQUAL FAILS                            0100   1F
1      1    1    1   1
A/D FIELD----------- B FIELD------------- ACTUAL RESULT------- CORRECT RESULT------ STATUS ID---
                      1                    1                   UNEQUAL              OK     0100   17