Source Code
These source-code files are part of a reconstructed copy of Luminary 97, the
second release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer
(AGC) software. It was created to fix two incorrect ephemeris constants in
Luminary 96, as described by anomaly report LNY-59.
The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memos 83 and 85, using asterisks indicating changed lines in the listing as a guide. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 97 listing. 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. |
025996,000002: ## Copyright: Public domain.
025997,000003: ## Filename: P30,P37.agc
025998,000004: ## Purpose: A section of Luminary revision 97.
025999,000005: ## It is part of the reconstructed source code for the
026000,000006: ## second release of the flight software for the Lunar
026001,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
026002,000008: ## It was created to fix two incorrect ephemeris constants in
026003,000009: ## Luminary 96, as described by anomaly report LNY-59.
026004,000010: ## The code has been recreated from a copy of Luminary 99
026005,000011: ## revision 001, using asterisks indicating changed lines in
026006,000012: ## the listing and Luminary Memos #83 and #85, which list
026007,000013: ## changes between Luminary 97 and 98, and 98 and 99. The
026008,000014: ## code has been adapted such that the resulting bugger words
026009,000015: ## exactly match those specified for Luminary 97 in NASA drawing
026010,000016: ## 2021152D, which gives relatively high confidence that the
026011,000017: ## reconstruction is correct.
026012,000018: ## Reference: pp. 614-617
026013,000019: ## Assembler: yaYUL
026014,000020: ## Contact: Ron Burkey <info@sandroid.org>.
026015,000021: ## Website: www.ibiblio.org/apollo/index.html
026016,000022: ## Mod history: 2019-07-28 MAS Created from Luminary 99.
026017,000023:
Page 614 |
026019,000025: # PROGRAM DESCRIPTION P30 DATE 3-6-67
026020,000026:
026021,000027: # MOD.1 BY RAMA AIYAWAR
026022,000028:
026023,000029: # FUNCTIONAL DESCRIPTION
026024,000030: # ACCEPT ASTRONAUT INPUTS OF TIG,DELV(LV)
026025,000031: # CALL IMU STATUS CHECK ROUTINE (R02)
026026,000032: # DISPLAY TIME TO GO, APOGEE, PERIGEE, DELV(MAG), MGA AT IGN
026027,000033: # REQUEST BURN PROGRAM
026028,000034:
026029,000035: # CALLING SEQUENCE VIA JOB FROM V37
026030,000036:
026031,000037: # EXIT VIA V37 CALL OR TO GOTOPOOH (V34E)
026032,000038:
026033,000039: # SUBROUTINE CALLS - FLAGUP, PHASCHNG, BANKCALL, ENDOFJOB, GOFLASH, GOFLASHR
026034,000040: # GOPERF3R, INTPRET, BLANKET, GOTOPOOH, R02BOTH, S30.1,
026035,000041: # TTG/N35, MIDGIM, DISPMGA
026036,000042:
026037,000043: # ERASABLE INITIALIZATION - STATE VECTOR
026038,000044:
026039,000045: # OUTPUT - RINIT, VINIT, +MGA, VTIG, RTIG, DELVSIN, DELVSAB, DELVSLV, HAPO,
026040,000046: # HPER, TTOGO
026041,000047:
026042,000048: # DEBRIS - A, L, MPAC, PUSHLIST
026043,000049:
026044,000050: 32,2776 BANK 32
026045,000051: 35,2000 SETLOC P30S
026046,000052: 35,2000 BANK
026047,000053: 35,2000 E4,1652 EBANK= +MGA
026048,000054: 35,2000 COUNT* $$/P30
026049,000055: 35,2000 05504 P30 TC UPFLAG # SET UPDATE FLAG
026050,000056: 35,2001 00027 ADRES UPDATFLG
026051,000057: 35,2002 05504 TC UPFLAG # SET TRACK FLAG
026052,000058: 35,2003 00031 ADRES TRACKFLG
026053,000059:
026054,000060: 35,2004 32025 P30N33 CAF V06N33 # T OF IGN
026055,000061: 35,2005 03712 TC VNPOOH # RETURNS ON PROCEED, POOH ON TERMINATE
026056,000062:
026057,000063: 35,2006 33727 CAF V06N81 # DISPLAY DELTA V (LV)
026058,000064: 35,2007 03712 TC VNPOOH # REDISPLAY ON RECYCLE
026059,000065:
026060,000066: 35,2010 05516 TC DOWNFLAG # RESET UPDATE FLAG
026061,000067: 35,2011 00027 ADRES UPDATFLG
026062,000068: 35,2012 06037 TC INTPRET
026063,000069: 35,2013 77624 CALL
026064,000070: 35,2014 70000 S30.1
026065,000071: 35,2015 77414 SET EXIT
026066,000072: 35,2016 00470 UPDATFLG
026067,000073: 35,2017 32026 PARAM30 CAF V06N42 # DISPLAY APOGEE,PERIGEE,DELTA V
026068,000074: 35,2020 03712 TC VNPOOH
Page 615 |
026070,000076:
026071,000077: 35,2021 06037 TC INTPRET
026072,000078: 35,2022 77614 SETGO
026073,000079: 35,2023 01027 XDELVFLG # FOR P40'S: EXTERNAL DELTA-V GUIDANCE.
026074,000080: 35,2024 72540 REVN1645 # TRKMKCNT, TGO, +MGA DISPLAY
026075,000081:
026076,000082: 35,2025 01441 V06N33 VN 0633
026077,000083: 35,2026 01452 V06N42 VN 0642
026078,000084:
Page 616 |
026080,000086: # PROGRAM DESCRIPTION S30.1 DATE 9NOV66
026081,000087: # MOD NO 1 LOG SECTION P30,P37
026082,000088: # MOD BY RAMA AIYAWAR **
026083,000089:
026084,000090: # FUNCTIONAL DESCRIPTION
026085,000091: # BASED ON STORED TARGET PARAMETERS (R OF IGNITION (RTIG), V OF
026086,000092: # IGNITION (VTIG), TIME OF IGNITION (TIG)), COMPUTE PERIGEE ALTITUDE
026087,000093: # APOGEE ALTITUDE AND DELTAV REQUIRED (DELVSIN).
026088,000094:
026089,000095: # CALLING SEQUENCE
026090,000096: # L CALL
026091,000097: # L+1 S30.1
026092,000098:
026093,000099: # NORMAL EXIT MODE
026094,000100: # AT L+2 OR CALLING SEQUENCE (GOTO L+2)
026095,000101:
026096,000102: # SUBROUTINES CALLED
026097,000103: # LEMPREC
026098,000104: # PERIAPO
026099,000105:
026100,000106: # ALARM OR ABORT EXIT MODES
026101,000107: # NONE
026102,000108:
026103,000109: # ERASABLE INITIALIZATION REQUIRED
026104,000110: # TIG TIME OF IGNITION DP B28CS
026105,000111: # DELVSLV SPECIFIED DELTA-V IN LOCAL VERT.
026106,000112: # COORDS. OF ACTIVE VEHICLE AT
026107,000113: # TIME OF IGNITION VECTOR B+7 METERS/CS
026108,000114:
026109,000115: # OUTPUT
026110,000116: # RTIG POSITION AT TIG VECTOR B+29 METERS
026111,000117: # VTIG VELOCITY AT TIG VECTOR B+29 METERS/CS
026112,000118: # PDL 4D APOGEE ALTITUDE DP B+29 M, B+27 METERS.
026113,000119: # HAPO APOGEE ALTITUDE DP B+29 METERS
026114,000120: # PDL 8D PERIGEE ALTITUDE DP B+29 M, B+27 METERS.
026115,000121: # HPER PERIGEE ALTITUDE DP B+29 METERS
026116,000122: # DELVSIN SPECIFIED DELTA-V IN INERTIAL
026117,000123: # COORD. OF ACTIVE VEHICLE AT
026118,000124: # TIME OF IGNITION VECTOR B+7 METERS/CS
026119,000125: # DELVSAB MAG. OF DELVSIN VECTOR B+7 METERS/CS
026120,000126:
026121,000127: # DEBRIS QTEMP TEMP.ERASABLE
026122,000128: # QPRET, MPAC
026123,000129: # PUSHLIST
026124,000130:
026125,000131: 34,2000 SETLOC P30S1
026126,000132: 34,2000 BANK
026127,000133:
026128,000134: 34,2000 COUNT* $$/S30S
026129,000135:
026130,000136: 34,2000 71220 S30.1 STQ DLOAD
026131,000137: 34,2001 03632 QTEMP
026132,000138: 34,2002 03442 TIG # TIME IGNITION SCALED AT 2(+28)CS
026133,000139: 34,2003 34041 STCALL TDEC1
026134,000140: 34,2004 27057 LEMPREC # ENCKE ROUTINE FOR LEM
026135,000141:
026136,000142: 34,2005 67175 VLOAD SXA,2
Page 617 |
026138,000144: 34,2006 00001 RATT
026139,000145: 34,2007 02777 RTX2
026140,000146: 34,2010 03642 STORE RTIG # RADIUS VECTOR AT IGNITION TIME
026141,000147: 34,2011 57456 UNIT VCOMP
026142,000148: 34,2012 27656 STOVL DELVSIN # ZRF/LV IN DELVSIN SCALED AT 2
026143,000149: 34,2013 00007 VATT # VELOCITY VECTOR AT TIG, SCALED 2(7) M/CS
026144,000150: 34,2014 03650 STORE VTIG
026145,000151: 34,2015 53435 VXV UNIT
026146,000152: 34,2016 03642 RTIG
026147,000153: 34,2017 66001 SETPD SXA,1
026148,000154: 34,2020 00001 0
026149,000155: 34,2021 02776 RTX1
026150,000156: 34,2022 47206 PUSH VXV # YRF/LV PDL 0 SCALED AT 2
026151,000157: 34,2023 03656 DELVSIN
026152,000158: 34,2024 63372 VSL1 PDVL
026153,000159: 34,2025 63315 PDVL PDVL # YRF/LV PDL 6 SCALED AT 2
026154,000160: 34,2026 03656 DELVSIN # ZRF/LV PDL 12D SCALED AT 2
026155,000161: 34,2027 03434 DELVSLV
026156,000162: 34,2030 76505 VXM VSL1
026157,000163: 34,2031 00001 0
026158,000164: 34,2032 03656 STORE DELVSIN # DELTAV IN INERT. COOR. SCALED TO B+7M/CS
026159,000165: 34,2033 77646 ABVAL
026160,000166: 34,2034 27664 STOVL DELVSAB # DELTA V MAG.
026161,000167: 34,2035 03642 RTIG # (FOR PERIAPO)
026162,000168: 34,2036 53315 PDVL VAD # VREQUIRED = VTIG + DELVSIN (FOR PERIAPO)
026163,000169: 34,2037 03650 VTIG
026164,000170: 34,2040 03656 DELVSIN
026165,000171: 34,2041 77624 CALL
026166,000172: 34,2042 46316 PERIAPO1
026167,000173: 34,2043 77624 CALL
026168,000174: 34,2044 46426 SHIFTR1 # RESCALE IF NEEDED
026169,000175: 34,2045 77624 CALL # LIMIT DISPLAY TO 9999.9 N. MI.
026170,000176: 34,2046 45636 MAXCHK
026171,000177: 34,2047 16321 STODL HPER # PERIGEE ALT 2(29) METERS, FOR DISPLAY
026172,000178: 34,2050 00005 4D
026173,000179: 34,2051 77624 CALL
026174,000180: 34,2052 46426 SHIFTR1 # RESCALE IF NEEDED
026175,000181: 34,2053 77624 CALL # LIMIT DISPLAY TO 9999.9 N. MI.
026176,000182: 34,2054 45636 MAXCHK
026177,000183: 34,2055 36317 STCALL HAPO # APOGEE ALT 2(29) METERS, FOR DISPLAY
026178,000184: 34,2056 03632 QTEMP
026179,000185:
026180,000186:
End of include-file P30,P37.agc. Parent file is MAIN.agc