Source Code

These source-code files derive from a printout of Luminary 116 (the Apollo 12 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Ron Burkey, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071
	19:09 AUG. 11,1969
Note that the date is the date of the printout, not the date of the program revision.

053994,000002:                                                                                                  ## Copyright:   Public domain.
053995,000003:                                                                                                  ## Filename:    AGC_BLOCK_TWO_SELF-CHECK.agc
053996,000004:                                                                                                  ## Purpose:     A section of Luminary revision 116.
053997,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM) 
053998,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 12.
053999,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
054000,000008:                                                                                                  ##              that the code format has been changed to conform to the
054001,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
054002,000010:                                                                                                  ##              original YUL assembler.
054003,000011:                                                                                                  ## Reference:   pp. 1274-1283
054004,000012:                                                                                                  ## Assembler:   yaYUL
054005,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
054006,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
054007,000015:                                                                                                  ## Mod history: 2017-01-22 MAS  Created from Luminary 99.
054008,000016:                                                                                                  ##              2017-01-24 RRB  Updated for Luminary 116.
054009,000017:                                                                                                  ##              2017-01-28 RSB  WTIH -> WITH.
054010,000018:                                                                                                  ##              2017-03-10 RSB  Proofed comment text via 3-way diff vs
054011,000019:                                                                                                  ##                              Luminary 99 and 132 ... no problems found.
054012,000020: 

Page 1274

054014,000022:                                                                                                  #  PROGRAM DESCRIPTION                           DATE  20 DECEMBER 1967
054015,000023:                                                                                                  #  PROGRAM NAME - SELF-CHECK                     LOG SECTION  AGC BLOCK TWO SELF-CHECK
054016,000024:                                                                                                  #  MOD NO - 1                                    ASSEMBLY SUBROUTINE UTILITYM REV 25
054017,000025:                                                                                                  #  MOD BY - GAUNTT
054018,000026: 
054019,000027:                                                                                                  #  FUNCTIONAL DESCRIPTION
054020,000028:                                                                                                  #       PROGRAM HAS TWO MAIN PARTS. THE FIRST IS SELF-CHECK WHICH RUNS AS A ZERO PRIORITY JOB WITH NO CORE SET, AS
054021,000029:                                                                                                  #  PART OF THE BACK-UP IDLE LOOP. THE SECOND IS SHOW-BANKSUM WHICH RUNS AS A REGULAR EXECUTIVE JOB WITH ITS OWN
054022,000030:                                                                                                  #  STARTING VERB.
054023,000031:                                                                                                  #       THE PURPOSE OF SELF-CHECK IS TO CHECK OUT VARIOUS PARTS OF THE COMPUTER AS OUTLINED BELOW IN THE OPTIONS.
054024,000032:                                                                                                  #       THE PURPOSE OF SHOW-BANKSUM IS TO DISPLAY THE SUM OF EACH BANK, ONE AT A TIME.
054025,000033:                                                                                                  #       IN ALL THERE ARE 7 POSSIBLE OPTIONS IN THIS BLOCK II VERSION OF SELF-CHECK. MORE DETAIL DESCRIPTION MAY BE
054026,000034:                                                                                                  #  FOUND IN E-2065 BLOCK II AGC SELF-CHECK AND SHOW BANKSUM BY EDWIN D. SMALLY DECEMBER 1966, AND ADDENDA 2 AND 3.
054027,000035:                                                                                                  #       THE DIFFERENT OPTIONS ARE CONTROLLED BY PUTTING DIFFERENT NUMBERS IN THE SMODE REGISTER (NOUN 27). BELOW IS
054028,000036:                                                                                                  #  A DESCRIPTION OF WHAT PARTS OF THE COMPUTER THAT ARE CHECKED BY THE OPTIONS, AND THE CORRESPONDING NUMBER, IN
054029,000037:                                                                                                  #  OCTAL, TO LOAD INTO SMODE.
054030,000038:                                                                                                  #  +-4   ERASABLE MEMORY
054031,000039:                                                                                                  #  +-5   FIXED MEMORY
054032,000040:                                                                                                  #  +-1,2,3,6,7,10   EVERYTHING IN OPTIONS 4 AND 5.
054033,000041:                                                                                                  #  -0    SAME AS +-10 UNTIL AN ERROR IS DETECTED.
054034,000042:                                                                                                  #  +0    NO CHECK, PUTS COMPUTER INTO THE BACKUP IDLE LOOP.
054035,000043: 
054036,000044:                                                                                                  #  WARNINGS
054037,000045: 
054038,000046:                                                                                                  #       USE OF E MEMORY RESERVED FOR SELF-CHECK (EVEN IN IDLE LOOP) AS TEMP STORAGE BY OTHER PROGRAMS IS DANGEROUS.
054039,000047:                                                                                                  #       SMODE SET GREATER THAN OCT 10 PUTS COMPUTER INTO BACKUP IDLE LOOP.
054040,000048: 
054041,000049:                                                                                                  #  CALLING SEQUENCE
054042,000050: 
054043,000051:                                                                                                  #       TO CALL SELF-CHECK KEY IN
054044,000052:                                                                                                  #            V 21 N 27 E  OPTION NUMBER E
054045,000053:                                                                                                  #        TO CALL SHOW-BANKSUM KEY IN
054046,000054:                                                                                                  #            V 91 E          DISPLAYS FIRST BANK
054047,000055:                                                                                                  #            V 33 E          PROCEED, DISPLAYS NEXT BANK
054048,000056: 
054049,000057:                                                                                                  #  EXIT MODES, NORMAL AND ALARM
054050,000058: 
054051,000059:                                                                                                  #       SELF-CHECK NORMALLY CONTINUES INDEFINITELY UNLESS THERE IS AN ERROR DETECTED. IF SO + OPTION NUMBERS PUT
054052,000060:                                                                                                  #  COMPUTER INTO BACKUP IDLE LOOP, - OPTION NUMBERS RESTART THE OPTION.
054053,000061: 
054054,000062:                                                                                                  #       THE -0 OPTION PROCEEDS FROM THE LINE FOLLOWING THE LINE WHERE THE ERROR WAS DETECTED.
054055,000063: 
054056,000064:                                                                                                  #       SHOW-BANKSUM PROCEEDS UNTIL A TERMINATE IS KEYED IN (V 34 E).  THE COMPUTER IS PUT INTO THE BACKUP IDLE LOOP
054057,000065: 
054058,000066:                                                                                                  #  OUTPUT

