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:
Among documentation not actually referenced in the annotations, there is a short writeup about the reconstruction process in our software repository that may be helpful in understanding it from a different perspective. There's also a handy table that lists what the number of memory-words should be for each routine in Comanche 51, which could make a nice double-check; however, we've not performed that double-check ourselves.

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.

059067,000002:                                                                                                  ## Copyright:   Public domain.
059068,000003:                                                                                                  ## Filename:    STAR_TABLES.agc
059069,000004:                                                                                                  ## Purpose:     A section of Comanche revision 051.
059070,000005:                                                                                                  ##              It is part of the reconstructed source code for the
059071,000006:                                                                                                  ##              original release of the flight software for the Command
059072,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 11.
059073,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
059074,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
059075,000010:                                                                                                  ##              exactly match those specified for Comanche 51 in NASA drawing
059076,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
059077,000012:                                                                                                  ##              reconstruction is correct.
059078,000013:                                                                                                  ## Reference:   pp. 1389-1393
059079,000014:                                                                                                  ## Assembler:   yaYUL
059080,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059081,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
059082,000017:                                                                                                  ## Mod history: 2019-07-30 MAS  Created from Comanche 55.
059083,000018: 

Page 1389

059085,000020: 32,3770                                           BANK     32                                    
059086,000021: 14,2000                                           SETLOC   STARTAB                               
059087,000022: 14,2000                                           BANK                                           
059088,000023: 
059089,000024: 14,3422                                           COUNT    14/STARS                              
059090,000025: 
059091,000026: 14,3422           15262 21773                     2DEC     +.8342971408 B-1                        #  STAR 37       X
059092,000027: 14,3424           74130 42420                     2DEC     -.2392481515 B-1                        #  STAR 37       Y
059093,000028: 14,3426           70033 41533                     2DEC     -.4966976975 B-1                        #  STAR 37       Z
059094,000029: 
059095,000030: 14,3430           15014 04650                     2DEC     +.8139832631 B-1                        #  STAR 36       X
059096,000031: 14,3432           67067 60150                     2DEC     -.5557243189 B-1                        #  STAR 36       Y
059097,000032: 14,3434           02551 15723                     2DEC     +.1691204557 B-1                        #  STAR 36       Z
059098,000033: 
059099,000034: 14,3436           07210 01664                     2DEC     +.4541086270 B-1                        #  STAR 35       X
059100,000035: 14,3440           67276 62232                     2DEC     -.5392368197 B-1                        #  STAR 35       Y
059101,000036: 14,3442           13262 00563                     2DEC     +.7092312789 B-1                        #  STAR 35       Z
059102,000037: 
059103,000038: 14,3444           05076 35561                     2DEC     +.3201817378 B-1                        #  STAR 34       X
059104,000039: 14,3446           70716 40260                     2DEC     -.4436021946 B-1                        #  STAR 34       Y
059105,000040: 14,3450           62466 64656                     2DEC     -.8370786986 B-1                        #  STAR 34       Z
059106,000041: 
059107,000042: 14,3452           10652 04246                     2DEC     +.5520184464 B-1                        #  STAR 33       X
059108,000043: 14,3454           63235 44200                     2DEC     -.7933187400 B-1                        #  STAR 33       Y
059109,000044: 14,3456           73710 66230                     2DEC     -.2567508745 B-1                        #  STAR 33       Z
059110,000045: 
059111,000046: 14,3460           07204 33712                     2DEC     +.4537196908 B-1                        #  STAR 32       X
059112,000047: 14,3462           61747 72343                     2DEC     -.8779508801 B-1                        #  STAR 32       Y
059113,000048: 14,3464           02343 21362                     2DEC     +.1527766153 B-1                        #  STAR 32       Z
059114,000049: 
059115,000050: 14,3466           03237 13301                     2DEC     +.2069525789 B-1                        #  STAR 31       X
059116,000051: 14,3470           62030 65332                     2DEC     -.8719885748 B-1                        #  STAR 31       Y
059117,000052: 14,3472           70715 71267                     2DEC     -.4436288486 B-1                        #  STAR 31       Z
059118,000053: 
059119,000054: 14,3474           01745 06477                     2DEC     +.1217293692 B-1                        #  STAR 30       X

