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.

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

Page 498

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

Page 499

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

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