Source Code

These source-code files are part of a reconstructed copy of Comanche 45, the second release, though not the final mission release, of the Apollo 10 Command Module (CM) Apollo Guidance Computer (AGC) software. Comanche 45 was preceded by Comanche 44 and followed by Comanche 45/2 (the flown release). The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 45, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 44 (itself previously accurately reconstructed). Comanche 44 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 44 and 45. The now-reconstructed Comanche 45 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code tend to match those in the Comanche 55, the most-similar revision of Comanche for which we have access to an actual non-reconstructed hardcopy; the source code would likely have different page numbers in a contemporary Comanche 45 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 44. Here's a guide to the Apollo documentation referenced in those annotations:
There is also a detailed commentary about the reconstruction process.

Comments expected to have been present in 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.

051422,000002:                                                                                                  ## Copyright:   Public domain.
051423,000003:                                                                                                  ## Filename:    SINGLE_PRECISION_SUBROUTINES.agc
051424,000004:                                                                                                  ## Purpose:     A section of Comanche revision 045.
051425,000005:                                                                                                  ##              It is part of the reconstructed source code for the
051426,000006:                                                                                                  ##              second release of the flight software for the Command
051427,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
051428,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
051429,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
051430,000010:                                                                                                  ##              exactly match those specified for Comanche 45 in NASA drawing
051431,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
051432,000012:                                                                                                  ##              reconstruction is correct.
051433,000013:                                                                                                  ## Assembler:   yaYUL
051434,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
051435,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
051436,000016:                                                                                                  ## Mod history: 2020-12-06 MAS  Created from Comanche 44.
051437,000017: 

Page 1207

051439,000019:    5074                                           BLOCK    02                                    
051440,000020: 
051441,000021:                                                                                                  #  SINGLE PRECISION SINE AND COSINE
051442,000022: 
051443,000023:    5074                                           COUNT    02/INTER                              
051444,000024: 
051445,000025:    5074           65002        SPCOS              AD       HALF                                  #  ARGUMENTS SCALED AT PI
051446,000026:    5075           55075        SPSIN              TS       TEMK                                  
051447,000027:    5076           15100                           TCF      SPT                                   
051448,000028:    5077           41075                           CS       TEMK                                  
051449,000029:    5100           60000        SPT                DOUBLE                                         
051450,000030:    5101           55075                           TS       TEMK                                  
051451,000031:    5102           15113                           TCF      POLLEY                                
051452,000032:    5103           57075                           XCH      TEMK                                  
051453,000033:    5104           51075                           INDEX    TEMK                                  
051454,000034:    5105           65000                           AD       LIMITS                                
051455,000035:    5106           40000                           COM                                            
051456,000036:    5107           61075                           AD       TEMK                                  
051457,000037:    5110           55075                           TS       TEMK                                  
051458,000038:    5111           15113                           TCF      POLLEY                                
051459,000039:    5112           15131                           TCF      ARG90                                 
051460,000040:    5113           00006        POLLEY             EXTEND                                         
051461,000041:    5114           71075                           MP       TEMK                                  
051462,000042:    5115           55076                           TS       SQ                                    
051463,000043:    5116           00006                           EXTEND                                         
051464,000044:    5117           75047                           MP       C5/2                                  
051465,000045:    5120           67706                           AD       C3/2                                  
051466,000046:    5121           00006                           EXTEND                                         
051467,000047:    5122           71076                           MP       SQ                                    
051468,000048:    5123           67666                           AD       C1/2                                  
051469,000049:    5124           00006                           EXTEND                                         
051470,000050:    5125           71075                           MP       TEMK                                  
051471,000051:    5126           20001                           DDOUBL                                         
051472,000052:    5127           55075                           TS       TEMK                                  
051473,000053:    5130           00002                           TC       Q                                     
051474,000054:    5131           50000        ARG90              INDEX    A                                     
051475,000055:    5132           45000                           CS       LIMITS                                
051476,000056:    5133           00002                           TC       Q                                     #  RESULT SCALED AT 1
051477,000057: 
051478,000058:                                                                                                  #  SPROOT WAS DELETED IN REV 51 OF MASTER. ASS. CONT. HAS CARDS.
051479,000059: 
051480,000060: 
051481,000061: 
051482,000062: 

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