Page 1390

059121,000056: 14,3476           63531 75365                     2DEC     -.7702732847 B-1                        #  STAR 30       Y
059122,000057: 14,3500           12010 03005                     2DEC     +.6259880410 B-1                        #  STAR 30       Z
059123,000058: 
059124,000059: 14,3502           76146 77014                     2DEC     -.1124304773 B-1                        #  STAR 29       X
059125,000060: 14,3504           60371 75073                     2DEC     -.9694934200 B-1                        #  STAR 29       Y
059126,000061: 14,3506           03370 12003                     2DEC     +.2178116072 B-1                        #  STAR 29       Z
059127,000062: 
059128,000063: 14,3510           76125 40037                     2DEC     -.1146237858 B-1                        #  STAR 28       X
059129,000064: 14,3512           72436 77062                     2DEC     -.3399692557 B-1                        #  STAR 28       Y
059130,000065: 14,3514           61041 54164                     2DEC     -.9334250333 B-1                        #  STAR 28       Z
059131,000066: 
059132,000067: 14,3516           72277 51044                     2DEC     -.3516499609 B-1                        #  STAR 27       X
059133,000068: 14,3520           62641 45471                     2DEC     -.8240752703 B-1                        #  STAR 27       Y
059134,000069: 14,3522           70711 70546                     2DEC     -.4441196390 B-1                        #  STAR 27       Z
059135,000070: 
059136,000071: 14,3524           67364 47073                     2DEC     -.5326876930 B-1                        #  STAR 26       X
059137,000072: 14,3526           64425 77777                     2DEC     -.7160644554 B-1                        #  STAR 26       Y
059138,000073: 14,3530           07157 16322                     2DEC     +.4511047742 B-1                        #  STAR 26       Z
059139,000074: 
059140,000075: 14,3532           63327 64446                     2DEC     -.7861763936 B-1                        #  STAR 25       X
059141,000076: 14,3534           67515 55266                     2DEC     -.5217996305 B-1                        #  STAR 25       Y
059142,000077: 14,3536           05230 25476                     2DEC     +.3311371675 B-1                        #  STAR 25       Z
059143,000078: 
059144,000079: 14,3540           64754 72604                     2DEC     -.6898393233 B-1                        #  STAR 24       X
059145,000080: 14,3542           71235 72553                     2DEC     -.4182330640 B-1                        #  STAR 24       Y
059146,000081: 14,3544           66427 42171                     2DEC     -.5909338474 B-1                        #  STAR 24       Z
059147,000082: 
059148,000083: 14,3546           66546 70765                     2DEC     -.5812035376 B-1                        #  STAR 23       X
059149,000084: 14,3550           73260 71643                     2DEC     -.2909171294 B-1                        #  STAR 23       Y
059150,000085: 14,3552           14121 30153                     2DEC     +.7599800468 B-1                        #  STAR 23       Z
059151,000086: 
059152,000087: 14,3554           61247 73310                     2DEC     -.9170097662 B-1                        #  STAR 22       X
059153,000088: 14,3556           72313 41247                     2DEC     -.3502146628 B-1                        #  STAR 22       Y

Page 1391

