Source Code

This source code is very close to the Apollo Guidance Computer software for the Apollo 13 Lunar module. This revision of the Luminary 131 program is from December of 1969, whereas there was a later revision in January of 1970, and still another revision in February, which is the code that flew on the mission. As far as this transcription is concerned, it was originally from a copy made in 1991 of a printout from the collection of AGC developer Don Eyles for collector David Craig. It was subsequently scanned by Gary Neff, reprocessed for online presentation at the now-discontinued History of Recent Science and Technology (HRST) website of MIT's Dibner Institute (the full-quality scans being discarded in the process), and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a high-quality replacement scan for a completely illegible page was later provided by Gary Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many errors to be introduced into the transcription. Accordingly, a second scan of the same physical printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive, and used to correct the transcription errors. All of the scanned materials mentioned, as well as other Luminary 131 related material, are available online. Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017, so the two scans are not identical in that respect. The page-headings in the printout read, in part:
	GAP:  ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091
	17:53 DEC. 19, 1969
Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together.

053724,000002:                                                                                                  ## Copyright:   Public domain.
053725,000003:                                                                                                  ## Filename:    AGC_BLOCK_TWO_SELF_CHECK.agc
053726,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
053727,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
053728,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
053729,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
053730,000008:                                                                                                  ##              that the code format has been changed to conform to the
053731,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
053732,000010:                                                                                                  ##              original YUL assembler.
053733,000011:                                                                                                  ## Reference:   pp. 1276-1285
053734,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
053735,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
053736,000014:                                                                                                  ## Mod history: 06/05/03 RSB.   Began transcribing.
053737,000015:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
053738,000016:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
053739,000017:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
053740,000018:                                                                                                  ##                              numbers in 1701.pdf.
053741,000019:                                                                                                  ##              2017-01-28 RSB  WTIH -> WITH.
053742,000020:                                                                                                  ##              2017-02-27 RSB  Proofed comment text using octopus/ProoferComments.
053743,000021: 

Page 1276

053745,000023:                                                                                                  #  PROGRAM DESCRIPTION                           DATE  20 DECEMBER 1967
053746,000024:                                                                                                  #  PROGRAM NAME - SELF-CHECK                     LOG SECTION  AGC BLOCK TWO SELF-CHECK
053747,000025:                                                                                                  #  MOD NO - 1                                    ASSEMBLY SUBROUTINE UTILITYM REV 25
053748,000026:                                                                                                  #  MOD BY - GAUNTT
053749,000027: 
053750,000028:                                                                                                  #  FUNCTIONAL DESCRIPTION
053751,000029:                                                                                                  #        PROGRAM HAS TWO MAIN PARTS.  THE FIRST IS SELF-CHECK WHICH RUNS AS A ZERO PRIORITY JOB WITH NO CORE SET, AS
053752,000030:                                                                                                  #        PART OF THE BACK-UP IDLE LOOP.  THE SECOND IS SHOW-BANKSUM WHICH RUNS AS A REGULAR EXECUTIVE JOB WITH ITS OWN
053753,000031:                                                                                                  #        STARTING VERB.
053754,000032: 
053755,000033:                                                                                                  #        THE PURPOSE OF SELF-CHECK IS TO CHECK OUT VARIOUS PARTS OF THE COMPUTER AS OUTLINED BELOW IN THE OPTIONS.
053756,000034: 
053757,000035:                                                                                                  #        THE PURPOSE OF SHOW-BANKSUM IS TO DISPLAY THE SUM OF EACH BANK, ONE AT A TIME.
053758,000036: 
053759,000037:                                                                                                  #        IN ALL THERE ARE 7 POSSIBLE OPTIONS IN THIS BLOCK II VERSION OF SELF-CHECK.  MORE DETAIL DESCRIPTION MAY BE
053760,000038:                                                                                                  #        FOUND IN E-2065 BLOCK II AGC SELF-CHECK AND SHOW BANKSUM BY EDWIN D. SMALLY DECEMBER 1966, AND ADDENDA 2 AND 3.
053761,000039: 
053762,000040:                                                                                                  #        THE DIFFERENT OPTIONS ARE CONTROLLED BY PUTTING DIFFERENT NUMBERS IN THE SMODE REGISTER (NOUN 27).  BELOW IS
053763,000041:                                                                                                  #        A DESCRIPTION OF WHAT PARTS OF THE COMPUTER THAT ARE CHECKED BY THE OPTIONS, AND THE CORRESPONDING NUMBER, IN
053764,000042:                                                                                                  #        OCTAL, TO LOAD INTO SMODE.
053765,000043:                                                                                                  #                +-4             ERASABLE MEMORY
053766,000044:                                                                                                  #                +-5             FIXED MEMORY
053767,000045:                                                                                                  #                +-1,2,3,6,7,10  EVERYTHING IN OPTIONS 4 AND 5.
053768,000046:                                                                                                  #                -0              SAME AS +-10 UNTIL AN ERROR IS DETECTED.
053769,000047:                                                                                                  #                +0              NO CHECK, PUTS COMPUTER INTO THE BACKUP IDLE LOOP.
053770,000048: 
053771,000049:                                                                                                  #  WARNINGS
053772,000050:                                                                                                  #        USE OF E MEMORY RESERVED FOR SELF-CHECK (EVEN IN IDLE LOOP) AS TEMP STORAGE BY OTHER PROGRAMS IS DANGEROUS.
053773,000051:                                                                                                  #        SMODE SET GREATER THAN OCT 10 PUTS COMPUTER INTO BACKUP IDLE LOOP.
053774,000052: 
053775,000053:                                                                                                  #  CALLING SEQUENCE
053776,000054:                                                                                                  #        TO CALL SELF-CHECK KEY IN
053777,000055:                                                                                                  #                V 21 N 27 E     OPTION NUMBER E
053778,000056:                                                                                                  #        TO CALL SHOW-BANKSUM KEY IN
053779,000057:                                                                                                  #                V 91 E          DISPLAYS FIRST BANK
053780,000058:                                                                                                  #                V 33 E          PROCEED, DISPLAYS NEXT BANK
053781,000059: 
053782,000060:                                                                                                  #  EXIT MODES, NORMAL AND ALARM
053783,000061:                                                                                                  #        SELF-CHECK NORMALLY CONTINUES INDEFINITELY UNLESS THERE IS AN ERROR DETECTED.  IF SO + OPTION NUMBERS PUT
053784,000062:                                                                                                  #        COMPUTER INTO BACKUP IDLE LOOP, - OPTION NUMBERS RESTART THE OPTION.
053785,000063: 
053786,000064:                                                                                                  #        THE -0 OPTION PROCEEDS FROM THE LINE FOLLOWING THE LINE WHERE THE ERROR WAS DETECTED.
053787,000065: 
053788,000066:                                                                                                  #        SHOW-BANKSUM PROCEEDS UNTIL A TERMINATE IS KEYED IN (V 34 E).  THE COMPUTER IS PUT INTO THE BACKUP IDLE LOOP
053789,000067: 
053790,000068:                                                                                                  #  OUTPUT

