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.

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

Page 490

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

Page 491

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

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