Source Code

This is the source-code for the Apollo 9 Command Module's Guidance Computer. These files were derived originally from the scan from MIT's Dibner Institute's now-discontinued website titled "History of Recent Science and Technology", which in turn was originally created by Gary Neff, though his high-quality scans were unfortunately reduced in legibility when presented online. The markings on the front of the printout imply that it was the original AGC developer Norm Brodeur's copy. A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original AGC developer Fred Martin. The source code was transcribed from those images by Ron Burkey. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

059564,000002:                                                                                                  ## Copyright:   Public domain.
059565,000003:                                                                                                  ## Filename:    AGC_BLOCK_TWO_SELF-CHECK.agc
059566,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus, build 249.
059567,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
059568,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 9.
059569,000007:                                                                                                  ## Assembler:   yaYUL
059570,000008:                                                                                                  ## Reference:   Starts on p. 1362
059571,000009:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059572,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo.
059573,000011:                                                                                                  ## Mod history: 08/30/04 RSB.   Adapted from corresponding Luminary13 file.
059574,000012:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
059575,000013:                                                                                                  ##                              original harcopy, as opposed to the PDF page
059576,000014:                                                                                                  ##                              numbers in 1701.pdf.
059577,000015:                                                                                                  ##              2017-01-07 RSB  Cross-diff'd comment text (not whitespace)
059578,000016:                                                                                                  ##                              vs the already-proofed corresponding Colossus
059579,000017:                                                                                                  ##                              237 and Comanche 55 source-code files
059580,000018:                                                                                                  ##                              and corrected errors found.
059581,000019:                                                                                                  ##
059582,000020:                                                                                                  ## The contents of the "Colossus249" files, in general, are transcribed 
059583,000021:                                                                                                  ## from a scanned copy of the program listing.  Notations on this
059584,000022:                                                                                                  ## document read, in part:
059585,000023:                                                                                                  ##
059586,000024:                                                                                                  ##      Assemble revision 249 of AGC program Colossus by NASA
059587,000025:                                                                                                  ##      2021111-041.  October 28, 1968.  
059588,000026:                                                                                                  ##
059589,000027:                                                                                                  ##      This AGC program shall also be referred to as
059590,000028:                                                                                                  ##                              Colossus 1A
059591,000029:                                                                                                  ##
059592,000030:                                                                                                  ##      Prepared by
059593,000031:                                                                                                  ##                      Massachusetts Institute of Technology
059594,000032:                                                                                                  ##                      75 Cambridge Parkway
059595,000033:                                                                                                  ##                      Cambridge, Massachusetts
059596,000034:                                                                                                  ##      under NASA contract NAS 9-4065.
059597,000035:                                                                                                  ##
059598,000036:                                                                                                  ## Refer directly to the online document mentioned above for further information.
059599,000037:                                                                                                  ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
059600,000038:                                                                                                  ##
059601,000039:                                                                                                  ## In some cases, where the source code for Luminary 131 overlaps that of 
059602,000040:                                                                                                  ## Colossus 249, this code is instead copied from the corresponding Luminary 131
059603,000041:                                                                                                  ## source file, and then is proofed to incorporate any changes.
059604,000042: 

Page 1362