Page 1275

054060,000068:                                                                                                  #       SELF-CHECK UPON DETECTING AN ERROR LOADS THE SELF-CHECK ALARM CONSTANT (01102) INTO THE FAILREG SET AND
054061,000069:                                                                                                  #  TURNS ON THE ALARM LIGHT. THE OPERATOR MAY THEN DISPLAY THE THREE FAILREGS BY KEYING IN V 05 N 09 E. FOR FURTHER
054062,000070:                                                                                                  #  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,
054063,000071:                                                                                                  #  IN R2 THE BBCON OF SELF-CHECK, AND IN R3 THE TOTAL NUMBER OF ERRORS DETECTED BY SELF-CHECK SINCE THE LAST MAN
054064,000072:                                                                                                  #  INITIATED FRESH START (SLAP1).
054065,000073:                                                                                                  #       SHOW-BANKSUM STARTING WITH BANK 0 DISPLAYS IN R1 THE BANK SUM (A +-NUMBER EQUAL TO THE BANK NUMBER), IN R2
054066,000074:                                                                                                  #  THE BANK NUMBER, AND IN R3 THE BUGGER WORD.
054067,000075: 
054068,000076:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
054069,000077: 
054070,000078:                                                                                                  #       ACCOMPLISHED BY FRESH START
054071,000079:                                                                                                  #            SMODE SET TO +0
054072,000080: 
054073,000081:                                                                                                  #  DEBRIS
054074,000082: 
054075,000083:                                                                                                  #        ALL EXITS FROM THE CHECK OF ERASABLE (ERASCHK) RESTORE ORIGINAL CONTENTS TO REGISTERS UNDER CHECK.
054076,000084:                                                                                                  #  EXCEPTION IS A RESTART. RESTART THAT OCCURS DURING ERASCHK RESTORES ERASABLE, UNLESS THERE IS EVIDENCE TO DOUBT
054077,000085:                                                                                                  #  E MEMORY, IN WHICH CASE PROGRAM THEN DOES A FRESH START (DOFSTART).
054078,000086: 
054079,000087: 25,3737                                           BANK     25                                    
054080,000088: 43,2000                                           SETLOC   SELFCHEC                              
054081,000089: 43,2000                                           BANK                                           
054082,000090: 
054083,000091: 43,3253                                           COUNT*   $$/SELF                               
054084,000092: 43,3253     4753               SBIT1              EQUALS   BIT1                                  
054085,000093: 43,3253     4752               SBIT2              EQUALS   BIT2                                  
054086,000094: 43,3253     4751               SBIT3              EQUALS   BIT3                                  
054087,000095: 43,3253     4750               SBIT4              EQUALS   BIT4                                  
054088,000096: 43,3253     4747               SBIT5              EQUALS   BIT5                                  
054089,000097: 43,3253     4746               SBIT6              EQUALS   BIT6                                  
054090,000098: 43,3253     4745               SBIT7              EQUALS   BIT7                                  
054091,000099: 43,3253     4744               SBIT8              EQUALS   BIT8                                  
054092,000100: 43,3253     4743               SBIT9              EQUALS   BIT9                                  
054093,000101: 43,3253     4742               SBIT10             EQUALS   BIT10                                 
054094,000102: 43,3253     4741               SBIT11             EQUALS   BIT11                                 
054095,000103: 43,3253     4740               SBIT12             EQUALS   BIT12                                 
054096,000104: 43,3253     4737               SBIT13             EQUALS   BIT13                                 
054097,000105: 43,3253     4736               SBIT14             EQUALS   BIT14                                 
054098,000106: 43,3253     4735               SBIT15             EQUALS   BIT15                                 
054099,000107: 
054100,000108: 43,3253     4755               S+ZERO             EQUALS   ZERO                                  
054101,000109: 43,3253     4753               S+1                EQUALS   BIT1                                  
054102,000110: 43,3253     4752               S+2                EQUALS   BIT2                                  
054103,000111: 43,3253     6250               S+3                EQUALS   THREE                                 
054104,000112: 43,3253     4751               S+4                EQUALS   FOUR                                  
054105,000113: 43,3253     4756               S+5                EQUALS   FIVE                                  
054106,000114: 43,3253     6245               S+6                EQUALS   SIX                                   

Page 1276

