Source Code

These source-code files are part of a reconstructed copy of Luminary 69/2, the flown, final release of the Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction is based on the source code of Luminary 69 — i.e., the initial, unflown version, "revision 0" — of which a contemporary listing was available. The code was then updated by incorporating the differences between Luminary 69 and Luminary 69/2, known from other contemporary documentation. The only such difference is the implementation in Luminary 69/2 of the "R-2 Lunar Potential Model", the source code for which was taken from program Luminary 99/1 (Apollo 11 LM), of which a contemporary listing was also available. Finally, the now-reconstructed Luminary 69/2 was then validated by assembling it to executable form and verifying that its memory banks had the correct checksums, known from still other contemporary documentation.

Note that page numbers in the reconstructed code match those in the original Luminary 69 program listing, or in the ORBITAL INTEGRATION log section, in Luminary 99/1. Page numbers would certainly differ somewhat in a contemporary Luminary 69/2 listing. Moreover, annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change in Luminary 69/2 relative to Luminary 69. Here's a guide to the Apollo documentation referenced in those annotations:
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.

022079,000002:                                                                                                  ## Copyright:   Public domain.
022080,000003:                                                                                                  ## Filename:    RADAR_LEADIN_ROUTINES.agc
022081,000004:                                                                                                  ## Purpose:     A section of LUM69 revision 2.
022082,000005:                                                                                                  ##              It is part of the reconstructed source code for the flown
022083,000006:                                                                                                  ##              version of the flight software for the Lunar Module's (LM)
022084,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 10. The code has
022085,000008:                                                                                                  ##              been recreated from a copy of Luminary revsion 069, using
022086,000009:                                                                                                  ##              changes present in Luminary 099 which were described in
022087,000010:                                                                                                  ##              Luminary memos 75 and 78. The code has been adapted such
022088,000011:                                                                                                  ##              that the resulting bugger words exactly match those specified
022089,000012:                                                                                                  ##              for LUM69 revision 2 in NASA drawing 2021152B, which gives
022090,000013:                                                                                                  ##              relatively high confidence that the reconstruction is correct.
022091,000014:                                                                                                  ## Reference:   pp. 502-503
022092,000015:                                                                                                  ## Assembler:   yaYUL
022093,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
022094,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
022095,000018:                                                                                                  ## Mod history: 2019-07-27 MAS  Created from Luminary 69.
022096,000019: 

Page 502

022098,000021: 25,2003                                           BANK     25                                    
022099,000022: 25,2000                                           SETLOC   RRLEADIN                              
022100,000023: 25,2000                                           BANK                                           
022101,000024: 
022102,000025: 25,2003  E4,1604                                  EBANK=   RSTACK                                
022103,000026: 
022104,000027:                                                                                                  #  RADAR SAMPLING LOOP.
022105,000028: 
022106,000029: 25,2003                                           COUNT*   $$/RLEAD                              
022107,000030: 25,2003           11761        RADSAMP            CCS      RSAMPDT                               #  TIMES NORMAL ONCE-PER-SECOND SAMPLING.
022108,000031: 25,2004           12006                           TCF      +2                                    
022109,000032: 25,2005           15261                           TCF      TASKOVER                              #  +0 INSERTED MANUALLY TERMINATES TEST.
022110,000033: 
022111,000034: 25,2006           05203                           TC       WAITLIST                              
022112,000035: 25,2007  E4,1604                                  EBANK=   RSTACK                                
022113,000036: 25,2007           02003 52064                     2CADR    RADSAMP                               
022114,000037: 
022115,000038: 25,2011           37712                           CAF      PRIO25                                
022116,000039: 25,2012           05072                           TC       NOVAC                                 
022117,000040: 25,2013  E4,1604                                  EBANK=   RSTACK                                
022118,000041: 25,2013           02023 52064                     2CADR    DORSAMP                               
022119,000042: 
022120,000043: 25,2015           34736                           CAF      BIT14                                 #  FOR CYCLIC SAMPLING, RTSTDEX=
022121,000044: 25,2016           00006                           EXTEND                                         #  RTSTLOC/2 + RTSTBASE
022122,000045: 25,2017           71760                           MP       RTSTLOC                               
022123,000046: 25,2020           61757                           AD       RTSTBASE                              #  0 FOR RR, 2 FOR LR.
022124,000047: 25,2021           55755                           TS       RTSTDEX                               
022125,000048: 25,2022           15261                           TCF      TASKOVER                              
022126,000049: 
022127,000050:                                                                                                  #  DO THE ACTUAL RADAR SAMPLE.
022128,000051: 
022129,000052: 25,2023           02047        DORSAMP            TC       VARADAR                               #  SELECTS VARIABLE RADAR CHANNEL.
022130,000053: 25,2024           04616                           TC       BANKCALL                              
022131,000054: 25,2025           17667                           CADR     RADSTALL                              
022132,000055: 
022133,000056: 25,2026           25762                           INCR     RFAILCNT                              #  ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
022134,000057: 
022135,000058: 25,2027           00004        DORSAMP2           INHINT                                         
022136,000059: 25,2030           30101                           CA       FLAGWRD5                              #  DON'T UPDATE RSTACK IF IN R77.
022137,000060: 25,2031           74741                           MASK     R77FLBIT                              
022138,000061: 25,2032           10000                           CCS      A                                     
022139,000062: 25,2033           12037                           TCF      +4                                    
022140,000063: 
022141,000064: 25,2034           53102                           DXCH     SAMPLSUM                              
022142,000065: 25,2035           51760                           INDEX    RTSTLOC                               
022143,000066: 25,2036           53605                           DXCH     RSTACK                                
022144,000067: 
022145,000068: 25,2037           41760                           CS       RTSTLOC                               #  CYCLE RTSTLOC.
022146,000069: 25,2040           61756                           AD       RTSTMAX                               
022147,000070: 25,2041           00006                           EXTEND                                         
022148,000071: 

Page 503

022150,000073: 25,2042           12045                           BZF      +3                                    
022151,000074: 25,2043           31760                           CA       RTSTLOC                               
022152,000075: 25,2044           64752                           AD       TWO                                   #  STORAGE IS DP
022153,000076: 25,2045           55760                           TS       RTSTLOC                               
022154,000077: 25,2046           15155                           TCF      ENDOFJOB                              #  CONTINUOUS SAMPLING AND 2N TRIES - GONE.
022155,000078: 
022156,000079:                                                                                                  #  VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
022157,000080: 
022158,000081: 25,2047           34753        VARADAR            CAF      ONE                                   #  WILL BE SENT TO RADAR ROUTINE IN A BY
022159,000082: 25,2050           54133                           TS       BUF2                                  #  SWCALL.
022160,000083: 25,2051           51755                           INDEX    RTSTDEX                               
022161,000084: 25,2052           32054                           CAF      RDRLOCS                               
022162,000085: 25,2053           14622                           TCF      SWCALL                                #  NOT TOUCHING Q.
022163,000086: 
022164,000087: 25,2054           53105        RDRLOCS            CADR     RRRANGE                               #  = 0
022165,000088: 25,2055           53103                           CADR     RRRDOT                                #  = 1
022166,000089: 25,2056           53101                           CADR     LRVELX                                #  = 2
022167,000090: 25,2057           53077                           CADR     LRVELY                                #  = 3
022168,000091: 25,2060           53075                           CADR     LRVELZ                                #  = 4
022169,000092: 25,2061           53073                           CADR     LRALT                                 #  = 5
022170,000093: 
022171,000094: 

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