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.

042444,000002:                                                                                                  ## Copyright:   Public domain.
042445,000003:                                                                                                  ## Filename:    SINGLE_PRECISION_SUBROUTINES.agc
042446,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
042447,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
042448,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
042449,000007:                                                                                                  ##              No original listings of this program are available;
042450,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
042451,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
042452,000010:                                                                                                  ## Assembler:   yaYUL
042453,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042454,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042455,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
042456,000014: 
042457,000015:                                                                                                  ## Sundance 292
042458,000016: 
042459,000017:    5102                                           BLOCK    02                                    
042460,000018: 
042461,000019:                                                                                                  #  SINGLE PRECISION SINE AND COSINE
042462,000020: 
042463,000021:    5102                                           COUNT*   $$/INTER                              
042464,000022:    5102           65011        SPCOS              AD       HALF                                  #  ARGUMENTS SCALED AT PI
042465,000023:    5103           55076        SPSIN              TS       TEMK                                  
042466,000024:    5104           15106                           TCF      SPT                                   
042467,000025:    5105           41076                           CS       TEMK                                  
042468,000026:    5106           60000        SPT                DOUBLE                                         
042469,000027:    5107           55076                           TS       TEMK                                  
042470,000028:    5110           15121                           TCF      POLLEY                                
042471,000029:    5111           57076                           XCH      TEMK                                  
042472,000030:    5112           51076                           INDEX    TEMK                                  
042473,000031:    5113           65007                           AD       LIMITS                                
042474,000032:    5114           40000                           COM                                            
042475,000033:    5115           61076                           AD       TEMK                                  
042476,000034:    5116           55076                           TS       TEMK                                  
042477,000035:    5117           15121                           TCF      POLLEY                                
042478,000036:    5120           15137                           TCF      ARG90                                 
042479,000037:    5121           00006        POLLEY             EXTEND                                         
042480,000038:    5122           71076                           MP       TEMK                                  
042481,000039:    5123           55077                           TS       SQ                                    
042482,000040:    5124           00006                           EXTEND                                         
042483,000041:    5125           75055                           MP       C5/2                                  
042484,000042:    5126           67710                           AD       C3/2                                  
042485,000043:    5127           00006                           EXTEND                                         
042486,000044:    5130           71077                           MP       SQ                                    
042487,000045:    5131           67671                           AD       C1/2                                  
042488,000046:    5132           00006                           EXTEND                                         
042489,000047:    5133           71076                           MP       TEMK                                  
042490,000048:    5134           20001                           DDOUBL                                         
042491,000049:    5135           55076                           TS       TEMK                                  
042492,000050:    5136           00002                           TC       Q                                     
042493,000051:    5137           50000        ARG90              INDEX    A                                     
042494,000052:    5140           45007                           CS       LIMITS                                
042495,000053:    5141           00002                           TC       Q                                     #  RESULT SCALED AT 1
042496,000054: 
042497,000055: 

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