059606,000044:                                                                                                  #  PROGRAM DESCRIPTION                           DATE 20 DECEMBER 1967
059607,000045:                                                                                                  #  PROGRAM NAME - SELF-CHECK                     LOG SECTION  AGC BLOCK TWO SELF-CHECK
059608,000046:                                                                                                  #  MOD NO - 1                                    ASSEMBLY SUBROUTINE UTILITYM REV 25
059609,000047:                                                                                                  #  MOD BY - GAUNTT
059610,000048: 
059611,000049:                                                                                                  #  FUNCTIONAL DESCRIPTION
059612,000050:                                                                                                  #        PROGRAM HAS TWO MAIN PARTS.  THE FIRST IS SELF-CHECK WHICH RUNS AS A ZERO PRIORITY JOB WITH NO CORE SET, AS
059613,000051:                                                                                                  #        PART OF THE BACK-UP IDLE LOOP.  THE SECOND IS SHOW-BANKSUM WHICH RUNS AS A REGULAR EXECUTIVE JOB WITH ITS OWN
059614,000052:                                                                                                  #        STARTING VERB.
059615,000053: 
059616,000054:                                                                                                  #        THE PURPOSE OF SELF-CHECK IS TO CHECK OUT VARIOUS PARTS OF THE COMPUTER AS OUTLINED BELOW IN THE OPTIONS.
059617,000055: 
059618,000056:                                                                                                  #        THE PURPOSE OF SHOW-BANKSUM IS TO DISPLAY THE SUM OF EACH BANK, ONE AT A TIME.
059619,000057: 
059620,000058:                                                                                                  #        IN ALL THERE ARE 7 POSSIBLE OPTIONS IN THIS BLOCK II VERSION OF SELF-CHECK.  MORE DETAIL DESCRIPTION MAY BE
059621,000059:                                                                                                  #        FOUND IN E-2065 BLOCK II AGC SELF-CHECK AND SHOW BANKSUM BY EDWIN D. SMALLY DECEMBER 1966, AND ADDENDA 2 AND 3.
059622,000060: 
059623,000061:                                                                                                  #        THE DIFFERENT OPTIONS ARE CONTROLLED BY PUTTING DIFFERENT NUMBERS IN THE SMODE REGISTER (NOUN 27).  BELOW IS
059624,000062:                                                                                                  #        A DESCRIPTION OF WHAT PARTS OF THE COMPUTER THAT ARE CHECKED BY THE OPTIONS, AND THE CORRESPONDING NUMBER, IN
059625,000063:                                                                                                  #        OCTAL, TO LOAD INTO SMODE.
059626,000064:                                                                                                  #                +-4             ERASABLE MEMORY
059627,000065:                                                                                                  #                +-5             FIXED MEMORY
059628,000066:                                                                                                  #                +-1,2,3,6,7,10  EVERYTHING IN OPTIONS 4 AND 5.
059629,000067:                                                                                                  #                -0              SAME AS +-10 UNTIL AN ERROR IS DETECTED.
059630,000068:                                                                                                  #                +0              NO CHECK, PUTS COMPUTER INTO THE BACKUP IDLE LOOP.
059631,000069: 
059632,000070:                                                                                                  #  WARNINGS
059633,000071:                                                                                                  #        USE OF E MEMORY RESERVED FOR SELF-CHECK (EVEN IN IDLE LOOP) AS TEMP STORAGE BY OTHER PROGRAMS IS DANGEROUS.
059634,000072:                                                                                                  #        SMODE SET GREATER THAN OCT 10 PUTS COMPUTER INTO BACKUP IDLE LOOP.
059635,000073: 
059636,000074:                                                                                                  #  CALLING SEQUENCE
059637,000075:                                                                                                  #        TO CALL SELF-CHECK KEY IN
059638,000076:                                                                                                  #                V 21 N 27 E     OPTION NUMBER E
059639,000077:                                                                                                  #        TO CALL SHOW-BANKSUM KEY IN
059640,000078:                                                                                                  #                V 91 E          DISPLAYS FIRST BANK
059641,000079:                                                                                                  #                V 33 E          PROCEED, DISPLAYS NEXT BANK
059642,000080: 
059643,000081:                                                                                                  #  EXIT MODES, NORMAL AND ALARM
059644,000082:                                                                                                  #        SELF-CHECK NORMALLY CONTINUES INDEFINITELY UNLESS THERE IS AN ERROR DETECTED.  IF SO + OPTION NUMBERS PUT
059645,000083:                                                                                                  #        COMPUTER INTO BACKUP IDLE LOOP, - OPTION NUMBERS RESTART THE OPTION.
059646,000084: 
059647,000085:                                                                                                  #        THE -0 OPTION PROCEEDS FROM THE LINE FOLLOWING THE LINE WHERE THE ERROR WAS DETECTED.
059648,000086: 
059649,000087:                                                                                                  #        SHOW-BANKSUM PROCEEDS UNTIL A TERMINATE IS KEYED IN (V 34 E).  THE COMPUTER IS PUT INTO THE BACKUP IDLE LOOP
059650,000088: 
059651,000089:                                                                                                  #  OUTPUT

Page 1363

059653,000091:                                                                                                  #        SELF-CHECK UPON DETECTING AN ERROR LOADS THE SELF-CHECK ALARM CONSTANT (01102) INTO THE FAILREG SET AND
059654,000092:                                                                                                  #        TURNS ON THE ALARM LIGHT.  THE OPERATOR MAY THEN DISPLAY THE THREE FAILREGS BY KEYING IN V 05 N 09 E.  FOR FURTHER
059655,000093:                                                                                                  #        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,
059656,000094:                                                                                                  #        IN R2 THE BBCON OF SELF-CHECK, AND IN R3 THE TOTAL NUMBER OF ERRORS DETECTED BY SELF-CHECK SINCE THE LAST MAN
059657,000095:                                                                                                  #        INITIATED FRESH START (SLAP1).
059658,000096: 
059659,000097:                                                                                                  #        SHOW-BANKSUM STARTING WITH BANK 0 DISPLAYS IN R1 THE BANK SUM (A +-NUMBER EQUAL TO THE BANK NUMBER), IN R2
059660,000098:                                                                                                  #        THE BANK NUMBER, AND IN R3 THE BUGGER WORD.
059661,000099: 
059662,000100:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
059663,000101:                                                                                                  #        ACCOMPLISHED BY FRESH START
059664,000102:                                                                                                  #                SMODE SET TO +0
059665,000103: 
059666,000104:                                                                                                  #  DEBRIS
059667,000105:                                                                                                  #        ALL EXITS FROM THE CHECK OF ERASABLE (ERASCHK) RESTORE ORIGINAL CONTENTS TO REGISTERS UNDER CHECK.
059668,000106:                                                                                                  #        EXCEPTION IS A RESTART.  RESTART THAT OCCURS DURING ERASCHK RESTORES ERASABLE, UNLESS THERE IS EVIDENCE TO DOUBT
059669,000107:                                                                                                  #        E MEMORY, IN WHICH CASE PROGRAM THEN DOES A FRESH START (DOFSTART).
059670,000108: 
059671,000109: 25,3766                                           BANK     25                                    
059672,000110: 43,2000                                           SETLOC   SELFCHEC                              
059673,000111: 43,2000                                           BANK                                           
059674,000112: 
059675,000113: 43,3230                                           COUNT    43/SELF                               
059676,000114: 
059677,000115: 43,3230     4712               SBIT1              EQUALS   BIT1                                  
059678,000116: 43,3230     4711               SBIT2              EQUALS   BIT2                                  
059679,000117: 43,3230     4710               SBIT3              EQUALS   BIT3                                  
059680,000118: 43,3230     4707               SBIT4              EQUALS   BIT4                                  
059681,000119: 43,3230     4706               SBIT5              EQUALS   BIT5                                  
059682,000120: 43,3230     4705               SBIT6              EQUALS   BIT6                                  
059683,000121: 43,3230     4704               SBIT7              EQUALS   BIT7                                  
059684,000122: 43,3230     4703               SBIT8              EQUALS   BIT8                                  
059685,000123: 43,3230     4702               SBIT9              EQUALS   BIT9                                  
059686,000124: 43,3230     4701               SBIT10             EQUALS   BIT10                                 
059687,000125: 43,3230     4700               SBIT11             EQUALS   BIT11                                 
059688,000126: 43,3230     4677               SBIT12             EQUALS   BIT12                                 
059689,000127: 43,3230     4676               SBIT13             EQUALS   BIT13                                 
059690,000128: 43,3230     4675               SBIT14             EQUALS   BIT14                                 
059691,000129: 43,3230     4674               SBIT15             EQUALS   BIT15                                 
059692,000130: 
059693,000131: 43,3230     4714               S+ZERO             EQUALS   ZERO                                  
059694,000132: 43,3230     4712               S+1                EQUALS   BIT1                                  
059695,000133: 43,3230     4711               S+2                EQUALS   BIT2                                  
059696,000134: 43,3230     6214               S+3                EQUALS   THREE                                 
059697,000135: 43,3230     4710               S+4                EQUALS   FOUR                                  
059698,000136: 43,3230     4715               S+5                EQUALS   FIVE                                  

