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.

042375,000002:                                                                                                  ## Copyright:   Public domain.
042376,000003:                                                                                                  ## Filename:    INTERPRETIVE_CONSTANTS.agc
042377,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
042378,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
042379,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
042380,000007:                                                                                                  ##              No original listings of this program are available;
042381,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
042382,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
042383,000010:                                                                                                  ## Assembler:   yaYUL
042384,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042385,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042386,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
042387,000014:                                                                                                  ##              2021-05-30 ABS  DFC-6 -> DEC-6, DFC-12 -> DEC-12
042388,000015: 
042389,000016:                                                                                                  ## Sundance 302
042390,000017: 
042391,000018: 23,2000                                           SETLOC   INTPRET1                              
042392,000019: 23,2000                                           BANK                                           
042393,000020: 
042394,000021: 23,2222                                           COUNT*   $$/ICONS                              
042395,000022: 23,2222           10000 00000  DP1/4TH            2DEC     .25                                   
042396,000023: 
042397,000024: 23,2224           00000 00000  UNITZ              2DEC     0          B-28                       
042398,000025: 
042399,000026: 23,2226           00000 00000  UNITY              2DEC     0          B-28                       
042400,000027: 
042401,000028: 23,2230           20000 00000  UNITX              2DEC     .5                                    
042402,000029: 
042403,000030: 23,2232           00000 00000  ZEROVECS           2DEC     0          B-28                       
042404,000031: 
042405,000032: 23,2234           00000 00000                     2DEC     0          B-28                       
042406,000033: 
042407,000034: 23,2236           00000 00000                     2DEC     0          B-28                       
042408,000035: 
042409,000036: 23,2240  23,2230               DPHALF             =        UNITX                                 
042410,000037: 23,2240           37777        DPPOSMAX           OCT      37777                                 
042411,000038: 23,2241           37777                           OCT      37777                                 
042412,000039: 
042413,000040:                                                                                                  #  INTERPRETIVE CONSTANTS IN THE OTHER HALF-MEMORY
042414,000041: 
042415,000042: 11,2000                                           SETLOC   INTPRET2                              
042416,000043: 11,2000                                           BANK                                           
042417,000044: 
042418,000045: 11,2267                                           COUNT*   $$/ICONS                              
042419,000046: 11,2267           00000 00000  ZUNIT              2DEC     0          B-28                       
042420,000047: 
042421,000048: 11,2271           00000 00000  YUNIT              2DEC     0          B-28                       
042422,000049: 
042423,000050: 11,2273           20000 00000  XUNIT              2DEC     .5                                    
042424,000051: 
042425,000052: 11,2275           00000 00000  ZEROVEC            2DEC     0          B-28                       
042426,000053: 
042427,000054: 11,2277           00000 00000                     2DEC     0          B-28                       
042428,000055: 
042429,000056: 11,2301           00000 00000                     2DEC     0          B-28                       
042430,000057: 
042431,000058: 11,2303           77777                           OCT      77777                                 #  -0, -6, -12 MUST REMAIN IN THIS ORDER
042432,000059: 11,2304           77771        DEC-6              DEC      -6         B-14                       
042433,000060: 11,2305           77763        DEC-12             DEC      -12        B-14                       
042434,000061: 11,2306           37777 37777  LODPMAX            2OCT     3777737777                            #  THESE TWO CONSTANTS MUST REMAIN
042435,000062: 
042436,000063: 11,2310           37777 37777  LODPMAX1           2OCT     3777737777                            #  ADJACENT AND THE SAME FOR INTEGRATION
042437,000064: 
042438,000065: 11,2312  11,2275               ZERODP             =        ZEROVEC                               
042439,000066: 11,2312  11,2273               HALFDP             =        XUNIT                                 
042440,000067: 
042441,000068: 

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