Source Code

These source code files are a reconstruction of Sundance, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
This means that source code does not represent a specific historical revision of Sundance, but rather a mixture of the three released versions. Nonetheless, it is capable of flying the whole Apollo 9 mission. This source code matches the binary dumps, as closely as feasible, but 100% match is not possible, due mostly to changes in memory addresses at which code and variables were allocated in different revisions of Sundance. Refer to this list of explanations for each binary mismatch.

Since only binary dumps (rather than listings) of Sundance 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.

049893,000002:                                                                                                  ## Copyright:   Public domain.
049894,000003:                                                                                                  ## Filename:    R32.agc
049895,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
049896,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
049897,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
049898,000007:                                                                                                  ##              No original listings of this program are available;
049899,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
049900,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
049901,000010:                                                                                                  ## Assembler:   yaYUL
049902,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
049903,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
049904,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
049905,000014: 
049906,000015:                                                                                                  ## Sundance 302
049907,000016: 
049908,000017: 32,3710                                           BANK     32                                    
049909,000018: 14,2000                                           SETLOC   STARTAB                               
049910,000019: 14,2000                                           BANK                                           
049911,000020: 
049912,000021: 14,3375                                           COUNT*   $$/STARS                              
049913,000022: 
049914,000023: 14,3375           15261 27231                     2DEC     +.8341953207 B-1                        #  STAR 37    X
049915,000024: 14,3377           74126 61161                     2DEC     -.2394362567 B-1                        #  STAR 37    Y
049916,000025: 14,3401           70032 54470                     2DEC     -.4967780649 B-1                        #  STAR 37    Z
049917,000026: 14,3403           15013 10432                     2DEC     +.8138753897 B-1                        #  STAR 36    X
049918,000027: 14,3405           67066 40370                     2DEC     -.5559063490 B-1                        #  STAR 36    Y
049919,000028: 14,3407           02550 31133                     2DEC     +.1690413589 B-1                        #  STAR 36    Z
049920,000029: 14,3411           07207 24243                     2DEC     +.4540570017 B-1                        #  STAR 35    X
049921,000030: 14,3413           67275 67544                     2DEC     -.5393383149 B-1                        #  STAR 35    Y
049922,000031: 14,3415           13261 25121                     2DEC     +.7091871552 B-1                        #  STAR 35    Z
049923,000032: 14,3417           05075 16350                     2DEC     +.3200014224 B-1                        #  STAR 34    X
049924,000033: 14,3421           70715 55404                     2DEC     -.4436740480 B-1                        #  STAR 34    Y
049925,000034: 14,3423           62466 54577                     2DEC     -.8371095679 B-1                        #  STAR 34    Z
049926,000035: 14,3425           10650 17202                     2DEC     +.5518160037 B-1                        #  STAR 33    X
049927,000036: 14,3427           63234 43704                     2DEC     -.7934422090 B-1                        #  STAR 33    Y
049928,000037: 14,3431           73710 50170                     2DEC     -.2568045150 B-1                        #  STAR 33    Z
049929,000038: 14,3433           07203 13612                     2DEC     +.4535361097 B-1                        #  STAR 32    X
049930,000039: 14,3435           61746 77370                     2DEC     -.8780537171 B-1                        #  STAR 32    Y
049931,000040: 14,3437           02343 05340                     2DEC     +.1527307006 B-1                        #  STAR 32    Z
049932,000041: 14,3441           03235 14762                     2DEC     +.2067145272 B-1                        #  STAR 31    X
049933,000042: 14,3443           62030 51212                     2DEC     -.8720349419 B-1                        #  STAR 31    Y
049934,000043: 14,3445           70715 64117                     2DEC     -.4436486945 B-1                        #  STAR 31    Z
049935,000044: 14,3447           01744 11157                     2DEC     +.1216171923 B-1                        #  STAR 30    X
049936,000045: 14,3451           63531 66055                     2DEC     -.7703014754 B-1                        #  STAR 30    Y
049937,000046: 14,3453           12007 37503                     2DEC     +.6259751556 B-1                        #  STAR 30    Z
049938,000047: 14,3455           76145 53477                     2DEC     -.1126265542 B-1                        #  STAR 29    X
049939,000048: 14,3457           60372 43624                     2DEC     -.9694679589 B-1                        #  STAR 29    Y
049940,000049: 14,3461           03370 15121                     2DEC     +.2178236347 B-1                        #  STAR 29    Z
049941,000050: 14,3463           76123 64245                     2DEC     -.1147906312 B-1                        #  STAR 28    X
049942,000051: 14,3465           72437 45623                     2DEC     -.3399437395 B-1                        #  STAR 28    Y
049943,000052: 14,3467           61041 57124                     2DEC     -.9334138229 B-1                        #  STAR 28    Z
049944,000053: 14,3471           72275 55365                     2DEC     -.3518772846 B-1                        #  STAR 27    X
049945,000054: 14,3473           62641 72150                     2DEC     -.8239967165 B-1                        #  STAR 27    Y
049946,000055: 14,3475           70712 41542                     2DEC     -.4440853383 B-1                        #  STAR 27    Z
049947,000056: 14,3477           67363 50441                     2DEC     -.5328042377 B-1                        #  STAR 26    X
049948,000057: 14,3501           64426 77263                     2DEC     -.7159448596 B-1                        #  STAR 26    Y
049949,000058: 14,3503           07157 34056                     2DEC     +.4511569595 B-1                        #  STAR 26    Z
049950,000059: 14,3505           63326 77723                     2DEC     -.7862552143 B-1                        #  STAR 25    X
049951,000060: 14,3507           67516 72566                     2DEC     -.5216265404 B-1                        #  STAR 25    Y
049952,000061: 14,3511           05231 14031                     2DEC     +.3312227199 B-1                        #  STAR 25    Z
049953,000062: 14,3513           64753 63156                     2DEC     -.6899901699 B-1                        #  STAR 24    X
049954,000063: 14,3515           71237 42272                     2DEC     -.4180817950 B-1                        #  STAR 24    Y
049955,000064: 14,3517           66427 64260                     2DEC     -.5908647707 B-1                        #  STAR 24    Z
049956,000065: 14,3521           66546 73302                     2DEC     -.5811943804 B-1                        #  STAR 23    X
049957,000066: 14,3523           73261 73575                     2DEC     -.2907877154 B-1                        #  STAR 23    Y
049958,000067: 14,3525           14122 07016                     2DEC     +.7600365758 B-1                        #  STAR 23    Z
049959,000068: 14,3527           61247 42015                     2DEC     -.9171065276 B-1                        #  STAR 22    X
049960,000069: 14,3531           72314 67004                     2DEC     -.3500098785 B-1                        #  STAR 22    Y
049961,000070: 14,3533           74744 74104                     2DEC     -.1908106439 B-1                        #  STAR 22    Z
049962,000071: 14,3535           70605 63103                     2DEC     -.4524416631 B-1                        #  STAR 21    X
049963,000072: 14,3537           77154 54113                     2DEC     -.0492700670 B-1                        #  STAR 21    Y
049964,000073: 14,3541           61601 62472                     2DEC     -.8904319167 B-1                        #  STAR 21    Z
049965,000074: 14,3543           60604 63166                     2DEC     -.9525633510 B-1                        #  STAR 20    X
049966,000075: 14,3545           77033 63044                     2DEC     -.0591313500 B-1                        #  STAR 20    Y
049967,000076: 14,3547           73162 53261                     2DEC     -.2985406935 B-1                        #  STAR 20    Z
049968,000077: 14,3551           60431 63350                     2DEC     -.9656240240 B-1                        #  STAR 19    X
049969,000078: 14,3553           00660 22763                     2DEC     +.0528067543 B-1                        #  STAR 19    Y
049970,000079: 14,3555           04045 01424                     2DEC     +.2545224762 B-1                        #  STAR 19    Z
049971,000080: 14,3557           62165 45335                     2DEC     -.8606970465 B-1                        #  STAR 18    X
049972,000081: 14,3561           07327 21564                     2DEC     +.4638127405 B-1                        #  STAR 18    Y
049973,000082: 14,3563           03267 34557                     2DEC     +.2099484122 B-1                        #  STAR 18    Z
049974,000083: 14,3565           63472 50705                     2DEC     -.7741360248 B-1                        #  STAR 17    X
049975,000084: 14,3567           11661 21433                     2DEC     +.6154234025 B-1                        #  STAR 17    Y
049976,000085: 14,3571           75501 72421                     2DEC     -.1482142053 B-1                        #  STAR 17    Z
049977,000086: 14,3573           70431 65316                     2DEC     -.4656165921 B-1                        #  STAR 16    X
049978,000087: 14,3575           07510 12666                     2DEC     +.4775804724 B-1                        #  STAR 16    Y
049979,000088: 14,3577           13727 21520                     2DEC     +.7450624681 B-1                        #  STAR 16    Z
049980,000089: 14,3601           72161 43161                     2DEC     -.3611937602 B-1                        #  STAR 15    X
049981,000090: 14,3603           11144 32323                     2DEC     +.5748077840 B-1                        #  STAR 15    Y
049982,000091: 14,3605           64200 76476                     2DEC     -.7342581827 B-1                        #  STAR 15    Z
049983,000092: 14,3607           71323 70264                     2DEC     -.4116502629 B-1                        #  STAR 14    X
049984,000093: 14,3611           16403 05717                     2DEC     +.9066387314 B-1                        #  STAR 14    Y
049985,000094: 14,3613           01365 17662                     2DEC     +.0924676785 B-1                        #  STAR 14    Z
049986,000095: 14,3615           75055 75101                     2DEC     -.1818957154 B-1                        #  STAR 13    X
049987,000096: 14,3617           17030 32613                     2DEC     +.9405318128 B-1                        #  STAR 13    Y
049988,000097: 14,3621           73321 65667                     2DEC     -.2869039173 B-1                        #  STAR 13    Z
049989,000098: 14,3623           77010 66714                     2DEC     -.0614360769 B-1                        #  STAR 12    X
049990,000099: 14,3625           11515 05314                     2DEC     +.6031700106 B-1                        #  STAR 12    Y
049991,000100: 14,3627           63215 53630                     2DEC     -.7952430739 B-1                        #  STAR 12    Z
049992,000101: 14,3631           02145 21163                     2DEC     +.1373948084 B-1                        #  STAR 11    X
049993,000102: 14,3633           12715 21123                     2DEC     +.6813398852 B-1                        #  STAR 11    Y
049994,000103: 14,3635           13401 26125                     2DEC     +.7189566241 B-1                        #  STAR 11    Z
049995,000104: 14,3637           03161 14610                     2DEC     +.2013426456 B-1                        #  STAR 10    X
049996,000105: 14,3641           17401 36465                     2DEC     +.9689888101 B-1                        #  STAR 10    Y
049997,000106: 14,3643           75552 56556                     2DEC     -.1432544058 B-1                        #  STAR 10    Z
049998,000107: 14,3645           05473 01565                     2DEC     +.3509587451 B-1                        #  STAR  9    X
049999,000108: 14,3647           16217 31643                     2DEC     +.8925545449 B-1                        #  STAR  9    Y
050000,000109: 14,3651           04417 22211                     2DEC     +.2831507435 B-1                        #  STAR  9    Z
050001,000110: 14,3653           06444 33354                     2DEC     +.4107492871 B-1                        #  STAR  8    X
050002,000111: 14,3655           07765 20153                     2DEC     +.4987190610 B-1                        #  STAR  8    Y
050003,000112: 14,3657           14154 23613                     2DEC     +.7632590132 B-1                        #  STAR  8    Z
050004,000113: 14,3661           13202 05024                     2DEC     +.7033883645 B-1                        #  STAR  7    X
050005,000114: 14,3663           13243 07665                     2DEC     +.7074274193 B-1                        #  STAR  7    Y
050006,000115: 14,3665           01067 01242                     2DEC     +.0692188921 B-1                        #  STAR  7    Z
050007,000116: 14,3667           10561 05666                     2DEC     +.5450662811 B-1                        #  STAR  6    X
050008,000117: 14,3671           10401 00357                     2DEC     +.5313738486 B-1                        #  STAR  6    Y
050009,000118: 14,3673           65477 61124                     2DEC     -.6484940879 B-1                        #  STAR  6    Z
050010,000119: 14,3675           00154 03111                     2DEC     +.0131955837 B-1                        #  STAR  5    X
050011,000120: 14,3677           00077 35676                     2DEC     +.0078043793 B-1                        #  STAR  5    Y
050012,000121: 14,3701           17777 01142                     2DEC     +.9998824772 B-1                        #  STAR  5    Z
050013,000122: 14,3703           07674 11416                     2DEC     +.4917355618 B-1                        #  STAR  4    X
050014,000123: 14,3705           03415 12707                     2DEC     +.2203784481 B-1                        #  STAR  4    Y
050015,000124: 14,3707           62413 43135                     2DEC     -.8423950835 B-1                        #  STAR  4    Z
050016,000125: 14,3711           07511 03423                     2DEC     +.4776746280 B-1                        #  STAR  3    X
050017,000126: 14,3713           01672 12054                     2DEC     +.1164935557 B-1                        #  STAR  3    Y
050018,000127: 14,3715           15735 15405                     2DEC     +.8707790771 B-1                        #  STAR  3    Z
050019,000128: 14,3717           16745 21763                     2DEC     +.9342726691 B-1                        #  STAR  2    X
050020,000129: 14,3721           02613 24675                     2DEC     +.1732973829 B-1                        #  STAR  2    Y
050021,000130: 14,3723           73007 50430                     2DEC     -.3116128956 B-1                        #  STAR  2    Z
050022,000131: 14,3725           15777 12457                     2DEC     +.8749183324 B-1                        #  STAR  1    X
050023,000132: 14,3727           00324 03265                     2DEC     +.0258916990 B-1                        #  STAR  1    Y
050024,000133: 14,3731           07571 17020                     2DEC     +.4835778442 B-1                        #  STAR  1    Z
050025,000134: 14,3733           15325        CATLOG             DEC      6869       B-14                       

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