054108,000116: 43,3253     4757               S+7                EQUALS   SEVEN                                 
054109,000117: 43,3253     4357               S8BITS             EQUALS   LOW8                                  #  00377
054110,000118: 43,3253     4771               CNTRCON            =        OCT50                                 #  USED IN CNTRCHK
054111,000119: 43,3253           00061        ERASCON1           OCTAL    00061                                 #  USED IN ERASCHK
054112,000120: 43,3254           01373        ERASCON2           OCTAL    01373                                 #  USED IN ERASCHK
054113,000121: 43,3255     5007               ERASCON6           =        OCT1400                               #  USED IN ERASCHK
054114,000122: 43,3255           01461        ERASCON3           OCTAL    01461                                 #  USED IN ERASCHK
054115,000123: 43,3256           01773        ERASCON4           OCTAL    01773                                 #  USED IN ERASCHK
054116,000124: 43,3257     5012               S10BITS            EQUALS   LOW10                                 #  01777, USED IN ERASCHK
054117,000125: 43,3257     5020               SBNK03             EQUALS   PRIO6                                 #  06000, USED IN ROPECHK
054118,000126: 43,3257     4350               -MAXADRS           =        HI5                                   #  FOR ROPECHK
054119,000127: 43,3257           00060        SIXTY              OCTAL    00060                                 
054120,000128: 43,3260           60017        SUPRCON            OCTAL    60017                                 #  USED IN ROPECHK
054121,000129: 43,3261           17777        S13BITS            OCTAL    17777                                 
054122,000130: 43,3262           25252        CONC+S1            OCTAL    25252                                 #  USED IN CYCLSHFT
054123,000131: 43,3263           52400        CONC+S2            OCTAL    52400                                 #  USED IN CYCLSHFT
054124,000132: 43,3264           76777        ERASCON5           OCTAL    76777                                 
054125,000133: 43,3265     5650               S-7                =        OCT77770                              
054126,000134: 43,3265     6115               S-4                EQUALS   NEG4                                  
054127,000135: 43,3265     7750               S-3                EQUALS   NEG3                                  
054128,000136: 43,3265     7751               S-2                EQUALS   NEG2                                  
054129,000137: 43,3265     7752               S-1                EQUALS   NEGONE                                
054130,000138: 43,3265     4754               S-ZERO             EQUALS   NEG0                                  
054131,000139: 
054132,000140: 43,3265  E3,1400                                  EBANK=   LST1                                  
054133,000141: 43,3265           01371        ADRS1              ADRES    SKEEP1                                
054134,000142: 43,3266           03357        SELFADRS           ADRES    SELFCHK                               #  SELFCHK RETURN ADDRESS. SHOULD BE PUT
054135,000143:                                                                                                  #  IN SELFRET WHEN GOING FROM SELFCHK TO
054136,000144:                                                                                                  #  SHOWSUM AND PUT IN SKEEP1 WHEN GOING
054137,000145:                                                                                                  #  FROM SHOWSUM TO SELF-CHECK.
054138,000146: 
054139,000147: 43,3267           31360        PRERRORS           CA       ERESTORE                              #  IS IT NECESSARY TO RESTORE ERASABLE
054140,000148: 43,3270           00006                           EXTEND                                         
054141,000149: 43,3271           13300                           BZF      ERRORS                                #  NO
054142,000150: 43,3272           00006                           EXTEND                                         
054143,000151: 43,3273           31376                           DCA      SKEEP5                                
054144,000152: 43,3274           51377                           INDEX    SKEEP7                                
054145,000153: 43,3275           52001                           DXCH     0000                                  #  RESTORE THE TWO ERASABLE REGISTERS
054146,000154: 43,3276           34755                           CA       S+ZERO                                
054147,000155: 43,3277           55360                           TS       ERESTORE                              
054148,000156: 43,3300           00004        ERRORS             INHINT                                         
054149,000157: 43,3301           30002                           CA       Q                                     
054150,000158: 43,3302           55357                           TS       SFAIL                                 #  SAVE Q FOR FAILURE LOCATION
054151,000159: 43,3303           55363                           TS       ALMCADR                               #  FOR DISPLAY WITH BBANK AND ERCOUNT
054152,000160: 43,3304           25365                           INCR     ERCOUNT                               #  KEEP TRACK OF NUMBER OF MALFUNCTIONS.
054153,000161: 43,3305           05571        TCALARM2           TC       ALARM2                                
054154,000162: 43,3306           01102                           OCT      01102                                 #  SELF-CHECK MALFUNCTION INDICATOR
054155,000163: 43,3307           11362                           CCS      SMODE                                 
054156,000164: 43,3310           34755        SIDLOOP            CA       S+ZERO                                
054157,000165: 43,3311           55362                           TS       SMODE                                 

Page 1277

