Source Code

This is a reconstructed version of Luminary 130, the initial AGC program released in November 1969 for the Apollo 13 LM. Three more releases followed before the flown revision was finally manufactured in February 1970.

This reconstruction was created from a previous transcription of the original listing of Luminary 131, combined with Luminary memo #129 which describes the small difference between the Luminary 130 and 131. The reconstructed source code was verified by matching memory-bank checksums to those listed for Luminary 130 in drawing 2021152G.

In this source code, program comments from the original (Luminary 131) code are prefixed with '#', while those added later by the Virtual AGC project are prefixed with '##'.

021096,000002:                                                                                                  ## Copyright:   Public domain.
021097,000003:                                                                                                  ## Filename:    RADAR_LEADIN_ROUTINES.agc
021098,000004:                                                                                                  ## Purpose:     A section of the reconstructed source code for Luminary 130.
021099,000005:                                                                                                  ##              This was the original program released for the Apollo 13 LM,
021100,000006:                                                                                                  ##              although several more revisions would follow. It has been
021101,000007:                                                                                                  ##              reconstructed from a listing of Luminary 131, from which it
021102,000008:                                                                                                  ##              differs on only two lines in P70-P71. The difference is
021103,000009:                                                                                                  ##              described in detail in Luminary memo #129, which was used
021104,000010:                                                                                                  ##              to perform the reconstruction. This file is intended to be a
021105,000011:                                                                                                  ##              faithful reconstruction, except that the code format has been
021106,000012:                                                                                                  ##              changed to conform to the requirements of the yaYUL assembler
021107,000013:                                                                                                  ##              rather than the original YUL assembler.
021108,000014:                                                                                                  ## Reference:   pp. 494-495
021109,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
021110,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
021111,000017:                                                                                                  ## Mod history: 05/14/03 RSB.   Began transcribing.
021112,000018:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
021113,000019:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
021114,000020:                                                                                                  ##                              original harcopy, as opposed to the PDF page
021115,000021:                                                                                                  ##                              numbers in 1701.pdf.
021116,000022:                                                                                                  ##              2017-02-24 RSB  Proofed comment text using octopus/ProoferComments.
021117,000023:                                                                                                  ##              2017-03-01 RSB  Fixed a comment-text error found in diff'ing vs Luminary 116.
021118,000024:                                                                                                  ##              2018-09-04 MAS  Copied from Luminary 131 for Luminary 130.
021119,000025: 

Page 494

