Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

022305,000002:                                                                                                  ## Copyright:   Public domain.
022306,000003:                                                                                                  ## Filename:    RADAR_LEADIN_ROUTINES.agc
022307,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
022308,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
022309,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
022310,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
022311,000008:                                                                                                  ##              that the code format has been changed to conform to the
022312,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
022313,000010:                                                                                                  ##              original YUL assembler.
022314,000011:                                                                                                  ## Reference:   pp. 505-506
022315,000012:                                                                                                  ## Assembler:   yaYUL
022316,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
022317,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
022318,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
022319,000016:                                                                                                  ##              2016-11-27 HG   Transcribed
022320,000017:                                                                                                  ##              2016-12-25 RSB  Comment-text proofed using ProoferComments
022321,000018:                                                                                                  ##                              and corrected errors found.
022322,000019: 

Page 505

022324,000021: 15,2162                                           BANK     15                                    
022325,000022: 15,2000                                           SETLOC   RRLEADIN                              
022326,000023: 15,2000                                           BANK                                           
022327,000024: 
022328,000025: 15,2162  E4,1571                                  EBANK=   RSTACK                                
022329,000026: 
022330,000027:                                                                                                  #  RADAR SAMPLING LOOP.
022331,000028: 
022332,000029: 15,2162                                           COUNT*   $$/RLEAD                              
022333,000030: 15,2162           11770        RADSAMP            CCS      RSAMPDT                               #  TIMES NORMAL ONCE-PER-SECOND SAMPLING.
022334,000031: 15,2163           12165                           TCF      +2                                    
022335,000032: 15,2164           15263                           TCF      TASKOVER                              #  +0 INSERTED MANUALLY TERMINATES TEST.
022336,000033: 
022337,000034: 15,2165           05175                           TC       TWIDDLE                               
022338,000035: 15,2166           02162                           ADRES    RADSAMP                               
022339,000036: 15,2167           37734                           CAF      PRIO25                                
022340,000037: 15,2170           05063                           TC       NOVAC                                 
022341,000038: 15,2171  E4,1571                                  EBANK=   RSTACK                                
022342,000039: 15,2171           02003 52064                     2CADR    DORSAMP                               
022343,000040: 
022344,000041: 15,2173           34727                           CAF      BIT14                                 #  FOR CYCLIC SAMPLING, RTSTDEX=
022345,000042: 15,2174           00006                           EXTEND                                         #  RTSTLOC/2 + RTSTBASE
022346,000043: 15,2175           71767                           MP       RTSTLOC                               
022347,000044: 15,2176           61766                           AD       RTSTBASE                              #  0 FOR RR, 2 FOR LR.
022348,000045: 15,2177           55764                           TS       RTSTDEX                               
022349,000046: 15,2200           15263                           TCF      TASKOVER                              
022350,000047: 
022351,000048: 25,2003                                           BANK     25                                    
022352,000049: 25,2000                                           SETLOC   DRSAMP                                
022353,000050: 25,2000                                           BANK                                           
022354,000051: 
022355,000052: 25,2003  E4,1571                                  EBANK=   RSTACK                                
022356,000053:                                                                                                  #  DO THE ACTUAL RADAR SAMPLE.
022357,000054: 
022358,000055: 25,2003           02040        DORSAMP            TC       VARADAR                               #  SELECTS VARIABLE RADAR CHANNEL.
022359,000056: 25,2004           04607                           TC       BANKCALL                              
022360,000057: 25,2005           17733                           CADR     RADSTALL                              
022361,000058: 
022362,000059: 25,2006           25566                           INCR     RFAILCNT                              #  ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
022363,000060: 
022364,000061: 25,2007           00004        DORSAMP2           INHINT                                         
022365,000062: 25,2010           30101                           CA       FLAGWRD5                              #  DON'T UPDATE RSTACK IF IN R77.
022366,000063: 25,2011           74732                           MASK     R77FLBIT                              
022367,000064: 25,2012           10000                           CCS      A                                     
022368,000065: 25,2013           12030                           TCF      R77IN                                 
022369,000066: 
022370,000067: 25,2014           53101                           DXCH     SAMPLSUM                              
022371,000068: 25,2015           51767                           INDEX    RTSTLOC                               
022372,000069: 25,2016           53572                           DXCH     RSTACK                                
022373,000070: 

Page 506

022375,000072: 25,2017           30110                           CA       RADMODES                              
022376,000073: 25,2020           00006                           EXTEND                                         
022377,000074: 25,2021           06033                           RXOR     CHAN33                                
022378,000075: 25,2022           74737                           MASK     BIT6                                  
022379,000076: 25,2023           00006                           EXTEND                                         
022380,000077: 25,2024           12030                           BZF      R77IN                                 
022381,000078: 
022382,000079: 25,2025           05571                           TC       ALARM                                 
022383,000080: 25,2026           00522                           OCT      522                                   
022384,000081: 25,2027           25566                           INCR     RFAILCNT                              
022385,000082: 
022386,000083: 25,2030           41767        R77IN              CS       RTSTLOC                               #  CYCLE RTSTLOC
022387,000084: 25,2031           61765                           AD       RTSTMAX                               
022388,000085: 25,2032           00006                           EXTEND                                         
022389,000086: 25,2033           12036                           BZF      +3                                    
022390,000087: 25,2034           31767                           CA       RTSTLOC                               
022391,000088: 25,2035           64743                           AD       TWO                                   #  STORAGE IS DP
022392,000089: 25,2036           55767                           TS       RTSTLOC                               
022393,000090: 25,2037           15146                           TCF      ENDOFJOB                              #  CONTINUOUS SAMPLING AND 2N TRIES - GONE.
022394,000091: 
022395,000092:                                                                                                  #  VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
022396,000093: 
022397,000094: 25,2040           34744        VARADAR            CAF      ONE                                   #  WILL BE SENT TO RADAR ROUTINE IN A BY
022398,000095: 25,2041           54133                           TS       BUF2                                  #  SWCALL.
022399,000096: 25,2042           51764                           INDEX    RTSTDEX                               
022400,000097: 25,2043           32045                           CAF      RDRLOCS                               
022401,000098: 25,2044           14613                           TCF      SWCALL                                #  NOT TOUCHING Q.
022402,000099: 
022403,000100: 25,2045           53074        RDRLOCS            CADR     RRRANGE                               #  = 0
022404,000101: 25,2046           53072                           CADR     RRRDOT                                #  = 1
022405,000102: 25,2047           53070                           CADR     LRVELX                                #  = 2
022406,000103: 25,2050           53066                           CADR     LRVELY                                #  = 3
022407,000104: 25,2051           53064                           CADR     LRVELZ                                #  = 4
022408,000105: 25,2052           53062                           CADR     LRALT                                 #  = 5

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