Source Code

These source-code files are part of a reconstructed copy of Comanche 72, the first release of the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 13.

They have been adapted from sources files created from a listing of Comanche 55. These source files were updated to match binary dumps of a set of Comanche 67 rope modules. They were then further modified by applying known changes between Comanche 67 and Comanche 72. A binary dump of module B2 of Comanche 72, part number 2010802-021, was also used to validate changes made to banks 05-13. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments.

Since no contemporary listings of Comanche 72 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

058195,000002:                                                                                                  ## Copyright:   Public domain.
058196,000003:                                                                                                  ## Filename:    AGC_BLOCK_TWO_SELF-CHECK.agc
058197,000004:                                                                                                  ## Purpose:     A section of Comanche revision 072.
058198,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
058199,000006:                                                                                                  ##              release of the software for the Command Module's (CM) Apollo
058200,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 13. No original listings
058201,000008:                                                                                                  ##              of this program are available; instead, this file was recreated
058202,000009:                                                                                                  ##              from a printout of Comanche 055, binary dumps of a set of
058203,000010:                                                                                                  ##              Comanche 067 rope modules, and changelogs between Comanche 067
058204,000011:                                                                                                  ##              and 072. It has been adapted such that the resulting bugger words
058205,000012:                                                                                                  ##              exactly match those specified for Comanche 072 in NASA drawing
058206,000013:                                                                                                  ##              2021153G, which gives relatively high confidence that the
058207,000014:                                                                                                  ##              reconstruction is correct.
058208,000015:                                                                                                  ## Assembler:   yaYUL
058209,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
058210,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
058211,000018:                                                                                                  ## Mod history: 2024-05-13 MAS  Created from Comanche 067.
058212,000019: 
058213,000020:                                                                                                  #  PROGRAM DESCRIPTION                           DATE  20 DECEMBER 1967
058214,000021:                                                                                                  #  PROGRAM NAME - SELF-CHECK                     LOG SECTION AGC BLOCK TWO SELF-CHECK
058215,000022:                                                                                                  #  MOD NO - 1                                    ASSEMBLY SUBROUTINE UTILITYM REV 25
058216,000023:                                                                                                  #  MOD BY - GAUNTT
058217,000024: 
058218,000025:                                                                                                  #  FUNCTIONAL DESCRIPTION
058219,000026:                                                                                                  #        PROGRAM HAS TWO MAIN PARTS.  THE FIRST IS SELF-CHECK WHICH RUNS AS A ZERO PRIORITY JOB WITH NO CORE SET, AS
058220,000027:                                                                                                  #        PART OF THE BACK-UP IDLE LOOP.  THE SECOND IS SHOW-BANKSUM WHICH RUNS AS A REGULAR EXECUTIVE JOB WITH ITS OWN
058221,000028:                                                                                                  #        STARTING VERB.
058222,000029: 
058223,000030:                                                                                                  #        THE PURPOSE OF SELF-CHECK IS TO CHECK OUT VARIOUS PARTS OF THE COMPUTER AS OUTLINED BELOW IN THE OPTIONS.
058224,000031: 
058225,000032:                                                                                                  #        THE PURPOSE OF SHOW-BANKSUM IS TO DISPLAY THE SUM OF EACH BANK, ONE AT A TIME.
058226,000033: 
058227,000034:                                                                                                  #        IN ALL THERE ARE 7 POSSIBLE OPTIONS IN THIS BLOCK II VERSION OF SELF-CHECK.  MORE DETAIL DESCRIPTION MAY BE
058228,000035:                                                                                                  #        FOUND IN E-2065 BLOCK II AGC SELF-CHECK AND SHOW BANKSUM BY EDWIN D. SMALLY DECEMBER 1966, AND ADDENDA 2 AND 3.
058229,000036: 
058230,000037:                                                                                                  #        THE DIFFERENT OPTIONS ARE CONTROLLED BY PUTTING DIFFERENT NUMBERS IN THE SMODE REGISTER (NOUN 27).  BELOW IS
058231,000038:                                                                                                  #        A DESCRIPTION OF WHAT PARTS OF THE COMPUTER THAT ARE CHECKED BY THE OPTIONS, AND THE CORRESPONDING NUMBER, IN
058232,000039:                                                                                                  #        OCTAL, TO LOAD INTO SMODE.
058233,000040:                                                                                                  #                +-4             ERASABLE MEMORY
058234,000041:                                                                                                  #                +-5             FIXED MEMORY
058235,000042:                                                                                                  #                +-1,2,3,6,7,10  EVERYTHING IN OPTIONS 4 AND 5.
058236,000043:                                                                                                  #                -0              SAME AS +-10 UNTIL AN ERROR IS DETECTED.
058237,000044:                                                                                                  #                +0              NO CHECK, PUTS COMPUTER INTO THE BACKUP IDLE LOOP.
058238,000045: 
058239,000046:                                                                                                  #  WARNINGS
058240,000047:                                                                                                  #        USE OF E MEMORY RESERVED FOR SELF-CHECK (EVEN IN IDLE LOOP) AS TEMP STORAGE BY OTHER PROGRAMS IS DANGEROUS.
058241,000048:                                                                                                  #        SMODE SET GREATER THAN OCT 10 PUTS COMPUTER INTO BACKUP IDLE LOOP.
058242,000049: 
058243,000050:                                                                                                  #  CALLING SEQUENCE
058244,000051:                                                                                                  #        TO CALL SELF-CHECK KEY IN
058245,000052:                                                                                                  #                V 21 N 27 E     OPTION NUMBER E
058246,000053:                                                                                                  #        TO CALL SHOW-BANKSUM KEY IN
058247,000054:                                                                                                  #                V 91 E          DISPLAYS FIRST BANK
058248,000055:                                                                                                  #                V 33 E          PROCEED, DISPLAYS NEXT BANK
058249,000056: 
058250,000057:                                                                                                  #  EXIT MODES, NORMAL AND ALARM
058251,000058:                                                                                                  #        SELF-CHECK NORMALLY CONTINUES INDEFINITELY UNLESS THERE IS AN ERROR DETECTED.  IF SO + OPTION NUMBERS PUT
058252,000059:                                                                                                  #        COMPUTER INTO BACKUP IDLE LOOP, - OPTION NUMBERS RESTART THE OPTION.
058253,000060: 
058254,000061:                                                                                                  #        THE -0 OPTION PROCEEDS FROM THE LINE FOLLOWING THE LINE WHERE THE ERROR WAS DETECTED.
058255,000062: 
058256,000063:                                                                                                  #        SHOW-BANKSUM PROCEEDS UNTIL A TERMINATE IS KEYED IN (V 34 E).  THE COMPUTER IS PUT INTO THE BACKUP IDLE LOOP
058257,000064: 
058258,000065:                                                                                                  #  OUTPUT
058259,000066:                                                                                                  #        SELF-CHECK UPON DETECTING AN ERROR LOADS THE SELF-CHECK ALARM CONSTANT (01102) INTO THE FAILREG SET AND
058260,000067:                                                                                                  #        TURNS ON THE ALARM LIGHT.  THE OPERATOR MAY THEN DISPLAY THE THREE FAILREGS BY KEYING IN V 05 N 09 E.  FOR FURTHER
058261,000068:                                                                                                  #        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,
058262,000069:                                                                                                  #        IN R2 THE BBCON OF SELF-CHECK, AND IN R3 THE TOTAL NUMBER OF ERRORS DETECTED BY SELF-CHECK SINCE THE LAST MAN
058263,000070:                                                                                                  #        INITIATED FRESH START (SLAP1).
058264,000071: 
058265,000072:                                                                                                  #        SHOW-BANKSUM STARTING WITH BANK 0 DISPLAYS IN R1 THE BANK SUM (A +-NUMBER EQUAL TO THE BANK NUMBER), IN R2
058266,000073:                                                                                                  #        THE BANK NUMBER, AND IN R3 THE BUGGER WORD.
058267,000074: 
058268,000075:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
058269,000076:                                                                                                  #        ACCOMPLISHED BY FRESH START
058270,000077:                                                                                                  #                SMODE SET TO +0
058271,000078: 
058272,000079:                                                                                                  #  DEBRIS
058273,000080:                                                                                                  #        ALL EXITS FROM THE CHECK OF ERASABLE (ERASCHK) RESTORE ORIGINAL CONTENTS TO REGISTERS UNDER CHECK.
058274,000081:                                                                                                  #        EXCEPTION IS A RESTART.  RESTART THAT OCCURS DURING ERASCHK RESTORES ERASABLE, UNLESS THERE IS EVIDENCE TO DOUBT
058275,000082:                                                                                                  #        E MEMORY, IN WHICH CASE PROGRAM THEN DOES A FRESH START (DOFSTART).
058276,000083: 
058277,000084: 25,3774                                           BANK     25                                    
058278,000085: 43,2000                                           SETLOC   SELFCHEC                              
058279,000086: 43,2000                                           BANK                                           
058280,000087: 
058281,000088: 43,3244                                           COUNT    43/SELF                               
058282,000089: 
058283,000090: 43,3244     5033               SBIT1              EQUALS   BIT1                                  
058284,000091: 43,3244     5032               SBIT2              EQUALS   BIT2                                  
058285,000092: 43,3244     5031               SBIT3              EQUALS   BIT3                                  
058286,000093: 43,3244     5030               SBIT4              EQUALS   BIT4                                  
058287,000094: 43,3244     5027               SBIT5              EQUALS   BIT5                                  
058288,000095: 43,3244     5026               SBIT6              EQUALS   BIT6                                  
058289,000096: 43,3244     5025               SBIT7              EQUALS   BIT7                                  
058290,000097: 43,3244     5024               SBIT8              EQUALS   BIT8                                  
058291,000098: 43,3244     5023               SBIT9              EQUALS   BIT9                                  
058292,000099: 43,3244     5022               SBIT10             EQUALS   BIT10                                 
058293,000100: 43,3244     5021               SBIT11             EQUALS   BIT11                                 
058294,000101: 43,3244     5020               SBIT12             EQUALS   BIT12                                 
058295,000102: 43,3244     5017               SBIT13             EQUALS   BIT13                                 
058296,000103: 43,3244     5016               SBIT14             EQUALS   BIT14                                 
058297,000104: 43,3244     5015               SBIT15             EQUALS   BIT15                                 
058298,000105: 
058299,000106: 43,3244     5035               S+ZERO             EQUALS   ZERO                                  
058300,000107: 43,3244     5033               S+1                EQUALS   BIT1                                  
058301,000108: 43,3244     5032               S+2                EQUALS   BIT2                                  
058302,000109: 43,3244     6214               S+3                EQUALS   THREE                                 
058303,000110: 43,3244     5031               S+4                EQUALS   FOUR                                  
058304,000111: 43,3244     5036               S+5                EQUALS   FIVE                                  
058305,000112: 43,3244     6211               S+6                EQUALS   SIX                                   
058306,000113: 43,3244     5037               S+7                EQUALS   SEVEN                                 
058307,000114: 43,3244     4373               S8BITS             EQUALS   LOW8                                  #  00377
058308,000115: 43,3244     5047               CNTRCON            =        OCT50                                 #  USED IN CNTRCHK
058309,000116: 43,3244           00061        ERASCON1           OCTAL    00061                                 #  USED IN ERASCHK
058310,000117: 43,3245           01373        ERASCON2           OCTAL    01373                                 #  USED IN ERASCHK
058311,000118: 43,3246     5065               ERASCON6           =        OCT1400                               #  USED IN ERASCHK
058312,000119: 43,3246           01461        ERASCON3           OCTAL    01461                                 #  USED IN ERASCHK
058313,000120: 43,3247           01773        ERASCON4           OCTAL    01773                                 #  USED IN ERASCHK
058314,000121: 43,3250     5070               S10BITS            EQUALS   LOW10                                 #  01777, USED IN ERASCHK
058315,000122: 43,3250     5076               SBNK03             EQUALS   PRIO6                                 #  06000, USED IN ROPECHK
058316,000123: 43,3250     4364               -MAXADRS           =        HI5                                   #  FOR ROPECHK
058317,000124: 43,3250           00060        SIXTY              OCTAL    00060                                 
058318,000125: 43,3251           60017        SUPRCON            OCTAL    60017                                 #  USED IN ROPECHK
058319,000126: 43,3252           17777        S13BITS            OCTAL    17777                                 
058320,000127: 43,3253           25252        CONC+S1            OCTAL    25252                                 #  USED IN CYCLSHFT
058321,000128: 43,3254           52400        CONC+S2            OCTAL    52400                                 #  USED IN CYCLSHFT
058322,000129: 43,3255           76777        ERASCON5           OCTAL    76777                                 
058323,000130: 43,3256     5735               S-7                =        OCT77770                              
058324,000131: 43,3256     6061               S-4                EQUALS   NEG4                                  
058325,000132: 43,3256     7714               S-3                EQUALS   NEG3                                  
058326,000133: 43,3256     7715               S-2                EQUALS   NEG2                                  
058327,000134: 43,3256     7716               S-1                EQUALS   NEGONE                                
058328,000135: 43,3256     5034               S-ZERO             EQUALS   NEG0                                  
058329,000136: 
058330,000137: 43,3256  E3,1400                                  EBANK=   LST1                                  
058331,000138: 43,3256           01371        ADRS1              ADRES    SKEEP1                                
058332,000139: 43,3257           03350        SELFADRS           ADRES    SELFCHK                               #  SELFCHK RETURN ADDRESS.  SHOULD BE PUT
058333,000140:                                                                                                  #  IN SELFRET WHEN GOING FROM SELFCHK TO
058334,000141:                                                                                                  #  SHOWSUM AND PUT IN SKEEP1 WHEN GOING
058335,000142:                                                                                                  #  FROM SHOWSUM TO SELF-CHECK.
058336,000143: 
058337,000144: 43,3260           31360        PRERRORS           CA       ERESTORE                              #  IS IT NECESSARY TO RESTORE ERASABLE
058338,000145: 43,3261           00006                           EXTEND                                         
058339,000146: 43,3262           13271                           BZF      ERRORS                                #  NO
058340,000147: 43,3263           00006                           EXTEND                                         
058341,000148: 43,3264           31376                           DCA      SKEEP5                                
058342,000149: 43,3265           51377                           INDEX    SKEEP7                                
058343,000150: 43,3266           52001                           DXCH     0000                                  #  RESTORE THE TWO ERASABLE REGISTERS
058344,000151: 43,3267           35035                           CA       S+ZERO                                
058345,000152: 43,3270           55360                           TS       ERESTORE                              
058346,000153: 43,3271           00004        ERRORS             INHINT                                         
058347,000154: 43,3272           30002                           CA       Q                                     
058348,000155: 43,3273           55357                           TS       SFAIL                                 #  SAVE Q FOR FAILURE LOCATION
058349,000156: 43,3274           55363                           TS       ALMCADR                               #  FOR DISPLAY WITH BBANK AND ERCOUNT
058350,000157: 43,3275           25365                           INCR     ERCOUNT                               #  KEEP TRACK OF NUMBER OF MALFUNCTIONS.
058351,000158: 43,3276           05666        TCALARM2           TC       ALARM2                                
058352,000159: 43,3277           01102                           OCT      01102                                 #  SELF-CHECK MALFUNCTION INDICATOR
058353,000160: 43,3300           11362                           CCS      SMODE                                 
058354,000161: 43,3301           35035        SIDLOOP            CA       S+ZERO                                
058355,000162: 43,3302           55362                           TS       SMODE                                 
058356,000163: 43,3303           03350                           TC       SELFCHK                               #  GO TO IDLE LOOP
058357,000164: 43,3304           01357                           TC       SFAIL                                 #  CONTINUE WITH SELF-CHECK
058358,000165: 
058359,000166: 43,3305           10000        -1CHK              CCS      A                                     
058360,000167: 43,3306           13260                           TCF      PRERRORS                              
058361,000168: 43,3307           13260                           TCF      PRERRORS                              
058362,000169: 43,3310           10000                           CCS      A                                     
058363,000170: 43,3311           13260                           TCF      PRERRORS                              
058364,000171: 43,3312           00002                           TC       Q                                     
058365,000172: 
058366,000173: 43,3313           00006        SMODECHK           EXTEND                                         
058367,000174: 43,3314           23371                           QXCH     SKEEP1                                
058368,000175: 43,3315           03344                           TC       CHECKNJ                               #  CHECK FOR NEW JOB
058369,000176: 43,3316           11362                           CCS      SMODE                                 
058370,000177: 43,3317           03324                           TC       SOPTIONS                              
058371,000178: 43,3320           03315                           TC       SMODECHK   +2                         #  TO BACKUP IDLE LOOP
058372,000179: 43,3321           03324                           TC       SOPTIONS                              
058373,000180: 43,3322           25366                           INCR     SCOUNT                                
058374,000181: 43,3323           01371                           TC       SKEEP1                                #  CONTINUE WITH SELF-CHECK
058375,000182: 
058376,000183: 43,3324           65735        SOPTIONS           AD       S-7                                   
058377,000184: 43,3325           00006                           EXTEND                                         
058378,000185: 43,3326           63330                           BZMF     +2                                    #  FOR OPTIONS BELOW NINE.
058379,000186: 43,3327           03301        BNKOPTN            TC       SIDLOOP                               #  ILLEGAL OPTION.  GO TO IDLE LOOP.
058380,000187: 43,3330           25366                           INCR     SCOUNT                                #  FOR OPTIONS BELOW NINE.
058381,000188: 43,3331           65037                           AD       S+7                                   
058382,000189: 
058383,000190: 43,3332           50000                           INDEX    A                                     
058384,000191: 43,3333           03334                           TC       SOPTION1                              
058385,000192: 43,3334           01371        SOPTION1           TC       SKEEP1                                #  WAS TC+TCF
058386,000193: 43,3335           01371        SOPTION2           TC       SKEEP1                                #  WAS IN:OUT1
058387,000194: 43,3336           01371        SOPTION3           TC       SKEEP1                                #  WAS COUNTCHK
058388,000195: 43,3337           03351        SOPTION4           TC       ERASCHK                               
058389,000196: 43,3340           03532        SOPTION5           TC       ROPECHK                               
058390,000197: 43,3341           01371        SOPTION6           TC       SKEEP1                                
058391,000198: 43,3342           01371        SOPTION7           TC       SKEEP1                                
058392,000199: 43,3343           01371        SOPTON10           TC       SKEEP1                                #  CONTINUE WITH SELF-CHECK
058393,000200: 
058394,000201: 43,3344           00006        CHECKNJ            EXTEND                                         
058395,000202: 43,3345           23361                           QXCH     SELFRET                               #  SAVE RETURN ADDRESS WHILE TESTING NEWJOB
058396,000203: 43,3346           04715                           TC       POSTJUMP                              #  TO SEE IF ANY JOBS HAVE BECOME ACTIVE.
058397,000204: 43,3347           03231                           CADR     ADVAN                                 
058398,000205: 
058399,000206: 43,3350           03313        SELFCHK            TC       SMODECHK                              #  ** CHARLEY, COME IN HERE
058400,000207: 
058401,000208:                                                                                                  #  SKEEP7 HOLDS LOWEST OF TWO ADDRESSES BEING CHECKED.
058402,000209:                                                                                                  #  SKEEP6 HOLDS B(X+1).
058403,000210:                                                                                                  #  SKEEP5 HOLDS B(X).
058404,000211:                                                                                                  #  SKEEP4 HOLDS C(EBANK) DURING ERASLOOP AND CHECKNJ.
058405,000212:                                                                                                  #  SKEEP3 HOLDS LAST ADDRESS BEING CHECKED (HIGHEST ADDRESS).
058406,000213:                                                                                                  #  SKEEP2 CONTROLS CHECKING OF NON-SWITCHABLE ERASABLE MEMORY WITH BANK NUMBERS IN EB.
058407,000214: 
058408,000215:                                                                                                  #  ERASCHK TAKES APPROXMATELY 7 SECONDS
058409,000216: 
058410,000217: 43,3351           35033        ERASCHK            CA       S+1                                   
058411,000218: 43,3352           55372                           TS       SKEEP2                                
058412,000219: 43,3353           35035        0EBANK             CA       S+ZERO                                
058413,000220: 43,3354           54003                           TS       EBANK                                 
058414,000221: 43,3355           33246                           CA       ERASCON3                              #  01461
058415,000222: 43,3356           55377                           TS       SKEEP7                                #  STARTING ADDRESS
058416,000223: 43,3357           35070                           CA       S10BITS                               #  01777
058417,000224: 43,3360           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
058418,000225: 43,3361           03401                           TC       ERASLOOP                              
058419,000226: 
058420,000227: 43,3362           35065        E134567B           CA       ERASCON6                              #  01400
058421,000228: 43,3363           55377                           TS       SKEEP7                                #  STARTING ADDRESS
058422,000229: 43,3364           35070                           CA       S10BITS                               #  01777
058423,000230: 43,3365           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
058424,000231: 43,3366           03401                           TC       ERASLOOP                              
058425,000232: 
058426,000233: 43,3367           35065        2EBANK             CA       ERASCON6                              #  01400
058427,000234: 43,3370           55377                           TS       SKEEP7                                #  STARTING ADDRESS
058428,000235: 43,3371           33247                           CA       ERASCON4                              #  01773
058429,000236: 43,3372           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
058430,000237: 43,3373           03401                           TC       ERASLOOP                              
058431,000238: 
058432,000239: 43,3374           55372        NOEBANK            TS       SKEEP2                                #  +0
058433,000240: 43,3375           33244                           CA       ERASCON1                              #  00061
058434,000241: 43,3376           55377                           TS       SKEEP7                                #  STARTING ADDRESS
058435,000242: 43,3377           33245                           CA       ERASCON2                              #  01373
058436,000243: 43,3400           55373                           TS       SKEEP3                                #  LAST ADDRESS CHECKED
058437,000244: 
058438,000245: 43,3401           00004        ERASLOOP           INHINT                                         
058439,000246: 43,3402           30003                           CA       EBANK                                 #  STORES C(EBANK)
058440,000247: 43,3403           55374                           TS       SKEEP4                                
058441,000248: 43,3404           00006                           EXTEND                                         
058442,000249: 43,3405           51377                           NDX      SKEEP7                                
058443,000250: 43,3406           30001                           DCA      0000                                  
058444,000251: 43,3407           53376                           DXCH     SKEEP5                                #  STORES C(X) AND C(X+1) IN SKEEP6 AND 5.
058445,000252: 43,3410           31377                           CA       SKEEP7                                
058446,000253: 43,3411           55360                           TS       ERESTORE                              #  IF RESTART, RESTORE C(X) AND C(X+1)
058447,000254: 43,3412           54001                           TS       L                                     
058448,000255: 43,3413           24001                           INCR     L                                     
058449,000256: 43,3414           50000                           NDX      A                                     
058450,000257: 43,3415           52001                           DXCH     0000                                  #  PUTS OWN ADDRESS IN X AND X +1
058451,000258: 43,3416           51377                           NDX      SKEEP7                                
058452,000259: 43,3417           40001                           CS       0001                                  #  CS X+1
058453,000260: 43,3420           51377                           NDX      SKEEP7                                
058454,000261: 43,3421           60000                           AD       0000                                  #  AD X
058455,000262: 43,3422           03305                           TC       -1CHK                                 
058456,000263: 43,3423           31360                           CA       ERESTORE                              #  HAS ERASABLE BEEN RESTORED
058457,000264: 43,3424           00006                           EXTEND                                         
058458,000265: 43,3425           13451                           BZF      ELOOPFIN                              #  YES, EXIT ERASLOOP.
058459,000266: 43,3426           00006                           EXTEND                                         
058460,000267: 43,3427           51377                           NDX      SKEEP7                                
058461,000268: 43,3430           40001                           DCS      0000                                  #  COMPLEMENT OF ADDRESS OF X AND X+1
058462,000269: 43,3431           51377                           NDX      SKEEP7                                
058463,000270: 43,3432           52001                           DXCH     0000                                  #  PUT COMPLEMENT OF ADDRESS OF X AND X+1
058464,000271: 43,3433           51377                           NDX      SKEEP7                                
058465,000272: 43,3434           40000                           CS       0000                                  #  CS X
058466,000273: 43,3435           51377                           NDX      SKEEP7                                
058467,000274: 43,3436           60001                           AD       0001                                  #  AD X+1
058468,000275: 43,3437           03305                           TC       -1CHK                                 
058469,000276: 43,3440           31360                           CA       ERESTORE                              #  HAS ERASABLE BEEN RESTORED
058470,000277: 43,3441           00006                           EXTEND                                         
058471,000278: 43,3442           13451                           BZF      ELOOPFIN                              #  YES, EXIT ERASLOOP.
058472,000279: 43,3443           00006                           EXTEND                                         
058473,000280: 43,3444           31376                           DCA      SKEEP5                                
058474,000281: 43,3445           51377                           NDX      SKEEP7                                
058475,000282: 43,3446           52001                           DXCH     0000                                  #  PUT B(X) AND B(X+1) BACK INTO X AND X+1
058476,000283: 43,3447           35035                           CA       S+ZERO                                
058477,000284: 43,3450           55360                           TS       ERESTORE                              #  IF RESTART, DO NOT RESTORE C(X), C(X+1)
058478,000285: 43,3451           00003        ELOOPFIN           RELINT                                         
058479,000286: 43,3452           03344                           TC       CHECKNJ                               #  CHECK FOR NEW JOB
058480,000287: 43,3453           31374                           CA       SKEEP4                                #  REPLACES B(EBANK)
058481,000288: 43,3454           54003                           TS       EBANK                                 
058482,000289: 43,3455           25377                           INCR     SKEEP7                                
058483,000290: 43,3456           41377                           CS       SKEEP7                                
058484,000291: 43,3457           61373                           AD       SKEEP3                                
058485,000292: 43,3460           00006                           EXTEND                                         
058486,000293: 43,3461           13463                           BZF      +2                                    
058487,000294: 43,3462           03401                           TC       ERASLOOP                              #  GO TO NEXT ADDRESS IN SAME BANK
058488,000295: 43,3463           11372                           CCS      SKEEP2                                
058489,000296: 43,3464           03374                           TC       NOEBANK                               
058490,000297: 43,3465           25372                           INCR     SKEEP2                                #  PUT +1 IN SKEEP2.
058491,000298: 43,3466           30003                           CA       EBANK                                 
058492,000299: 43,3467           65023                           AD       SBIT9                                 
058493,000300: 43,3470           54003                           TS       EBANK                                 
058494,000301: 43,3471           63255                           AD       ERASCON5                              #  76777, CHECK FOR BANK E2
058495,000302: 43,3472           00006                           EXTEND                                         
058496,000303: 43,3473           13367                           BZF      2EBANK                                
058497,000304: 43,3474           10003                           CCS      EBANK                                 
058498,000305: 43,3475           03362                           TC       E134567B                              #  GO TO EBANKS 1,3,4,5,6, AND 7
058499,000306: 43,3476           35065                           CA       ERASCON6                              #  END OF ERASCHK
058500,000307: 43,3477           54003                           TS       EBANK                                 
058501,000308: 
058502,000309:                                                                                                  #  CNTRCHK PERFORMS A CS OF ALL REGISTERS FROM OCT. 60 THROUGH OCT. 10.
058503,000310:                                                                                                  #  INCLUDED ARE ALL COUNTERS, T6-1, CYCLE AND SHIFT, AND ALL RUPT REGISTERS
058504,000311: 
058505,000312: 43,3500           35047        CNTRCHK            CA       CNTRCON                               #  00050
058506,000313: 43,3501           55372        CNTRLOOP           TS       SKEEP2                                
058507,000314: 43,3502           65030                           AD       SBIT4                                 #  +10 OCTAL
058508,000315: 43,3503           50000                           INDEX    A                                     
058509,000316: 43,3504           40000                           CS       0000                                  
058510,000317: 43,3505           11372                           CCS      SKEEP2                                
058511,000318: 43,3506           03501                           TC       CNTRLOOP                              
058512,000319: 
058513,000320:                                                                                                  #  CYCLSHFT CHECKS THE CYCLE AND SHIFT REGISTERS
058514,000321: 
058515,000322: 43,3507           33253        CYCLSHFT           CA       CONC+S1                               #  25252
058516,000323: 43,3510           54020                           TS       CYR                                   #  C(CYR) = 12525
058517,000324: 43,3511           54022                           TS       CYL                                   #  C(CYL) = 52524
058518,000325: 43,3512           54021                           TS       SR                                    #  C(SR) = 12525
058519,000326: 43,3513           54023                           TS       EDOP                                  #  C(EDOP) = 00125
058520,000327: 43,3514           60020                           AD       CYR                                   #  37777         C(CYR) = 45252
058521,000328: 43,3515           60022                           AD       CYL                                   #  00-12524      C(CYL) = 25251
058522,000329: 43,3516           60021                           AD       SR                                    #  00-25251      C(SR) = 05252
058523,000330: 43,3517           60023                           AD       EDOP                                  #  00-25376      C(EDOP) = +0
058524,000331: 43,3520           63254                           AD       CONC+S2                               #  C(CONC+S2) = 52400
058525,000332: 43,3521           03305                           TC       -1CHK                                 
058526,000333: 43,3522           60020                           AD       CYR                                   #  45252
058527,000334: 43,3523           60022                           AD       CYL                                   #  72523
058528,000335: 43,3524           60021                           AD       SR                                    #  77775
058529,000336: 43,3525           60023                           AD       EDOP                                  #  77775
058530,000337: 43,3526           65033                           AD       S+1                                   #  77776
058531,000338: 43,3527           03305                           TC       -1CHK                                 
058532,000339: 
058533,000340: 43,3530           25367                           INCR     SCOUNT     +1                         
058534,000341: 43,3531           03313                           TC       SMODECHK                              
058535,000342: 
058536,000343:                                                                                                  #  SKEEP1 HOLDS SUM
058537,000344:                                                                                                  #  SKEEP2 HOLDS PRESENT CONTENTS OF ADDRESS IN ROPECHK AND SHOWSUM ROUTINES
058538,000345:                                                                                                  #  SKEEP2 HOLDS BANK NUMBER IN LOW ORDER BITS DURING SHOWSUM DISPLAY
058539,000346:                                                                                                  #  SKEEP3 HOLDS PRESENT ADDRESS (00000 TO 01777 IN COMMON FIXED BANKS)
058540,000347:                                                                                                  #                               (04000 TO 07777 IN FXFX BANKS)
058541,000348:                                                                                                  #  SKEEP3 HOLDS BUGGER WORD DURING SHOWSUM DISPLAY
058542,000349:                                                                                                  #  SKEEP4 HOLDS BANK NUMBER AND SUPER BANK NUMBER
058543,000350:                                                                                                  #  SKEEP5 COUNTS 2 SUCCESSIVE TC SELF WORDS
058544,000351:                                                                                                  #  SKEEP6 CONTROLS ROPECHK OR SHOWSUM OPTION
058545,000352:                                                                                                  #  SKEEP7 CONTROLS WHEN ROUNTINE IS IN COMMON FIXED OR FIXED FIXED BANKS
058546,000353: 
058547,000354: 43,3532           35034        ROPECHK            CA       S-ZERO                                #  *
058548,000355: 43,3533           55376                           TS       SKEEP6                                #  * -0 FOR ROPECHK.
058549,000356: 43,3534           35035        STSHOSUM           CA       S+ZERO                                #  * SHOULD BE ROPECHK
058550,000357: 
058551,000358: 43,3535           55374                           TS       SKEEP4                                #  BANK NUMBER
058552,000359: 43,3536           35033                           CA       S+1                                   
058553,000360: 43,3537           55377        COMMFX             TS       SKEEP7                                
058554,000361: 43,3540           35035                           CA       S+ZERO                                
058555,000362: 43,3541           55371                           TS       SKEEP1                                
058556,000363: 43,3542           55373                           TS       SKEEP3                                
058557,000364: 43,3543           35033                           CA       S+1                                   
058558,000365: 43,3544           55375                           TS       SKEEP5                                #  COUNTS DOWN 2 TC SELF WORDS
058559,000366: 43,3545           31374        COMADRS            CA       SKEEP4                                
058560,000367: 43,3546           54001                           TS       L                                     #  TO SET SUPER BANK
058561,000368: 43,3547           74364                           MASK     HI5                                   
058562,000369: 43,3550           61373                           AD       SKEEP3                                
058563,000370: 43,3551           04731                           TC       SUPDACAL                              #  SUPER DATA CALL
058564,000371: 43,3552           03575                           TC       ADSUM                                 
058565,000372: 43,3553           65021                           AD       SBIT11                                #  02000
058566,000373: 43,3554           03606                           TC       ADRSCHK                               
058567,000374: 
058568,000375: 43,3555           40000        FXFX               CS       A                                     
058569,000376: 43,3556           55377                           TS       SKEEP7                                
058570,000377: 43,3557           00006                           EXTEND                                         
058571,000378: 43,3560           13563                           BZF      +3                                    
058572,000379: 43,3561           35020                           CA       SBIT12                                #  04000, STARTING ADDRESS OF BANK 02
058573,000380: 43,3562           03564                           TC       +2                                    
058574,000381: 43,3563           35076                           CA       SBNK03                                #  06000, STARTING ADDRESS OF BANK 03
058575,000382: 43,3564           55373                           TS       SKEEP3                                
058576,000383: 43,3565           35035                           CA       S+ZERO                                
058577,000384: 43,3566           55371                           TS       SKEEP1                                
058578,000385: 43,3567           35033                           CA       S+1                                   
058579,000386: 43,3570           55375                           TS       SKEEP5                                #  COUNTS DOWN 2 TC SELF WORDS
058580,000387: 43,3571           51373        FXADRS             INDEX    SKEEP3                                
058581,000388: 43,3572           30000                           CA       0000                                  
058582,000389: 43,3573           03575                           TC       ADSUM                                 
058583,000390: 43,3574           03606                           TC       ADRSCHK                               
058584,000391: 
058585,000392: 43,3575           55372        ADSUM              TS       SKEEP2                                
058586,000393: 43,3576           61371                           AD       SKEEP1                                
058587,000394: 43,3577           55371                           TS       SKEEP1                                
058588,000395: 43,3600           35035                           CAF      S+ZERO                                
058589,000396: 43,3601           61371                           AD       SKEEP1                                
058590,000397: 43,3602           55371                           TS       SKEEP1                                
058591,000398: 43,3603           41372                           CS       SKEEP2                                
058592,000399: 43,3604           61373                           AD       SKEEP3                                
058593,000400: 43,3605           00002                           TC       Q                                     
058594,000401: 
058595,000402: 43,3606           22000        ADRSCHK            LXCH     A                                     
058596,000403: 43,3607           31373                           CA       SKEEP3                                
058597,000404: 43,3610           75070                           MASK     LOW10                                 #  RELATIVE ADDRESS
058598,000405: 43,3611           64364                           AD       -MAXADRS                              #  SUBTRACT MAX RELATIVE ADDRESS = 1777.
058599,000406: 43,3612           00006                           EXTEND                                         
058600,000407: 43,3613           13702                           BZF      SOPTION                               #  CHECKSUM FINISHED IF LAST ADDRESS.
058601,000408: 43,3614           11375                           CCS      SKEEP5                                #  IS CHECKSUM FINISHED
058602,000409: 43,3615           03620                           TC       +3                                    #  NO
058603,000410: 43,3616           03620                           TC       +2                                    #  NO
058604,000411: 43,3617           03702                           TC       SOPTION                               #  GO TO ROPECHK SHOWSUM OPTION
058605,000412: 43,3620           10001                           CCS      L                                     #  -0 MEANS A TC SELF WORD.
058606,000413: 43,3621           03630                           TC       CONTINU                               
058607,000414: 43,3622           03630                           TC       CONTINU                               
058608,000415: 43,3623           03630                           TC       CONTINU                               
058609,000416: 43,3624           11375                           CCS      SKEEP5                                
058610,000417: 43,3625           03631                           TC       CONTINU    +1                         
058611,000418: 43,3626           37716                           CA       S-1                                   
058612,000419: 43,3627           03631                           TC       CONTINU    +1                         #  AD IN THE BUGGER WORD
058613,000420: 43,3630           35033        CONTINU            CA       S+1                                   #  MAKE SURE TWO CONSECUTIVE TC SELF WORDS
058614,000421: 43,3631           55375                           TS       SKEEP5                                
058615,000422: 43,3632           11376                           CCS      SKEEP6                                #  *
058616,000423: 43,3633           10067                           CCS      NEWJOB                                #  * +1, SHOWSUM
058617,000424: 43,3634           05200                           TC       CHANG1                                #  *
058618,000425: 43,3635           03637                           TC       +2                                    #  *
058619,000426: 43,3636           03344                           TC       CHECKNJ                               #  -0 IN SKEEP6 FOR ROPECHK
058620,000427: 
058621,000428: 43,3637           25373        ADRS+1             INCR     SKEEP3                                
058622,000429: 43,3640           11377                           CCS      SKEEP7                                
058623,000430: 43,3641           03545                           TC       COMADRS                               
058624,000431: 43,3642           03545                           TC       COMADRS                               
058625,000432: 43,3643           03571                           TC       FXADRS                                
058626,000433: 43,3644           03571                           TC       FXADRS                                
058627,000434: 
058628,000435: 43,3645           41374        NXTBNK             CS       SKEEP4                                
058629,000436: 43,3646           63735                           AD       LSTBNKCH                              #  LAST BANK TO BE CHECKED
058630,000437: 43,3647           00006                           EXTEND                                         
058631,000438: 43,3650           13010                           BZF      ENDSUMS                               #  END OF SUMMING OF BANKS.
058632,000439: 43,3651           31374                           CA       SKEEP4                                
058633,000440: 43,3652           65021                           AD       SBIT11                                
058634,000441: 43,3653           55374                           TS       SKEEP4                                #  37 TO 40 INCRMTS SKEEP4 BY END RND CARRY
058635,000442: 43,3654           03660                           TC       CHKSUPR                               
058636,000443: 43,3655           35015        17TO20             CA       SBIT15                                
058637,000444: 43,3656           27374                           ADS      SKEEP4                                #  SET FOR BANK 20
058638,000445: 43,3657           03674                           TC       GONXTBNK                              
058639,000446: 43,3660           74364        CHKSUPR            MASK     HI5                                   
058640,000447: 43,3661           00006                           EXTEND                                         
058641,000448: 43,3662           13672                           BZF      NXTSUPR                               #  INCREMENT SUPER BANK
058642,000449: 43,3663           63252        27TO30             AD       S13BITS                               
058643,000450: 43,3664           00006                           EXTEND                                         
058644,000451: 43,3665           13667                           BZF      +2                                    #  BANK SET FOR 30
058645,000452: 43,3666           03674                           TC       GONXTBNK                              
058646,000453: 43,3667           33250                           CA       SIXTY                                 #  FIRST SUPER BANK
058647,000454: 43,3670           27374                           ADS      SKEEP4                                
058648,000455: 43,3671           03674                           TC       GONXTBNK                              
058649,000456: 43,3672           63251        NXTSUPR            AD       SUPRCON                               #  SET BNK 30 + INCR SUPR BNK AND CANCEL
058650,000457: 43,3673           27374                           ADS      SKEEP4                                #  ERC BIT OF THE 37 TO 40 ADVANCE.
058651,000458: 43,3674           11377        GONXTBNK           CCS      SKEEP7                                
058652,000459: 43,3675           03537                           TC       COMMFX                                
058653,000460: 43,3676           35033                           CA       S+1                                   
058654,000461: 43,3677           03555                           TC       FXFX                                  
058655,000462: 43,3700           35025                           CA       SBIT7                                 #  HAS TO BE LARGER THAN NO OF FXSW BANKS.
058656,000463: 43,3701           03537                           TC       COMMFX                                
058657,000464: 
058658,000465: 43,3702           31374        SOPTION            CA       SKEEP4                                
058659,000466: 43,3703           74364                           MASK     HI5                                   #  = BANK BITS
058660,000467: 43,3704           04345                           TC       LEFT5                                 
058661,000468: 43,3705           54001                           TS       L                                     #  BANK NUMBER BEFORE SUPER BANK
058662,000469: 43,3706           31374                           CA       SKEEP4                                
058663,000470: 43,3707           74373                           MASK     S8BITS                                #  = SUPER BANK BITS
058664,000471: 43,3710           00006                           EXTEND                                         
058665,000472: 43,3711           13717                           BZF      SOPT                                  #  BEFORE SUPER BANK
058666,000473: 43,3712           54021                           TS       SR                                    #  SUPER BANK NECESSARY
058667,000474: 43,3713           30001                           CA       L                                     
058668,000475: 43,3714           75037                           MASK     SEVEN                                 
058669,000476: 43,3715           60021                           AD       SR                                    
058670,000477: 43,3716           54001                           TS       L                                     #  BANK NUMBER WITH SUPER BANK
058671,000478: 43,3717           31376        SOPT               CA       SKEEP6                                #  *
058672,000479: 43,3720           00006                           EXTEND                                         #  *
058673,000480: 43,3721           13723                           BZF      +2                                    #  * ON -0 CONTINUE WITH ROPE CHECK.
058674,000481: 43,3722           02772                           TC       SDISPLAY                              #  * ON +1 GO TO DISPLAY OF SUM.
058675,000482: 43,3723           11371                           CCS      SKEEP1                                #  FORCE SUM TO ABSOLUTE VALUE.
058676,000483: 43,3724           03726                           TC       +2                                    
058677,000484: 43,3725           03727                           TC       +2                                    
058678,000485: 43,3726           65033                           AD       S+1                                   
058679,000486: 43,3727           55371                           TS       SKEEP1                                
058680,000487: 43,3730           40001        BNKCHK             CS       L                                     #  = - BANK NUMBER
058681,000488: 43,3731           61371                           AD       SKEEP1                                
058682,000489: 43,3732           67716                           AD       S-1                                   
058683,000490: 43,3733           03305                           TC       -1CHK                                 #  CHECK SUM
058684,000491: 43,3734           03645                           TC       NXTBNK                                
058685,000492: 
058686,000493: 43,3735     0067                                  EBANK=   NEWJOB                                
058687,000494: 43,3735           66100        LSTBNKCH           BBCON*                                         #  * CONSTANT, LAST BANK.
058688,000495: 43,3736  30,2000                                  SBANK=   LOWSUPER                              
058689,000496: 
058690,000497: 

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