Page 1277

053792,000070:                                                                                                  #        SELF-CHECK UPON DETECTING AN ERROR LOADS THE SELF-CHECK ALARM CONSTANT (01102) INTO THE FAILREG SET AND
053793,000071:                                                                                                  #        TURNS ON THE ALARM LIGHT.  THE OPERATOR MAY THEN DISPLAY THE THREE FAILREGS BY KEYING IN V 05 N 09 E.  FOR FURTHER
053794,000072:                                                                                                  #        INFORMATION HE MAY KEY IN V 05 N 08 E, THE DSKY DISPLAY IN R1 WILL BE ADDRESS+1 OF WHERE THE ERROR WAS DETECTED,
053795,000073:                                                                                                  #        IN R2 THE BBCON OF SELF-CHECK, AND IN R3 THE TOTAL NUMBER OF ERRORS DETECTED BY SELF-CHECK SINCE THE LAST MAN
053796,000074:                                                                                                  #        INITIATED FRESH START (SLAP1).
053797,000075: 
053798,000076:                                                                                                  #        SHOW-BANKSUM STARTING WITH BANK 0 DISPLAYS IN R1 THE BANK SUM (A +-NUMBER EQUAL TO THE BANK NUMBER), IN R2
053799,000077:                                                                                                  #        THE BANK NUMBER, AND IN R3 THE BUGGER WORD.
053800,000078: 
053801,000079:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
053802,000080:                                                                                                  #        ACCOMPLISHED BY FRESH START
053803,000081:                                                                                                  #                SMODE SET TO +0
053804,000082: 
053805,000083:                                                                                                  #  DEBRIS
053806,000084:                                                                                                  #        ALL EXITS FROM THE CHECK OF ERASABLE (ERASCHK) RESTORE ORIGINAL CONTENTS TO REGISTERS UNDER CHECK.
053807,000085:                                                                                                  #        EXCEPTION IS A RESTART.  RESTART THAT OCCURS DURING ERASCHK RESTORES ERASABLE, UNLESS THERE IS EVIDENCE TO DOUBT
053808,000086:                                                                                                  #        E MEMORY, IN WHICH CASE PROGRAM THEN DOES A FRESH START (DOFSTART).
053809,000087: 
053810,000088: 25,3757                                           BANK     25                                    
053811,000089: 43,2000                                           SETLOC   SELFCHEC                              
053812,000090: 43,2000                                           BANK                                           
053813,000091: 
053814,000092: 43,3257                                           COUNT*   $$/SELF                               
053815,000093: 43,3257     4753               SBIT1              EQUALS   BIT1                                  
053816,000094: 43,3257     4752               SBIT2              EQUALS   BIT2                                  
053817,000095: 43,3257     4751               SBIT3              EQUALS   BIT3                                  
053818,000096: 43,3257     4750               SBIT4              EQUALS   BIT4                                  
053819,000097: 43,3257     4747               SBIT5              EQUALS   BIT5                                  
053820,000098: 43,3257     4746               SBIT6              EQUALS   BIT6                                  
053821,000099: 43,3257     4745               SBIT7              EQUALS   BIT7                                  
053822,000100: 43,3257     4744               SBIT8              EQUALS   BIT8                                  
053823,000101: 43,3257     4743               SBIT9              EQUALS   BIT9                                  
053824,000102: 43,3257     4742               SBIT10             EQUALS   BIT10                                 
053825,000103: 43,3257     4741               SBIT11             EQUALS   BIT11                                 
053826,000104: 43,3257     4740               SBIT12             EQUALS   BIT12                                 
053827,000105: 43,3257     4737               SBIT13             EQUALS   BIT13                                 
053828,000106: 43,3257     4736               SBIT14             EQUALS   BIT14                                 
053829,000107: 43,3257     4735               SBIT15             EQUALS   BIT15                                 
053830,000108: 
053831,000109: 43,3257     4755               S+ZERO             EQUALS   ZERO                                  
053832,000110: 43,3257     4753               S+1                EQUALS   BIT1                                  
053833,000111: 43,3257     4752               S+2                EQUALS   BIT2                                  
053834,000112: 43,3257     6250               S+3                EQUALS   THREE                                 
053835,000113: 43,3257     4751               S+4                EQUALS   FOUR                                  
053836,000114: 43,3257     4756               S+5                EQUALS   FIVE                                  
053837,000115: 43,3257     6245               S+6                EQUALS   SIX                                   

