Source Code

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

The reconstruction began with reconstructed source code for Luminary 173. Changes between revision 163 and 173 were backed out, as described by Luminary memos 157 and 158. 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 163 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.

021610,000002:                                                                                                  ## Copyright:   Public domain.
021611,000003:                                                                                                  ## Filename:    RADAR_LEADIN_ROUTINES.agc
021612,000004:                                                                                                  ## Purpose:     A section of Luminary revision 163.
021613,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
021614,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
021615,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
021616,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
021617,000009:                                                                                                  ##              Luminary 173, as well as Luminary memos 157 amd 158.
021618,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
021619,000011:                                                                                                  ##              exactly match those specified for Luminary 163 in NASA
021620,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
021621,000013:                                                                                                  ##              that the reconstruction is correct.
021622,000014:                                                                                                  ## Reference:   pp. 498-499
021623,000015:                                                                                                  ## Assembler:   yaYUL
021624,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
021625,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
021626,000018:                                                                                                  ## Mod history: 2019-08-21 MAS  Created from Luminary 173. Moved RADSAMP back
021627,000019:                                                                                                  ##                              to bank 25. Changed the TWIDDLE to RADSAMP to
021628,000020:                                                                                                  ##                              a WAITLIST call.
021629,000021: 

Page 498

021631,000023: 25,2003                                           BANK     25                                    
021632,000024: 25,2000                                           SETLOC   RRLEADIN                              
021633,000025: 25,2000                                           BANK                                           
021634,000026: 
021635,000027: 25,2003  E4,1600                                  EBANK=   RSTACK                                
021636,000028: 
021637,000029:                                                                                                  #  RADAR SAMPLING LOOP.
021638,000030: 
021639,000031: 25,2003                                           COUNT*   $$/RLEAD                              
021640,000032: 25,2003           11777        RADSAMP            CCS      RSAMPDT                               #  TIMES NORMAL ONCE-PER-SECOND SAMPLING.
021641,000033: 25,2004           12006                           TCF      +2                                    
021642,000034: 25,2005           15272                           TCF      TASKOVER                              #  +0 INSERTED MANUALLY TERMINATES TEST.
021643,000035: 
021644,000036: 25,2006           05214                           TC       WAITLIST                              
021645,000037: 25,2007  E4,1600                                  EBANK=   RSTACK                                
021646,000038: 25,2007           02003 52064                     2CADR    RADSAMP                               
021647,000039: 
021648,000040: 25,2011           37716                           CAF      PRIO25                                
021649,000041: 25,2012           05072                           TC       NOVAC                                 
021650,000042: 25,2013  E4,1600                                  EBANK=   RSTACK                                
021651,000043: 25,2013           02023 52064                     2CADR    DORSAMP                               
021652,000044: 
021653,000045: 25,2015           34736                           CAF      BIT14                                 #  FOR CYCLIC SAMPLING, RTSTDEX=
021654,000046: 25,2016           00006                           EXTEND                                         #  RTSTLOC/2 + RTSTBASE
021655,000047: 25,2017           71776                           MP       RTSTLOC                               
021656,000048: 25,2020           61775                           AD       RTSTBASE                              #  0 FOR RR, 2 FOR LR.
021657,000049: 25,2021           55773                           TS       RTSTDEX                               
021658,000050: 25,2022           15272                           TCF      TASKOVER                              
021659,000051: 
021660,000052:                                                                                                  #  DO THE ACTUAL RADAR SAMPLE.
021661,000053: 
021662,000054: 25,2023           02060        DORSAMP            TC       VARADAR                               #  SELECTS VARIABLE RADAR CHANNEL.
021663,000055: 25,2024           04616                           TC       BANKCALL                              
021664,000056: 25,2025           17720                           CADR     RADSTALL                              
021665,000057: 
021666,000058: 25,2026           25575                           INCR     RFAILCNT                              #  ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
021667,000059: 
021668,000060: 25,2027           00004        DORSAMP2           INHINT                                         
021669,000061: 25,2030           30101                           CA       FLAGWRD5                              #  DON'T UPDATE RSTACK IF IN R77.
021670,000062: 25,2031           74741                           MASK     R77FLBIT                              
021671,000063: 25,2032           10000                           CCS      A                                     
021672,000064: 25,2033           12050                           TCF      R77IN                                 
021673,000065: 
021674,000066: 25,2034           53101                           DXCH     SAMPLSUM                              
021675,000067: 25,2035           51776                           INDEX    RTSTLOC                               
021676,000068: 25,2036           53601                           DXCH     RSTACK                                
021677,000069: 

Page 499

021679,000071: 25,2037           30110                           CA       RADMODES                              
021680,000072: 25,2040           00006                           EXTEND                                         
021681,000073: 25,2041           06033                           RXOR     CHAN33                                
021682,000074: 25,2042           74746                           MASK     BIT6                                  
021683,000075: 25,2043           00006                           EXTEND                                         
021684,000076: 25,2044           12050                           BZF      R77IN                                 
021685,000077: 
021686,000078: 25,2045           05600                           TC       ALARM                                 
021687,000079: 25,2046           00522                           OCT      522                                   
021688,000080: 25,2047           25575                           INCR     RFAILCNT                              
021689,000081: 
021690,000082: 25,2050           41776        R77IN              CS       RTSTLOC                               #  CYCLE RTSTLOC
021691,000083: 25,2051           61774                           AD       RTSTMAX                               
021692,000084: 25,2052           00006                           EXTEND                                         
021693,000085: 25,2053           12056                           BZF      +3                                    
021694,000086: 25,2054           31776                           CA       RTSTLOC                               
021695,000087: 25,2055           64752                           AD       TWO                                   #  STORAGE IS DP
021696,000088: 25,2056           55776                           TS       RTSTLOC                               
021697,000089: 25,2057           15155                           TCF      ENDOFJOB                              #  CONTINUOUS SAMPLING AND 2N TRIES - GONE.
021698,000090: 
021699,000091:                                                                                                  #  VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
021700,000092: 
021701,000093: 25,2060           34753        VARADAR            CAF      ONE                                   #  WILL BE SENT TO RADAR ROUTINE IN A BY
021702,000094: 25,2061           54133                           TS       BUF2                                  #  SWCALL.
021703,000095: 25,2062           51773                           INDEX    RTSTDEX                               
021704,000096: 25,2063           32065                           CAF      RDRLOCS                               
021705,000097: 25,2064           14622                           TCF      SWCALL                                #  NOT TOUCHING Q.
021706,000098: 
021707,000099: 25,2065           53114        RDRLOCS            CADR     RRRANGE                               #  = 0
021708,000100: 25,2066           53112                           CADR     RRRDOT                                #  = 1
021709,000101: 25,2067           53110                           CADR     LRVELX                                #  = 2
021710,000102: 25,2070           53106                           CADR     LRVELY                                #  = 3
021711,000103: 25,2071           53104                           CADR     LRVELZ                                #  = 4
021712,000104: 25,2072           53102                           CADR     LRALT                                 #  = 5

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