Source Code
These source-code files are part of a reconstructed copy of Comanche 51, the
initial release (though not the final mission release) of the Apollo 11
Command Module (CM) Apollo Guidance Computer (AGC) software. The flown, final
release was Comanche 55. The reconstruction is believed to be exactly accurate,
but in the absence of an actual Apollo-era listing of Comanche 51, some
explanation of the reconstruction process is needed to insure confidence in
that accuracy.
The starting point was the source code of Comanche 55, whose original source code is available. Comanche 55 source code was then modified by undoing changes known to have been made between revisions 51 and 55. The most-significant steps involved reverting changes related to the R-2 lunar potential model, the details of which were known from the previous, separate, independent reconstruction of the Apollo 10 Lunar Module software Luminary 69/2. The now-reconstructed Comanche 51 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code match those on the Comanche 55 or Luminary 69 printouts, although the source code would likely have different page numbers in a contemporary Comanche 51 listing. Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 55. Here's a guide to some of the Apollo documentation relevant to those annotations:
Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository. |
001118,000002: ## Copyright: Public domain.
001119,000003: ## Filename: TAGS_FOR_RELATIVE_SETLOC_AND_BLANK_BANK_CARDS.agc
001120,000004: ## Purpose: A section of Comanche revision 051.
001121,000005: ## It is part of the reconstructed source code for the
001122,000006: ## original release of the flight software for the Command
001123,000007: ## Module's (CM) Apollo Guidance Computer (AGC) for Apollo 11.
001124,000008: ## The code has been recreated from a copy of Comanche 055. It
001125,000009: ## has been adapted such that the resulting bugger words
001126,000010: ## exactly match those specified for Comanche 51 in NASA drawing
001127,000011: ## 2021153D, which gives relatively high confidence that the
001128,000012: ## reconstruction is correct.
001129,000013: ## Reference: pp. 27-35
001130,000014: ## Assembler: yaYUL
001131,000015: ## Contact: Ron Burkey <info@sandroid.org>.
001132,000016: ## Website: www.ibiblio.org/apollo/index.html
001133,000017: ## Mod history: 2019-07-30 MAS Created from Comanche 55.
001134,000018: ## 2020-12-08 MAS Removed MODCHG2 and MODCHG3 tags (which
001135,000019: ## were added between Comanche 51 and 55).
001136,000020: ## 2020-12-13 RSB Added justifying annotations for Mike's
001137,000021: ## reconstruction steps.
001138,000022:
Page 27 |
001140,000024: ??????? FIXED MEMORY 120000 - 167777
001141,000025: ??????? COUNT BANKSUM
001142,000026:
001143,000027: # MODULE 1 CONTAINS BANKS 0 THROUGH 5
001144,000028:
001145,000029: 4000 BLOCK 02
001146,000030: 4000 FFTAG1 EQUALS
001147,000031: 4000 FFTAG2 EQUALS
001148,000032: 4000 FFTAG3 EQUALS
001149,000033: 4000 FFTAG4 EQUALS
001150,000034: 4000 FFTAG7 EQUALS
001151,000035: 4000 FFTAG8 EQUALS
001152,000036: 4000 FFTAG9 EQUALS
001153,000037: 4000 FFTAG10 EQUALS
001154,000038: 4000 FFTAG12 EQUALS
001155,000039: 4000 P30SUBS EQUALS
001156,000040: 4000 STOPRAT EQUALS
001157,000041: 4000 P23S EQUALS
001158,000042: 4000 BNKSUM 02
001159,000043:
001160,000044: 6000 BLOCK 03
001161,000045: 6000 FFTAG5 EQUALS
001162,000046: 6000 FFTAG6 EQUALS
001163,000047: 6000 DAPS9 EQUALS
001164,000048: 6000 FFTAG13 EQUALS
001165,000049: 6000 BNKSUM 03
001166,000050:
001167,000051: 00,2000 BANK 00
001168,000052: 00,2000 DLAYJOB EQUALS
001169,000053: 00,2000 BNKSUM 00
001170,000054:
001171,000055: 01,2000 BANK 01
001172,000056: 01,2000 RESTART EQUALS
001173,000057: 01,2000 BNKSUM 01
001174,000058:
001175,000059: 04,2000 BANK 4
001176,000060: 04,2000 VERB37 EQUALS
001177,000061: 04,2000 CONICS1 EQUALS
001178,000062: 04,2000 PINBALL4 EQUALS
001179,000063: 04,2000 CSI/CDH1 EQUALS
001180,000064: 04,2000 INTPRET2 EQUALS
001181,000065: 04,2000 IMUCAL1 EQUALS
001182,000066:
Page 28 |
001184,000068:
001185,000069: 04,2000 STBLEORB EQUALS
001186,000070: 04,2000 E/PROG EQUALS
001187,000071: 04,2000 MIDDGIM EQUALS
001188,000072:
001189,000073: 04,2000 BNKSUM 04
001190,000074:
001191,000075: 05,2000 BANK 5
001192,000076: 05,2000 FRANDRES EQUALS
001193,000077: 05,2000 DOWNTELM EQUALS
001194,000078: 05,2000 DAPMASS EQUALS
001195,000079: 05,2000 CDHTAG EQUALS
001196,000080: 05,2000 BNKSUM 05
001197,000081:
001198,000082: # MODULE 2 CONTAINS BANKS 6 THROUGH 13
001199,000083:
001200,000084: 06,2000 BANK 6
001201,000085: 06,2000 IMUCOMP EQUALS
001202,000086: 06,2000 T4RUP EQUALS
001203,000087: 06,2000 IMUCAL2 EQUALS
001204,000088: 06,2000 CSIPROG EQUALS
001205,000089: 06,2000 BNKSUM 06
001206,000090:
001207,000091: 07,2000 BANK 7
001208,000092: 07,2000 SXTMARKE EQUALS
001209,000093: 07,2000 R02 EQUALS
001210,000094: 07,2000 MODESW EQUALS
001211,000095: 07,2000 XANG EQUALS
001212,000096: 07,2000 KEYRUPT EQUALS
001213,000097: 07,2000 CSIPROG6 EQUALS
001214,000098: 07,2000 BNKSUM 07
001215,000099:
001216,000100: 10,2000 BANK 10
001217,000101: 10,2000 DISPLAYS EQUALS
001218,000102: 10,2000 PHASETAB EQUALS
001219,000103: 10,2000 COMGEOM2 EQUALS
001220,000104: 10,2000 SXTMARK1 EQUALS
001221,000105: 10,2000 P60S4 EQUALS
001222,000106: 10,2000 OPTDRV EQUALS
001223,000107: 10,2000 CSIPROG8 EQUALS
001224,000108: 10,2000 BNKSUM 10
001225,000109:
001226,000110: 11,2000 BANK 11
001227,000111: 11,2000 ORBITAL EQUALS
001228,000112: 11,2000 ORBITAL1 EQUALS # CONSTANTS
001229,000113:
Page 29 |
001231,000115:
001232,000116: 11,2000 INTVEL EQUALS
001233,000117: 11,2000 S52/2 EQUALS
001234,000118: 11,2000 CSIPROG5 EQUALS
001235,000119: 11,2000 INTINIT1 EQUALS
001236,000120: 11,2000 BNKSUM 11
001237,000121:
001238,000122: 12,2000 BANK 12
001239,000123: 12,2000 CONICS EQUALS
001240,000124: 12,2000 CSIPROG2 EQUALS
001241,000125: 12,2000 CSI/CDH2 EQUALS
Reconstruction: A line in Comanche 55 reading "MODCHG2 EQUALS" has been removed at this point. MODCHG2 was used in Comanche 55 only in a block of code removed from Comanche 51 at the end of the RTB OP CODES log section, and is thus not used at all in Comanche 51. |
001247,000131: 12,2000 BNKSUM 12
001248,000132:
001249,000133: 13,2000 BANK 13
001250,000134: 13,2000 P76LOC EQUALS
001251,000135: 13,2000 LATLONG EQUALS
001252,000136: 13,2000 INTINIT EQUALS
001253,000137: 13,2000 SR52/1 EQUALS
001254,000138: 13,2000 ORBITAL2 EQUALS
001255,000139: 13,2000 CDHTAGS EQUALS
001256,000140: 13,2000 E/PROG1 EQUALS
Reconstruction: A line in Comanche 55 reading "MODCHG3 EQUALS" has been removed at this point. MODCHG3 was used in Comanche 55 only in a block of code removed from Comanche 51 at the end of the RTB OP CODES log section, and is thus not used at all in Comanche 51. |
001262,000146: 13,2000 BNKSUM 13
001263,000147:
001264,000148: # SPACER
001265,000149:
001266,000150: # MODULE 3 CONTAINS BANKS 14 THROUGH 21
001267,000151:
001268,000152: 14,2000 BANK 14
001269,000153: 14,2000 STARTAB EQUALS
001270,000154: 14,2000 RT53 EQUALS
001271,000155: 14,2000 P50S1 EQUALS
001272,000156: 14,2000 MEASINC2 EQUALS
001273,000157: 14,2000 CSI/CDH3 EQUALS
001274,000158: 14,2000 BNKSUM 14
001275,000159:
001276,000160: 15,2000 BANK 15
001277,000161: 15,2000 P50S EQUALS
001278,000162: 15,2000 ETRYDAP EQUALS
001279,000163: 15,2000 S52/3 EQUALS
001280,000164: 15,2000 BNKSUM 15
001281,000165:
001282,000166: 16,2000 BANK 16
001283,000167: 16,2000 P40S1 EQUALS
001284,000168:
Page 30 |
001286,000170:
001287,000171: 16,2000 DAPROLL EQUALS
001288,000172: 16,2000 P50S2 EQUALS
001289,000173: 16,2000 P23S1 EQUALS
001290,000174: 16,2000 RTE2 EQUALS
001291,000175: 16,2000 BNKSUM 16
001292,000176:
001293,000177: 17,2000 BANK 17
001294,000178: 17,2000 DAPS4 EQUALS
001295,000179: 17,2000 DAPS5 EQUALS
001296,000180: 17,2000 DAPS7 EQUALS
001297,000181: 17,2000 P50S3 EQUALS
001298,000182: 17,2000 BNKSUM 17
001299,000183:
001300,000184: 20,2000 BANK 20
001301,000185: 20,2000 DAPS6 EQUALS
001302,000186: 20,2000 DAPS1 EQUALS
001303,000187: 20,2000 DAPS2 EQUALS
001304,000188: 20,2000 MANUSTUF EQUALS
001305,000189: 20,2000 R36CM EQUALS
001306,000190: 20,2000 VAC5LOC EQUALS
001307,000191: 20,2000 BNKSUM 20
001308,000192:
001309,000193: 21,2000 BANK 21
001310,000194: 21,2000 DAPS3 EQUALS
001311,000195: 21,2000 MYSUBS EQUALS
001312,000196: 21,2000 KALCMON3 EQUALS
001313,000197: 21,2000 BNKSUM 21
001314,000198:
001315,000199: # MODULE 4 CONTAINS BANKS 22 THROUGH 27
001316,000200:
001317,000201: 22,2000 BANK 22
001318,000202: 22,2000 RTBCODES EQUALS
001319,000203: 22,2000 RTBCODE1 EQUALS
001320,000204: 22,2000 DAPS8 EQUALS
001321,000205: 22,2000 APOPERI EQUALS
001322,000206: 22,2000 P40S5 EQUALS
001323,000207: 22,2000 KALCMON2 EQUALS
001324,000208: 22,2000 KALCMON1 EQUALS
001325,000209: 22,2000 CSIPROG3 EQUALS
001326,000210: 22,2000 BNKSUM 22
001327,000211:
Page 31 |
001329,000213:
001330,000214: 23,2000 BANK 23
001331,000215: 23,2000 P20S2 EQUALS
001332,000216: 23,2000 INFLIGHT EQUALS
001333,000217: 23,2000 COMGEOM1 EQUALS
001334,000218: 23,2000 POWFLITE EQUALS
001335,000219: 23,2000 POWFLIT1 EQUALS
001336,000220: 23,2000 RENDGUID EQUALS
001337,000221: 23,2000 POWFLIT2 EQUALS
001338,000222: 23,2000 R30LOC EQUALS
001339,000223: 23,2000 P11FOUR EQUALS
001340,000224: 23,2000 CSIPROG4 EQUALS
001341,000225: 23,2000 BNKSUM 23
001342,000226:
001343,000227: 24,2000 BANK 24
001344,000228: 24,2000 LOADDAP EQUALS
001345,000229: 24,2000 P40S EQUALS
001346,000230: 24,2000 CSIPROG7 EQUALS
001347,000231: 24,2000 BNKSUM 24
001348,000232:
001349,000233: 25,2000 BANK 25
001350,000234: 25,2000 REENTRY EQUALS
001351,000235: 25,2000 CDHTAG1 EQUALS
001352,000236: 25,2000 BNKSUM 25
001353,000237:
001354,000238: 26,2000 BANK 26
001355,000239: 26,2000 INTPRET1 EQUALS
001356,000240: 26,2000 REENTRY1 EQUALS
001357,000241: 26,2000 P60S EQUALS
001358,000242: 26,2000 P60S1 EQUALS
001359,000243: 26,2000 P60S2 EQUALS
001360,000244: 26,2000 P60S3 EQUALS
001361,000245: 26,2000 PLANTIN EQUALS # LUNAR ROT
001362,000246: 26,2000 EPHEM EQUALS
001363,000247: 26,2000 P05P06 EQUALS
001364,000248: 26,2000 26P50S EQUALS
001365,000249: 26,2000 BNKSUM 26
001366,000250:
001367,000251: 27,2000 BANK 27
001368,000252: 27,2000 TOF-FF EQUALS
001369,000253: 27,2000 TOF-FF1 EQUALS
001370,000254: 27,2000 MANUVER EQUALS
001371,000255: 27,2000 MANUVER1 EQUALS
001372,000256:
Page 32 |
001374,000258:
001375,000259: 27,2000 VECPT EQUALS
001376,000260: 27,2000 UPDATE1 EQUALS
001377,000261: 27,2000 UPDATE2 EQUALS
001378,000262: 27,2000 R22S1 EQUALS
001379,000263: 27,2000 P60S5 EQUALS
001380,000264: 27,2000 P40S2 EQUALS
001381,000265: 27,2000 BNKSUM 27
001382,000266:
001383,000267: # MODULE 5 CONTAINS BANKS 30 THROUGH 35
001384,000268:
001385,000269: 30,2000 BANK 30
001386,000270: 30,2000 IMUSUPER EQUALS
001387,000271: 30,2000 LOWSUPER EQUALS
001388,000272: 30,2000 FCSTART EQUALS # STANDARD LOCATION FOR THIS. (FOR EXTVB)
001389,000273: 30,2000 LOPC EQUALS
001390,000274: 30,2000 P20S1 EQUALS
001391,000275: 30,2000 P20S6 EQUALS
001392,000276: 30,2000 P40S3 EQUALS
001393,000277: 30,2000 R35A EQUALS
001394,000278: 30,2000 BNKSUM 30
001395,000279:
001396,000280: 31,2000 BANK 31
001397,000281: 31,2000 R35 EQUALS
001398,000282: 31,2000 RT23 EQUALS
001399,000283: 31,2000 P30S1A EQUALS
001400,000284: 31,2000 R34 EQUALS
001401,000285: 31,2000 CDHTAG2 EQUALS
001402,000286: 31,2000 CSIPROG9 EQUALS
001403,000287: 31,2000 R31 EQUALS
001404,000288: 31,2000 P22S EQUALS
001405,000289: 31,2000 RTE3 EQUALS
001406,000290: 31,2000 BNKSUM 31
001407,000291:
001408,000292: 32,2000 BANK 32
001409,000293: 32,2000 MSGSCAN1 EQUALS
001410,000294: 32,2000 RTE EQUALS
001411,000295: 32,2000 DELRSPL1 EQUALS
001412,000296: 32,2000 IMUCAL3 EQUALS
001413,000297: 32,2000 BNKSUM 32
001414,000298:
001415,000299: 33,2000 BANK 33
001416,000300: 33,2000 TESTLEAD EQUALS
001417,000301:
Page 33 |
001419,000303:
001420,000304: 33,2000 IMUCAL EQUALS
001421,000305: 33,2000 BNKSUM 33
001422,000306:
001423,000307: 34,2000 BANK 34
001424,000308: 34,2000 P11ONE EQUALS
001425,000309: 34,2000 P20S3 EQUALS
001426,000310: 34,2000 P20S4 EQUALS
001427,000311: 34,2000 RTECON EQUALS
001428,000312: 34,2000 BNKSUM 34
001429,000313:
001430,000314: 35,2000 BANK 35
001431,000315: 35,2000 RTECON1 EQUALS
001432,000316: 35,2000 CSI/CDH EQUALS
001433,000317: 35,2000 P30S1 EQUALS
001434,000318: 35,2000 P30S EQUALS
001435,000319: 35,2000 P17S1 EQUALS
001436,000320: 35,2000 MEASINC3 EQUALS
001437,000321: 35,2000 INTINIT2 EQUALS
001438,000322: 35,2000 BNKSUM 35
001439,000323:
001440,000324: # MODULE 6 CONTAINS BANKS 36 THROUGH 43
001441,000325:
001442,000326: 36,2000 BANK 36
001443,000327: 36,2000 MEASINC EQUALS
001444,000328: 36,2000 MEASINC1 EQUALS
001445,000329: 36,2000 P17S EQUALS
001446,000330: 36,2000 RTE1 EQUALS
001447,000331: 36,2000 S3435LOC EQUALS
001448,000332: 36,2000 BNKSUM 36
001449,000333:
001450,000334: 37,2000 BANK 37
001451,000335: 37,2000 P20S EQUALS
001452,000336: 37,2000 BODYATT EQUALS
001453,000337: 37,2000 RENDEZ EQUALS
001454,000338: 37,2000 SERVICES EQUALS
001455,000339: 37,2000 P11TWO EQUALS
001456,000340: 37,2000 CDHTAG3 EQUALS
001457,000341: 37,2000 BNKSUM 37
001458,000342:
001459,000343: 40,2000 BANK 40
001460,000344: 40,2000 PINSUPER EQUALS
001461,000345:
Page 34 |
001463,000347:
001464,000348: 40,2000 SELFSUPR EQUALS
001465,000349: 40,2000 PINBALL1 EQUALS
001466,000350: 40,2000 R36CM1 EQUALS
001467,000351: 40,2000 BNKSUM 40
001468,000352:
001469,000353: 41,2000 BANK 41
001470,000354: 41,2000 PINBALL2 EQUALS
001471,000355: 41,2000 R36LM EQUALS
001472,000356: 41,2000 BNKSUM 41
001473,000357:
001474,000358: 42,2000 BANK 42
001475,000359: 42,2000 SBAND EQUALS
001476,000360: 42,2000 PINBALL3 EQUALS
001477,000361: 42,2000 EXTVBS EQUALS
001478,000362: 42,2000 R36LM1 EQUALS
001479,000363: 42,2000 BNKSUM 42
001480,000364:
001481,000365: 43,2000 BANK 43
001482,000366: 43,2000 SELFCHEC EQUALS
001483,000367: 43,2000 EXTVERBS EQUALS
001484,000368: 43,2000 BNKSUM 43
001485,000369:
001486,000370: 43,2000 26,3334 HI6ZEROS EQUALS ZEROVECS # ZERO VECTOR ALWAYS IN HIGH MEMORY
001487,000371: 43,2000 04,3565 LO6ZEROS EQUALS ZEROVEC # ZERO VECTOR ALWAYS IN LOW MEMORY
001488,000372: 43,2000 26,3332 HIDPHALF EQUALS UNITX
001489,000373: 43,2000 04,3563 LODPHALF EQUALS XUNIT
001490,000374: 43,2000 26,3324 HIDP1/4 EQUALS DP1/4TH
001491,000375: 43,2000 04,3611 LODP1/4 EQUALS D1/4 # 2DEC .25
001492,000376: 43,2000 26,3332 HIUNITX EQUALS UNITX
001493,000377: 43,2000 26,3330 HIUNITY EQUALS UNITY
001494,000378: 43,2000 26,3326 HIUNITZ EQUALS UNITZ
001495,000379: 43,2000 04,3563 LOUNITX EQUALS XUNIT # 2DEC .5
001496,000380: 43,2000 04,3561 LOUNITY EQUALS YUNIT # 2DEC 0
001497,000381: 43,2000 04,3557 LOUNITZ EQUALS ZUNIT # 2DEC 0
001498,000382: 43,2000 11,3763 3/4LOWDP EQUALS 3/4 # 2DEC 3.0 B-2
001499,000383:
001500,000384: 43,2000 30,2000 SBANK= LOWSUPER
001501,000385:
001502,000386: # ROPE SPECIFIC ASSIGNS OBVIATING NEED TO CHECK COMPUTER FLAG IN DETVRUZVING INTEGRATION AREA ENTRIES
001503,000387:
001504,000388: 43,2000 13,3105 OTHPREC EQUALS LEMPREC
001505,000389: 43,2000 13,2760 ATOPOTH EQUALS ATOPLEM
001506,000390: 43,2000 13,2705 ATOPTHIS EQUALS ATOPCSM
001507,000391: 43,2000 0000173 MOONTHIS EQUALS CMOONFLG
001508,000392:
Page 35 |
001510,000394:
001511,000395: 43,2000 0000174 MOONOTH EQUALS LMOONFLG
001512,000396: 43,2000 13,2720 MOVATHIS EQUALS MOVEACSM
001513,000397: 43,2000 31,2032 STATEST EQUALS V83CALL # * TEMPORARY
001514,000398: 43,2000 13,3071 THISPREC EQUALS CSMPREC
001515,000399: 43,2000 26,3332 THISAXIS = UNITX
001516,000400: 43,2000 5054 ERASID EQUALS LOW10 # DOWNLINK ERASABLE DUMP ID
001517,000401: 43,2000 6214 DELAYNUM EQUALS THREE
001518,000402:
001519,000403: # ****************************************************************************************************************
001520,000404:
001521,000405: # THE FOLLOWING ECADRS ARE DEFINED TO FACILITATE EBANK SWITCHING. THEY ALSO MAKE IT EASIER FOR
001522,000406: # ERASABLE CONTROL TO REARRANGE ERASABLE MEMORY WITHOUT DISRUPTING THE PROGRAMS WHICH SET EBANKS.
001523,000407: # PRIOR TO ROPE RELEASE FIXED MEMORY CAN BE SAVED BY SETTING EACH EBXXXX =EBANKX (X=4,5,6,7). EBANKX OF COURSE
001524,000408: # WILL BE THE BANK WHERE THE ERASABLES REFERENCED IN EBXXXX WILL BE STORED.
001525,000409:
001526,000410: 07,2000 BANK 7
001527,000411: 07,2000 E7,1674 EBANK= MARKDOWN
001528,000412: 07,2000 03674 EBMARKDO ECADR MARKDOWN
001529,000413: 07,2001 E7,1725 EBANK= MRKBUF1
001530,000414: 07,2001 03725 EBMRKBUF ECADR MRKBUF1
001531,000415:
001532,000416: 24,2000 BANK 24
001533,000417: 24,2000 E7,1431 EBANK= DVCNTR
001534,000418: 24,2000 03431 EBDVCNTR ECADR DVCNTR
001535,000419: 24,2001 E7,1672 EBANK= P40TMP
001536,000420: 24,2001 03672 EBP40TMP ECADR P40TMP
001537,000421:
001538,000422: 34,2000 BANK 34
001539,000423: 34,2000 E7,1431 EBANK= DVCNTR
001540,000424: 34,2000 03431 EBDVCNT ECADR DVCNTR
001541,000425: 34,2001 E5,1426 EBANK= QPLACES
001542,000426: 34,2001 02426 EBQPLACE ECADR QPLACES
001543,000427:
001544,000428: 37,2000 BANK 37
001545,000429: 37,2000 1231 EBANK= RN1
001546,000430: 37,2000 01231 EBRN1 ECADR RN1
001547,000431:
001548,000432: # ****************************************************************************************************************
001549,000433:
Page 36 This page contains only assembler-generated messages, and no source code. |
End of include-file TAGS_FOR_RELATIVE_SETLOC_AND_BLANK_BANK_CARDS.agc. Parent file is MAIN.agc