Page 1278

053839,000117: 43,3257     4757               S+7                EQUALS   SEVEN                                 
053840,000118: 43,3257     4357               S8BITS             EQUALS   LOW8                                  #  00377
053841,000119: 43,3257     4771               CNTRCON            =        OCT50                                 #  USED IN CNTRCHK
053842,000120: 43,3257           00061        ERASCON1           OCTAL    00061                                 #  USED IN ERASCHK
053843,000121: 43,3260           01373        ERASCON2           OCTAL    01373                                 #  USED IN ERASCHK
053844,000122: 43,3261     5007               ERASCON6           =        OCT1400                               #  USED IN ERASCHK
053845,000123: 43,3261           01461        ERASCON3           OCTAL    01461                                 #  USED IN ERASCHK
053846,000124: 43,3262           01773        ERASCON4           OCTAL    01773                                 #  USED IN ERASCHK
053847,000125: 43,3263     5012               S10BITS            EQUALS   LOW10                                 #  01777, USED IN ERASCHK
053848,000126: 43,3263     5020               SBNK03             EQUALS   PRIO6                                 #  06000, USED IN ROPECHK
053849,000127: 43,3263     4350               -MAXADRS           =        HI5                                   #  FOR ROPECHK
053850,000128: 43,3263           00060        SIXTY              OCTAL    00060                                 
053851,000129: 43,3264           60017        SUPRCON            OCTAL    60017                                 #  USED IN ROPECHK
053852,000130: 43,3265           17777        S13BITS            OCTAL    17777                                 
053853,000131: 43,3266           25252        CONC+S1            OCTAL    25252                                 #  USED IN CYCLSHFT
053854,000132: 43,3267           52400        CONC+S2            OCTAL    52400                                 #  USED IN CYCLSHFT
053855,000133: 43,3270           76777        ERASCON5           OCTAL    76777                                 
053856,000134: 43,3271     5650               S-7                =        OCT77770                              
053857,000135: 43,3271     6115               S-4                EQUALS   NEG4                                  
053858,000136: 43,3271     7750               S-3                EQUALS   NEG3                                  
053859,000137: 43,3271     7751               S-2                EQUALS   NEG2                                  
053860,000138: 43,3271     7752               S-1                EQUALS   NEGONE                                
053861,000139: 43,3271     4754               S-ZERO             EQUALS   NEG0                                  
053862,000140: 
053863,000141: 43,3271  E3,1400                                  EBANK=   LST1                                  
053864,000142: 43,3271           01371        ADRS1              ADRES    SKEEP1                                
053865,000143: 43,3272           03363        SELFADRS           ADRES    SELFCHK                               #  SELFCHK RETURN ADDRESS.  SHOULD BE PUT
053866,000144:                                                                                                  #  IN SELFRET WHEN GOING FROM SELFCHK TO
053867,000145:                                                                                                  #  SHOWSUM AND PUT IN SKEEP1 WHEN GOING
053868,000146:                                                                                                  #  FROM SHOWSUM TO SELF-CHECK.
053869,000147: 
053870,000148: 43,3273           31360        PRERRORS           CA       ERESTORE                              #  IS IT NECESSARY TO RESTORE ERASABLE
053871,000149: 43,3274           00006                           EXTEND                                         
053872,000150: 43,3275           13304                           BZF      ERRORS                                #  NO
053873,000151: 43,3276           00006                           EXTEND                                         
053874,000152: 43,3277           31376                           DCA      SKEEP5                                
053875,000153: 43,3300           51377                           INDEX    SKEEP7                                
053876,000154: 43,3301           52001                           DXCH     0000                                  #  RESTORE THE TWO ERASABLE REGISTERS
053877,000155: 43,3302           34755                           CA       S+ZERO                                
053878,000156: 43,3303           55360                           TS       ERESTORE                              
053879,000157: 43,3304           00004        ERRORS             INHINT                                         
053880,000158: 43,3305           30002                           CA       Q                                     
053881,000159: 43,3306           55357                           TS       SFAIL                                 #  SAVE Q FOR FAILURE LOCATION
053882,000160: 43,3307           55363                           TS       ALMCADR                               #  FOR DISPLAY WITH BBANK AND ERCOUNT
053883,000161: 43,3310           25365                           INCR     ERCOUNT                               #  KEEP TRACK OF NUMBER OF MALFUNCTIONS.
053884,000162: 43,3311           05571        TCALARM2           TC       ALARM2                                
053885,000163: 43,3312           01102                           OCT      01102                                 #  SELF-CHECK MALFUNCTION INDICATOR
053886,000164: 43,3313           11362                           CCS      SMODE                                 
053887,000165: 43,3314           34755        SIDLOOP            CA       S+ZERO                                
053888,000166: 43,3315           55362                           TS       SMODE                                 

Page 1279

