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:
|
027231,000002: ## Copyright: Public domain.
027232,000003: ## Filename: P30,P37.agc
027233,000004: ## Purpose: A section of LUM69 revision 2.
027234,000005: ## It is part of the reconstructed source code for the flown
027235,000006: ## version of the flight software for the Lunar Module's (LM)
027236,000007: ## Apollo Guidance Computer (AGC) for Apollo 10. The code has
027237,000008: ## been recreated from a copy of Luminary revsion 069, using
027238,000009: ## changes present in Luminary 099 which were described in
027239,000010: ## Luminary memos 75 and 78. The code has been adapted such
027240,000011: ## that the resulting bugger words exactly match those specified
027241,000012: ## for LUM69 revision 2 in NASA drawing 2021152B, which gives
027242,000013: ## relatively high confidence that the reconstruction is correct.
027243,000014: ## Reference: pp. 624-627
027244,000015: ## Assembler: yaYUL
027245,000016: ## Contact: Ron Burkey <info@sandroid.org>.
027246,000017: ## Website: www.ibiblio.org/apollo/index.html
027247,000018: ## Mod history: 2019-07-27 MAS Created from Luminary 69.
027248,000019:
Page 624 |
027250,000021: # PROGRAM DESCRIPTION P30 DATE 3-6-67
027251,000022:
027252,000023: # MOD.1 BY RAMA AIYAWAR
027253,000024: # FUNCTIONAL DESCRIPTION
027254,000025: # ACCEPT ASTRONAUT INPUTS OF TIG,DELV(LV)
027255,000026: # CALL IMU STATUS CHECK ROUTINE (R02)
027256,000027: # DISPLAY TIME TO GO, APOGEE, PERIGEE, DELV(MAG), MGA AT IGN
027257,000028: # REQUEST BURN PROGRAM
027258,000029:
027259,000030: # CALLING SEQUENCE VIA JOB FROM V37
027260,000031:
027261,000032: # EXIT VIA V37 CALL OR TO GOTOPOOH (V34E)
027262,000033:
027263,000034: # SUBROUTINE CALLS - FLAGUP, PHASCHNG, BANKCALL, ENDOFJOB, GOFLASH, GOFLASHR
027264,000035: # GOPERF3R, INTPRET, BLANKET, GOTOPOOH, R02BOTH, S30.1,
027265,000036: # TTG/N35, MIDGIM, DISPMGA
027266,000037:
027267,000038: # ERASABLE INITIALIZATION - STATE VECTOR
027268,000039:
027269,000040: # OUTPUT-RINIT, VINIT, +MGA, VTIG, RTIG, DELVSIN, DELVSAB, DELVSLV, HAPO,
027270,000041: # HPER, TTOGO
027271,000042:
027272,000043: # DEBRIS- A,L, MPAC, PUSHLIST
027273,000044:
027274,000045: 32,2772 BANK 32
027275,000046: 35,2000 SETLOC P30S
027276,000047: 35,2000 BANK
027277,000048: 35,2000 E4,1656 EBANK= +MGA
027278,000049: 35,2000 COUNT* $$/P30
027279,000050: 35,2000 05504 P30 TC UPFLAG # SET UPDATE FLAG
027280,000051: 35,2001 00027 ADRES UPDATFLG
027281,000052: 35,2002 05504 TC UPFLAG # SET TRACK FLAG
027282,000053: 35,2003 00031 ADRES TRACKFLG
027283,000054:
027284,000055: 35,2004 32025 P30N33 CAF V06N33 # T OF IGN
027285,000056: 35,2005 03651 TC VNPOOH # RETURNS ON PROCEED, POOH ON TERMINATE
027286,000057:
027287,000058: 35,2006 33666 CAF V06N81 # DISPLAY DELTA V (LV)
027288,000059: 35,2007 03651 TC VNPOOH # REDISPLAY ON RECYCLE
027289,000060:
027290,000061: 35,2010 05516 TC DOWNFLAG # RESET UPDATE FLAG
027291,000062: 35,2011 00027 ADRES UPDATFLG
027292,000063: 35,2012 06036 TC INTPRET
027293,000064: 35,2013 77624 CALL
027294,000065: 35,2014 70000 S30.1
027295,000066: 35,2015 77414 SET EXIT
027296,000067: 35,2016 00470 UPDATFLG
027297,000068: 35,2017 32026 PARAM30 CAF V06N42 # DISPLAY APOGEE,PERIGEE ,DELTA V
027298,000069: 35,2020 03651 TC VNPOOH
Page 625 |
027300,000071:
027301,000072: 35,2021 06036 TC INTPRET
027302,000073: 35,2022 77614 SETGO
027303,000074: 35,2023 01027 XDELVFLG # FOR P40'S: EXTERNAL DELTA-V GUIDANCE.
027304,000075: 35,2024 72504 REVN1645 # TRKMKCNT, TGO, +MGA DISPLAY
027305,000076:
027306,000077: 35,2025 01441 V06N33 VN 0633
027307,000078: 35,2026 01452 V06N42 VN 0642
027308,000079:
Page 626 |
027310,000081: # PROGRAM DESCRIPTION S30.1 DATE 9NOV66
027311,000082:
027312,000083: # MOD NO 1 LOG SECTION P30,P37
027313,000084: # MOD BY RAMA AIYAWAR **
027314,000085:
027315,000086: # FUNCTIONAL DESCRIPTION
027316,000087: # BASED ON STORED TARGET PARAMETERS(R OF IGNITION (RTIG), V OF
027317,000088: # IGNITION(VTIG), TIME OF IGNITION (TIG)),COMPUTE PERIGEE ALTITUDE
027318,000089: # APOGEE ALTITUDE AND DELTAV REQUIRED(DELVSIN).
027319,000090:
027320,000091: # CALLING SEQUENCE
027321,000092: # L CALL
027322,000093: # L+1 S30.1
027323,000094:
027324,000095: # NORMAL EXIT MODE
027325,000096: # AT L+2 OR CALLING SEQUENCE (GOTO L+2)
027326,000097:
027327,000098: # SUBROUTINES CALLED
027328,000099: # LEMPREC
027329,000100: # PERIAPO
027330,000101:
027331,000102: # ALARM OR ABORT EXIT MODES
027332,000103: # NONE
027333,000104:
027334,000105: # ERASABLE INITIALIZATION REQUIRED
027335,000106: # TIG TIME OF IGNITION DP B28CS
027336,000107: # DELVSLV SPECIFIED DELTA-V IN LOCAL VERT.
027337,000108: # COORDS. OF ACTIVE VEHICLE AT
027338,000109: # TIME OF IGNITION VECTOR B+7 METERS/CS
027339,000110:
027340,000111: # OUTPUT
027341,000112: # RTIG POSITION AT TIG VECTOR B+29 METERS
027342,000113: # VTIG VELOCITY AT TIG VECTOR B+29 METERS/CS
027343,000114: # PDL 4D APOGEE ALTITUDE DP B+29 M , B+27 METERS.
027344,000115: # HAPO APOGEE ALTITUDE DP B+29 METERS
027345,000116: # PDL 8D PERIGEE ALTITUDE DP B+29 M , B+27 METERS.
027346,000117: # HPER PERIGEE ALTITUDE DP B+29 METERS
027347,000118: # DELVSIN SPECIFIED DELTA-V IN INERTIAL
027348,000119: # COORD. OF ACTIVE VEHICLE AT
027349,000120: # TIME OF IGNITION VECTOR B+7 METERS/CS
027350,000121: # DELVSAB MAG. OF DELVSIN VECTOR B+7 METERS/CS
027351,000122:
027352,000123: # DEBRIS QTEMP TEMP.ERASABLE
027353,000124: # QPRET, MPAC
027354,000125: # PUSHLIST
027355,000126:
027356,000127: 34,2000 SETLOC P30S1
027357,000128: 34,2000 BANK
027358,000129:
027359,000130: 34,2000 COUNT* $$/S30S
027360,000131:
027361,000132: 34,2000 71220 S30.1 STQ DLOAD
027362,000133: 34,2001 03630 QTEMP
027363,000134: 34,2002 03440 TIG # TIME IGNITION SCALED AT 2(+28)CS
027364,000135: 34,2003 34041 STCALL TDEC1
027365,000136: 34,2004 27057 LEMPREC # ENCKE ROUTINE FOR LEM
027366,000137:
027367,000138: 34,2005 67175 VLOAD SXA,2
Page 627 |
027369,000140: 34,2006 00001 RATT
027370,000141: 34,2007 03376 RTX2
027371,000142: 34,2010 03640 STORE RTIG # RADIUS VECTOR AT IGNITION TIME
027372,000143: 34,2011 57456 UNIT VCOMP
027373,000144: 34,2012 27654 STOVL DELVSIN # ZRF/LV IN DELVSIN SCALED AT 2
027374,000145: 34,2013 00007 VATT # VELOCITY VECTOR AT TIG, SCALED 2(7) M/CS
027375,000146: 34,2014 03646 STORE VTIG
027376,000147: 34,2015 53435 VXV UNIT
027377,000148: 34,2016 03640 RTIG
027378,000149: 34,2017 66001 SETPD SXA,1
027379,000150: 34,2020 00001 0
027380,000151: 34,2021 03375 RTX1
027381,000152: 34,2022 47206 PUSH VXV # YRF/LV PDL 0 SCALED AT 2
027382,000153: 34,2023 03654 DELVSIN
027383,000154: 34,2024 63372 VSL1 PDVL
027384,000155: 34,2025 63315 PDVL PDVL # YRF/LV PDL 6 SCALED AT 2
027385,000156: 34,2026 03654 DELVSIN # ZRF/LV PDL 12D SCALED AT 2
027386,000157: 34,2027 03432 DELVSLV
027387,000158: 34,2030 76505 VXM VSL1
027388,000159: 34,2031 00001 0
027389,000160: 34,2032 03654 STORE DELVSIN # DELTAV IN INERT. COOR. SCALED TO B+7M/CS
027390,000161: 34,2033 77646 ABVAL
027391,000162: 34,2034 27662 STOVL DELVSAB # DELTA V MAG.
027392,000163: 34,2035 03640 RTIG # (FOR PERIAPO)
027393,000164: 34,2036 53315 PDVL VAD # VREQUIRED = VTIG + DELVSIN (FOR PERIAPO)
027394,000165: 34,2037 03646 VTIG
027395,000166: 34,2040 03654 DELVSIN
027396,000167: 34,2041 77624 CALL
027397,000168: 34,2042 46277 PERIAPO1
027398,000169: 34,2043 77624 CALL
027399,000170: 34,2044 46407 SHIFTR1 # RESCALE IF NEEDED
027400,000171: 34,2045 77624 CALL # LIMIT DISPLAY TO 9999.9 N. MI.
027401,000172: 34,2046 45636 MAXCHK
027402,000173: 34,2047 16325 STODL HPER # PERIGEE ALT 2(29) METERS, FOR DISPLAY
027403,000174: 34,2050 00005 4D
027404,000175: 34,2051 77624 CALL
027405,000176: 34,2052 46407 SHIFTR1 # RESCALE IF NEEDED
027406,000177: 34,2053 77624 CALL # LIMIT DISPLAY TO 9999.9 N. MI.
027407,000178: 34,2054 45636 MAXCHK
027408,000179: 34,2055 36323 STCALL HAPO # APOGEE ALT 2(29) METERS, FOR DISPLAY
027409,000180: 34,2056 03630 QTEMP
027410,000181:
027411,000182:
End of include-file P30,P37.agc. Parent file is MAIN.agc