054159,000167: 43,3312           03357                           TC       SELFCHK                               #  GO TO IDLE LOOP
054160,000168: 43,3313           01357                           TC       SFAIL                                 #  CONTINUE WITH SELF-CHECK
054161,000169: 
054162,000170: 43,3314           10000        -1CHK              CCS      A                                     
054163,000171: 43,3315           13267                           TCF      PRERRORS                              
054164,000172: 43,3316           13267                           TCF      PRERRORS                              
054165,000173: 43,3317           10000                           CCS      A                                     
054166,000174: 43,3320           13267                           TCF      PRERRORS                              
054167,000175: 43,3321           00002                           TC       Q                                     
054168,000176: 
054169,000177: 43,3322           00006        SMODECHK           EXTEND                                         
054170,000178: 43,3323           23371                           QXCH     SKEEP1                                
054171,000179: 43,3324           03353                           TC       CHECKNJ                               #  CHECK FOR NEW JOB
054172,000180: 43,3325           11362                           CCS      SMODE                                 
054173,000181: 43,3326           03333                           TC       SOPTIONS                              
054174,000182: 43,3327           03324                           TC       SMODECHK   +2                         #  TO BACKUP IDLE LOOP
054175,000183: 43,3330           03333                           TC       SOPTIONS                              
054176,000184: 43,3331           25366                           INCR     SCOUNT                                
054177,000185: 43,3332           01371                           TC       SKEEP1                                #  CONTINUE WITH SELF-CHECK
054178,000186: 
054179,000187: 43,3333           65650        SOPTIONS           AD       S-7                                   
054180,000188: 43,3334           00006                           EXTEND                                         
054181,000189: 43,3335           63337                           BZMF     +2                                    #  FOR OPTIONS BELOW NINE.
054182,000190: 43,3336           03310        BNKOPTN            TC       SIDLOOP                               #  ILLEGAL OPTION.  GO TO IDLE LOOP.
054183,000191: 43,3337           25366                           INCR     SCOUNT                                #  FOR OPTIONS BELOW NINE.
054184,000192: 43,3340           64757                           AD       S+7                                   
054185,000193: 
054186,000194: 43,3341           50000                           INDEX    A                                     
054187,000195: 43,3342           03343                           TC       SOPTION1                              
054188,000196: 43,3343           01371        SOPTION1           TC       SKEEP1                                #  WAS TC+TCF
054189,000197: 43,3344           01371        SOPTION2           TC       SKEEP1                                #  WAS IN:OUT1
054190,000198: 43,3345           01371        SOPTION3           TC       SKEEP1                                #  WAS COUNTCHK
054191,000199: 43,3346           03360        SOPTION4           TC       ERASCHK                               
054192,000200: 43,3347           03541        SOPTION5           TC       ROPECHK                               
054193,000201: 43,3350           01371        SOPTION6           TC       SKEEP1                                
054194,000202: 43,3351           01371        SOPTION7           TC       SKEEP1                                
054195,000203: 43,3352           01371        SOPTON10           TC       SKEEP1                                #  CONTINUE WITH SELF-CHECK
054196,000204: 
054197,000205: 43,3353           00006        CHECKNJ            EXTEND                                         
054198,000206: 43,3354           23361                           QXCH     SELFRET                               #  SAVE RETURN ADDRESS WHILE TESTING NEWJOB
054199,000207: 43,3355           04635                           TC       POSTJUMP                              #  TO SEE IF ANY JOBS HAVE BECOME ACTIVE.
054200,000208: 43,3356           03215                           CADR     ADVAN                                 
054201,000209: 
054202,000210: 43,3357           03322        SELFCHK            TC       SMODECHK                              #  ** CHARLEY, COME IN HERE
054203,000211: 
054204,000212:                                                                                                  #  SKEEP7 HOLDS LOWEST OF TWO ADDRESSES BEING CHECKED.
054205,000213:                                                                                                  #  SKEEP6 HOLDS B(X+1).
054206,000214:                                                                                                  #  SKEEP5 HOLDS B(X).
054207,000215:                                                                                                  #  SKEEP4 HOLDS C(EBANK) DURING ERASLOOP AND CHECKNJ.
054208,000216:                                                                                                  #  SKEEP3 HOLDS LAST ADDRESS BEING CHECKED (HIGHEST ADDRESS).

Page 1278