Page 1364

059700,000138: 43,3230     6211               S+6                EQUALS   SIX                                   
059701,000139: 43,3230     4716               S+7                EQUALS   SEVEN                                 
059702,000140: 43,3230     4373               S8BITS             EQUALS   LOW8                                  #  00377
059703,000141: 43,3230     4726               CNTRCON            =        OCT50                                 #  USED IN CNTRCHK
059704,000142: 43,3230           00061        ERASCON1           OCTAL    00061                                 #  USED IN ERASCHK
059705,000143: 43,3231           01373        ERASCON2           OCTAL    01373                                 #  USED IN ERASCHK
059706,000144: 43,3232     4744               ERASCON6           =        OCT1400                               #  USED IN ERASCHK
059707,000145: 43,3232           01461        ERASCON3           OCTAL    01461                                 #  USED IN ERASCHK
059708,000146: 43,3233           01773        ERASCON4           OCTAL    01773                                 #  USED IN ERASCHK
059709,000147: 43,3234     4747               S10BITS            EQUALS   LOW10                                 #  01777, USED IN ERASCHK
059710,000148: 43,3234     4755               SBNK03             EQUALS   PRIO6                                 #  06000, USED IN ROPECHK
059711,000149: 43,3234     4364               -MAXADRS           =        HI5                                   #  FOR ROPECHK
059712,000150: 43,3234           00060        SIXTY              OCTAL    00060                                 
059713,000151: 43,3235           60017        SUPRCON            OCTAL    60017                                 #  USED IN ROPECHK
059714,000152: 43,3236           17777        S13BITS            OCTAL    17777                                 
059715,000153: 43,3237           25252        CONC+S1            OCTAL    25252                                 #  USED IN CYCLSHFT
059716,000154: 43,3240           52400        CONC+S2            OCTAL    52400                                 #  USED IN CYCLSHFT
059717,000155: 43,3241           76777        ERASCON5           OCTAL    76777                                 
059718,000156: 43,3242     5630               S-7                =        OCT77770                              
059719,000157: 43,3242     6061               S-4                EQUALS   NEG4                                  
059720,000158: 43,3242     7714               S-3                EQUALS   NEG3                                  
059721,000159: 43,3242     7715               S-2                EQUALS   NEG2                                  
059722,000160: 43,3242     7716               S-1                EQUALS   NEGONE                                
059723,000161: 43,3242     4713               S-ZERO             EQUALS   NEG0                                  
059724,000162: 
059725,000163: 43,3242  E3,1400                                  EBANK=   LST1                                  
059726,000164: 43,3242           01371        ADRS1              ADRES    SKEEP1                                
059727,000165: 43,3243           03334        SELFADRS           ADRES    SELFCHK                               #  SELFCHK RETURN ADDRESS.  SHOULD BE PUT
059728,000166:                                                                                                  #  IN SELFRET WHEN GOING FROM SELFCHK TO
059729,000167:                                                                                                  #  SHOWSUM AND PUT IN SKEEP1 WHEN GOING
059730,000168:                                                                                                  #  FROM SHOWSUM TO SELF-CHECK.
059731,000169: 
059732,000170: 43,3244           31360        PRERRORS           CA       ERESTORE                              #  IS IT NECESSARY TO RESTORE ERASABLE
059733,000171: 43,3245           00006                           EXTEND                                         
059734,000172: 43,3246           13255                           BZF      ERRORS                                #  NO
059735,000173: 43,3247           00006                           EXTEND                                         
059736,000174: 43,3250           31376                           DCA      SKEEP5                                
059737,000175: 43,3251           51377                           INDEX    SKEEP7                                
059738,000176: 43,3252           52001                           DXCH     0000                                  #  RESTORE THE TWO ERASABLE REGISTERS
059739,000177: 43,3253           34714                           CA       S+ZERO                                
059740,000178: 43,3254           55360                           TS       ERESTORE                              
059741,000179: 43,3255           00004        ERRORS             INHINT                                         
059742,000180: 43,3256           30002                           CA       Q                                     
059743,000181: 43,3257           55357                           TS       SFAIL                                 #  SAVE Q FOR FAILURE LOCATION
059744,000182: 43,3260           55363                           TS       ALMCADR                               #  FOR DISPLAY WITH BBANK AND ERCOUNT
059745,000183: 43,3261           25365                           INCR     ERCOUNT                               #  KEEP TRACK OF NUMBER OF MALFUNCTIONS.
059746,000184: 43,3262           05541        TCALARM2           TC       ALARM2                                
059747,000185: 43,3263           01102                           OCT      01102                                 #  SELF-CHECK MALFUNCTION INDICATOR
059748,000186: 43,3264           11362                           CCS      SMODE                                 
059749,000187: 43,3265           34714        SIDLOOP            CA       S+ZERO                                