053890,000168: 43,3316           03363                           TC       SELFCHK                               #  GO TO IDLE LOOP
053891,000169: 43,3317           01357                           TC       SFAIL                                 #  CONTINUE WITH SELF-CHECK
053892,000170: 
053893,000171: 43,3320           10000        -1CHK              CCS      A                                     
053894,000172: 43,3321           13273                           TCF      PRERRORS                              
053895,000173: 43,3322           13273                           TCF      PRERRORS                              
053896,000174: 43,3323           10000                           CCS      A                                     
053897,000175: 43,3324           13273                           TCF      PRERRORS                              
053898,000176: 43,3325           00002                           TC       Q                                     
053899,000177: 
053900,000178: 43,3326           00006        SMODECHK           EXTEND                                         
053901,000179: 43,3327           23371                           QXCH     SKEEP1                                
053902,000180: 43,3330           03357                           TC       CHECKNJ                               #  CHECK FOR NEW JOB
053903,000181: 43,3331           11362                           CCS      SMODE                                 
053904,000182: 43,3332           03337                           TC       SOPTIONS                              
053905,000183: 43,3333           03330                           TC       SMODECHK   +2                         #  TO BACKUP IDLE LOOP
053906,000184: 43,3334           03337                           TC       SOPTIONS                              
053907,000185: 43,3335           25366                           INCR     SCOUNT                                
053908,000186: 43,3336           01371                           TC       SKEEP1                                #  CONTINUE WITH SELF-CHECK
053909,000187: 
053910,000188: 43,3337           65650        SOPTIONS           AD       S-7                                   
053911,000189: 43,3340           00006                           EXTEND                                         
053912,000190: 43,3341           63343                           BZMF     +2                                    #  FOR OPTIONS BELOW NINE.
053913,000191: 43,3342           03314        BNKOPTN            TC       SIDLOOP                               #  ILLEGAL OPTION.  GO TO IDLE LOOP.
053914,000192: 43,3343           25366                           INCR     SCOUNT                                #  FOR OPTIONS BELOW NINE.
053915,000193: 43,3344           64757                           AD       S+7                                   
053916,000194: 
053917,000195: 43,3345           50000                           INDEX    A                                     
053918,000196: 43,3346           03347                           TC       SOPTION1                              
053919,000197: 43,3347           01371        SOPTION1           TC       SKEEP1                                #  WAS TC+TCF
053920,000198: 43,3350           01371        SOPTION2           TC       SKEEP1                                #  WAS IN:OUT1
053921,000199: 43,3351           01371        SOPTION3           TC       SKEEP1                                #  WAS COUNTCHK
053922,000200: 43,3352           03364        SOPTION4           TC       ERASCHK                               
053923,000201: 43,3353           03545        SOPTION5           TC       ROPECHK                               
053924,000202: 43,3354           01371        SOPTION6           TC       SKEEP1                                
053925,000203: 43,3355           01371        SOPTION7           TC       SKEEP1                                
053926,000204: 43,3356           01371        SOPTON10           TC       SKEEP1                                #  CONTINUE WITH SELF-CHECK
053927,000205: 
053928,000206: 43,3357           00006        CHECKNJ            EXTEND                                         
053929,000207: 43,3360           23361                           QXCH     SELFRET                               #  SAVE RETURN ADDRESS WHILE TESTING NEWJOB
053930,000208: 43,3361           04635                           TC       POSTJUMP                              #  TO SEE IF ANY JOBS HAVE BECOME ACTIVE.
053931,000209: 43,3362           03215                           CADR     ADVAN                                 
053932,000210: 
053933,000211: 43,3363           03326        SELFCHK            TC       SMODECHK                              #  ** CHARLEY, COME IN HERE
053934,000212: 
053935,000213:                                                                                                  #  SKEEP7 HOLDS LOWEST OF TWO ADDRESSES BEING CHECKED.
053936,000214:                                                                                                  #  SKEEP6 HOLDS B(X+1).
053937,000215:                                                                                                  #  SKEEP5 HOLDS B(X).
053938,000216:                                                                                                  #  SKEEP4 HOLDS C(EBANK) DURING ERASLOOP AND CHECKNJ.
053939,000217:                                                                                                  #  SKEEP3 HOLDS LAST ADDRESS BEING CHECKED (HIGHEST ADDRESS).

Page 1280

