Source Code

This source code is very close to the Apollo Guidance Computer software for the Apollo 13 Lunar module. This revision of the Luminary 131 program is from December of 1969, whereas there was a later revision in January of 1970, and still another revision in February, which is the code that flew on the mission. As far as this transcription is concerned, it was originally from a copy made in 1991 of a printout from the collection of AGC developer Don Eyles for collector David Craig. It was subsequently scanned by Gary Neff, reprocessed for online presentation at the now-discontinued History of Recent Science and Technology (HRST) website of MIT's Dibner Institute (the full-quality scans being discarded in the process), and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a high-quality replacement scan for a completely illegible page was later provided by Gary Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many errors to be introduced into the transcription. Accordingly, a second scan of the same physical printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive, and used to correct the transcription errors. All of the scanned materials mentioned, as well as other Luminary 131 related material, are available online. Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017, so the two scans are not identical in that respect. The page-headings in the printout read, in part:
	GAP:  ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091
	17:53 DEC. 19, 1969
Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together.

046090,000002:                                                                                                  ## Copyright:   Public domain.
046091,000003:                                                                                                  ## Filename:    SINGLE_PRECISION_SUBROUTINES.agc
046092,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
046093,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
046094,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
046095,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
046096,000008:                                                                                                  ##              that the code format has been changed to conform to the
046097,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
046098,000010:                                                                                                  ##              original YUL assembler.
046099,000011:                                                                                                  ## Reference:   p. 1096
046100,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
046101,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
046102,000014:                                                                                                  ## Mod history: 05/31/03 RSB.   Began transcribing.
046103,000015:                                                                                                  ##              05/14/05 RSB    Corrected website references above.
046104,000016:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
046105,000017:                                                                                                  ##                              original harcopy, as opposed to the PDF page
046106,000018:                                                                                                  ##                              numbers in 1701.pdf.
046107,000019:                                                                                                  ##              2017-02-27 RSB  Proofed comment text using octopus/ProoferComments.
046108,000020: 

Page 1096

046110,000022:    5032                                           BLOCK    02                                    
046111,000023: 
046112,000024:                                                                                                  #  SINGLE PRECISION SINE AND COSINE
046113,000025: 
046114,000026:    5032                                           COUNT*   $$/INTER                              
046115,000027:    5032           64736        SPCOS              AD       HALF                                  #  ARGUMENTS SCALED AT PI
046116,000028:    5033           55075        SPSIN              TS       TEMK                                  
046117,000029:    5034           15036                           TCF      SPT                                   
046118,000030:    5035           41075                           CS       TEMK                                  
046119,000031:    5036           60000        SPT                DOUBLE                                         
046120,000032:    5037           55075                           TS       TEMK                                  
046121,000033:    5040           15051                           TCF      POLLEY                                
046122,000034:    5041           57075                           XCH      TEMK                                  
046123,000035:    5042           51075                           INDEX    TEMK                                  
046124,000036:    5043           64734                           AD       LIMITS                                
046125,000037:    5044           40000                           COM                                            
046126,000038:    5045           61075                           AD       TEMK                                  
046127,000039:    5046           55075                           TS       TEMK                                  
046128,000040:    5047           15051                           TCF      POLLEY                                
046129,000041:    5050           15067                           TCF      ARG90                                 
046130,000042:    5051           00006        POLLEY             EXTEND                                         
046131,000043:    5052           71075                           MP       TEMK                                  
046132,000044:    5053           55076                           TS       SQ                                    
046133,000045:    5054           00006                           EXTEND                                         
046134,000046:    5055           75005                           MP       C5/2                                  
046135,000047:    5056           67742                           AD       C3/2                                  
046136,000048:    5057           00006                           EXTEND                                         
046137,000049:    5060           71076                           MP       SQ                                    
046138,000050:    5061           67722                           AD       C1/2                                  
046139,000051:    5062           00006                           EXTEND                                         
046140,000052:    5063           71075                           MP       TEMK                                  
046141,000053:    5064           20001                           DDOUBL                                         
046142,000054:    5065           55075                           TS       TEMK                                  
046143,000055:    5066           00002                           TC       Q                                     
046144,000056:    5067           50000        ARG90              INDEX    A                                     
046145,000057:    5070           44734                           CS       LIMITS                                
046146,000058:    5071           00002                           TC       Q                                     #  RESULT SCALED AT 1
046147,000059: 
046148,000060: 

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