054210,000218:                                                                                                  #  SKEEP2 CONTROLS CHECKING OF NON-SWITCHABLE ERASABLE MEMORY WITH BANK NUMBERS IN EB.
054211,000219:                                                                                                  #  ERASCHK TAKES APPROXMATELY 7 SECONDS
054212,000220: 
054213,000221: 43,3360           34753        ERASCHK            CA       S+1                                   
054214,000222: 43,3361           55372                           TS       SKEEP2                                
054215,000223: 43,3362           34755        0EBANK             CA       S+ZERO                                
054216,000224: 43,3363           54003                           TS       EBANK                                 
054217,000225: 43,3364           33255                           CA       ERASCON3                              #  01461
054218,000226: 43,3365           55377                           TS       SKEEP7                                #  STARTING ADDRESS
054219,000227: 43,3366           35012                           CA       S10BITS                               #  01777
054220,000228: 43,3367           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
054221,000229: 43,3370           03410                           TC       ERASLOOP                              
054222,000230: 
054223,000231: 43,3371           35007        E134567B           CA       ERASCON6                              #  01400
054224,000232: 43,3372           55377                           TS       SKEEP7                                #  STARTING ADDRESS
054225,000233: 43,3373           35012                           CA       S10BITS                               #  01777
054226,000234: 43,3374           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
054227,000235: 43,3375           03410                           TC       ERASLOOP                              
054228,000236: 
054229,000237: 43,3376           35007        2EBANK             CA       ERASCON6                              #  01400
054230,000238: 43,3377           55377                           TS       SKEEP7                                #  STARTING ADDRESS
054231,000239: 43,3400           33256                           CA       ERASCON4                              #  01773
054232,000240: 43,3401           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
054233,000241: 43,3402           03410                           TC       ERASLOOP                              
054234,000242: 
054235,000243: 43,3403           55372        NOEBANK            TS       SKEEP2                                #  +0
054236,000244: 43,3404           33253                           CA       ERASCON1                              #  00061
054237,000245: 43,3405           55377                           TS       SKEEP7                                #  STARTING ADDRESS
054238,000246: 43,3406           33254                           CA       ERASCON2                              #  01373
054239,000247: 43,3407           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
054240,000248: 
054241,000249: 43,3410           00004        ERASLOOP           INHINT                                         
054242,000250: 43,3411           30003                           CA       EBANK                                 #  STORES C(EBANK)
054243,000251: 43,3412           55374                           TS       SKEEP4                                
054244,000252: 43,3413           00006                           EXTEND                                         
054245,000253: 43,3414           51377                           NDX      SKEEP7                                
054246,000254: 43,3415           30001                           DCA      0000                                  
054247,000255: 43,3416           53376                           DXCH     SKEEP5                                #  STORES C(X) AND C(X+1) IN SKEEP6 AND 5.
054248,000256: 43,3417           31377                           CA       SKEEP7                                
054249,000257: 43,3420           55360                           TS       ERESTORE                              #  IF RESTART, RESTORE C(X) AND C(X+1)
054250,000258: 43,3421           54001                           TS       L                                     
054251,000259: 43,3422           24001                           INCR     L                                     
054252,000260: 43,3423           50000                           NDX      A                                     
054253,000261: 43,3424           52001                           DXCH     0000                                  #  PUTS OWN ADDRESS IN X AND X +1
054254,000262: 43,3425           51377                           NDX      SKEEP7                                
054255,000263: 43,3426           40001                           CS       0001                                  #  CS  X+1
054256,000264: 43,3427           51377                           NDX      SKEEP7                                
054257,000265: 43,3430           60000                           AD       0000                                  #  AD X
054258,000266: 43,3431           03314                           TC       -1CHK                                 
054259,000267: 43,3432           31360                           CA       ERESTORE                              #  HAS ERASABLE BEEN RESTORED
054260,000268: 43,3433           00006                           EXTEND                                         

Page 1279

054262,000270: 43,3434           13460                           BZF      ELOOPFIN                              #  YES, EXIT ERASLOOP.
054263,000271: 43,3435           00006                           EXTEND                                         
054264,000272: 43,3436           51377                           NDX      SKEEP7                                
054265,000273: 43,3437           40001                           DCS      0000                                  #  COMPLEMENT OF ADDRESS OF X AND X+1
054266,000274: 43,3440           51377                           NDX      SKEEP7                                
054267,000275: 43,3441           52001                           DXCH     0000                                  #  PUT COMPLEMENT OF ADDRESS OF X AND X+1
054268,000276: 43,3442           51377                           NDX      SKEEP7                                
054269,000277: 43,3443           40000                           CS       0000                                  #  CS X
054270,000278: 43,3444           51377                           NDX      SKEEP7                                
054271,000279: 43,3445           60001                           AD       0001                                  #  AD X+1
054272,000280: 43,3446           03314                           TC       -1CHK                                 
054273,000281: 43,3447           31360                           CA       ERESTORE                              #  HAS ERASABLE BEEN RESTORED
054274,000282: 43,3450           00006                           EXTEND                                         
054275,000283: 43,3451           13460                           BZF      ELOOPFIN                              #  YES, EXIT ERASLOOP.
054276,000284: 43,3452           00006                           EXTEND                                         
054277,000285: 43,3453           31376                           DCA      SKEEP5                                
054278,000286: 43,3454           51377                           NDX      SKEEP7                                
054279,000287: 43,3455           52001                           DXCH     0000                                  #  PUT B(X) AND B(X+1) BACK INTO X AND X+1
054280,000288: 43,3456           34755                           CA       S+ZERO                                
054281,000289: 43,3457           55360                           TS       ERESTORE                              #  IF RESTART, DO NOT RESTORE C(X), C(X+1)
054282,000290: 43,3460           00003        ELOOPFIN           RELINT                                         
054283,000291: 43,3461           03353                           TC       CHECKNJ                               #  CHECK FOR NEW JOB
054284,000292: 43,3462           31374                           CA       SKEEP4                                #  REPLACES B(EBANK)
054285,000293: 43,3463           54003                           TS       EBANK                                 
054286,000294: 43,3464           25377                           INCR     SKEEP7                                
054287,000295: 43,3465           41377                           CS       SKEEP7                                
054288,000296: 43,3466           61373                           AD       SKEEP3                                
054289,000297: 43,3467           00006                           EXTEND                                         
054290,000298: 43,3470           13472                           BZF      +2                                    
054291,000299: 43,3471           03410                           TC       ERASLOOP                              #  GO TO NEXT ADDRESS IN SAME BANK
054292,000300: 43,3472           11372                           CCS      SKEEP2                                
054293,000301: 43,3473           03403                           TC       NOEBANK                               
054294,000302: 43,3474           25372                           INCR     SKEEP2                                #  PUT +1 IN SKEEP2.
054295,000303: 43,3475           30003                           CA       EBANK                                 
054296,000304: 43,3476           64743                           AD       SBIT9                                 
054297,000305: 43,3477           54003                           TS       EBANK                                 
054298,000306: 43,3500           63264                           AD       ERASCON5                              #  76777, CHECK FOR BANK E2
054299,000307: 43,3501           00006                           EXTEND                                         
054300,000308: 43,3502           13376                           BZF      2EBANK                                
054301,000309: 43,3503           10003                           CCS      EBANK                                 
054302,000310: 43,3504           03371                           TC       E134567B                              #  GO TO EBANKS 1,3,4,5,6, AND 7
054303,000311: 43,3505           35007                           CA       ERASCON6                              #  END OF ERASCHK
054304,000312: 43,3506           54003                           TS       EBANK                                 
054305,000313: 
054306,000314:                                                                                                  #  CNTRCHK PERFORMS A CS OF ALL REGISTERS FROM OCT. 60 THROUGH OCT. 10.
054307,000315:                                                                                                  #  INCLUDED ARE ALL COUNTERS, T6-1, CYCLE AND SHIFT, AND ALL RUPT REGISTERS
054308,000316: 
054309,000317: 43,3507           34771        CNTRCHK            CA       CNTRCON                               #  00050
054310,000318: 43,3510           55372        CNTRLOOP           TS       SKEEP2                                
054311,000319: 43,3511           64750                           AD       SBIT4                                 #  +10 OCTAL
054312,000320: 43,3512           50000                           INDEX    A                                     
054313,000321: 43,3513           40000                           CS       0000                                  