053941,000219:                                                                                                  #  SKEEP2 CONTROLS CHECKING OF NON-SWITCHABLE ERASABLE MEMORY WITH BANK NUMBERS IN EB.
053942,000220:                                                                                                  #  ERASCHK TAKES APPROXMATELY 7 SECONDS
053943,000221: 
053944,000222: 43,3364           34753        ERASCHK            CA       S+1                                   
053945,000223: 43,3365           55372                           TS       SKEEP2                                
053946,000224: 43,3366           34755        0EBANK             CA       S+ZERO                                
053947,000225: 43,3367           54003                           TS       EBANK                                 
053948,000226: 43,3370           33261                           CA       ERASCON3                              #  01461
053949,000227: 43,3371           55377                           TS       SKEEP7                                #  STARTING ADDRESS
053950,000228: 43,3372           35012                           CA       S10BITS                               #  01777
053951,000229: 43,3373           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
053952,000230: 43,3374           03414                           TC       ERASLOOP                              
053953,000231: 
053954,000232: 43,3375           35007        E134567B           CA       ERASCON6                              #  01400
053955,000233: 43,3376           55377                           TS       SKEEP7                                #  STARTING ADDRESS
053956,000234: 43,3377           35012                           CA       S10BITS                               #  01777
053957,000235: 43,3400           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
053958,000236: 43,3401           03414                           TC       ERASLOOP                              
053959,000237: 
053960,000238: 43,3402           35007        2EBANK             CA       ERASCON6                              #  01400
053961,000239: 43,3403           55377                           TS       SKEEP7                                #  STARTING ADDRESS
053962,000240: 43,3404           33262                           CA       ERASCON4                              #  01773
053963,000241: 43,3405           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
053964,000242: 43,3406           03414                           TC       ERASLOOP                              
053965,000243: 
053966,000244: 43,3407           55372        NOEBANK            TS       SKEEP2                                #  +0
053967,000245: 43,3410           33257                           CA       ERASCON1                              #  00061
053968,000246: 43,3411           55377                           TS       SKEEP7                                #  STARTING ADDRESS
053969,000247: 43,3412           33260                           CA       ERASCON2                              #  01373
053970,000248: 43,3413           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
053971,000249: 
053972,000250: 43,3414           00004        ERASLOOP           INHINT                                         
053973,000251: 43,3415           30003                           CA       EBANK                                 #  STORES C(EBANK)
053974,000252: 43,3416           55374                           TS       SKEEP4                                
053975,000253: 43,3417           00006                           EXTEND                                         
053976,000254: 43,3420           51377                           NDX      SKEEP7                                
053977,000255: 43,3421           30001                           DCA      0000                                  
053978,000256: 43,3422           53376                           DXCH     SKEEP5                                #  STORES C(X) AND C(X+1) IN SKEEP6 AND 5.
053979,000257: 43,3423           31377                           CA       SKEEP7                                
053980,000258: 43,3424           55360                           TS       ERESTORE                              #  IF RESTART, RESTORE C(X) AND C(X+1)
053981,000259: 43,3425           54001                           TS       L                                     
053982,000260: 43,3426           24001                           INCR     L                                     
053983,000261: 43,3427           50000                           NDX      A                                     
053984,000262: 43,3430           52001                           DXCH     0000                                  #  PUTS OWN ADDRESS IN X AND X +1
053985,000263: 43,3431           51377                           NDX      SKEEP7                                
053986,000264: 43,3432           40001                           CS       0001                                  #  CS X+1
053987,000265: 43,3433           51377                           NDX      SKEEP7                                
053988,000266: 43,3434           60000                           AD       0000                                  #  AD X
053989,000267: 43,3435           03320                           TC       -1CHK                                 
053990,000268: 43,3436           31360                           CA       ERESTORE                              #  HAS ERASABLE BEEN RESTORED
053991,000269: 43,3437           00006                           EXTEND                                         

Page 1281

053993,000271: 43,3440           13464                           BZF      ELOOPFIN                              #  YES, EXIT ERASLOOP.
053994,000272: 43,3441           00006                           EXTEND                                         
053995,000273: 43,3442           51377                           NDX      SKEEP7                                
053996,000274: 43,3443           40001                           DCS      0000                                  #  COMPLEMENT OF ADDRESS OF X AND X+1
053997,000275: 43,3444           51377                           NDX      SKEEP7                                
053998,000276: 43,3445           52001                           DXCH     0000                                  #  PUT COMPLEMENT OF ADDRESS OF X AND X+1
053999,000277: 43,3446           51377                           NDX      SKEEP7                                
054000,000278: 43,3447           40000                           CS       0000                                  #  CS X
054001,000279: 43,3450           51377                           NDX      SKEEP7                                
054002,000280: 43,3451           60001                           AD       0001                                  #  AD X+1
054003,000281: 43,3452           03320                           TC       -1CHK                                 
054004,000282: 43,3453           31360                           CA       ERESTORE                              #  HAS ERASABLE BEEN RESTORED
054005,000283: 43,3454           00006                           EXTEND                                         
054006,000284: 43,3455           13464                           BZF      ELOOPFIN                              #  YES, EXIT ERASLOOP.
054007,000285: 43,3456           00006                           EXTEND                                         
054008,000286: 43,3457           31376                           DCA      SKEEP5                                
054009,000287: 43,3460           51377                           NDX      SKEEP7                                
054010,000288: 43,3461           52001                           DXCH     0000                                  #  PUT B(X) AND B(X+1) BACK INTO X AND X+1
054011,000289: 43,3462           34755                           CA       S+ZERO                                
054012,000290: 43,3463           55360                           TS       ERESTORE                              #  IF RESTART, DO NOT RESTORE C(X), C(X+1)
054013,000291: 43,3464           00003        ELOOPFIN           RELINT                                         
054014,000292: 43,3465           03357                           TC       CHECKNJ                               #  CHECK FOR NEW JOB
054015,000293: 43,3466           31374                           CA       SKEEP4                                #  REPLACES B(EBANK)
054016,000294: 43,3467           54003                           TS       EBANK                                 
054017,000295: 43,3470           25377                           INCR     SKEEP7                                
054018,000296: 43,3471           41377                           CS       SKEEP7                                
054019,000297: 43,3472           61373                           AD       SKEEP3                                
054020,000298: 43,3473           00006                           EXTEND                                         
054021,000299: 43,3474           13476                           BZF      +2                                    
054022,000300: 43,3475           03414                           TC       ERASLOOP                              #  GO TO NEXT ADDRESS IN SAME BANK
054023,000301: 43,3476           11372                           CCS      SKEEP2                                
054024,000302: 43,3477           03407                           TC       NOEBANK                               
054025,000303: 43,3500           25372                           INCR     SKEEP2                                #  PUT +1 IN SKEEP2.
054026,000304: 43,3501           30003                           CA       EBANK                                 
054027,000305: 43,3502           64743                           AD       SBIT9                                 
054028,000306: 43,3503           54003                           TS       EBANK                                 
054029,000307: 43,3504           63270                           AD       ERASCON5                              #  76777, CHECK FOR BANK E2
054030,000308: 43,3505           00006                           EXTEND                                         
054031,000309: 43,3506           13402                           BZF      2EBANK                                
054032,000310: 43,3507           10003                           CCS      EBANK                                 
054033,000311: 43,3510           03375                           TC       E134567B                              #  GO TO EBANKS 1,3,4,5,6, AND 7
054034,000312: 43,3511           35007                           CA       ERASCON6                              #  END OF ERASCHK
054035,000313: 43,3512           54003                           TS       EBANK                                 
054036,000314: 
054037,000315:                                                                                                  #  CNTRCHK PERFORMS A CS OF ALL REGISTERS FROM OCT. 60 THROUGH OCT. 10.
054038,000316:                                                                                                  #  INCLUDED ARE ALL COUNTERS, T6-1, CYCLE AND SHIFT, AND ALL RUPT REGISTERS
054039,000317: 
054040,000318: 43,3513           34771        CNTRCHK            CA       CNTRCON                               #  00050
054041,000319: 43,3514           55372        CNTRLOOP           TS       SKEEP2                                
054042,000320: 43,3515           64750                           AD       SBIT4                                 #  +10 OCTAL
054043,000321: 43,3516           50000                           INDEX    A                                     
054044,000322: 43,3517           40000                           CS       0000                                  

