Source Code

These source-code files are part of a reconstructed copy of Luminary 69/2, the flown, final release of the Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction is based on the source code of Luminary 69 — i.e., the initial, unflown version, "revision 0" — of which a contemporary listing was available. The code was then updated by incorporating the differences between Luminary 69 and Luminary 69/2, known from other contemporary documentation. The only such difference is the implementation in Luminary 69/2 of the "R-2 Lunar Potential Model", the source code for which was taken from program Luminary 99/1 (Apollo 11 LM), of which a contemporary listing was also available. Finally, the now-reconstructed Luminary 69/2 was then validated by assembling it to executable form and verifying that its memory banks had the correct checksums, known from still other contemporary documentation.

Note that page numbers in the reconstructed code match those in the original Luminary 69 program listing, or in the ORBITAL INTEGRATION log section, in Luminary 99/1. Page numbers would certainly differ somewhat in a contemporary Luminary 69/2 listing. Moreover, annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change in Luminary 69/2 relative to Luminary 69. Here's a guide to the Apollo documentation referenced in those annotations:
Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

047257,000002:                                                                                                  ## Copyright:   Public domain.
047258,000003:                                                                                                  ## Filename:    SINGLE_PRECISION_SUBROUTINES.agc
047259,000004:                                                                                                  ## Purpose:     A section of LUM69 revision 2.
047260,000005:                                                                                                  ##              It is part of the reconstructed source code for the flown
047261,000006:                                                                                                  ##              version of the flight software for the Lunar Module's (LM)
047262,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 10. The code has
047263,000008:                                                                                                  ##              been recreated from a copy of Luminary revsion 069, using
047264,000009:                                                                                                  ##              changes present in Luminary 099 which were described in
047265,000010:                                                                                                  ##              Luminary memos 75 and 78. The code has been adapted such
047266,000011:                                                                                                  ##              that the resulting bugger words exactly match those specified
047267,000012:                                                                                                  ##              for LUM69 revision 2 in NASA drawing 2021152B, which gives
047268,000013:                                                                                                  ##              relatively high confidence that the reconstruction is correct.
047269,000014:                                                                                                  ## Reference:   p.  1097
047270,000015:                                                                                                  ## Assembler:   yaYUL
047271,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047272,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047273,000018:                                                                                                  ## Mod history: 2019-07-27 MAS  Created from Luminary 69.
047274,000019: 

Page 1097

047276,000021:    5032                                           BLOCK    02                                    
047277,000022: 
047278,000023:                                                                                                  #  SINGLE PRECISION SINE AND COSINE
047279,000024: 
047280,000025:    5032                                           COUNT*   $$/INTER                              
047281,000026:    5032           64736        SPCOS              AD       HALF                                  #  ARGUMENTS SCALED AT PI
047282,000027:    5033           55076        SPSIN              TS       TEMK                                  
047283,000028:    5034           15036                           TCF      SPT                                   
047284,000029:    5035           41076                           CS       TEMK                                  
047285,000030:    5036           60000        SPT                DOUBLE                                         
047286,000031:    5037           55076                           TS       TEMK                                  
047287,000032:    5040           15051                           TCF      POLLEY                                
047288,000033:    5041           57076                           XCH      TEMK                                  
047289,000034:    5042           51076                           INDEX    TEMK                                  
047290,000035:    5043           64734                           AD       LIMITS                                
047291,000036:    5044           40000                           COM                                            
047292,000037:    5045           61076                           AD       TEMK                                  
047293,000038:    5046           55076                           TS       TEMK                                  
047294,000039:    5047           15051                           TCF      POLLEY                                
047295,000040:    5050           15067                           TCF      ARG90                                 
047296,000041:    5051           00006        POLLEY             EXTEND                                         
047297,000042:    5052           71076                           MP       TEMK                                  
047298,000043:    5053           55077                           TS       SQ                                    
047299,000044:    5054           00006                           EXTEND                                         
047300,000045:    5055           75005                           MP       C5/2                                  
047301,000046:    5056           67736                           AD       C3/2                                  
047302,000047:    5057           00006                           EXTEND                                         
047303,000048:    5060           71077                           MP       SQ                                    
047304,000049:    5061           67716                           AD       C1/2                                  
047305,000050:    5062           00006                           EXTEND                                         
047306,000051:    5063           71076                           MP       TEMK                                  
047307,000052:    5064           20001                           DDOUBL                                         
047308,000053:    5065           55076                           TS       TEMK                                  
047309,000054:    5066           00002                           TC       Q                                     
047310,000055:    5067           50000        ARG90              INDEX    A                                     
047311,000056:    5070           44734                           CS       LIMITS                                
047312,000057:    5071           00002                           TC       Q                                     #  RESULT SCALED AT 1
047313,000058: 
047314,000059: 

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