059155,000090: 14,3560           74744 44566                     2DEC     -.1908999176 B-1                        #  STAR 22       Z
059156,000091: 
059157,000092: 14,3562           70606 54564                     2DEC     -.4523440203 B-1                        #  STAR 21       X
059158,000093: 14,3564           77153 61536                     2DEC     -.0493710140 B-1                        #  STAR 21       Y
059159,000094: 14,3566           61601 47046                     2DEC     -.8904759346 B-1                        #  STAR 21       Z
059160,000095: 
059161,000096: 14,3570           60604 76224                     2DEC     -.9525211695 B-1                        #  STAR 20       X
059162,000097: 14,3572           77031 73354                     2DEC     -.0593434796 B-1                        #  STAR 20       Y
059163,000098: 14,3574           73161 63065                     2DEC     -.2986331746 B-1                        #  STAR 20       Z
059164,000099: 
059165,000100: 14,3576           60431 51702                     2DEC     -.9656605484 B-1                        #  STAR 19       X
059166,000101: 14,3600           00656 33013                     2DEC     +.0525933156 B-1                        #  STAR 19       Y
059167,000102: 14,3602           04044 10627                     2DEC     +.2544280809 B-1                        #  STAR 19       Z
059168,000103: 
059169,000104: 14,3604           62164 45040                     2DEC     -.8608205219 B-1                        #  STAR 18       X
059170,000105: 14,3606           07325 37443                     2DEC     +.4636213989 B-1                        #  STAR 18       Y
059171,000106: 14,3610           03267 06626                     2DEC     +.2098647835 B-1                        #  STAR 18       Z
059172,000107: 
059173,000108: 14,3612           63471 50471                     2DEC     -.7742591356 B-1                        #  STAR 17       X
059174,000109: 14,3614           11660 04151                     2DEC     +.6152504197 B-1                        #  STAR 17       Y
059175,000110: 14,3616           75501 46664                     2DEC     -.1482892839 B-1                        #  STAR 17       Z
059176,000111: 
059177,000112: 14,3620           70430 46540                     2DEC     -.4657947941 B-1                        #  STAR 16       X
059178,000113: 14,3622           07507 20100                     2DEC     +.4774785033 B-1                        #  STAR 16       Y
059179,000114: 14,3624           13727 05455                     2DEC     +.7450164351 B-1                        #  STAR 16       Z
059180,000115: 
059181,000116: 14,3626           72160 64202                     2DEC     -.3612508532 B-1                        #  STAR 15       X
059182,000117: 14,3630           11144 05203                     2DEC     +.5747270840 B-1                        #  STAR 15       Y
059183,000118: 14,3632           64200 65331                     2DEC     -.7342932655 B-1                        #  STAR 15       Z
059184,000119: 
059185,000120: 14,3634           71322 41512                     2DEC     -.4118589524 B-1                        #  STAR 14       X
059186,000121: 14,3636           16402 16205                     2DEC     +.9065485360 B-1                        #  STAR 14       Y
059187,000122: 14,3640           01365 04034                     2DEC     +.0924226975 B-1                        #  STAR 14       Z
059188,000123: 

Page 1392