Page 1282

054046,000324: 43,3520           11372                           CCS      SKEEP2                                
054047,000325: 43,3521           03514                           TC       CNTRLOOP                              
054048,000326: 
054049,000327:                                                                                                  #  CYCLSHFT CHECKS THE CYCLE AND SHIFT REGISTERS
054050,000328: 
054051,000329: 43,3522           33266        CYCLSHFT           CA       CONC+S1                               #  25252
054052,000330: 43,3523           54020                           TS       CYR                                   #  C(CYR) = 12525
054053,000331: 43,3524           54022                           TS       CYL                                   #  C(CYL) = 52524
054054,000332: 43,3525           54021                           TS       SR                                    #  C(SR) = 12525
054055,000333: 43,3526           54023                           TS       EDOP                                  #  C(EDOP) = 00125
054056,000334: 43,3527           60020                           AD       CYR                                   #  37777         C(CYR) = 45252
054057,000335: 43,3530           60022                           AD       CYL                                   #  00-12524      C(CYL) = 25251
054058,000336: 43,3531           60021                           AD       SR                                    #  00-25251      C(SR) = 05252
054059,000337: 43,3532           60023                           AD       EDOP                                  #  00-25376      C(EDOP) = +0
054060,000338: 43,3533           63267                           AD       CONC+S2                               #  C(CONC+S2) = 52400
054061,000339: 43,3534           03320                           TC       -1CHK                                 
054062,000340: 43,3535           60020                           AD       CYR                                   #  45252
054063,000341: 43,3536           60022                           AD       CYL                                   #  72523
054064,000342: 43,3537           60021                           AD       SR                                    #  77775
054065,000343: 43,3540           60023                           AD       EDOP                                  #  77775
054066,000344: 43,3541           64753                           AD       S+1                                   #  77776
054067,000345: 43,3542           03320                           TC       -1CHK                                 
054068,000346: 
054069,000347: 43,3543           25367                           INCR     SCOUNT     +1                         
054070,000348: 43,3544           03326                           TC       SMODECHK                              
054071,000349: 
054072,000350:                                                                                                  #  SKEEP1 HOLDS SUM
054073,000351:                                                                                                  #  SKEEP2 HOLDS PRESENT CONTENTS OF ADDRESS IN ROPECHK AND SHOWSUM ROUTINES
054074,000352:                                                                                                  #  SKEEP2 HOLDS BANK NUMBER IN LOW ORDER BITS DURING SHOWSUM DISPLAY
054075,000353:                                                                                                  #  SKEEP3 HOLDS PRESENT ADDRESS (00000 TO 01777 IN COMMON FIXED BANKS)
054076,000354:                                                                                                  #                               (04000 TO 07777 IN FXFX BANKS)
054077,000355:                                                                                                  #  SKEEP3 HOLDS BUGGER WORD DURING SHOWSUM DISPLAY
054078,000356:                                                                                                  #  SKEEP4 HOLDS BANK NUMBER AND SUPER BANK NUMBER
054079,000357:                                                                                                  #  SKEEP5 COUNTS 2 SUCCESSIVE TC SELF WORDS
054080,000358:                                                                                                  #  SKEEP6 CONTROLS ROPECHK OR SHOWSUM OPTION
054081,000359:                                                                                                  #  SKEEP7 CONTROLS WHEN ROUNTINE IS IN COMMON FIXED OR FIXED FIXED BANKS
054082,000360: 
054083,000361: 43,3545           34754        ROPECHK            CA       S-ZERO                                #  *
054084,000362: 43,3546           55376                           TS       SKEEP6                                #  * -0 FOR ROPECHK.
054085,000363: 43,3547           34755        STSHOSUM           CA       S+ZERO                                #  * SHOULD BE ROPECHK
054086,000364: 
054087,000365: 43,3550           55374                           TS       SKEEP4                                #  BANK NUMBER
054088,000366: 43,3551           34753                           CA       S+1                                   
054089,000367: 43,3552           55377        COMMFX             TS       SKEEP7                                
054090,000368: 43,3553           34755                           CA       S+ZERO                                
054091,000369: 43,3554           55371                           TS       SKEEP1                                
054092,000370: 43,3555           55373                           TS       SKEEP3                                
054093,000371: 43,3556           34753                           CA       S+1                                   
054094,000372: 43,3557           55375                           TS       SKEEP5                                #  COUNTS DOWN 2 TC SELF WORDS
054095,000373: 43,3560           31374        COMADRS            CA       SKEEP4                                
054096,000374: 43,3561           54001                           TS       L                                     #  TO SET SUPER BANK
054097,000375: 43,3562           74350                           MASK     HI5                                   

