Source Code

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

The reconstruction began with source code of Zerlina 56, Luminary 210, and Luminary 131, previously transcribed from digitized copies of those programs. The code was created by combining the three, using Zerlina 56 as a base, since it was based off of Luminary 183. The differences between the three were carefully merged using the Luminary memos as a guide, with all changes made after Luminary 178 being backed out. 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 178 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.

021650,000002:                                                                                                  ## Copyright:   Public domain.
021651,000003:                                                                                                  ## Filename:    RADAR_LEADIN_ROUTINES.agc
021652,000004:                                                                                                  ## Purpose:     A section of Luminary revision 178.
021653,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
021654,000006:                                                                                                  ##              release of the flight software for the Lunar Module's
021655,000007:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
021656,000008:                                                                                                  ##              code has been recreated from copies of Zerlina 56, Luminary
021657,000009:                                                                                                  ##              210, and Luminary 131, as well as many Luminary memos.
021658,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
021659,000011:                                                                                                  ##              exactly match those specified for Luminary 178 in NASA
021660,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
021661,000013:                                                                                                  ##              that the reconstruction is correct.
021662,000014:                                                                                                  ## Reference:   pp. 498-499
021663,000015:                                                                                                  ## Assembler:   yaYUL
021664,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
021665,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
021666,000018:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Zerlina 56.
021667,000019:                                                                                                  ##              2019-09-05 MAS  Changed an ADRES to a CADR to restore
021668,000020:                                                                                                  ##                              a bug present in Luminary 178.
021669,000021: 

Page 498

021671,000023: 15,2050                                           BANK     15                                    
021672,000024: 15,2000                                           SETLOC   RRLEADIN                              
021673,000025: 15,2000                                           BANK                                           
021674,000026: 
021675,000027: 15,2050  E4,1600                                  EBANK=   RSTACK                                
021676,000028: 
021677,000029:                                                                                                  #  RADAR SAMPLING LOOP.
021678,000030: 
021679,000031: 15,2050                                           COUNT*   $$/RLEAD                              
021680,000032: 15,2050           11777        RADSAMP            CCS      RSAMPDT                               #  TIMES NORMAL ONCE-PER-SECOND SAMPLING.
021681,000033: 15,2051           12053                           TCF      +2                                    
021682,000034: 15,2052           15272                           TCF      TASKOVER                              #  +0 INSERTED MANUALLY TERMINATES TEST.
021683,000035: 
021684,000036: 15,2053           05204                           TC       TWIDDLE                               
021685,000037: 15,2054           32050                           CADR     RADSAMP                               
021686,000038: 15,2055           37716                           CAF      PRIO25                                
021687,000039: 15,2056           05072                           TC       NOVAC                                 
021688,000040: 15,2057  E4,1600                                  EBANK=   RSTACK                                
021689,000041: 15,2057           02003 52064                     2CADR    DORSAMP                               
021690,000042: 
021691,000043: 15,2061           34736                           CAF      BIT14                                 #  FOR CYCLIC SAMPLING, RTSTDEX=
021692,000044: 15,2062           00006                           EXTEND                                         #  RTSTLOC/2 + RTSTBASE
021693,000045: 15,2063           71776                           MP       RTSTLOC                               
021694,000046: 15,2064           61775                           AD       RTSTBASE                              #  0 FOR RR, 2 FOR LR.
021695,000047: 15,2065           55773                           TS       RTSTDEX                               
021696,000048: 15,2066           15272                           TCF      TASKOVER                              
021697,000049: 
021698,000050: 25,2003                                           BANK     25                                    
021699,000051: 25,2000                                           SETLOC   DRSAMP                                
021700,000052: 25,2000                                           BANK                                           
021701,000053: 
021702,000054: 25,2003  E4,1600                                  EBANK=   RSTACK                                
021703,000055:                                                                                                  #  DO THE ACTUAL RADAR SAMPLE.
021704,000056: 
021705,000057: 25,2003           02040        DORSAMP            TC       VARADAR                               #  SELECTS VARIABLE RADAR CHANNEL.
021706,000058: 25,2004           04616                           TC       BANKCALL                              
021707,000059: 25,2005           17720                           CADR     RADSTALL                              
021708,000060: 
021709,000061: 25,2006           25575                           INCR     RFAILCNT                              #  ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
021710,000062: 
021711,000063: 25,2007           00004        DORSAMP2           INHINT                                         
021712,000064: 25,2010           30101                           CA       FLAGWRD5                              #  DON'T UPDATE RSTACK IF IN R77.
021713,000065: 25,2011           74741                           MASK     R77FLBIT                              
021714,000066: 25,2012           10000                           CCS      A                                     
021715,000067: 25,2013           12030                           TCF      R77IN                                 
021716,000068: 
021717,000069: 25,2014           53101                           DXCH     SAMPLSUM                              
021718,000070: 25,2015           51776                           INDEX    RTSTLOC                               
021719,000071: 25,2016           53601                           DXCH     RSTACK                                
021720,000072: 

Page 499

021722,000074: 25,2017           30110                           CA       RADMODES                              
021723,000075: 25,2020           00006                           EXTEND                                         
021724,000076: 25,2021           06033                           RXOR     CHAN33                                
021725,000077: 25,2022           74746                           MASK     BIT6                                  
021726,000078: 25,2023           00006                           EXTEND                                         
021727,000079: 25,2024           12030                           BZF      R77IN                                 
021728,000080: 
021729,000081: 25,2025           05600                           TC       ALARM                                 
021730,000082: 25,2026           00522                           OCT      522                                   
021731,000083: 25,2027           25575                           INCR     RFAILCNT                              
021732,000084: 
021733,000085: 25,2030           41776        R77IN              CS       RTSTLOC                               #  CYCLE RTSTLOC
021734,000086: 25,2031           61774                           AD       RTSTMAX                               
021735,000087: 25,2032           00006                           EXTEND                                         
021736,000088: 25,2033           12036                           BZF      +3                                    
021737,000089: 25,2034           31776                           CA       RTSTLOC                               
021738,000090: 25,2035           64752                           AD       TWO                                   #  STORAGE IS DP
021739,000091: 25,2036           55776                           TS       RTSTLOC                               
021740,000092: 25,2037           15155                           TCF      ENDOFJOB                              #  CONTINUOUS SAMPLING AND 2N TRIES - GONE.
021741,000093: 
021742,000094:                                                                                                  #  VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
021743,000095: 
021744,000096: 25,2040           34753        VARADAR            CAF      ONE                                   #  WILL BE SENT TO RADAR ROUTINE IN A BY
021745,000097: 25,2041           54133                           TS       BUF2                                  #  SWCALL.
021746,000098: 25,2042           51773                           INDEX    RTSTDEX                               
021747,000099: 25,2043           32045                           CAF      RDRLOCS                               
021748,000100: 25,2044           14622                           TCF      SWCALL                                #  NOT TOUCHING Q.
021749,000101: 
021750,000102: 25,2045           53074        RDRLOCS            CADR     RRRANGE                               #  = 0
021751,000103: 25,2046           53072                           CADR     RRRDOT                                #  = 1
021752,000104: 25,2047           53070                           CADR     LRVELX                                #  = 2
021753,000105: 25,2050           53066                           CADR     LRVELY                                #  = 3
021754,000106: 25,2051           53064                           CADR     LRVELZ                                #  = 4
021755,000107: 25,2052           53062                           CADR     LRALT                                 #  = 5

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