059190,000125: 14,3642           75054 56052                     2DEC     -.1820751783 B-1                        #  STAR 13       X
059191,000126: 14,3644           17030 17635                     2DEC     +.9404899869 B-1                        #  STAR 13       Y
059192,000127: 14,3646           73321 57603                     2DEC     -.2869271926 B-1                        #  STAR 13       Z
059193,000128: 
059194,000129: 14,3650           77010 47623                     2DEC     -.0614937230 B-1                        #  STAR 12       X
059195,000130: 14,3652           11515 01640                     2DEC     +.6031563286 B-1                        #  STAR 12       Y
059196,000131: 14,3654           63215 52176                     2DEC     -.7952489957 B-1                        #  STAR 12       Z
059197,000132: 
059198,000133: 14,3656           02143 26755                     2DEC     +.1371725575 B-1                        #  STAR 11       X
059199,000134: 14,3660           12715 31470                     2DEC     +.6813721061 B-1                        #  STAR 11       Y
059200,000135: 14,3662           13401 31222                     2DEC     +.7189685267 B-1                        #  STAR 11       Z
059201,000136: 
059202,000137: 14,3664           03157 27504                     2DEC     +.2011399589 B-1                        #  STAR 10       X
059203,000138: 14,3666           17402 12312                     2DEC     +.9690337941 B-1                        #  STAR 10       Y
059204,000139: 14,3670           75552 63657                     2DEC     -.1432348512 B-1                        #  STAR 10       Z
059205,000140: 
059206,000141: 14,3672           05471 06122                     2DEC     +.3507315038 B-1                        #  STAR 9        X
059207,000142: 14,3674           16220 16362                     2DEC     +.8926333307 B-1                        #  STAR 9        Y
059208,000143: 14,3676           04417 32762                     2DEC     +.2831839492 B-1                        #  STAR 9        Z
059209,000144: 
059210,000145: 14,3700           06443 12622                     2DEC     +.4105636020 B-1                        #  STAR 8        X
059211,000146: 14,3702           07766 10237                     2DEC     +.4988110001 B-1                        #  STAR 8        Y
059212,000147: 14,3704           14154 36154                     2DEC     +.7632988371 B-1                        #  STAR 8        Z
059213,000148: 
059214,000149: 14,3706           13200 31653                     2DEC     +.7032235469 B-1                        #  STAR 7        X
059215,000150: 14,3710           13244 21036                     2DEC     +.7075846047 B-1                        #  STAR 7        Y
059216,000151: 14,3712           01067 23106                     2DEC     +.0692868685 B-1                        #  STAR 7        Z
059217,000152: 
059218,000153: 14,3714           10560 27227                     2DEC     +.5450107404 B-1                        #  STAR 6        X
059219,000154: 14,3716           10402 00275                     2DEC     +.5314955466 B-1                        #  STAR 6        Y
059220,000155: 14,3720           65477 77044                     2DEC     -.6484410356 B-1                        #  STAR 6        Z
059221,000156: 
059222,000157: 14,3722           00153 11212                     2DEC     +.0130968840 B-1                        #  STAR 5        X

Page 1393

059224,000159: 14,3724           00077 36275                     2DEC     +.0078062795 B-1                        #  STAR 5        Y
059225,000160: 14,3726           17777 01417                     2DEC     +.9998837600 B-1                        #  STAR 5        Z
059226,000161: 
059227,000162: 14,3730           07674 21771                     2DEC     +.4917678276 B-1                        #  STAR 4        X
059228,000163: 14,3732           03416 07626                     2DEC     +.2204887125 B-1                        #  STAR 4        Y
059229,000164: 14,3734           62413 57536                     2DEC     -.8423473935 B-1                        #  STAR 4        Z
059230,000165: 
059231,000166: 14,3736           07510 06414                     2DEC     +.4775639450 B-1                        #  STAR 3        X
059232,000167: 14,3740           01673 06065                     2DEC     +.1166004340 B-1                        #  STAR 3        Y
059233,000168: 14,3742           15735 31531                     2DEC     +.8708254803 B-1                        #  STAR 3        Z
059234,000169: 
059235,000170: 14,3744           16745 17555                     2DEC     +.9342640400 B-1                        #  STAR 2        X
059236,000171: 14,3746           02615 13716                     2DEC     +.1735073142 B-1                        #  STAR 2        Y
059237,000172: 14,3750           73010 40311                     2DEC     -.3115219339 B-1                        #  STAR 2        Z
059238,000173: 
059239,000174: 14,3752           15776 34660                     2DEC     +.8748658918 B-1                        #  STAR 1        X
059240,000175: 14,3754           00325 26625                     2DEC     +.0260879174 B-1                        #  STAR 1        Y
059241,000176: 14,3756           07572 05105                     2DEC     +.4836621670 B-1                        #  STAR 1        Z
059242,000177: 
059243,000178: 14,3760           15472        CATLOG             DEC      6970       B-14                       
059244,000179: 
059245,000180: 
059246,000181: 

End of include-file STAR_TABLES.agc.  Parent file is MAIN.agc