Page 1280

054315,000323: 43,3514           11372                           CCS      SKEEP2                                
054316,000324: 43,3515           03510                           TC       CNTRLOOP                              
054317,000325: 
054318,000326:                                                                                                  #  CYCLSHFT CHECKS THE CYCLE AND SHIFT REGISTERS
054319,000327: 
054320,000328: 43,3516           33262        CYCLSHFT           CA       CONC+S1                               #  25252
054321,000329: 43,3517           54020                           TS       CYR                                   #  C(CYR) = 12525
054322,000330: 43,3520           54022                           TS       CYL                                   #  C(CYL) = 52524
054323,000331: 43,3521           54021                           TS       SR                                    #  C(SR) = 12525
054324,000332: 43,3522           54023                           TS       EDOP                                  #  C(EDOP) = 00125
054325,000333: 43,3523           60020                           AD       CYR                                   #  37777         C(CYR) = 45252
054326,000334: 43,3524           60022                           AD       CYL                                   #  00-12524      C(CYL) = 25251
054327,000335: 43,3525           60021                           AD       SR                                    #  00-25251      C(SR) = 05252
054328,000336: 43,3526           60023                           AD       EDOP                                  #  00-25376      C(EDOP) = +0
054329,000337: 43,3527           63263                           AD       CONC+S2                               #  C(CONC+S2) = 52400
054330,000338: 43,3530           03314                           TC       -1CHK                                 
054331,000339: 43,3531           60020                           AD       CYR                                   #  45252
054332,000340: 43,3532           60022                           AD       CYL                                   #  72523
054333,000341: 43,3533           60021                           AD       SR                                    #  77775
054334,000342: 43,3534           60023                           AD       EDOP                                  #  77775
054335,000343: 43,3535           64753                           AD       S+1                                   #  77776
054336,000344: 43,3536           03314                           TC       -1CHK                                 
054337,000345: 
054338,000346: 43,3537           25367                           INCR     SCOUNT     +1                         
054339,000347: 43,3540           03322                           TC       SMODECHK                              
054340,000348: 
054341,000349:                                                                                                  #  SKEEP1 HOLDS SUM
054342,000350:                                                                                                  #  SKEEP2 HOLDS PRESENT CONTENTS OF ADDRESS IN ROPECHK AND SHOWSUM ROUTINES
054343,000351:                                                                                                  #  SKEEP2 HOLDS BANK NUMBER IN LOW ORDER BITS DURING SHOWSUM DISPLAY
054344,000352:                                                                                                  #  SKEEP3 HOLDS PRESENT ADDRESS (00000 TO 01777 IN COMMON FIXED BANKS)
054345,000353:                                                                                                  #                               (04000 TO 07777 IN FXFX BANKS)
054346,000354:                                                                                                  #  SKEEP3 HOLDS BUGGER WORD DURING SHOWSUM DISPLAY
054347,000355:                                                                                                  #  SKEEP4 HOLDS BANK NUMBER AND SUPER BANK NUMBER
054348,000356:                                                                                                  #  SKEEP5 COUNTS 2 SUCCESSIVE TC SELF WORDS
054349,000357:                                                                                                  #  SKEEP6 CONTROLS ROPECHK OR SHOWSUM OPTION
054350,000358:                                                                                                  #  SKEEP7 CONTROLS WHEN ROUNTINE IS IN COMMON FIXED OR FIXED FIXED BANKS
054351,000359: 
054352,000360: 43,3541           34754        ROPECHK            CA       S-ZERO                                #  *
054353,000361: 43,3542           55376                           TS       SKEEP6                                #  * -0 FOR ROPECHK.
054354,000362: 43,3543           34755        STSHOSUM           CA       S+ZERO                                #  * SHOULD BE ROPECHK
054355,000363: 
054356,000364: 43,3544           55374                           TS       SKEEP4                                #  BANK NUMBER
054357,000365: 43,3545           34753                           CA       S+1                                   
054358,000366: 43,3546           55377        COMMFX             TS       SKEEP7                                
054359,000367: 43,3547           34755                           CA       S+ZERO                                
054360,000368: 43,3550           55371                           TS       SKEEP1                                
054361,000369: 43,3551           55373                           TS       SKEEP3                                
054362,000370: 43,3552           34753                           CA       S+1                                   
054363,000371: 43,3553           55375                           TS       SKEEP5                                #  COUNTS DOWN 2 TC SELF WORDS
054364,000372: 43,3554           31374        COMADRS            CA       SKEEP4                                
054365,000373: 43,3555           54001                           TS       L                                     #  TO SET SUPER BANK
054366,000374: 43,3556           74350                           MASK     HI5                                   