Page 1283

054099,000377: 43,3563           61373                           AD       SKEEP3                                
054100,000378: 43,3564           04651                           TC       SUPDACAL                              #  SUPER DATA CALL
054101,000379: 43,3565           03610                           TC       ADSUM                                 
054102,000380: 43,3566           64741                           AD       SBIT11                                #  02000
054103,000381: 43,3567           03621                           TC       ADRSCHK                               
054104,000382: 
054105,000383: 43,3570           40000        FXFX               CS       A                                     
054106,000384: 43,3571           55377                           TS       SKEEP7                                
054107,000385: 43,3572           00006                           EXTEND                                         
054108,000386: 43,3573           13576                           BZF      +3                                    
054109,000387: 43,3574           34740                           CA       SBIT12                                #  04000, STARTING ADDRESS OF BANK 02
054110,000388: 43,3575           03577                           TC       +2                                    
054111,000389: 43,3576           35020                           CA       SBNK03                                #  06000, STARTING ADDRESS OF BANK 03
054112,000390: 43,3577           55373                           TS       SKEEP3                                
054113,000391: 43,3600           34755                           CA       S+ZERO                                
054114,000392: 43,3601           55371                           TS       SKEEP1                                
054115,000393: 43,3602           34753                           CA       S+1                                   
054116,000394: 43,3603           55375                           TS       SKEEP5                                #  COUNTS DOWN 2 TC SELF WORDS
054117,000395: 43,3604           51373        FXADRS             INDEX    SKEEP3                                
054118,000396: 43,3605           30000                           CA       0000                                  
054119,000397: 43,3606           03610                           TC       ADSUM                                 
054120,000398: 43,3607           03621                           TC       ADRSCHK                               
054121,000399: 
054122,000400: 43,3610           55372        ADSUM              TS       SKEEP2                                
054123,000401: 43,3611           61371                           AD       SKEEP1                                
054124,000402: 43,3612           55371                           TS       SKEEP1                                
054125,000403: 43,3613           34755                           CAF      S+ZERO                                
054126,000404: 43,3614           61371                           AD       SKEEP1                                
054127,000405: 43,3615           55371                           TS       SKEEP1                                
054128,000406: 43,3616           41372                           CS       SKEEP2                                
054129,000407: 43,3617           61373                           AD       SKEEP3                                
054130,000408: 43,3620           00002                           TC       Q                                     
054131,000409: 
054132,000410: 43,3621           22000        ADRSCHK            LXCH     A                                     
054133,000411: 43,3622           31373                           CA       SKEEP3                                
054134,000412: 43,3623           75012                           MASK     LOW10                                 #  RELATIVE ADDRESS
054135,000413: 43,3624           64350                           AD       -MAXADRS                              #  SUBTRACT MAX RELATIVE ADDRESS = 1777.
054136,000414: 43,3625           00006                           EXTEND                                         
054137,000415: 43,3626           13715                           BZF      SOPTION                               #  CHECKSUM FINISHED IF LAST ADDRESS.
054138,000416: 43,3627           11375                           CCS      SKEEP5                                #  IS CHECKSUM FINISHED
054139,000417: 43,3630           03633                           TC       +3                                    #  NO
054140,000418: 43,3631           03633                           TC       +2                                    #  NO
054141,000419: 43,3632           03715                           TC       SOPTION                               #  GO TO ROPECHK SHOWSUM OPTION
054142,000420: 43,3633           10001                           CCS      L                                     #  -0 MEANS A TC SELF WORD.
054143,000421: 43,3634           03643                           TC       CONTINU                               
054144,000422: 43,3635           03643                           TC       CONTINU                               
054145,000423: 43,3636           03643                           TC       CONTINU                               
054146,000424: 43,3637           11375                           CCS      SKEEP5                                
054147,000425: 43,3640           03644                           TC       CONTINU    +1                         
054148,000426: 43,3641           37752                           CA       S-1                                   

Page 1284

