Source Code

This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the third release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 96 and 97. A bug (which had been around since at least Apollo 10, Luminary 69) was discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute revision into Rev 1, which is what actually flew rather than the Rev 0 presented here. A hardcopy of Rev 0 is known to exist — it belonged to AGC developer Allan Klumpp for many years — but unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus the code you see here had been reconstructed (we believe accurately) rather than transcribed. The first step of the reconstruction of the Rev 0 source code was the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection. The process of reverting the active portion of the source code (i.e., other than program comments) from Rev 1 to Rev 0 was very minor, consisting only of moving the position of the STARTSB1 label in FRESH START AND RESTART. Allan had previously given us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read, in part:

	GAP:  ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051

A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here.

048021,000002:                                                                                                  ## Copyright:   Public domain.
048022,000003:                                                                                                  ## Filename:    SINGLE_PRECISION_SUBROUTINES.agc
048023,000004:                                                                                                  ## Purpose:     Part of the reconstructed source code for LMY99 Rev 0,
048024,000005:                                                                                                  ##              otherwise known as Luminary Rev 99, the third release
048025,000006:                                                                                                  ##              of the Apollo Guidance Computer (AGC) software for Apollo 11.
048026,000007:                                                                                                  ##              It differs from LMY99 Rev 1 (the flown version) only in the
048027,000008:                                                                                                  ##              placement of a single label. The corrections shown here have
048028,000009:                                                                                                  ##              been verified to have the same bank checksums as AGC developer
048029,000010:                                                                                                  ##              Allan Klumpp's copy of Luminary Rev 99, and so are believed
048030,000011:                                                                                                  ##              to be accurate. This file is intended to be a faithful 
048031,000012:                                                                                                  ##              recreation, except that the code format has been changed to 
048032,000013:                                                                                                  ##              conform to the requirements of the yaYUL assembler rather than 
048033,000014:                                                                                                  ##              the original YUL assembler.
048034,000015:                                                                                                  ##
048035,000016:                                                                                                  ## Assembler:   yaYUL
048036,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
048037,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo.
048038,000019:                                                                                                  ## Pages:       1102
048039,000020:                                                                                                  ## Mod history: 2009-05-25 RSB  Adapted from the corresponding 
048040,000021:                                                                                                  ##                              Luminary131 file, using page 
048041,000022:                                                                                                  ##                              images from Luminary 1A.
048042,000023:                                                                                                  ##              2010-12-31 JL   Fixed page number comment.
048043,000024:                                                                                                  ##              2016-12-17 RSB  Proofed text comments with octopus/ProoferComments
048044,000025:                                                                                                  ##                              and corrected the errors found.
048045,000026:                                                                                                  ##              2017-08-01 MAS  Created from LMY99 Rev 1.
048046,000027: 
048047,000028:                                                                                                  ## This source code has been transcribed or otherwise adapted from
048048,000029:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
048049,000030:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
048050,000031:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
048051,000032:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
048052,000033:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
048053,000034:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
048054,000035:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
048055,000036:                                                                                                  ## actually created.
048056,000037:                                                                                                  ##
048057,000038:                                                                                                  ## The code has been modified to match LMY99 Revision 0, otherwise
048058,000039:                                                                                                  ## known as Luminary Revision 99, the Apollo 11 software release preceeding
048059,000040:                                                                                                  ## the listing from which it was transcribed. It has been verified to
048060,000041:                                                                                                  ## contain the same bank checksums as AGC developer Allan Klumpp's listing
048061,000042:                                                                                                  ## of Luminary Revision 99 (for which we do not have scans).
048062,000043:                                                                                                  ##
048063,000044:                                                                                                  ## Notations on Allan Klumpp's listing read, in part:
048064,000045:                                                                                                  ##
048065,000046:                                                                                                  ##      ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
048066,000047: 

Page 1102

048068,000049:    5032                                           BLOCK    02                                    
048069,000050: 
048070,000051:                                                                                                  #  SINGLE PRECISION SINE AND COSINE
048071,000052: 
048072,000053:    5032                                           COUNT*   $$/INTER                              
048073,000054:    5032           64736        SPCOS              AD       HALF                                  #  ARGUMENTS SCALED AT PI
048074,000055:    5033           55076        SPSIN              TS       TEMK                                  
048075,000056:    5034           15036                           TCF      SPT                                   
048076,000057:    5035           41076                           CS       TEMK                                  
048077,000058:    5036           60000        SPT                DOUBLE                                         
048078,000059:    5037           55076                           TS       TEMK                                  
048079,000060:    5040           15051                           TCF      POLLEY                                
048080,000061:    5041           57076                           XCH      TEMK                                  
048081,000062:    5042           51076                           INDEX    TEMK                                  
048082,000063:    5043           64734                           AD       LIMITS                                
048083,000064:    5044           40000                           COM                                            
048084,000065:    5045           61076                           AD       TEMK                                  
048085,000066:    5046           55076                           TS       TEMK                                  
048086,000067:    5047           15051                           TCF      POLLEY                                
048087,000068:    5050           15067                           TCF      ARG90                                 
048088,000069:    5051           00006        POLLEY             EXTEND                                         
048089,000070:    5052           71076                           MP       TEMK                                  
048090,000071:    5053           55077                           TS       SQ                                    
048091,000072:    5054           00006                           EXTEND                                         
048092,000073:    5055           75005                           MP       C5/2                                  
048093,000074:    5056           67737                           AD       C3/2                                  
048094,000075:    5057           00006                           EXTEND                                         
048095,000076:    5060           71077                           MP       SQ                                    
048096,000077:    5061           67717                           AD       C1/2                                  
048097,000078:    5062           00006                           EXTEND                                         
048098,000079:    5063           71076                           MP       TEMK                                  
048099,000080:    5064           20001                           DDOUBL                                         
048100,000081:    5065           55076                           TS       TEMK                                  
048101,000082:    5066           00002                           TC       Q                                     
048102,000083:    5067           50000        ARG90              INDEX    A                                     
048103,000084:    5070           44734                           CS       LIMITS                                
048104,000085:    5071           00002                           TC       Q                                     #  RESULT SCALED AT 1
048105,000086: 
048106,000087: 

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