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.

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

Page 1362

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

Page 1363

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

Page 1364

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

Page 1365

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

Page 1366

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

Page 1367

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

Page 1368

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

Page 1369

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

Page 1370

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

Page 1371

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

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