Page 1365

059751,000189: 43,3266           55362                           TS       SMODE                                 
059752,000190: 43,3267           03334                           TC       SELFCHK                               #  GO TO IDLE LOOP
059753,000191: 43,3270           01357                           TC       SFAIL                                 #  CONTINUE WITH SELF-CHECK
059754,000192: 
059755,000193: 43,3271           10000        -1CHK              CCS      A                                     
059756,000194: 43,3272           13244                           TCF      PRERRORS                              
059757,000195: 43,3273           13244                           TCF      PRERRORS                              
059758,000196: 43,3274           10000                           CCS      A                                     
059759,000197: 43,3275           13244                           TCF      PRERRORS                              
059760,000198: 43,3276           00002                           TC       Q                                     
059761,000199: 
059762,000200: 43,3277           00006        SMODECHK           EXTEND                                         
059763,000201: 43,3300           23371                           QXCH     SKEEP1                                
059764,000202: 43,3301           03330                           TC       CHECKNJ                               #  CHECK FOR NEW JOB
059765,000203: 43,3302           11362                           CCS      SMODE                                 
059766,000204: 43,3303           03310                           TC       SOPTIONS                              
059767,000205: 43,3304           03301                           TC       SMODECHK   +2                         #  TO BACKUP IDLE LOOP
059768,000206: 43,3305           03310                           TC       SOPTIONS                              
059769,000207: 43,3306           25366                           INCR     SCOUNT                                
059770,000208: 43,3307           01371                           TC       SKEEP1                                #  CONTINUE WITH SELF-CHECK
059771,000209: 
059772,000210: 43,3310           65630        SOPTIONS           AD       S-7                                   
059773,000211: 43,3311           00006                           EXTEND                                         
059774,000212: 43,3312           63314                           BZMF     +2                                    #  FOR OPTIONS BELOW NINE.
059775,000213: 43,3313           03265        BNKOPTN            TC       SIDLOOP                               #  ILLEGAL OPTION.  GO TO IDLE LOOP.
059776,000214: 43,3314           25366                           INCR     SCOUNT                                #  FOR OPTIONS BELOW NINE.
059777,000215: 43,3315           64716                           AD       S+7                                   
059778,000216: 
059779,000217: 43,3316           50000                           INDEX    A                                     
059780,000218: 43,3317           03320                           TC       SOPTION1                              
059781,000219: 43,3320           01371        SOPTION1           TC       SKEEP1                                #  WAS TC+TCF
059782,000220: 43,3321           01371        SOPTION2           TC       SKEEP1                                #  WAS IN:OUT1
059783,000221: 43,3322           01371        SOPTION3           TC       SKEEP1                                #  WAS COUNTCHK
059784,000222: 43,3323           03335        SOPTION4           TC       ERASCHK                               
059785,000223: 43,3324           03516        SOPTION5           TC       ROPECHK                               
059786,000224: 43,3325           01371        SOPTION6           TC       SKEEP1                                
059787,000225: 43,3326           01371        SOPTION7           TC       SKEEP1                                
059788,000226: 43,3327           01371        SOPTON10           TC       SKEEP1                                #  CONTINUE WITH SELF-CHECK
059789,000227: 
059790,000228: 43,3330           00006        CHECKNJ            EXTEND                                         
059791,000229: 43,3331           23361                           QXCH     SELFRET                               #  SAVE RETURN ADDRESS WHILE TESTING NEWJOB
059792,000230: 43,3332           04574                           TC       POSTJUMP                              #  TO SEE IF ANY JOBS HAVE BECOME ACTIVE.
059793,000231: 43,3333           03231                           CADR     ADVAN                                 
059794,000232: 
059795,000233: 43,3334           03277        SELFCHK            TC       SMODECHK                              #  ** CHARLEY, COME IN HERE
059796,000234: 
059797,000235:                                                                                                  #  SKEEP7 HOLDS LOWEST OF TWO ADDRESSES BEING CHECKED.
059798,000236:                                                                                                  #  SKEEP6 HOLDS B(X+1).
059799,000237:                                                                                                  #  SKEEP5 HOLDS B(X).
059800,000238:                                                                                                  #  SKEEP4 HOLDS C(EBANK) DURING ERASLOOP AND CHECKNJ.

Page 1366

