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.

053751,000002:                                                                                                  ## Copyright:   Public domain.
053752,000003:                                                                                                  ## Filename:    AGC_BLOCK_TWO_SELF_CHECK.agc
053753,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
053754,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
053755,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
053756,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
053757,000008:                                                                                                  ##              that the code format has been changed to conform to the
053758,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
053759,000010:                                                                                                  ##              original YUL assembler.
053760,000011:                                                                                                  ## Reference:   pp. 1276-1285
053761,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
053762,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
053763,000014:                                                                                                  ## Mod history: 06/05/03 RSB.   Began transcribing.
053764,000015:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
053765,000016:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
053766,000017:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
053767,000018:                                                                                                  ##                              numbers in 1701.pdf.
053768,000019:                                                                                                  ##              2017-01-28 RSB  WTIH -> WITH.
053769,000020:                                                                                                  ##              2017-02-27 RSB  Proofed comment text using octopus/ProoferComments.
053770,000021: 

Page 1276

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

Page 1277

053819,000070:                                                                                                  #        SELF-CHECK UPON DETECTING AN ERROR LOADS THE SELF-CHECK ALARM CONSTANT (01102) INTO THE FAILREG SET AND
053820,000071:                                                                                                  #        TURNS ON THE ALARM LIGHT.  THE OPERATOR MAY THEN DISPLAY THE THREE FAILREGS BY KEYING IN V 05 N 09 E.  FOR FURTHER
053821,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,
053822,000073:                                                                                                  #        IN R2 THE BBCON OF SELF-CHECK, AND IN R3 THE TOTAL NUMBER OF ERRORS DETECTED BY SELF-CHECK SINCE THE LAST MAN
053823,000074:                                                                                                  #        INITIATED FRESH START (SLAP1).
053824,000075: 
053825,000076:                                                                                                  #        SHOW-BANKSUM STARTING WITH BANK 0 DISPLAYS IN R1 THE BANK SUM (A +-NUMBER EQUAL TO THE BANK NUMBER), IN R2
053826,000077:                                                                                                  #        THE BANK NUMBER, AND IN R3 THE BUGGER WORD.
053827,000078: 
053828,000079:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
053829,000080:                                                                                                  #        ACCOMPLISHED BY FRESH START
053830,000081:                                                                                                  #                SMODE SET TO +0
053831,000082: 
053832,000083:                                                                                                  #  DEBRIS
053833,000084:                                                                                                  #        ALL EXITS FROM THE CHECK OF ERASABLE (ERASCHK) RESTORE ORIGINAL CONTENTS TO REGISTERS UNDER CHECK.
053834,000085:                                                                                                  #        EXCEPTION IS A RESTART.  RESTART THAT OCCURS DURING ERASCHK RESTORES ERASABLE, UNLESS THERE IS EVIDENCE TO DOUBT
053835,000086:                                                                                                  #        E MEMORY, IN WHICH CASE PROGRAM THEN DOES A FRESH START (DOFSTART).
053836,000087: 
053837,000088: 25,3757                                           BANK     25                                    
053838,000089: 43,2000                                           SETLOC   SELFCHEC                              
053839,000090: 43,2000                                           BANK                                           
053840,000091: 
053841,000092: 43,3257                                           COUNT*   $$/SELF                               
053842,000093: 43,3257     4753               SBIT1              EQUALS   BIT1                                  
053843,000094: 43,3257     4752               SBIT2              EQUALS   BIT2                                  
053844,000095: 43,3257     4751               SBIT3              EQUALS   BIT3                                  
053845,000096: 43,3257     4750               SBIT4              EQUALS   BIT4                                  
053846,000097: 43,3257     4747               SBIT5              EQUALS   BIT5                                  
053847,000098: 43,3257     4746               SBIT6              EQUALS   BIT6                                  
053848,000099: 43,3257     4745               SBIT7              EQUALS   BIT7                                  
053849,000100: 43,3257     4744               SBIT8              EQUALS   BIT8                                  
053850,000101: 43,3257     4743               SBIT9              EQUALS   BIT9                                  
053851,000102: 43,3257     4742               SBIT10             EQUALS   BIT10                                 
053852,000103: 43,3257     4741               SBIT11             EQUALS   BIT11                                 
053853,000104: 43,3257     4740               SBIT12             EQUALS   BIT12                                 
053854,000105: 43,3257     4737               SBIT13             EQUALS   BIT13                                 
053855,000106: 43,3257     4736               SBIT14             EQUALS   BIT14                                 
053856,000107: 43,3257     4735               SBIT15             EQUALS   BIT15                                 
053857,000108: 
053858,000109: 43,3257     4755               S+ZERO             EQUALS   ZERO                                  
053859,000110: 43,3257     4753               S+1                EQUALS   BIT1                                  
053860,000111: 43,3257     4752               S+2                EQUALS   BIT2                                  
053861,000112: 43,3257     6250               S+3                EQUALS   THREE                                 
053862,000113: 43,3257     4751               S+4                EQUALS   FOUR                                  
053863,000114: 43,3257     4756               S+5                EQUALS   FIVE                                  
053864,000115: 43,3257     6245               S+6                EQUALS   SIX                                   

Page 1278

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

Page 1279

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

Page 1280

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

Page 1281

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

Page 1282

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

Page 1283

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

Page 1284

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

Page 1285

054228,000479: 43,3721           31374                           CA       SKEEP4                                
054229,000480: 43,3722           74357                           MASK     S8BITS                                #  = SUPER BANK BITS
054230,000481: 43,3723           00006                           EXTEND                                         
054231,000482: 43,3724           13732                           BZF      SOPT                                  #  BEFORE SUPER BANK
054232,000483: 43,3725           54021                           TS       SR                                    #  SUPER BANK NECESSARY
054233,000484: 43,3726           30001                           CA       L                                     
054234,000485: 43,3727           74757                           MASK     SEVEN                                 
054235,000486: 43,3730           60021                           AD       SR                                    
054236,000487: 43,3731           54001                           TS       L                                     #  BANK NUMBER WITH SUPER BANK
054237,000488: 43,3732           31376        SOPT               CA       SKEEP6                                #  *
054238,000489: 43,3733           00006                           EXTEND                                         #  *
054239,000490: 43,3734           13736                           BZF      +2                                    #  * ON -0 CONTINUE WITH ROPE CHECK.
054240,000491: 43,3735           03134                           TC       SDISPLAY                              #  * ON +1 GO TO DISPLAY OF SUM.
054241,000492: 43,3736           11371                           CCS      SKEEP1                                #  FORCE SUM TO ABSOLUTE VALUE.
054242,000493: 43,3737           03741                           TC       +2                                    
054243,000494: 43,3740           03742                           TC       +2                                    
054244,000495: 43,3741           64753                           AD       S+1                                   
054245,000496: 43,3742           55371                           TS       SKEEP1                                
054246,000497: 43,3743           40001        BNKCHK             CS       L                                     #  = - BANK NUMBER
054247,000498: 43,3744           61371                           AD       SKEEP1                                
054248,000499: 43,3745           67752                           AD       S-1                                   
054249,000500: 43,3746           03320                           TC       -1CHK                                 #  CHECK SUM
054250,000501: 43,3747           03660                           TC       NXTBNK                                
054251,000502: 
054252,000503: 43,3750     0067                                  EBANK=   NEWJOB                                
054253,000504: 43,3750           66100        LSTBNKCH           BBCON*                                         #  * CONSTANT, LAST BANK.
054254,000505: 

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