Source Code

These source-code files are part of a reconstructed copy of Luminary 97, the original release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memos 83 and 85, using asterisks indicating changed lines in the listing as a guide. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 97 listing.

Comments from 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.

020662,000002:                                                                                                  ## Copyright:   Public domain.
020663,000003:                                                                                                  ## Filename:    RADAR_LEADIN_ROUTINES.agc
020664,000004:                                                                                                  ## Purpose:     A section of Luminary revision 97.
020665,000005:                                                                                                  ##              It is part of the reconstructed source code for the
020666,000006:                                                                                                  ##              original release of the flight software for the Lunar 
020667,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
020668,000008:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
020669,000009:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
020670,000010:                                                                                                  ##              the listing and Luminary Memos #83 and #85, which list 
020671,000011:                                                                                                  ##              changes between Luminary 97 and 98, and 98 and 99. The
020672,000012:                                                                                                  ##              code has been adapted such that the resulting bugger words
020673,000013:                                                                                                  ##              exactly match those specified for Luminary 97 in NASA drawing
020674,000014:                                                                                                  ##              2021152D, which gives relatively high confidence that the
020675,000015:                                                                                                  ##              reconstruction is correct.
020676,000016:                                                                                                  ## Reference:   pp. 490-491
020677,000017:                                                                                                  ## Assembler:   yaYUL
020678,000018:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
020679,000019:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
020680,000020:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99.
020681,000021: 

Page 490

020683,000023: 25,2003                                           BANK     25                                    
020684,000024: 25,2000                                           SETLOC   RRLEADIN                              
020685,000025: 25,2000                                           BANK                                           
020686,000026: 
020687,000027: 25,2003  E4,1600                                  EBANK=   RSTACK                                
020688,000028: 
020689,000029:                                                                                                  #  RADAR SAMPLING LOOP.
020690,000030: 
020691,000031: 25,2003                                           COUNT*   $$/RLEAD                              
020692,000032: 25,2003           11755        RADSAMP            CCS      RSAMPDT                               #  TIMES NORMAL ONCE-PER-SECOND SAMPLING.
020693,000033: 25,2004           12006                           TCF      +2                                    
020694,000034: 25,2005           15261                           TCF      TASKOVER                              #  +0 INSERTED MANUALLY TERMINATES TEST.
020695,000035: 
020696,000036: 25,2006           05203                           TC       WAITLIST                              
020697,000037: 25,2007  E4,1600                                  EBANK=   RSTACK                                
020698,000038: 25,2007           02003 52064                     2CADR    RADSAMP                               
020699,000039: 
020700,000040: 25,2011           37713                           CAF      PRIO25                                
020701,000041: 25,2012           05072                           TC       NOVAC                                 
020702,000042: 25,2013  E4,1600                                  EBANK=   RSTACK                                
020703,000043: 25,2013           02023 52064                     2CADR    DORSAMP                               
020704,000044: 
020705,000045: 25,2015           34736                           CAF      BIT14                                 #  FOR CYCLIC SAMPLING, RTSTDEX=
020706,000046: 25,2016           00006                           EXTEND                                         #  RTSTLOC/2 + RTSTBASE
020707,000047: 25,2017           71754                           MP       RTSTLOC                               
020708,000048: 25,2020           61753                           AD       RTSTBASE                              #  0 FOR RR, 2 FOR LR.
020709,000049: 25,2021           55751                           TS       RTSTDEX                               
020710,000050: 25,2022           15261                           TCF      TASKOVER                              
020711,000051: 
020712,000052:                                                                                                  #  DO THE ACTUAL RADAR SAMPLE.
020713,000053: 
020714,000054: 25,2023           02047        DORSAMP            TC       VARADAR                               #  SELECTS VARIABLE RADAR CHANNEL.
020715,000055: 25,2024           04616                           TC       BANKCALL                              
020716,000056: 25,2025           17714                           CADR     RADSTALL                              
020717,000057: 
020718,000058: 25,2026           25756                           INCR     RFAILCNT                              #  ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
020719,000059: 
020720,000060: 25,2027           00004        DORSAMP2           INHINT                                         
020721,000061: 25,2030           30101                           CA       FLAGWRD5                              #  DON'T UPDATE RSTACK IF IN R77.
020722,000062: 25,2031           74741                           MASK     R77FLBIT                              
020723,000063: 25,2032           10000                           CCS      A                                     
020724,000064: 25,2033           12037                           TCF      +4                                    
020725,000065: 
020726,000066: 25,2034           53102                           DXCH     SAMPLSUM                              
020727,000067: 25,2035           51754                           INDEX    RTSTLOC                               
020728,000068: 25,2036           53601                           DXCH     RSTACK                                
020729,000069: 
020730,000070: 25,2037           41754                           CS       RTSTLOC                               #  CYCLE RTSTLOC.
020731,000071: 25,2040           61752                           AD       RTSTMAX                               
020732,000072: 25,2041           00006                           EXTEND                                         
020733,000073: 

Page 491

020735,000075: 25,2042           12045                           BZF      +3                                    
020736,000076: 25,2043           31754                           CA       RTSTLOC                               
020737,000077: 25,2044           64752                           AD       TWO                                   #  STORAGE IS DP
020738,000078: 25,2045           55754                           TS       RTSTLOC                               
020739,000079: 25,2046           15155                           TCF      ENDOFJOB                              #  CONTINUOUS SAMPLING AND 2N TRIES - GONE.
020740,000080: 
020741,000081:                                                                                                  #  VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
020742,000082: 
020743,000083: 25,2047           34753        VARADAR            CAF      ONE                                   #  WILL BE SENT TO RADAR ROUTINE IN A BY
020744,000084: 25,2050           54133                           TS       BUF2                                  #  SWCALL.
020745,000085: 25,2051           51751                           INDEX    RTSTDEX                               
020746,000086: 25,2052           32054                           CAF      RDRLOCS                               
020747,000087: 25,2053           14622                           TCF      SWCALL                                #  NOT TOUCHING Q.
020748,000088: 
020749,000089: 25,2054           53105        RDRLOCS            CADR     RRRANGE                               #  = 0
020750,000090: 25,2055           53103                           CADR     RRRDOT                                #  = 1
020751,000091: 25,2056           53101                           CADR     LRVELX                                #  = 2
020752,000092: 25,2057           53077                           CADR     LRVELY                                #  = 3
020753,000093: 25,2060           53075                           CADR     LRVELZ                                #  = 4
020754,000094: 25,2061           53073                           CADR     LRALT                                 #  = 5
020755,000095: 
020756,000096: 

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