Source Code

These source-code files are part of a reconstructed copy of LM131 revision 1, the final release of the Apollo 13 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The source reconstruction began with source code of Luminary 131 previously transcribed from a digitized copy of that program. A dump of the flight spare core rope memory module B5, part number 2010802-171, serial number RAY 411, was obtained. This module is the only module different between Luminary 131 and LM131 revision 1. The dump was disassembled and all changes were incorporated into these source files. Note that page numbers in the reconstructed code match those on the Luminary 131 printout, although the changed code would likely have changed page numbers for a real LM131 revision 1 listing.

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.

046013,000002:                                                                                                  ## Copyright:   Public domain.
046014,000003:                                                                                                  ## Filename:    SINGLE_PRECISION_SUBROUTINES.agc
046015,000004:                                                                                                  ## Purpose:     A section of LM131 revision 1.
046016,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
046017,000006:                                                                                                  ##              release of the flight software for the Lunar Module's (LM)
046018,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13. The code has
046019,000008:                                                                                                  ##              been reconstructed from a listing of Luminary 131 and a dump
046020,000009:                                                                                                  ##              of a core rope memory module B5, part number 2010802-171,
046021,000010:                                                                                                  ##              which is the only module different between LM131 revision 1
046022,000011:                                                                                                  ##              and Luminary 131. The executable generated from this source
046023,000012:                                                                                                  ##              has been verified against the module dump, so while the names,
046024,000013:                                                                                                  ##              comments, and ordering may not be exactly correct, the
046025,000014:                                                                                                  ##              resulting binary is.
046026,000015:                                                                                                  ## Reference:   p.  1096
046027,000016:                                                                                                  ## Assembler:   yaYUL
046028,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
046029,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
046030,000019:                                                                                                  ## Mod history: 2022-10-28 MAS  Created from Luminary 131.
046031,000020: 

Page 1096

046033,000022:    5032                                           BLOCK    02                                    
046034,000023: 
046035,000024:                                                                                                  #  SINGLE PRECISION SINE AND COSINE
046036,000025: 
046037,000026:    5032                                           COUNT*   $$/INTER                              
046038,000027:    5032           64736        SPCOS              AD       HALF                                  #  ARGUMENTS SCALED AT PI
046039,000028:    5033           55075        SPSIN              TS       TEMK                                  
046040,000029:    5034           15036                           TCF      SPT                                   
046041,000030:    5035           41075                           CS       TEMK                                  
046042,000031:    5036           60000        SPT                DOUBLE                                         
046043,000032:    5037           55075                           TS       TEMK                                  
046044,000033:    5040           15051                           TCF      POLLEY                                
046045,000034:    5041           57075                           XCH      TEMK                                  
046046,000035:    5042           51075                           INDEX    TEMK                                  
046047,000036:    5043           64734                           AD       LIMITS                                
046048,000037:    5044           40000                           COM                                            
046049,000038:    5045           61075                           AD       TEMK                                  
046050,000039:    5046           55075                           TS       TEMK                                  
046051,000040:    5047           15051                           TCF      POLLEY                                
046052,000041:    5050           15067                           TCF      ARG90                                 
046053,000042:    5051           00006        POLLEY             EXTEND                                         
046054,000043:    5052           71075                           MP       TEMK                                  
046055,000044:    5053           55076                           TS       SQ                                    
046056,000045:    5054           00006                           EXTEND                                         
046057,000046:    5055           75005                           MP       C5/2                                  
046058,000047:    5056           67742                           AD       C3/2                                  
046059,000048:    5057           00006                           EXTEND                                         
046060,000049:    5060           71076                           MP       SQ                                    
046061,000050:    5061           67722                           AD       C1/2                                  
046062,000051:    5062           00006                           EXTEND                                         
046063,000052:    5063           71075                           MP       TEMK                                  
046064,000053:    5064           20001                           DDOUBL                                         
046065,000054:    5065           55075                           TS       TEMK                                  
046066,000055:    5066           00002                           TC       Q                                     
046067,000056:    5067           50000        ARG90              INDEX    A                                     
046068,000057:    5070           44734                           CS       LIMITS                                
046069,000058:    5071           00002                           TC       Q                                     #  RESULT SCALED AT 1
046070,000059: 
046071,000060: 

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