Page 1281

054368,000376: 43,3557           61373                           AD       SKEEP3                                
054369,000377: 43,3560           04651                           TC       SUPDACAL                              #  SUPER DATA CALL
054370,000378: 43,3561           03604                           TC       ADSUM                                 
054371,000379: 43,3562           64741                           AD       SBIT11                                #  02000
054372,000380: 43,3563           03615                           TC       ADRSCHK                               
054373,000381: 
054374,000382: 43,3564           40000        FXFX               CS       A                                     
054375,000383: 43,3565           55377                           TS       SKEEP7                                
054376,000384: 43,3566           00006                           EXTEND                                         
054377,000385: 43,3567           13572                           BZF      +3                                    
054378,000386: 43,3570           34740                           CA       SBIT12                                #  04000, STARTING ADDRESS OF BANK 02
054379,000387: 43,3571           03573                           TC       +2                                    
054380,000388: 43,3572           35020                           CA       SBNK03                                #  06000, STARTING ADDRESS OF BANK 03
054381,000389: 43,3573           55373                           TS       SKEEP3                                
054382,000390: 43,3574           34755                           CA       S+ZERO                                
054383,000391: 43,3575           55371                           TS       SKEEP1                                
054384,000392: 43,3576           34753                           CA       S+1                                   
054385,000393: 43,3577           55375                           TS       SKEEP5                                #  COUNTS DOWN 2 TC SELF WORDS
054386,000394: 43,3600           51373        FXADRS             INDEX    SKEEP3                                
054387,000395: 43,3601           30000                           CA       0000                                  
054388,000396: 43,3602           03604                           TC       ADSUM                                 
054389,000397: 43,3603           03615                           TC       ADRSCHK                               
054390,000398: 
054391,000399: 43,3604           55372        ADSUM              TS       SKEEP2                                
054392,000400: 43,3605           61371                           AD       SKEEP1                                
054393,000401: 43,3606           55371                           TS       SKEEP1                                
054394,000402: 43,3607           34755                           CAF      S+ZERO                                
054395,000403: 43,3610           61371                           AD       SKEEP1                                
054396,000404: 43,3611           55371                           TS       SKEEP1                                
054397,000405: 43,3612           41372                           CS       SKEEP2                                
054398,000406: 43,3613           61373                           AD       SKEEP3                                
054399,000407: 43,3614           00002                           TC       Q                                     
054400,000408: 
054401,000409: 43,3615           22000        ADRSCHK            LXCH     A                                     
054402,000410: 43,3616           31373                           CA       SKEEP3                                
054403,000411: 43,3617           75012                           MASK     LOW10                                 #  RELATIVE ADDRESS
054404,000412: 43,3620           64350                           AD       -MAXADRS                              #  SUBTRACT MAX RELATIVE ADDRESS = 1777.
054405,000413: 43,3621           00006                           EXTEND                                         
054406,000414: 43,3622           13711                           BZF      SOPTION                               #  CHECKSUM FINISHED IF LAST ADDRESS.
054407,000415: 43,3623           11375                           CCS      SKEEP5                                #  IS CHECKSUM FINISHED
054408,000416: 43,3624           03627                           TC       +3                                    #  NO
054409,000417: 43,3625           03627                           TC       +2                                    #  NO
054410,000418: 43,3626           03711                           TC       SOPTION                               #  GO TO ROPECHK SHOWSUM OPTION
054411,000419: 43,3627           10001                           CCS      L                                     #  -0 MEANS A TC SELF WORD.
054412,000420: 43,3630           03637                           TC       CONTINU                               
054413,000421: 43,3631           03637                           TC       CONTINU                               
054414,000422: 43,3632           03637                           TC       CONTINU                               
054415,000423: 43,3633           11375                           CCS      SKEEP5                                
054416,000424: 43,3634           03640                           TC       CONTINU    +1                         
054417,000425: 43,3635           37752                           CA       S-1                                   

Page 1282

