Source Code

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

The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. 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 96 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.

020617,000002:                                                                                                  ## Copyright:   Public domain.
020618,000003:                                                                                                  ## Filename:    RADAR_LEADIN_ROUTINES.agc
020619,000004:                                                                                                  ## Purpose:     A section of Luminary revision 96.
020620,000005:                                                                                                  ##              It is part of the reconstructed source code for the
020621,000006:                                                                                                  ##              original release of the flight software for the Lunar 
020622,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
020623,000008:                                                                                                  ##              The code has been recreated from a previously reconstructed
020624,000009:                                                                                                  ##              copy of Luminary 97 by undoing changes described in anomaly
020625,000010:                                                                                                  ##              report LNY-59. The code has been adapted such that the
020626,000011:                                                                                                  ##              resulting bugger words exactly match those specified for
020627,000012:                                                                                                  ##              Luminary 96 in NASA drawing 2021152D, which gives relatively
020628,000013:                                                                                                  ##              high confidence that the reconstruction is correct.
020629,000014:                                                                                                  ## Reference:   pp. 490-491
020630,000015:                                                                                                  ## Assembler:   yaYUL
020631,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
020632,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
020633,000018:                                                                                                  ## Mod history: 2019-08-04 MAS  Created from Luminary 97.
020634,000019: 

Page 490

020636,000021: 25,2003                                           BANK     25                                    
020637,000022: 25,2000                                           SETLOC   RRLEADIN                              
020638,000023: 25,2000                                           BANK                                           
020639,000024: 
020640,000025: 25,2003  E4,1600                                  EBANK=   RSTACK                                
020641,000026: 
020642,000027:                                                                                                  #  RADAR SAMPLING LOOP.
020643,000028: 
020644,000029: 25,2003                                           COUNT*   $$/RLEAD                              
020645,000030: 25,2003           11755        RADSAMP            CCS      RSAMPDT                               #  TIMES NORMAL ONCE-PER-SECOND SAMPLING.
020646,000031: 25,2004           12006                           TCF      +2                                    
020647,000032: 25,2005           15261                           TCF      TASKOVER                              #  +0 INSERTED MANUALLY TERMINATES TEST.
020648,000033: 
020649,000034: 25,2006           05203                           TC       WAITLIST                              
020650,000035: 25,2007  E4,1600                                  EBANK=   RSTACK                                
020651,000036: 25,2007           02003 52064                     2CADR    RADSAMP                               
020652,000037: 
020653,000038: 25,2011           37713                           CAF      PRIO25                                
020654,000039: 25,2012           05072                           TC       NOVAC                                 
020655,000040: 25,2013  E4,1600                                  EBANK=   RSTACK                                
020656,000041: 25,2013           02023 52064                     2CADR    DORSAMP                               
020657,000042: 
020658,000043: 25,2015           34736                           CAF      BIT14                                 #  FOR CYCLIC SAMPLING, RTSTDEX=
020659,000044: 25,2016           00006                           EXTEND                                         #  RTSTLOC/2 + RTSTBASE
020660,000045: 25,2017           71754                           MP       RTSTLOC                               
020661,000046: 25,2020           61753                           AD       RTSTBASE                              #  0 FOR RR, 2 FOR LR.
020662,000047: 25,2021           55751                           TS       RTSTDEX                               
020663,000048: 25,2022           15261                           TCF      TASKOVER                              
020664,000049: 
020665,000050:                                                                                                  #  DO THE ACTUAL RADAR SAMPLE.
020666,000051: 
020667,000052: 25,2023           02047        DORSAMP            TC       VARADAR                               #  SELECTS VARIABLE RADAR CHANNEL.
020668,000053: 25,2024           04616                           TC       BANKCALL                              
020669,000054: 25,2025           17714                           CADR     RADSTALL                              
020670,000055: 
020671,000056: 25,2026           25756                           INCR     RFAILCNT                              #  ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
020672,000057: 
020673,000058: 25,2027           00004        DORSAMP2           INHINT                                         
020674,000059: 25,2030           30101                           CA       FLAGWRD5                              #  DON'T UPDATE RSTACK IF IN R77.
020675,000060: 25,2031           74741                           MASK     R77FLBIT                              
020676,000061: 25,2032           10000                           CCS      A                                     
020677,000062: 25,2033           12037                           TCF      +4                                    
020678,000063: 
020679,000064: 25,2034           53102                           DXCH     SAMPLSUM                              
020680,000065: 25,2035           51754                           INDEX    RTSTLOC                               
020681,000066: 25,2036           53601                           DXCH     RSTACK                                
020682,000067: 
020683,000068: 25,2037           41754                           CS       RTSTLOC                               #  CYCLE RTSTLOC.
020684,000069: 25,2040           61752                           AD       RTSTMAX                               
020685,000070: 25,2041           00006                           EXTEND                                         
020686,000071: 

Page 491

020688,000073: 25,2042           12045                           BZF      +3                                    
020689,000074: 25,2043           31754                           CA       RTSTLOC                               
020690,000075: 25,2044           64752                           AD       TWO                                   #  STORAGE IS DP
020691,000076: 25,2045           55754                           TS       RTSTLOC                               
020692,000077: 25,2046           15155                           TCF      ENDOFJOB                              #  CONTINUOUS SAMPLING AND 2N TRIES - GONE.
020693,000078: 
020694,000079:                                                                                                  #  VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
020695,000080: 
020696,000081: 25,2047           34753        VARADAR            CAF      ONE                                   #  WILL BE SENT TO RADAR ROUTINE IN A BY
020697,000082: 25,2050           54133                           TS       BUF2                                  #  SWCALL.
020698,000083: 25,2051           51751                           INDEX    RTSTDEX                               
020699,000084: 25,2052           32054                           CAF      RDRLOCS                               
020700,000085: 25,2053           14622                           TCF      SWCALL                                #  NOT TOUCHING Q.
020701,000086: 
020702,000087: 25,2054           53105        RDRLOCS            CADR     RRRANGE                               #  = 0
020703,000088: 25,2055           53103                           CADR     RRRDOT                                #  = 1
020704,000089: 25,2056           53101                           CADR     LRVELX                                #  = 2
020705,000090: 25,2057           53077                           CADR     LRVELY                                #  = 3
020706,000091: 25,2060           53075                           CADR     LRVELZ                                #  = 4
020707,000092: 25,2061           53073                           CADR     LRALT                                 #  = 5
020708,000093: 
020709,000094: 

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