059802,000240:                                                                                                  #  SKEEP3 HOLDS LAST ADDRESS BEING CHECKED (HIGHEST ADDRESS).
059803,000241:                                                                                                  #  SKEEP2 CONTROLS CHECKING OF NON-SWITCHABLE ERASABLE MEMORY WITH BANK NUMBERS IN EB.
059804,000242: 
059805,000243:                                                                                                  #  ERASCHK TAKES APPROXMATELY 7 SECONDS
059806,000244: 
059807,000245: 43,3335           34712        ERASCHK            CA       S+1                                   
059808,000246: 43,3336           55372                           TS       SKEEP2                                
059809,000247: 43,3337           34714        0EBANK             CA       S+ZERO                                
059810,000248: 43,3340           54003                           TS       EBANK                                 
059811,000249: 43,3341           33232                           CA       ERASCON3                              #  01461
059812,000250: 43,3342           55377                           TS       SKEEP7                                #  STARTING ADDRESS
059813,000251: 43,3343           34747                           CA       S10BITS                               #  01777
059814,000252: 43,3344           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
059815,000253: 43,3345           03365                           TC       ERASLOOP                              
059816,000254: 
059817,000255: 43,3346           34744        E134567B           CA       ERASCON6                              #  01400
059818,000256: 43,3347           55377                           TS       SKEEP7                                #  STARTING ADDRESS
059819,000257: 43,3350           34747                           CA       S10BITS                               #  01777
059820,000258: 43,3351           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
059821,000259: 43,3352           03365                           TC       ERASLOOP                              
059822,000260: 
059823,000261: 43,3353           34744        2EBANK             CA       ERASCON6                              #  01400
059824,000262: 43,3354           55377                           TS       SKEEP7                                #  STARTING ADDRESS
059825,000263: 43,3355           33233                           CA       ERASCON4                              #  01773
059826,000264: 43,3356           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
059827,000265: 43,3357           03365                           TC       ERASLOOP                              
059828,000266: 
059829,000267: 43,3360           55372        NOEBANK            TS       SKEEP2                                #  +0
059830,000268: 43,3361           33230                           CA       ERASCON1                              #  00061
059831,000269: 43,3362           55377                           TS       SKEEP7                                #  STARTING ADDRESS
059832,000270: 43,3363           33231                           CA       ERASCON2                              #  01373
059833,000271: 43,3364           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
059834,000272: 
059835,000273: 43,3365           00004        ERASLOOP           INHINT                                         
059836,000274: 43,3366           30003                           CA       EBANK                                 #  STORES C(EBANK)
059837,000275: 43,3367           55374                           TS       SKEEP4                                
059838,000276: 43,3370           00006                           EXTEND                                         
059839,000277: 43,3371           51377                           NDX      SKEEP7                                
059840,000278: 43,3372           30001                           DCA      0000                                  
059841,000279: 43,3373           53376                           DXCH     SKEEP5                                #  STORES C(X) AND C(X+1) IN SKEEP6 AND 5.
059842,000280: 43,3374           31377                           CA       SKEEP7                                
059843,000281: 43,3375           55360                           TS       ERESTORE                              #  IF RESTART, RESTORE C(X) AND C(X+1)
059844,000282: 43,3376           54001                           TS       L                                     
059845,000283: 43,3377           24001                           INCR     L                                     
059846,000284: 43,3400           50000                           NDX      A                                     
059847,000285: 43,3401           52001                           DXCH     0000                                  #  PUTS OWN ADDRESS IN X AND X +1
059848,000286: 43,3402           51377                           NDX      SKEEP7                                
059849,000287: 43,3403           40001                           CS       0001                                  #  CS X+1
059850,000288: 43,3404           51377                           NDX      SKEEP7                                
059851,000289: 43,3405           60000                           AD       0000                                  #  AD X
059852,000290: 43,3406           03271                           TC       -1CHK                                 
059853,000291: 43,3407           31360                           CA       ERESTORE                              #  HAS ERASABLE BEEN RESTORED

Page 1367

059855,000293: 43,3410           00006                           EXTEND                                         
059856,000294: 43,3411           13435                           BZF      ELOOPFIN                              #  YES, EXIT ERASLOOP.
059857,000295: 43,3412           00006                           EXTEND                                         
059858,000296: 43,3413           51377                           NDX      SKEEP7                                
059859,000297: 43,3414           40001                           DCS      0000                                  #  COMPLEMENT OF ADDRESS OF X AND X+1
059860,000298: 43,3415           51377                           NDX      SKEEP7                                
059861,000299: 43,3416           52001                           DXCH     0000                                  #  PUT COMPLEMENT OF ADDRESS OF X AND X+1
059862,000300: 43,3417           51377                           NDX      SKEEP7                                
059863,000301: 43,3420           40000                           CS       0000                                  #  CS X
059864,000302: 43,3421           51377                           NDX      SKEEP7                                
059865,000303: 43,3422           60001                           AD       0001                                  #  AD X+1
059866,000304: 43,3423           03271                           TC       -1CHK                                 
059867,000305: 43,3424           31360                           CA       ERESTORE                              #  HAS ERASABLE BEEN RESTORED
059868,000306: 43,3425           00006                           EXTEND                                         
059869,000307: 43,3426           13435                           BZF      ELOOPFIN                              #  YES, EXIT ERASLOOP.
059870,000308: 43,3427           00006                           EXTEND                                         
059871,000309: 43,3430           31376                           DCA      SKEEP5                                
059872,000310: 43,3431           51377                           NDX      SKEEP7                                
059873,000311: 43,3432           52001                           DXCH     0000                                  #  PUT B(X) AND B(X+1) BACK INTO X AND X+1
059874,000312: 43,3433           34714                           CA       S+ZERO                                
059875,000313: 43,3434           55360                           TS       ERESTORE                              #  IF RESTART, DO NOT RESTORE C(X), C(X+1)
059876,000314: 43,3435           00003        ELOOPFIN           RELINT                                         
059877,000315: 43,3436           03330                           TC       CHECKNJ                               #  CHECK FOR NEW JOB
059878,000316: 43,3437           31374                           CA       SKEEP4                                #  REPLACES B(EBANK)
059879,000317: 43,3440           54003                           TS       EBANK                                 
059880,000318: 43,3441           25377                           INCR     SKEEP7                                
059881,000319: 43,3442           41377                           CS       SKEEP7                                
059882,000320: 43,3443           61373                           AD       SKEEP3                                
059883,000321: 43,3444           00006                           EXTEND                                         
059884,000322: 43,3445           13447                           BZF      +2                                    
059885,000323: 43,3446           03365                           TC       ERASLOOP                              #  GO TO NEXT ADDRESS IN SAME BANK
059886,000324: 43,3447           11372                           CCS      SKEEP2                                
059887,000325: 43,3450           03360                           TC       NOEBANK                               
059888,000326: 43,3451           25372                           INCR     SKEEP2                                #  PUT +1 IN SKEEP2.
059889,000327: 43,3452           30003                           CA       EBANK                                 
059890,000328: 43,3453           64702                           AD       SBIT9                                 
059891,000329: 43,3454           54003                           TS       EBANK                                 
059892,000330: 43,3455           63241                           AD       ERASCON5                              #  76777, CHECK FOR BANK E2
059893,000331: 43,3456           00006                           EXTEND                                         
059894,000332: 43,3457           13353                           BZF      2EBANK                                
059895,000333: 43,3460           10003                           CCS      EBANK                                 
059896,000334: 43,3461           03346                           TC       E134567B                              #  GO TO EBANKS 1,3,4,5,6, AND 7
059897,000335: 43,3462           34744                           CA       ERASCON6                              #  END OF ERASCHK
059898,000336: 43,3463           54003                           TS       EBANK                                 
059899,000337: 
059900,000338:                                                                                                  #  CNTRCHK PERFORMS A CS OF ALL REGISTERS FROM OCT. 60 THROUGH OCT. 10.
059901,000339:                                                                                                  #  INCLUDED ARE ALL COUNTERS, T6-1, CYCLE AND SHIFT, AND ALL RUPT REGISTERS
059902,000340: 
059903,000341: 43,3464           34726        CNTRCHK            CA       CNTRCON                               #  00050
059904,000342: 43,3465           55372        CNTRLOOP           TS       SKEEP2                                
059905,000343: 43,3466           64707                           AD       SBIT4                                 #  +10 OCTAL
059906,000344: 43,3467           50000                           INDEX    A                                     