054419,000427: 43,3636           03640                           TC       CONTINU    +1                         #  AD IN THE BUGGER WORD
054420,000428: 43,3637           34753        CONTINU            CA       S+1                                   #  MAKE SURE TWO CONSECUTIVE TC SELF WORDS
054421,000429: 43,3640           55375                           TS       SKEEP5                                
054422,000430: 43,3641           11376                           CCS      SKEEP6                                #  *
054423,000431: 43,3642           10067                           CCS      NEWJOB                                #  * +1, SHOWSUM
054424,000432: 43,3643           05122                           TC       CHANG1                                #  *
054425,000433: 43,3644           03646                           TC       +2                                    #  *
054426,000434: 43,3645           03353                           TC       CHECKNJ                               #  -0 IN SKEEP6 FOR ROPECHK
054427,000435: 
054428,000436: 43,3646           25373        ADRS+1             INCR     SKEEP3                                
054429,000437: 43,3647           11377                           CCS      SKEEP7                                
054430,000438: 43,3650           03554                           TC       COMADRS                               
054431,000439: 43,3651           03554                           TC       COMADRS                               
054432,000440: 43,3652           03600                           TC       FXADRS                                
054433,000441: 43,3653           03600                           TC       FXADRS                                
054434,000442: 
054435,000443: 43,3654           41374        NXTBNK             CS       SKEEP4                                
054436,000444: 43,3655           63744                           AD       LSTBNKCH                              #  LAST BANK TO BE CHECKED
054437,000445: 43,3656           00006                           EXTEND                                         
054438,000446: 43,3657           13146                           BZF      ENDSUMS                               #  END OF SUMMING OF BANKS.
054439,000447: 43,3660           31374                           CA       SKEEP4                                
054440,000448: 43,3661           64741                           AD       SBIT11                                
054441,000449: 43,3662           55374                           TS       SKEEP4                                #  37 TO 40 INCRMTS SKEEP4 BY END RND CARRY
054442,000450: 43,3663           03667                           TC       CHKSUPR                               
054443,000451: 43,3664           34735        17TO20             CA       SBIT15                                
054444,000452: 43,3665           27374                           ADS      SKEEP4                                #  SET FOR BANK 20
054445,000453: 43,3666           03703                           TC       GONXTBNK                              
054446,000454: 43,3667           74350        CHKSUPR            MASK     HI5                                   
054447,000455: 43,3670           00006                           EXTEND                                         
054448,000456: 43,3671           13701                           BZF      NXTSUPR                               #  INCREMENT SUPER BANK
054449,000457: 43,3672           63261        27TO30             AD       S13BITS                               
054450,000458: 43,3673           00006                           EXTEND                                         
054451,000459: 43,3674           13676                           BZF      +2                                    #  BANK SET FOR 30
054452,000460: 43,3675           03703                           TC       GONXTBNK                              
054453,000461: 43,3676           33257                           CA       SIXTY                                 #  FIRST SUPER BANK
054454,000462: 43,3677           27374                           ADS      SKEEP4                                
054455,000463: 43,3700           03703                           TC       GONXTBNK                              
054456,000464: 43,3701           63260        NXTSUPR            AD       SUPRCON                               #  SET BNK 30 + INCR SUPR BNK AND CANCEL
054457,000465: 43,3702           27374                           ADS      SKEEP4                                #  ERC BIT OF THE 37 TO 40 ADVANCE.
054458,000466: 43,3703           11377        GONXTBNK           CCS      SKEEP7                                
054459,000467: 43,3704           03546                           TC       COMMFX                                
054460,000468: 43,3705           34753                           CA       S+1                                   
054461,000469: 43,3706           03564                           TC       FXFX                                  
054462,000470: 43,3707           34745                           CA       SBIT7                                 #  HAS TO BE LARGER THAN NO OF FXSW BANKS.
054463,000471: 43,3710           03546                           TC       COMMFX                                
054464,000472: 
054465,000473: 43,3711           31374        SOPTION            CA       SKEEP4                                
054466,000474: 43,3712           74350                           MASK     HI5                                   #  = BANK BITS
054467,000475: 43,3713           04331                           TC       LEFT5                                 
054468,000476: 43,3714           54001                           TS       L                                     #  BANK NUMBER BEFORE SUPER BANK

Page 1283

054470,000478: 43,3715           31374                           CA       SKEEP4                                
054471,000479: 43,3716           74357                           MASK     S8BITS                                #  = SUPER BANK BITS
054472,000480: 43,3717           00006                           EXTEND                                         
054473,000481: 43,3720           13726                           BZF      SOPT                                  #  BEFORE SUPER BANK
054474,000482: 43,3721           54021                           TS       SR                                    #  SUPER BANK NECESSARY
054475,000483: 43,3722           30001                           CA       L                                     
054476,000484: 43,3723           74757                           MASK     SEVEN                                 
054477,000485: 43,3724           60021                           AD       SR                                    
054478,000486: 43,3725           54001                           TS       L                                     #  BANK NUMBER WITH SUPER BANK
054479,000487: 43,3726           31376        SOPT               CA       SKEEP6                                #  *
054480,000488: 43,3727           00006                           EXTEND                                         #  *
054481,000489: 43,3730           13732                           BZF      +2                                    #  * ON -0 CONTINUE WITH ROPE CHECK.
054482,000490: 43,3731           03130                           TC       SDISPLAY                              #  * ON +1 GO TO DISPLAY OF SUM.
054483,000491: 43,3732           11371                           CCS      SKEEP1                                #  FORCE SUM TO ABSOLUTE VALUE.
054484,000492: 43,3733           03735                           TC       +2                                    
054485,000493: 43,3734           03736                           TC       +2                                    
054486,000494: 43,3735           64753                           AD       S+1                                   
054487,000495: 43,3736           55371                           TS       SKEEP1                                
054488,000496: 43,3737           40001        BNKCHK             CS       L                                     #  = - BANK NUMBER
054489,000497: 43,3740           61371                           AD       SKEEP1                                
054490,000498: 43,3741           67752                           AD       S-1                                   
054491,000499: 43,3742           03314                           TC       -1CHK                                 #  CHECK SUM
054492,000500: 43,3743           03654                           TC       NXTBNK                                
054493,000501: 
054494,000502: 43,3744     0067                                  EBANK=   NEWJOB                                
054495,000503: 43,3744           66100        LSTBNKCH           BBCON*                                         #  * CONSTANT, LAST BANK.
054496,000504: 

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