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,1971Note that the date is the date of the printout, not the date of the program revision. |
022312,000002: ## Copyright: Public domain.
022313,000003: ## Filename: RADAR_LEADIN_ROUTINES.agc
022314,000004: ## Purpose: A section of Luminary revision 210.
022315,000005: ## It is part of the source code for the Lunar Module's (LM)
022316,000006: ## Apollo Guidance Computer (AGC) for Apollo 15-17.
022317,000007: ## This file is intended to be a faithful transcription, except
022318,000008: ## that the code format has been changed to conform to the
022319,000009: ## requirements of the yaYUL assembler rather than the
022320,000010: ## original YUL assembler.
022321,000011: ## Reference: pp. 505-506
022322,000012: ## Assembler: yaYUL
022323,000013: ## Contact: Ron Burkey <info@sandroid.org>.
022324,000014: ## Website: www.ibiblio.org/apollo/index.html
022325,000015: ## Mod history: 2016-11-17 JL Created from Luminary131 version.
022326,000016: ## 2016-11-27 HG Transcribed
022327,000017: ## 2016-12-25 RSB Comment-text proofed using ProoferComments
022328,000018: ## and corrected errors found.
022329,000019:
![]() |
Page 505 |
022331,000021: 15,2162 BANK 15
022332,000022: 15,2000 SETLOC RRLEADIN
022333,000023: 15,2000 BANK
022334,000024:
022335,000025: 15,2162 E4,1571 EBANK= RSTACK
022336,000026:
022337,000027: # RADAR SAMPLING LOOP.
022338,000028:
022339,000029: 15,2162 COUNT* $$/RLEAD
022340,000030: 15,2162 11770 RADSAMP CCS RSAMPDT # TIMES NORMAL ONCE-PER-SECOND SAMPLING.
022341,000031: 15,2163 12165 TCF +2
022342,000032: 15,2164 15263 TCF TASKOVER # +0 INSERTED MANUALLY TERMINATES TEST.
022343,000033:
022344,000034: 15,2165 05175 TC TWIDDLE
022345,000035: 15,2166 02162 ADRES RADSAMP
022346,000036: 15,2167 37734 CAF PRIO25
022347,000037: 15,2170 05063 TC NOVAC
022348,000038: 15,2171 E4,1571 EBANK= RSTACK
022349,000039: 15,2171 02003 52064 2CADR DORSAMP
022350,000040:
022351,000041: 15,2173 34727 CAF BIT14 # FOR CYCLIC SAMPLING, RTSTDEX=
022352,000042: 15,2174 00006 EXTEND # RTSTLOC/2 + RTSTBASE
022353,000043: 15,2175 71767 MP RTSTLOC
022354,000044: 15,2176 61766 AD RTSTBASE # 0 FOR RR, 2 FOR LR.
022355,000045: 15,2177 55764 TS RTSTDEX
022356,000046: 15,2200 15263 TCF TASKOVER
022357,000047:
022358,000048: 25,2003 BANK 25
022359,000049: 25,2000 SETLOC DRSAMP
022360,000050: 25,2000 BANK
022361,000051:
022362,000052: 25,2003 E4,1571 EBANK= RSTACK
022363,000053: # DO THE ACTUAL RADAR SAMPLE.
022364,000054:
022365,000055: 25,2003 02040 DORSAMP TC VARADAR # SELECTS VARIABLE RADAR CHANNEL.
022366,000056: 25,2004 04607 TC BANKCALL
022367,000057: 25,2005 17733 CADR RADSTALL
022368,000058:
022369,000059: 25,2006 25566 INCR RFAILCNT # ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
022370,000060:
022371,000061: 25,2007 00004 DORSAMP2 INHINT
022372,000062: 25,2010 30101 CA FLAGWRD5 # DON'T UPDATE RSTACK IF IN R77.
022373,000063: 25,2011 74732 MASK R77FLBIT
022374,000064: 25,2012 10000 CCS A
022375,000065: 25,2013 12030 TCF R77IN
022376,000066:
022377,000067: 25,2014 53101 DXCH SAMPLSUM
022378,000068: 25,2015 51767 INDEX RTSTLOC
022379,000069: 25,2016 53572 DXCH RSTACK
022380,000070:
![]() |
Page 506 |
022382,000072: 25,2017 30110 CA RADMODES
022383,000073: 25,2020 00006 EXTEND
022384,000074: 25,2021 06033 RXOR CHAN33
022385,000075: 25,2022 74737 MASK BIT6
022386,000076: 25,2023 00006 EXTEND
022387,000077: 25,2024 12030 BZF R77IN
022388,000078:
022389,000079: 25,2025 05571 TC ALARM
022390,000080: 25,2026 00522 OCT 522
022391,000081: 25,2027 25566 INCR RFAILCNT
022392,000082:
022393,000083: 25,2030 41767 R77IN CS RTSTLOC # CYCLE RTSTLOC
022394,000084: 25,2031 61765 AD RTSTMAX
022395,000085: 25,2032 00006 EXTEND
022396,000086: 25,2033 12036 BZF +3
022397,000087: 25,2034 31767 CA RTSTLOC
022398,000088: 25,2035 64743 AD TWO # STORAGE IS DP
022399,000089: 25,2036 55767 TS RTSTLOC
022400,000090: 25,2037 15146 TCF ENDOFJOB # CONTINUOUS SAMPLING AND 2N TRIES - GONE.
022401,000091:
022402,000092: # VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
022403,000093:
022404,000094: 25,2040 34744 VARADAR CAF ONE # WILL BE SENT TO RADAR ROUTINE IN A BY
022405,000095: 25,2041 54133 TS BUF2 # SWCALL.
022406,000096: 25,2042 51764 INDEX RTSTDEX
022407,000097: 25,2043 32045 CAF RDRLOCS
022408,000098: 25,2044 14613 TCF SWCALL # NOT TOUCHING Q.
022409,000099:
022410,000100: 25,2045 53074 RDRLOCS CADR RRRANGE # = 0
022411,000101: 25,2046 53072 CADR RRRDOT # = 1
022412,000102: 25,2047 53070 CADR LRVELX # = 2
022413,000103: 25,2050 53066 CADR LRVELY # = 3
022414,000104: 25,2051 53064 CADR LRVELZ # = 4
022415,000105: 25,2052 53062 CADR LRALT # = 5
End of include-file RADAR_LEADIN_ROUTINES.agc. Parent file is MAIN.agc