Page 1368

059908,000346: 43,3470           40000                           CS       0000                                  
059909,000347: 43,3471           11372                           CCS      SKEEP2                                
059910,000348: 43,3472           03465                           TC       CNTRLOOP                              
059911,000349: 
059912,000350:                                                                                                  #  CYCLSHFT CHECKS THE CYCLE AND SHIFT REGISTERS
059913,000351: 
059914,000352: 43,3473           33237        CYCLSHFT           CA       CONC+S1                               #  25252
059915,000353: 43,3474           54020                           TS       CYR                                   #  C(CYR) = 12525
059916,000354: 43,3475           54022                           TS       CYL                                   #  C(CYL) = 52524
059917,000355: 43,3476           54021                           TS       SR                                    #  C(SR) = 12525
059918,000356: 43,3477           54023                           TS       EDOP                                  #  C(EDOP) = 00125
059919,000357: 43,3500           60020                           AD       CYR                                   #  37777         C(CYR) = 45252
059920,000358: 43,3501           60022                           AD       CYL                                   #  00-12524      C(CYL) = 25251
059921,000359: 43,3502           60021                           AD       SR                                    #  00-25251      C(SR) = 05252
059922,000360: 43,3503           60023                           AD       EDOP                                  #  00-25376      C(EDOP) = +0
059923,000361: 43,3504           63240                           AD       CONC+S2                               #  C(CONC+S2) = 52400
059924,000362: 43,3505           03271                           TC       -1CHK                                 
059925,000363: 43,3506           60020                           AD       CYR                                   #  45252
059926,000364: 43,3507           60022                           AD       CYL                                   #  72523
059927,000365: 43,3510           60021                           AD       SR                                    #  77775
059928,000366: 43,3511           60023                           AD       EDOP                                  #  77775
059929,000367: 43,3512           64712                           AD       S+1                                   #  77776
059930,000368: 43,3513           03271                           TC       -1CHK                                 
059931,000369: 
059932,000370: 43,3514           25367                           INCR     SCOUNT     +1                         
059933,000371: 43,3515           03277                           TC       SMODECHK                              
059934,000372: 
059935,000373:                                                                                                  #  SKEEP1 HOLDS SUM
059936,000374:                                                                                                  #  SKEEP2 HOLDS PRESENT CONTENTS OF ADDRESS IN ROPECHK AND SHOWSUM ROUTINES
059937,000375:                                                                                                  #  SKEEP2 HOLDS BANK NUMBER IN LOW ORDER BITS DURING SHOWSUM DISPLAY
059938,000376:                                                                                                  #  SKEEP3 HOLDS PRESENT ADDRESS (00000 TO 01777 IN COMMON FIXED BANKS)
059939,000377:                                                                                                  #                               (04000 TO 07777 IN FXFX BANKS)
059940,000378:                                                                                                  #  SKEEP3 HOLDS BUGGER WORD DURING SHOWSUM DISPLAY
059941,000379:                                                                                                  #  SKEEP4 HOLDS BANK NUMBER AND SUPER BANK NUMBER
059942,000380:                                                                                                  #  SKEEP5 COUNTS 2 SUCCESSIVE TC SELF WORDS
059943,000381:                                                                                                  #  SKEEP6 CONTROLS ROPECHK OR SHOWSUM OPTION
059944,000382:                                                                                                  #  SKEEP7 CONTROLS WHEN ROUNTINE IS IN COMMON FIXED OR FIXED FIXED BANKS
059945,000383: 
059946,000384: 43,3516           34713        ROPECHK            CA       S-ZERO                                #  *
059947,000385: 43,3517           55376                           TS       SKEEP6                                #  * -0 FOR ROPECHK.
059948,000386: 43,3520           34714        STSHOSUM           CA       S+ZERO                                #  * SHOULD BE ROPECHK
059949,000387: 
059950,000388: 43,3521           55374                           TS       SKEEP4                                #  BANK NUMBER
059951,000389: 43,3522           34712                           CA       S+1                                   
059952,000390: 43,3523           55377        COMMFX             TS       SKEEP7                                
059953,000391: 43,3524           34714                           CA       S+ZERO                                
059954,000392: 43,3525           55371                           TS       SKEEP1                                
059955,000393: 43,3526           55373                           TS       SKEEP3                                
059956,000394: 43,3527           34712                           CA       S+1                                   
059957,000395: 43,3530           55375                           TS       SKEEP5                                #  COUNTS DOWN 2 TC SELF WORDS
059958,000396: 43,3531           31374        COMADRS            CA       SKEEP4                                
059959,000397: 43,3532           54001                           TS       L                                     #  TO SET SUPER BANK

