Source Code

This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the second release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 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.

021523,000002:                                                                                                  ## Copyright:   Public domain.
021524,000003:                                                                                                  ## Filename:    RADAR_LEADIN_ROUTINES.agc
021525,000004:                                                                                                  ## Purpose:     Part of the reconstructed source code for LMY99 Rev 0,
021526,000005:                                                                                                  ##              otherwise known as Luminary Rev 99, the second release
021527,000006:                                                                                                  ##              of the Apollo Guidance Computer (AGC) software for Apollo 11.
021528,000007:                                                                                                  ##              It differs from LMY99 Rev 1 (the flown version) only in the
021529,000008:                                                                                                  ##              placement of a single label. The corrections shown here have
021530,000009:                                                                                                  ##              been verified to have the same bank checksums as AGC developer
021531,000010:                                                                                                  ##              Allan Klumpp's copy of Luminary Rev 99, and so are believed
021532,000011:                                                                                                  ##              to be accurate. This file is intended to be a faithful 
021533,000012:                                                                                                  ##              recreation, except that the code format has been changed to 
021534,000013:                                                                                                  ##              conform to the requirements of the yaYUL assembler rather than 
021535,000014:                                                                                                  ##              the original YUL assembler.
021536,000015:                                                                                                  ##
021537,000016:                                                                                                  ## Assembler:   yaYUL
021538,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
021539,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo.
021540,000019:                                                                                                  ## Pages:       490-491
021541,000020:                                                                                                  ## Mod history: 2009-05-17 RSB  Adapted from the corresponding 
021542,000021:                                                                                                  ##                              Luminary131 file, using page 
021543,000022:                                                                                                  ##                              images from Luminary 1A.
021544,000023:                                                                                                  ##              2016-12-14 RSB  Proofed text comments with octopus/ProoferComments
021545,000024:                                                                                                  ##                              and corrected the errors found.
021546,000025:                                                                                                  ##              2017-08-01 MAS  Created from LMY99 Rev 1.
021547,000026: 
021548,000027:                                                                                                  ## This source code has been transcribed or otherwise adapted from
021549,000028:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
021550,000029:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
021551,000030:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
021552,000031:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
021553,000032:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
021554,000033:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
021555,000034:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
021556,000035:                                                                                                  ## actually created.
021557,000036:                                                                                                  ##
021558,000037:                                                                                                  ## The code has been modified to match LMY99 Revision 0, otherwise
021559,000038:                                                                                                  ## known as Luminary Revision 99, the Apollo 11 software release preceeding
021560,000039:                                                                                                  ## the listing from which it was transcribed. It has been verified to
021561,000040:                                                                                                  ## contain the same bank checksums as AGC developer Allan Klumpp's listing
021562,000041:                                                                                                  ## of Luminary Revision 99 (for which we do not have scans).
021563,000042:                                                                                                  ##
021564,000043:                                                                                                  ## Notations on Allan Klumpp's listing read, in part:
021565,000044:                                                                                                  ##
021566,000045:                                                                                                  ##      ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
021567,000046: 

Page 490