054150,000428: 43,3642           03644                           TC       CONTINU    +1                         #  AD IN THE BUGGER WORD
054151,000429: 43,3643           34753        CONTINU            CA       S+1                                   #  MAKE SURE TWO CONSECUTIVE TC SELF WORDS
054152,000430: 43,3644           55375                           TS       SKEEP5                                
054153,000431: 43,3645           11376                           CCS      SKEEP6                                #  *
054154,000432: 43,3646           10067                           CCS      NEWJOB                                #  * +1, SHOWSUM
054155,000433: 43,3647           05122                           TC       CHANG1                                #  *
054156,000434: 43,3650           03652                           TC       +2                                    #  *
054157,000435: 43,3651           03357                           TC       CHECKNJ                               #  -0 IN SKEEP6 FOR ROPECHK
054158,000436: 
054159,000437: 43,3652           25373        ADRS+1             INCR     SKEEP3                                
054160,000438: 43,3653           11377                           CCS      SKEEP7                                
054161,000439: 43,3654           03560                           TC       COMADRS                               
054162,000440: 43,3655           03560                           TC       COMADRS                               
054163,000441: 43,3656           03604                           TC       FXADRS                                
054164,000442: 43,3657           03604                           TC       FXADRS                                
054165,000443: 
054166,000444: 43,3660           41374        NXTBNK             CS       SKEEP4                                
054167,000445: 43,3661           63750                           AD       LSTBNKCH                              #  LAST BANK TO BE CHECKED
054168,000446: 43,3662           00006                           EXTEND                                         
054169,000447: 43,3663           13152                           BZF      ENDSUMS                               #  END OF SUMMING OF BANKS.
054170,000448: 43,3664           31374                           CA       SKEEP4                                
054171,000449: 43,3665           64741                           AD       SBIT11                                
054172,000450: 43,3666           55374                           TS       SKEEP4                                #  37 TO 40 INCRMTS SKEEP4 BY END RND CARRY
054173,000451: 43,3667           03673                           TC       CHKSUPR                               
054174,000452: 43,3670           34735        17TO20             CA       SBIT15                                
054175,000453: 43,3671           27374                           ADS      SKEEP4                                #  SET FOR BANK 20
054176,000454: 43,3672           03707                           TC       GONXTBNK                              
054177,000455: 43,3673           74350        CHKSUPR            MASK     HI5                                   
054178,000456: 43,3674           00006                           EXTEND                                         
054179,000457: 43,3675           13705                           BZF      NXTSUPR                               #  INCREMENT SUPER BANK
054180,000458: 43,3676           63265        27TO30             AD       S13BITS                               
054181,000459: 43,3677           00006                           EXTEND                                         
054182,000460: 43,3700           13702                           BZF      +2                                    #  BANK SET FOR 30
054183,000461: 43,3701           03707                           TC       GONXTBNK                              
054184,000462: 43,3702           33263                           CA       SIXTY                                 #  FIRST SUPER BANK
054185,000463: 43,3703           27374                           ADS      SKEEP4                                
054186,000464: 43,3704           03707                           TC       GONXTBNK                              
054187,000465: 43,3705           63264        NXTSUPR            AD       SUPRCON                               #  SET BNK 30 + INCR SUPR BNK AND CANCEL
054188,000466: 43,3706           27374                           ADS      SKEEP4                                #  ERC BIT OF THE 37 TO 40 ADVANCE.
054189,000467: 43,3707           11377        GONXTBNK           CCS      SKEEP7                                
054190,000468: 43,3710           03552                           TC       COMMFX                                
054191,000469: 43,3711           34753                           CA       S+1                                   
054192,000470: 43,3712           03570                           TC       FXFX                                  
054193,000471: 43,3713           34745                           CA       SBIT7                                 #  HAS TO BE LARGER THAN NO OF FXSW BANKS.
054194,000472: 43,3714           03552                           TC       COMMFX                                
054195,000473: 
054196,000474: 43,3715           31374        SOPTION            CA       SKEEP4                                
054197,000475: 43,3716           74350                           MASK     HI5                                   #  = BANK BITS
054198,000476: 43,3717           04331                           TC       LEFT5                                 
054199,000477: 43,3720           54001                           TS       L                                     #  BANK NUMBER BEFORE SUPER BANK

Page 1285

054201,000479: 43,3721           31374                           CA       SKEEP4                                
054202,000480: 43,3722           74357                           MASK     S8BITS                                #  = SUPER BANK BITS
054203,000481: 43,3723           00006                           EXTEND                                         
054204,000482: 43,3724           13732                           BZF      SOPT                                  #  BEFORE SUPER BANK
054205,000483: 43,3725           54021                           TS       SR                                    #  SUPER BANK NECESSARY
054206,000484: 43,3726           30001                           CA       L                                     
054207,000485: 43,3727           74757                           MASK     SEVEN                                 
054208,000486: 43,3730           60021                           AD       SR                                    
054209,000487: 43,3731           54001                           TS       L                                     #  BANK NUMBER WITH SUPER BANK
054210,000488: 43,3732           31376        SOPT               CA       SKEEP6                                #  *
054211,000489: 43,3733           00006                           EXTEND                                         #  *
054212,000490: 43,3734           13736                           BZF      +2                                    #  * ON -0 CONTINUE WITH ROPE CHECK.
054213,000491: 43,3735           03134                           TC       SDISPLAY                              #  * ON +1 GO TO DISPLAY OF SUM.
054214,000492: 43,3736           11371                           CCS      SKEEP1                                #  FORCE SUM TO ABSOLUTE VALUE.
054215,000493: 43,3737           03741                           TC       +2                                    
054216,000494: 43,3740           03742                           TC       +2                                    
054217,000495: 43,3741           64753                           AD       S+1                                   
054218,000496: 43,3742           55371                           TS       SKEEP1                                
054219,000497: 43,3743           40001        BNKCHK             CS       L                                     #  = - BANK NUMBER
054220,000498: 43,3744           61371                           AD       SKEEP1                                
054221,000499: 43,3745           67752                           AD       S-1                                   
054222,000500: 43,3746           03320                           TC       -1CHK                                 #  CHECK SUM
054223,000501: 43,3747           03660                           TC       NXTBNK                                
054224,000502: 
054225,000503: 43,3750     0067                                  EBANK=   NEWJOB                                
054226,000504: 43,3750           66100        LSTBNKCH           BBCON*                                         #  * CONSTANT, LAST BANK.
054227,000505: 

End of include-file AGC_BLOCK_TWO_SELF-CHECK.agc.  Parent file is MAIN.agc