Page 1369

059961,000399: 43,3533           74364                           MASK     HI5                                   
059962,000400: 43,3534           61373                           AD       SKEEP3                                
059963,000401: 43,3535           04610                           TC       SUPDACAL                              #  SUPER DATA CALL
059964,000402: 43,3536           03561                           TC       ADSUM                                 
059965,000403: 43,3537           64700                           AD       SBIT11                                #  02000
059966,000404: 43,3540           03572                           TC       ADRSCHK                               
059967,000405: 
059968,000406: 43,3541           40000        FXFX               CS       A                                     
059969,000407: 43,3542           55377                           TS       SKEEP7                                
059970,000408: 43,3543           00006                           EXTEND                                         
059971,000409: 43,3544           13547                           BZF      +3                                    
059972,000410: 43,3545           34677                           CA       SBIT12                                #  04000, STARTING ADDRESS OF BANK 02
059973,000411: 43,3546           03550                           TC       +2                                    
059974,000412: 43,3547           34755                           CA       SBNK03                                #  06000, STARTING ADDRESS OF BANK 03
059975,000413: 43,3550           55373                           TS       SKEEP3                                
059976,000414: 43,3551           34714                           CA       S+ZERO                                
059977,000415: 43,3552           55371                           TS       SKEEP1                                
059978,000416: 43,3553           34712                           CA       S+1                                   
059979,000417: 43,3554           55375                           TS       SKEEP5                                #  COUNTS DOWN 2 TC SELF WORDS
059980,000418: 43,3555           51373        FXADRS             INDEX    SKEEP3                                
059981,000419: 43,3556           30000                           CA       0000                                  
059982,000420: 43,3557           03561                           TC       ADSUM                                 
059983,000421: 43,3560           03572                           TC       ADRSCHK                               
059984,000422: 
059985,000423: 43,3561           55372        ADSUM              TS       SKEEP2                                
059986,000424: 43,3562           61371                           AD       SKEEP1                                
059987,000425: 43,3563           55371                           TS       SKEEP1                                
059988,000426: 43,3564           34714                           CAF      S+ZERO                                
059989,000427: 43,3565           61371                           AD       SKEEP1                                
059990,000428: 43,3566           55371                           TS       SKEEP1                                
059991,000429: 43,3567           41372                           CS       SKEEP2                                
059992,000430: 43,3570           61373                           AD       SKEEP3                                
059993,000431: 43,3571           00002                           TC       Q                                     
059994,000432: 
059995,000433: 43,3572           22000        ADRSCHK            LXCH     A                                     
059996,000434: 43,3573           31373                           CA       SKEEP3                                
059997,000435: 43,3574           74747                           MASK     LOW10                                 #  RELATIVE ADDRESS
059998,000436: 43,3575           64364                           AD       -MAXADRS                              #  SUBTRACT MAX RELATIVE ADDRESS = 1777.
059999,000437: 43,3576           00006                           EXTEND                                         
060000,000438: 43,3577           13666                           BZF      SOPTION                               #  CHECKSUM FINISHED IF LAST ADDRESS.
060001,000439: 43,3600           11375                           CCS      SKEEP5                                #  IS CHECKSUM FINISHED
060002,000440: 43,3601           03604                           TC       +3                                    #  NO
060003,000441: 43,3602           03604                           TC       +2                                    #  NO
060004,000442: 43,3603           03666                           TC       SOPTION                               #  GO TO ROPECHK SHOWSUM OPTION
060005,000443: 43,3604           10001                           CCS      L                                     #  -0 MEANS A TC SELF WORD.
060006,000444: 43,3605           03614                           TC       CONTINU                               
060007,000445: 43,3606           03614                           TC       CONTINU                               
060008,000446: 43,3607           03614                           TC       CONTINU                               
060009,000447: 43,3610           11375                           CCS      SKEEP5                                
060010,000448: 43,3611           03615                           TC       CONTINU    +1                         

Page 1370

