Source Code

These source-code files are part of a reconstructed copy of Luminary 173, the second (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 178. Changes between revision 173 and 178 were backed out, as described by Luminary memo 167 (revision 1). The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 173 listing would be different.

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.

021604,000002:                                                                                                  ## Copyright:   Public domain.
021605,000003:                                                                                                  ## Filename:    RADAR_LEADIN_ROUTINES.agc
021606,000004:                                                                                                  ## Purpose:     A section of Luminary revision 173.
021607,000005:                                                                                                  ##              It is part of the reconstructed source code for the second
021608,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
021609,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
021610,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
021611,000009:                                                                                                  ##              Luminary 178, as well as Luminary memo 167 (revision 1).
021612,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
021613,000011:                                                                                                  ##              exactly match those specified for Luminary 173 in NASA
021614,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
021615,000013:                                                                                                  ##              that the reconstruction is correct.
021616,000014:                                                                                                  ## Reference:   pp. 498-499
021617,000015:                                                                                                  ## Assembler:   yaYUL
021618,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
021619,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
021620,000018:                                                                                                  ## Mod history: 2019-09-18 MAS  Created from Luminary 178.
021621,000019: 

Page 498

021623,000021: 15,2050                                           BANK     15                                    
021624,000022: 15,2000                                           SETLOC   RRLEADIN                              
021625,000023: 15,2000                                           BANK                                           
021626,000024: 
021627,000025: 15,2050  E4,1600                                  EBANK=   RSTACK                                
021628,000026: 
021629,000027:                                                                                                  #  RADAR SAMPLING LOOP.
021630,000028: 
021631,000029: 15,2050                                           COUNT*   $$/RLEAD                              
021632,000030: 15,2050           11777        RADSAMP            CCS      RSAMPDT                               #  TIMES NORMAL ONCE-PER-SECOND SAMPLING.
021633,000031: 15,2051           12053                           TCF      +2                                    
021634,000032: 15,2052           15272                           TCF      TASKOVER                              #  +0 INSERTED MANUALLY TERMINATES TEST.
021635,000033: 
021636,000034: 15,2053           05204                           TC       TWIDDLE                               
021637,000035: 15,2054           32050                           CADR     RADSAMP                               
021638,000036: 15,2055           37716                           CAF      PRIO25                                
021639,000037: 15,2056           05072                           TC       NOVAC                                 
021640,000038: 15,2057  E4,1600                                  EBANK=   RSTACK                                
021641,000039: 15,2057           02003 52064                     2CADR    DORSAMP                               
021642,000040: 
021643,000041: 15,2061           34736                           CAF      BIT14                                 #  FOR CYCLIC SAMPLING, RTSTDEX=
021644,000042: 15,2062           00006                           EXTEND                                         #  RTSTLOC/2 + RTSTBASE
021645,000043: 15,2063           71776                           MP       RTSTLOC                               
021646,000044: 15,2064           61775                           AD       RTSTBASE                              #  0 FOR RR, 2 FOR LR.
021647,000045: 15,2065           55773                           TS       RTSTDEX                               
021648,000046: 15,2066           15272                           TCF      TASKOVER                              
021649,000047: 
021650,000048: 25,2003                                           BANK     25                                    
021651,000049: 25,2000                                           SETLOC   DRSAMP                                
021652,000050: 25,2000                                           BANK                                           
021653,000051: 
021654,000052: 25,2003  E4,1600                                  EBANK=   RSTACK                                
021655,000053:                                                                                                  #  DO THE ACTUAL RADAR SAMPLE.
021656,000054: 
021657,000055: 25,2003           02040        DORSAMP            TC       VARADAR                               #  SELECTS VARIABLE RADAR CHANNEL.
021658,000056: 25,2004           04616                           TC       BANKCALL                              
021659,000057: 25,2005           17720                           CADR     RADSTALL                              
021660,000058: 
021661,000059: 25,2006           25575                           INCR     RFAILCNT                              #  ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
021662,000060: 
021663,000061: 25,2007           00004        DORSAMP2           INHINT                                         
021664,000062: 25,2010           30101                           CA       FLAGWRD5                              #  DON'T UPDATE RSTACK IF IN R77.
021665,000063: 25,2011           74741                           MASK     R77FLBIT                              
021666,000064: 25,2012           10000                           CCS      A                                     
021667,000065: 25,2013           12030                           TCF      R77IN                                 
021668,000066: 
021669,000067: 25,2014           53101                           DXCH     SAMPLSUM                              
021670,000068: 25,2015           51776                           INDEX    RTSTLOC                               
021671,000069: 25,2016           53601                           DXCH     RSTACK                                
021672,000070: 

Page 499

021674,000072: 25,2017           30110                           CA       RADMODES                              
021675,000073: 25,2020           00006                           EXTEND                                         
021676,000074: 25,2021           06033                           RXOR     CHAN33                                
021677,000075: 25,2022           74746                           MASK     BIT6                                  
021678,000076: 25,2023           00006                           EXTEND                                         
021679,000077: 25,2024           12030                           BZF      R77IN                                 
021680,000078: 
021681,000079: 25,2025           05600                           TC       ALARM                                 
021682,000080: 25,2026           00522                           OCT      522                                   
021683,000081: 25,2027           25575                           INCR     RFAILCNT                              
021684,000082: 
021685,000083: 25,2030           41776        R77IN              CS       RTSTLOC                               #  CYCLE RTSTLOC
021686,000084: 25,2031           61774                           AD       RTSTMAX                               
021687,000085: 25,2032           00006                           EXTEND                                         
021688,000086: 25,2033           12036                           BZF      +3                                    
021689,000087: 25,2034           31776                           CA       RTSTLOC                               
021690,000088: 25,2035           64752                           AD       TWO                                   #  STORAGE IS DP
021691,000089: 25,2036           55776                           TS       RTSTLOC                               
021692,000090: 25,2037           15155                           TCF      ENDOFJOB                              #  CONTINUOUS SAMPLING AND 2N TRIES - GONE.
021693,000091: 
021694,000092:                                                                                                  #  VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
021695,000093: 
021696,000094: 25,2040           34753        VARADAR            CAF      ONE                                   #  WILL BE SENT TO RADAR ROUTINE IN A BY
021697,000095: 25,2041           54133                           TS       BUF2                                  #  SWCALL.
021698,000096: 25,2042           51773                           INDEX    RTSTDEX                               
021699,000097: 25,2043           32045                           CAF      RDRLOCS                               
021700,000098: 25,2044           14622                           TCF      SWCALL                                #  NOT TOUCHING Q.
021701,000099: 
021702,000100: 25,2045           53074        RDRLOCS            CADR     RRRANGE                               #  = 0
021703,000101: 25,2046           53072                           CADR     RRRDOT                                #  = 1
021704,000102: 25,2047           53070                           CADR     LRVELX                                #  = 2
021705,000103: 25,2050           53066                           CADR     LRVELY                                #  = 3
021706,000104: 25,2051           53064                           CADR     LRVELZ                                #  = 4
021707,000105: 25,2052           53062                           CADR     LRALT                                 #  = 5

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