021569,000048: 25,2003                                           BANK     25                                    
021570,000049: 25,2000                                           SETLOC   RRLEADIN                              
021571,000050: 25,2000                                           BANK                                           
021572,000051: 
021573,000052: 25,2003  E4,1600                                  EBANK=   RSTACK                                
021574,000053: 
021575,000054:                                                                                                  #  RADAR SAMPLING LOOP.
021576,000055: 
021577,000056: 25,2003                                           COUNT*   $$/RLEAD                              
021578,000057: 25,2003           11755        RADSAMP            CCS      RSAMPDT                               #  TIMES NORMAL ONCE-PER-SECOND SAMPLING.
021579,000058: 25,2004           12006                           TCF      +2                                    
021580,000059: 25,2005           15261                           TCF      TASKOVER                              #  +0 INSERTED MANUALLY TERMINATES TEST.
021581,000060: 
021582,000061: 25,2006           05203                           TC       WAITLIST                              
021583,000062: 25,2007  E4,1600                                  EBANK=   RSTACK                                
021584,000063: 25,2007           02003 52064                     2CADR    RADSAMP                               
021585,000064: 
021586,000065: 25,2011           37713                           CAF      PRIO25                                
021587,000066: 25,2012           05072                           TC       NOVAC                                 
021588,000067: 25,2013  E4,1600                                  EBANK=   RSTACK                                
021589,000068: 25,2013           02023 52064                     2CADR    DORSAMP                               
021590,000069: 
021591,000070: 25,2015           34736                           CAF      BIT14                                 #  FOR CYCLIC SAMPLING, RTSTDEX=
021592,000071: 25,2016           00006                           EXTEND                                         #  RTSTLOC/2 + RTSTBASE
021593,000072: 25,2017           71754                           MP       RTSTLOC                               
021594,000073: 25,2020           61753                           AD       RTSTBASE                              #  0 FOR RR, 2 FOR LR.
021595,000074: 25,2021           55751                           TS       RTSTDEX                               
021596,000075: 25,2022           15261                           TCF      TASKOVER                              
021597,000076: 
021598,000077:                                                                                                  #  DO THE ACTUAL RADAR SAMPLE.
021599,000078: 
021600,000079: 25,2023           02047        DORSAMP            TC       VARADAR                               #  SELECTS VARIABLE RADAR CHANNEL.
021601,000080: 25,2024           04616                           TC       BANKCALL                              
021602,000081: 25,2025           17714                           CADR     RADSTALL                              
021603,000082: 
021604,000083: 25,2026           25756                           INCR     RFAILCNT                              #  ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
021605,000084: 
021606,000085: 25,2027           00004        DORSAMP2           INHINT                                         
021607,000086: 25,2030           30101                           CA       FLAGWRD5                              #  DON'T UPDATE RSTACK IF IN R77.
021608,000087: 25,2031           74741                           MASK     R77FLBIT                              
021609,000088: 25,2032           10000                           CCS      A                                     
021610,000089: 25,2033           12037                           TCF      +4                                    
021611,000090: 
021612,000091: 25,2034           53102                           DXCH     SAMPLSUM                              
021613,000092: 25,2035           51754                           INDEX    RTSTLOC                               
021614,000093: 25,2036           53601                           DXCH     RSTACK                                
021615,000094: 
021616,000095: 25,2037           41754                           CS       RTSTLOC                               #  CYCLE RTSTLOC.
021617,000096: 25,2040           61752                           AD       RTSTMAX                               
021618,000097: 25,2041           00006                           EXTEND                                         
021619,000098: 

Page 491

021621,000100: 25,2042           12045                           BZF      +3                                    
021622,000101: 25,2043           31754                           CA       RTSTLOC                               
021623,000102: 25,2044           64752                           AD       TWO                                   #  STORAGE IS DP
021624,000103: 25,2045           55754                           TS       RTSTLOC                               
021625,000104: 25,2046           15155                           TCF      ENDOFJOB                              #  CONTINUOUS SAMPLING AND 2N TRIES - GONE.
021626,000105: 
021627,000106:                                                                                                  #  VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
021628,000107: 
021629,000108: 25,2047           34753        VARADAR            CAF      ONE                                   #  WILL BE SENT TO RADAR ROUTINE IN A BY
021630,000109: 25,2050           54133                           TS       BUF2                                  #  SWCALL.
021631,000110: 25,2051           51751                           INDEX    RTSTDEX                               
021632,000111: 25,2052           32054                           CAF      RDRLOCS                               
021633,000112: 25,2053           14622                           TCF      SWCALL                                #  NOT TOUCHING Q.
021634,000113: 
021635,000114: 25,2054           53105        RDRLOCS            CADR     RRRANGE                               #  = 0
021636,000115: 25,2055           53103                           CADR     RRRDOT                                #  = 1
021637,000116: 25,2056           53101                           CADR     LRVELX                                #  = 2
021638,000117: 25,2057           53077                           CADR     LRVELY                                #  = 3
021639,000118: 25,2060           53075                           CADR     LRVELZ                                #  = 4
021640,000119: 25,2061           53073                           CADR     LRALT                                 #  = 5
021641,000120: 
021642,000121: 

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