021121,000027: 25,2003                                           BANK     25                                    
021122,000028: 25,2000                                           SETLOC   RRLEADIN                              
021123,000029: 25,2000                                           BANK                                           
021124,000030: 
021125,000031: 25,2003  E4,1600                                  EBANK=   RSTACK                                
021126,000032: 
021127,000033:                                                                                                  #  RADAR SAMPLING LOOP.
021128,000034: 25,2003                                           COUNT*   $$/RLEAD                              
021129,000035: 25,2003           11777        RADSAMP            CCS      RSAMPDT                               #  TIMES NORMAL ONCE-PER-SECOND SAMPLING.
021130,000036: 25,2004           12006                           TCF      +2                                    
021131,000037: 25,2005           15261                           TCF      TASKOVER                              #  +0 INSERTED MANUALLY TERMINATES TEST.
021132,000038: 
021133,000039: 25,2006           05203                           TC       WAITLIST                              
021134,000040: 25,2007  E4,1600                                  EBANK=   RSTACK                                
021135,000041: 25,2007           02003 52064                     2CADR    RADSAMP                               
021136,000042: 
021137,000043: 25,2011           37716                           CAF      PRIO25                                
021138,000044: 25,2012           05072                           TC       NOVAC                                 
021139,000045: 25,2013  E4,1600                                  EBANK=   RSTACK                                
021140,000046: 25,2013           02023 52064                     2CADR    DORSAMP                               
021141,000047: 
021142,000048: 25,2015           34736                           CAF      BIT14                                 #  FOR CYCLIC SAMPLING, RTSTDEX=
021143,000049: 25,2016           00006                           EXTEND                                         #  RTSTLOC/2 + RTSTBASE
021144,000050: 25,2017           71776                           MP       RTSTLOC                               
021145,000051: 25,2020           61775                           AD       RTSTBASE                              #  0 FOR RR, 2 FOR LR.
021146,000052: 25,2021           55773                           TS       RTSTDEX                               
021147,000053: 25,2022           15261                           TCF      TASKOVER                              
021148,000054: 
021149,000055:                                                                                                  #  DO THE ACTUAL RADAR SAMPLE.
021150,000056: 
021151,000057: 25,2023           02060        DORSAMP            TC       VARADAR                               #  SELECTS VARIABLE RADAR CHANNEL.
021152,000058: 25,2024           04616                           TC       BANKCALL                              
021153,000059: 25,2025           17705                           CADR     RADSTALL                              
021154,000060: 
021155,000061: 25,2026           25575                           INCR     RFAILCNT                              #  ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
021156,000062: 
021157,000063: 25,2027           00004        DORSAMP2           INHINT                                         
021158,000064: 25,2030           30101                           CA       FLAGWRD5                              #  DON'T UPDATE RSTACK IF IN R77.
021159,000065: 25,2031           74741                           MASK     R77FLBIT                              
021160,000066: 25,2032           10000                           CCS      A                                     
021161,000067: 25,2033           12050                           TCF      R77IN                                 
021162,000068: 
021163,000069: 25,2034           53101                           DXCH     SAMPLSUM                              
021164,000070: 25,2035           51776                           INDEX    RTSTLOC                               
021165,000071: 25,2036           53601                           DXCH     RSTACK                                
021166,000072: 
021167,000073: 25,2037           30110                           CA       RADMODES                              
021168,000074: 25,2040           00006                           EXTEND                                         
021169,000075: 25,2041           06033                           RXOR     CHAN33                                

Page 495

021171,000077: 25,2042           74746                           MASK     BIT6                                  
021172,000078: 25,2043           00006                           EXTEND                                         
021173,000079: 25,2044           12050                           BZF      R77IN                                 
021174,000080: 
021175,000081: 25,2045           05567                           TC       ALARM                                 
021176,000082: 25,2046           00522                           OCT      522                                   
021177,000083: 25,2047           25575                           INCR     RFAILCNT                              
021178,000084: 
021179,000085: 25,2050           41776        R77IN              CS       RTSTLOC                               #  CYCLE RTSTLOC
021180,000086: 25,2051           61774                           AD       RTSTMAX                               
021181,000087: 25,2052           00006                           EXTEND                                         
021182,000088: 25,2053           12056                           BZF      +3                                    
021183,000089: 25,2054           31776                           CA       RTSTLOC                               
021184,000090: 25,2055           64752                           AD       TWO                                   #  STORAGE IS DP
021185,000091: 25,2056           55776                           TS       RTSTLOC                               
021186,000092: 25,2057           15155                           TCF      ENDOFJOB                              #  CONTINUOUS SAMPLING AND 2N TRIES - GONE.
021187,000093: 
021188,000094:                                                                                                  #  VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
021189,000095: 
021190,000096: 25,2060           34753        VARADAR            CAF      ONE                                   #  WILL BE SENT TO RADAR ROUTINE IN A BY
021191,000097: 25,2061           54133                           TS       BUF2                                  #  SWCALL.
021192,000098: 25,2062           51773                           INDEX    RTSTDEX                               
021193,000099: 25,2063           32065                           CAF      RDRLOCS                               
021194,000100: 25,2064           14622                           TCF      SWCALL                                #  NOT TOUCHING Q.
021195,000101: 
021196,000102: 25,2065           53114        RDRLOCS            CADR     RRRANGE                               #  = 0
021197,000103: 25,2066           53112                           CADR     RRRDOT                                #  = 1
021198,000104: 25,2067           53110                           CADR     LRVELX                                #  = 2
021199,000105: 25,2070           53106                           CADR     LRVELY                                #  = 3
021200,000106: 25,2071           53104                           CADR     LRVELZ                                #  = 4
021201,000107: 25,2072           53102                           CADR     LRALT                                 #  = 5
021202,000108: 
021203,000109: 

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