Source Code

These source code files are an attempted reconstruction of Sundance revision 306, 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
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. 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.

042614,000002:                                                                                                  ## Copyright:   Public domain.
042615,000003:                                                                                                  ## Filename:    SINGLE_PRECISION_SUBROUTINES.agc
042616,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
042617,000005:                                                                                                  ##              as closely as possible with available information. Sundance
042618,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
042619,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
042620,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
042621,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
042622,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
042623,000011:                                                                                                  ##              or the Sundance GSOPs.
042624,000012:                                                                                                  ## Assembler:   yaYUL
042625,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042626,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042627,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
042628,000016: 
042629,000017: 
042630,000018: 
042631,000019:    5102                                           BLOCK    02                                    
042632,000020: 
042633,000021:                                                                                                  #  SINGLE PRECISION SINE AND COSINE
042634,000022: 
042635,000023:    5102                                           COUNT*   $$/INTER                              
042636,000024:    5102           65011        SPCOS              AD       HALF                                  #  ARGUMENTS SCALED AT PI
042637,000025:    5103           55076        SPSIN              TS       TEMK                                  
042638,000026:    5104           15106                           TCF      SPT                                   
042639,000027:    5105           41076                           CS       TEMK                                  
042640,000028:    5106           60000        SPT                DOUBLE                                         
042641,000029:    5107           55076                           TS       TEMK                                  
042642,000030:    5110           15121                           TCF      POLLEY                                
042643,000031:    5111           57076                           XCH      TEMK                                  
042644,000032:    5112           51076                           INDEX    TEMK                                  
042645,000033:    5113           65007                           AD       LIMITS                                
042646,000034:    5114           40000                           COM                                            
042647,000035:    5115           61076                           AD       TEMK                                  
042648,000036:    5116           55076                           TS       TEMK                                  
042649,000037:    5117           15121                           TCF      POLLEY                                
042650,000038:    5120           15137                           TCF      ARG90                                 
042651,000039:    5121           00006        POLLEY             EXTEND                                         
042652,000040:    5122           71076                           MP       TEMK                                  
042653,000041:    5123           55077                           TS       SQ                                    
042654,000042:    5124           00006                           EXTEND                                         
042655,000043:    5125           75055                           MP       C5/2                                  
042656,000044:    5126           67710                           AD       C3/2                                  
042657,000045:    5127           00006                           EXTEND                                         
042658,000046:    5130           71077                           MP       SQ                                    
042659,000047:    5131           67671                           AD       C1/2                                  
042660,000048:    5132           00006                           EXTEND                                         
042661,000049:    5133           71076                           MP       TEMK                                  
042662,000050:    5134           20001                           DDOUBL                                         
042663,000051:    5135           55076                           TS       TEMK                                  
042664,000052:    5136           00002                           TC       Q                                     
042665,000053:    5137           50000        ARG90              INDEX    A                                     
042666,000054:    5140           45007                           CS       LIMITS                                
042667,000055:    5141           00002                           TC       Q                                     #  RESULT SCALED AT 1
042668,000056: 
042669,000057: 

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