060012,000450: 43,3612           37716                           CA       S-1                                   
060013,000451: 43,3613           03615                           TC       CONTINU    +1                         #  AD IN THE BUGGER WORD
060014,000452: 43,3614           34712        CONTINU            CA       S+1                                   #  MAKE SURE TWO CONSECUTIVE TC SELF WORDS
060015,000453: 43,3615           55375                           TS       SKEEP5                                
060016,000454: 43,3616           11376                           CCS      SKEEP6                                #  *
060017,000455: 43,3617           10067                           CCS      NEWJOB                                #  * +1, SHOWSUM
060018,000456: 43,3620           05057                           TC       CHANG1                                #  *
060019,000457: 43,3621           03623                           TC       +2                                    #  *
060020,000458: 43,3622           03330                           TC       CHECKNJ                               #  -0 IN SKEEP6 FOR ROPECHK
060021,000459: 
060022,000460: 43,3623           25373        ADRS+1             INCR     SKEEP3                                
060023,000461: 43,3624           11377                           CCS      SKEEP7                                
060024,000462: 43,3625           03531                           TC       COMADRS                               
060025,000463: 43,3626           03531                           TC       COMADRS                               
060026,000464: 43,3627           03555                           TC       FXADRS                                
060027,000465: 43,3630           03555                           TC       FXADRS                                
060028,000466: 
060029,000467: 43,3631           41374        NXTBNK             CS       SKEEP4                                
060030,000468: 43,3632           63721                           AD       LSTBNKCH                              #  LAST BANK TO BE CHECKED
060031,000469: 43,3633           00006                           EXTEND                                         
060032,000470: 43,3634           13000                           BZF      ENDSUMS                               #  END OF SUMMING OF BANKS.
060033,000471: 43,3635           31374                           CA       SKEEP4                                
060034,000472: 43,3636           64700                           AD       SBIT11                                
060035,000473: 43,3637           55374                           TS       SKEEP4                                #  37 TO 40 INCRMTS SKEEP4 BY END RND CARRY
060036,000474: 43,3640           03644                           TC       CHKSUPR                               
060037,000475: 43,3641           34674        17TO20             CA       SBIT15                                
060038,000476: 43,3642           27374                           ADS      SKEEP4                                #  SET FOR BANK 20
060039,000477: 43,3643           03660                           TC       GONXTBNK                              
060040,000478: 43,3644           74364        CHKSUPR            MASK     HI5                                   
060041,000479: 43,3645           00006                           EXTEND                                         
060042,000480: 43,3646           13656                           BZF      NXTSUPR                               #  INCREMENT SUPER BANK
060043,000481: 43,3647           63236        27TO30             AD       S13BITS                               
060044,000482: 43,3650           00006                           EXTEND                                         
060045,000483: 43,3651           13653                           BZF      +2                                    #  BANK SET FOR 30
060046,000484: 43,3652           03660                           TC       GONXTBNK                              
060047,000485: 43,3653           33234                           CA       SIXTY                                 #  FIRST SUPER BANK
060048,000486: 43,3654           27374                           ADS      SKEEP4                                
060049,000487: 43,3655           03660                           TC       GONXTBNK                              
060050,000488: 43,3656           63235        NXTSUPR            AD       SUPRCON                               #  SET BNK 30 + INCR SUPR BNK AND CANCEL
060051,000489: 43,3657           27374                           ADS      SKEEP4                                #  ERC BIT OF THE 37 TO 40 ADVANCE.
060052,000490: 43,3660           11377        GONXTBNK           CCS      SKEEP7                                
060053,000491: 43,3661           03523                           TC       COMMFX                                
060054,000492: 43,3662           34712                           CA       S+1                                   
060055,000493: 43,3663           03541                           TC       FXFX                                  
060056,000494: 43,3664           34704                           CA       SBIT7                                 #  HAS TO BE LARGER THAN NO OF FXSW BANKS.
060057,000495: 43,3665           03523                           TC       COMMFX                                
060058,000496: 
060059,000497: 43,3666           31374        SOPTION            CA       SKEEP4                                
060060,000498: 43,3667           74364                           MASK     HI5                                   #  = BANK BITS
060061,000499: 43,3670           04345                           TC       LEFT5                                 

Page 1371

060063,000501: 43,3671           54001                           TS       L                                     #  BANK NUMBER BEFORE SUPER BANK
060064,000502: 43,3672           31374                           CA       SKEEP4                                
060065,000503: 43,3673           74373                           MASK     S8BITS                                #  = SUPER BANK BITS
060066,000504: 43,3674           00006                           EXTEND                                         
060067,000505: 43,3675           13703                           BZF      SOPT                                  #  BEFORE SUPER BANK
060068,000506: 43,3676           54021                           TS       SR                                    #  SUPER BANK NECESSARY
060069,000507: 43,3677           30001                           CA       L                                     
060070,000508: 43,3700           74716                           MASK     SEVEN                                 
060071,000509: 43,3701           60021                           AD       SR                                    
060072,000510: 43,3702           54001                           TS       L                                     #  BANK NUMBER WITH SUPER BANK
060073,000511: 43,3703           31376        SOPT               CA       SKEEP6                                #  *
060074,000512: 43,3704           00006                           EXTEND                                         #  *
060075,000513: 43,3705           13707                           BZF      +2                                    #  * ON -0 CONTINUE WITH ROPE CHECK.
060076,000514: 43,3706           02762                           TC       SDISPLAY                              #  * ON +1 GO TO DISPLAY OF SUM.
060077,000515: 43,3707           11371                           CCS      SKEEP1                                #  FORCE SUM TO ABSOLUTE VALUE.
060078,000516: 43,3710           03712                           TC       +2                                    
060079,000517: 43,3711           03713                           TC       +2                                    
060080,000518: 43,3712           64712                           AD       S+1                                   
060081,000519: 43,3713           55371                           TS       SKEEP1                                
060082,000520: 43,3714           40001        BNKCHK             CS       L                                     #  = - BANK NUMBER
060083,000521: 43,3715           61371                           AD       SKEEP1                                
060084,000522: 43,3716           67716                           AD       S-1                                   
060085,000523: 43,3717           03271                           TC       -1CHK                                 #  CHECK SUM
060086,000524: 43,3720           03631                           TC       NXTBNK                                
060087,000525: 
060088,000526: 43,3721     0067                                  EBANK=   NEWJOB                                
060089,000527: 43,3721           66100        LSTBNKCH           BBCON*                                         #  * CONSTANT, LAST BANK.
060090,000528: 
060091,000529: 
060092,000530: 

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