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.

001037,000002:                                                                                                  ## Copyright:   Public domain.
001038,000003:                                                                                                  ## Filename:    TAGS_FOR_RELATIVE_SETLOC_AND_BLANK_BANK_CARDS.agc
001039,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
001040,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
001041,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
001042,000007:                                                                                                  ##              No original listings of this program are available;
001043,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
001044,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
001045,000010:                                                                                                  ## Assembler:   yaYUL
001046,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
001047,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
001048,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
001049,000014: 
001050,000015:                                                                                                  ## This section allocates tags to match our particular set of Sundance modules.
001051,000016: 
001052,000017: ???????                                           COUNT    BANKSUM                               
001053,000018: 
001054,000019:                                                                                                  #  MODULE 1 CONTAINS BANKS 0 THROUGH 5
001055,000020: 
001056,000021:    4000                                           BLOCK    02                                    
001057,000022:    4000                        RADARFF            EQUALS                                         
001058,000023:    4000                        FFTAG1             EQUALS                                         
001059,000024:    4000                        FFTAG2             EQUALS                                         
001060,000025:    4000                        FFTAG3             EQUALS                                         
001061,000026:    4000                        FFTAG4             EQUALS                                         
001062,000027:    4000                        FFTAG7             EQUALS                                         
001063,000028:    4000                        FFTAG8             EQUALS                                         
001064,000029:    4000                        FFTAG9             EQUALS                                         
001065,000030:    4000                        FFTAG10            EQUALS                                         
001066,000031:    4000                                           BNKSUM   02                                    
001067,000032: 
001068,000033: 
001069,000034:    6000                                           BLOCK    03                                    
001070,000035:    6000                        FFTAG5             EQUALS                                         
001071,000036:    6000                        FFTAG6             EQUALS                                         
001072,000037:    6000                                           BNKSUM   03                                    
001073,000038: 
001074,000039: 
001075,000040: 00,2000                                           BANK     00                                    
001076,000041: 00,2000                        DLAYJOB            EQUALS                                         
001077,000042: 00,2000                                           BNKSUM   00                                    
001078,000043: 
001079,000044: 
001080,000045: 01,2000                                           BANK     01                                    
001081,000046: 01,2000                        RESTART            EQUALS                                         
001082,000047: 01,2000                                           BNKSUM   01                                    
001083,000048: 
001084,000049: 
001085,000050: 04,2000                                           BANK     04                                    
001086,000051: 04,2000                        R02                EQUALS                                         
001087,000052: 04,2000                        VERB37             EQUALS                                         
001088,000053: 04,2000                        PINBALL4           EQUALS                                         
001089,000054: 04,2000                        CONICS1            EQUALS                                         
001090,000055: 04,2000                        KEYRUPT            EQUALS                                         
001091,000056: 04,2000                        R36LM              EQUALS                                         
001092,000057: 04,2000                        UPDATE2            EQUALS                                         
001093,000058: 04,2000                        E/PROG             EQUALS                                         
001094,000059: 04,2000                                           BNKSUM   04                                    
001095,000060: 
001096,000061: 
001097,000062: 05,2000                                           BANK     05                                    
001098,000063: 05,2000                        FRANDRES           EQUALS                                         
001099,000064: 05,2000                        DOWNTELM           EQUALS                                         
001100,000065: 05,2000                                           BNKSUM   05                                    
001101,000066: 
001102,000067: 
001103,000068:                                                                                                  #  MODULE 2 CONTAINS BANKS 6 THROUGH 13
001104,000069: 
001105,000070: 06,2000                                           BANK     06                                    
001106,000071: 06,2000                        IMUCOMP            EQUALS                                         
001107,000072: 06,2000                        T4RUP              EQUALS                                         
001108,000073: 06,2000                        RCSMONT            EQUALS                                         
001109,000074: 06,2000                        STGMONT            EQUALS                                         
001110,000075: 06,2000                                           BNKSUM   06                                    
001111,000076: 
001112,000077: 
001113,000078: 07,2000                                           BANK     07                                    
001114,000079: 07,2000                        AOTMARK1           EQUALS                                         
001115,000080: 07,2000                        MODESW             EQUALS                                         
001116,000081: 07,2000                                           BNKSUM   07                                    
001117,000082: 
001118,000083: 
001119,000084: 10,2000                                           BANK     10                                    
001120,000085: 10,2000                        RTBCODES           EQUALS                                         
001121,000086: 10,2000                        DISPLAYS           EQUALS                                         
001122,000087: 10,2000                        PHASETAB           EQUALS                                         
001123,000088: 10,2000                        MIDDGIM            EQUALS                                         
001124,000089: 10,2000                                           BNKSUM   10                                    
001125,000090: 
001126,000091: 
001127,000092: 11,2000                                           BANK     11                                    
001128,000093: 11,2000                        ORBITAL            EQUALS                                         
001129,000094: 11,2000                        ORBITAL1           EQUALS                                         
001130,000095: 11,2000                        INTVEL             EQUALS                                         
001131,000096: 11,2000                        INTPRET2           EQUALS                                         
001132,000097: 11,2000                                           BNKSUM   11                                    
001133,000098: 
001134,000099: 
001135,000100: 12,2000                                           BANK     12                                    
001136,000101: 12,2000                        CONICS             EQUALS                                         
001137,000102: 12,2000                                           BNKSUM   12                                    
001138,000103: 
001139,000104: 
001140,000105: 13,2000                                           BANK     13                                    
001141,000106: 13,2000                        LATLONG            EQUALS                                         
001142,000107: 13,2000                        INTINIT            EQUALS                                         
001143,000108: 13,2000                        LEMGEOM            EQUALS                                         
001144,000109: 13,2000                        R32LOC             EQUALS                                         
001145,000110: 13,2000                                           BNKSUM   13                                    
001146,000111: 
001147,000112: 
001148,000113:                                                                                                  #  MODULE 3 CONTAINS BANKS 14 THROUGH 21
001149,000114: 
001150,000115: 14,2000                                           BANK     14                                    
001151,000116: 14,2000                        P50S1              EQUALS                                         
001152,000117: 14,2000                        STARTAB            EQUALS                                         
001153,000118: 14,2000                        EPHEM1             EQUALS                                         
001154,000119: 14,2000                                           BNKSUM   14                                    
001155,000120: 
001156,000121: 
001157,000122: 15,2000                                           BANK     15                                    
001158,000123: 15,2000                        P50S               EQUALS                                         
001159,000124: 15,2000                        EPHEM              EQUALS                                         
001160,000125: 15,2000                                           BNKSUM   15                                    
001161,000126: 
001162,000127: 
001163,000128: 16,2000                                           BANK     16                                    
001164,000129: 16,2000                        DAPS1              EQUALS                                         
001165,000130: 16,2000                                           BNKSUM   16                                    
001166,000131: 
001167,000132: 
001168,000133: 17,2000                                           BANK     17                                    
001169,000134: 17,2000                        DAPS2              EQUALS                                         
001170,000135: 17,2000                                           BNKSUM   17                                    
001171,000136: 
001172,000137: 
001173,000138: 20,2000                                           BANK     20                                    
001174,000139: 20,2000                        DAPS3              EQUALS                                         
001175,000140: 20,2000                        LOADDAP            EQUALS                                         
001176,000141: 20,2000                                           BNKSUM   20                                    
001177,000142: 
001178,000143: 
001179,000144: 21,2000                                           BANK     21                                    
001180,000145: 21,2000                        DAPS4              EQUALS                                         
001181,000146: 21,2000                        RODTRAP            EQUALS                                         
001182,000147: 21,2000                        F2DPS*21           EQUALS                                         
001183,000148: 21,2000                        R10                EQUALS                                         
001184,000149: 21,2000                                           BNKSUM   21                                    
001185,000150: 
001186,000151: 
001187,000152:                                                                                                  #  MODULE 4 CONTAINS BANKS 22 THROUGH 27
001188,000153: 
001189,000154: 22,2000                                           BANK     22                                    
001190,000155: 22,2000                        KALCMON1           EQUALS                                         
001191,000156: 22,2000                        KALCMON2           EQUALS                                         
001192,000157: 22,2000                        R30LOC             EQUALS                                         
001193,000158: 22,2000                                           BNKSUM   22                                    
001194,000159: 
001195,000160: 
001196,000161: 23,2000                                           BANK     23                                    
001197,000162: 23,2000                        POWFLITE           EQUALS                                         
001198,000163: 23,2000                        POWFLIT1           EQUALS                                         
001199,000164: 23,2000                        INFLIGHT           EQUALS                                         
001200,000165: 23,2000                        APOPERI            EQUALS                                         
001201,000166: 23,2000                        R61                EQUALS                                         
001202,000167: 23,2000                        R62                EQUALS                                         
001203,000168: 23,2000                        INTPRET1           EQUALS                                         
001204,000169: 23,2000                        MEASINC            EQUALS                                         
001205,000170: 23,2000                        MEASINC1           EQUALS                                         
001206,000171: 23,2000                                           BNKSUM   23                                    
001207,000172: 
001208,000173: 
001209,000174: 24,2000                                           BANK     24                                    
001210,000175: 24,2000                        PLANTIN            EQUALS                                         
001211,000176: 24,2000                        P20S               EQUALS                                         
001212,000177: 24,2000                                           BNKSUM   24                                    
001213,000178: 
001214,000179: 
001215,000180: 25,2000                                           BANK     25                                    
001216,000181: 25,2000                        P20S1              EQUALS                                         
001217,000182: 25,2000                        P20S2              EQUALS                                         
001218,000183: 25,2000                        LRS22              EQUALS                                         
001219,000184: 25,2000                        RADARUPT           EQUALS                                         
001220,000185: 25,2000                        RRLEADIN           EQUALS                                         
001221,000186: 25,2000                                           BNKSUM   25                                    
001222,000187: 
001223,000188: 
001224,000189: 26,2000                                           BANK     26                                    
001225,000190: 26,2000                        P20S3              EQUALS                                         
001226,000191: 26,2000                        BAWLANGS           EQUALS                                         
001227,000192: 26,2000                        MANUVER            EQUALS                                         
001228,000193: 26,2000                        MANUVER1           EQUALS                                         
001229,000194: 26,2000                                           BNKSUM   26                                    
001230,000195: 
001231,000196: 
001232,000197: 27,2000                                           BANK     27                                    
001233,000198: 27,2000                        TOF-FF             EQUALS                                         
001234,000199: 27,2000                        TOF-FF1            EQUALS                                         
001235,000200: 27,2000                        P40S1              EQUALS                                         
001236,000201: 27,2000                        VECPT              EQUALS                                         
001237,000202: 27,2000                                           BNKSUM   27                                    
001238,000203: 
001239,000204: 
001240,000205:                                                                                                  #  MODULE 5 CONTAINS BANKS 30 THROUGH 35
001241,000206: 
001242,000207: 30,2000                                           BANK     30                                    
001243,000208: 30,2000                        LOWSUPER           EQUALS                                         
001244,000209: 30,2000                        P12                EQUALS                                         
001245,000210: 30,2000                        ASENT              EQUALS                                         
001246,000211: 30,2000                        FCDUW              EQUALS                                         
001247,000212: 30,2000                                           BNKSUM   30                                    
001248,000213: 
001249,000214: 
001250,000215: 31,2000                                           BANK     31                                    
001251,000216: 31,2000                        FTHROT             EQUALS                                         
001252,000217: 31,2000                        F2DPS*31           EQUALS                                         
001253,000218: 31,2000                                           BNKSUM   31                                    
001254,000219: 
001255,000220: 
001256,000221: 32,2000                                           BANK     32                                    
001257,000222: 32,2000                        P10S               EQUALS                                         
001258,000223: 32,2000                        F2DPS*32           EQUALS                                         
001259,000224: 32,2000                        ABORTS             EQUALS                                         
001260,000225: 32,2000                        P40S2              EQUALS                                         
001261,000226: 32,2000                        R11                EQUALS                                         
001262,000227: 32,2000                                           BNKSUM   32                                    
001263,000228: 
001264,000229: 
001265,000230: 33,2000                                           BANK     33                                    
001266,000231: 33,2000                        SERVICES           EQUALS                                         
001267,000232: 33,2000                                           BNKSUM   33                                    
001268,000233: 
001269,000234: 
001270,000235: 34,2000                                           BANK     34                                    
001271,000236: 34,2000                        STBLEORB           EQUALS                                         
001272,000237: 34,2000                        GLM                EQUALS                                         
001273,000238: 34,2000                        P30S1              EQUALS                                         
001274,000239: 34,2000                        CSI/CDH1           EQUALS                                         
001275,000240: 34,2000                                           BNKSUM   34                                    
001276,000241: 
001277,000242: 
001278,000243: 35,2000                                           BANK     35                                    
001279,000244: 35,2000                        CSI/CDH            EQUALS                                         
001280,000245: 35,2000                        P30S               EQUALS                                         
001281,000246: 35,2000                                           BNKSUM   35                                    
001282,000247: 
001283,000248:                                                                                                  #  MODULE 6 CONTAINS BANKS 36 THROUGH 43
001284,000249: 
001285,000250: 36,2000                                           BANK     36                                    
001286,000251: 36,2000                        P40S               EQUALS                                         
001287,000252: 36,2000                                           BNKSUM   36                                    
001288,000253: 
001289,000254: 
001290,000255: 37,2000                                           BANK     37                                    
001291,000256: 37,2000                        VB45               EQUALS                                         
001292,000257: 37,2000                        P05P06             EQUALS                                         
001293,000258: 37,2000                        IMU2               EQUALS                                         
001294,000259: 37,2000                        IMU4               EQUALS                                         
001295,000260: 37,2000                        R31                EQUALS                                         
001296,000261: 37,2000                        IMUSUPER           EQUALS                                         
001297,000262: 37,2000                                           BNKSUM   37                                    
001298,000263: 
001299,000264: 
001300,000265: 40,2000                                           BANK     40                                    
001301,000266: 40,2000                        R47                EQUALS                                         
001302,000267: 40,2000                        PINBALL1           EQUALS                                         
001303,000268: 40,2000                        SELFSUPR           EQUALS                                         
001304,000269: 40,2000                        PINSUPER           EQUALS                                         
001305,000270: 40,2000                                           BNKSUM   40                                    
001306,000271: 
001307,000272: 
001308,000273: 41,2000                                           BANK     41                                    
001309,000274: 41,2000                        PINBALL2           EQUALS                                         
001310,000275: 41,2000                                           BNKSUM   41                                    
001311,000276: 
001312,000277: 
001313,000278: 42,2000                                           BANK     42                                    
001314,000279: 42,2000                        SBAND              EQUALS                                         
001315,000280: 42,2000                        PINBALL3           EQUALS                                         
001316,000281: 42,2000                        EXTVB1             EQUALS                                         
001317,000282: 42,2000                                           BNKSUM   42                                    
001318,000283: 
001319,000284: 
001320,000285: 43,2000                                           BANK     43                                    
001321,000286: 43,2000                        EXTVERBS           EQUALS                                         
001322,000287: 43,2000                        SELFCHEC           EQUALS                                         
001323,000288: 
001324,000289: 43,2000                                           BNKSUM   43                                    
001325,000290: 
001326,000291: 
001327,000292: 43,2000  23,2232               HI6ZEROS           EQUALS   ZEROVECS                              #  ZERO VECTOR ALWAYS IN HIGH MEMORY
001328,000293: 43,2000  11,2275               LO6ZEROS           EQUALS   ZEROVEC                               #  ZERO VECTOR ALWAYS IN LOW MEMORY
001329,000294: 43,2000  23,2230               HIDPHALF           EQUALS   UNITX                                 
001330,000295: 43,2000  11,2273               LODPHALF           EQUALS   XUNIT                                 
001331,000296: 43,2000  23,2222               HIDP1/4            EQUALS   DP1/4TH                               
001332,000297: 43,2000  04,2672               LODP1/4            EQUALS   D1/4                                  #  2DEC .25
001333,000298: 43,2000  23,2230               HIUNITX            EQUALS   UNITX                                 
001334,000299: 43,2000  23,2226               HIUNITY            EQUALS   UNITY                                 
001335,000300: 43,2000  23,2224               HIUNITZ            EQUALS   UNITZ                                 
001336,000301: 43,2000  11,2273               LOUNITX            EQUALS   XUNIT                                 #  2DEC .5
001337,000302: 43,2000  11,2271               LOUNITY            EQUALS   YUNIT                                 #  2DEC 0
001338,000303: 43,2000  11,2267               LOUNITZ            EQUALS   ZUNIT                                 #  2DEC 0
001339,000304: 
001340,000305: 
001341,000306: 
001342,000307: 43,2000  22,3562               DELRSPL            EQUALS   SPLRET                                #  COL PGM, ALSO CALLED BY R30 IN LUMINARY
001343,000308:                                                                                                  #  ROPE-SPECIFIC ASSIGNS OBVIATING NEED TO CHECK COMPUTER FLAG IN           DETERMINING INTEGRATION AREA ENTRIES.
001344,000309: 
001345,000310: 43,2000  13,2704               ATOPTHIS           EQUALS   ATOPLEM                               
001346,000311: 43,2000  13,2631               ATOPOTH            EQUALS   ATOPCSM                               
001347,000312: 43,2000  13,3014               OTHPREC            EQUALS   CSMPREC                               
001348,000313: 43,2000  0000174               MOONTHIS           EQUALS   LMOONFLG                              
001349,000314: 43,2000  0000173               MOONOTH            EQUALS   CMOONFLG                              
001350,000315: 43,2000  13,2717               MOVATHIS           EQUALS   MOVEALEM                              
001351,000316: 43,2000  11,2306               RMM                =        LODPMAX                               
001352,000317: 43,2000  11,2310               RME                =        LODPMAX1                              
001353,000318: 43,2000  13,3030               THISPREC           EQUALS   LEMPREC                               
001354,000319: 43,2000  23,2224               THISAXIS           =        UNITZ                                 
001355,000320: 43,2000  23,2224               NB1NB2             EQUALS   THISAXIS                              #  FOR R31
001356,000321: 43,2000     5061               ERASID             EQUALS   BITS2-10                              #  DOWNLINK ERASABLE DUMP ID
001357,000322: 43,2000     5025               DELAYNUM           EQUALS   TWO                                   

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