Source Code
These source-code files are part of a reconstructed copy of Luminary 96, the
original release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer
(AGC) software.
The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. 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 96 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. |
025879,000002: ## Copyright: Public domain.
025880,000003: ## Filename: P30,P37.agc
025881,000004: ## Purpose: A section of Luminary revision 96.
025882,000005: ## It is part of the reconstructed source code for the
025883,000006: ## original release of the flight software for the Lunar
025884,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
025885,000008: ## The code has been recreated from a previously reconstructed
025886,000009: ## copy of Luminary 97 by undoing changes described in anomaly
025887,000010: ## report LNY-59. The code has been adapted such that the
025888,000011: ## resulting bugger words exactly match those specified for
025889,000012: ## Luminary 96 in NASA drawing 2021152D, which gives relatively
025890,000013: ## high confidence that the reconstruction is correct.
025891,000014: ## Reference: pp. 614-617
025892,000015: ## Assembler: yaYUL
025893,000016: ## Contact: Ron Burkey <info@sandroid.org>.
025894,000017: ## Website: www.ibiblio.org/apollo/index.html
025895,000018: ## Mod history: 2019-08-04 MAS Created from Luminary 97.
025896,000019:
Page 614 |
025898,000021: # PROGRAM DESCRIPTION P30 DATE 3-6-67
025899,000022:
025900,000023: # MOD.1 BY RAMA AIYAWAR
025901,000024:
025902,000025: # FUNCTIONAL DESCRIPTION
025903,000026: # ACCEPT ASTRONAUT INPUTS OF TIG,DELV(LV)
025904,000027: # CALL IMU STATUS CHECK ROUTINE (R02)
025905,000028: # DISPLAY TIME TO GO, APOGEE, PERIGEE, DELV(MAG), MGA AT IGN
025906,000029: # REQUEST BURN PROGRAM
025907,000030:
025908,000031: # CALLING SEQUENCE VIA JOB FROM V37
025909,000032:
025910,000033: # EXIT VIA V37 CALL OR TO GOTOPOOH (V34E)
025911,000034:
025912,000035: # SUBROUTINE CALLS - FLAGUP, PHASCHNG, BANKCALL, ENDOFJOB, GOFLASH, GOFLASHR
025913,000036: # GOPERF3R, INTPRET, BLANKET, GOTOPOOH, R02BOTH, S30.1,
025914,000037: # TTG/N35, MIDGIM, DISPMGA
025915,000038:
025916,000039: # ERASABLE INITIALIZATION - STATE VECTOR
025917,000040:
025918,000041: # OUTPUT - RINIT, VINIT, +MGA, VTIG, RTIG, DELVSIN, DELVSAB, DELVSLV, HAPO,
025919,000042: # HPER, TTOGO
025920,000043:
025921,000044: # DEBRIS - A, L, MPAC, PUSHLIST
025922,000045:
025923,000046: 32,2776 BANK 32
025924,000047: 35,2000 SETLOC P30S
025925,000048: 35,2000 BANK
025926,000049: 35,2000 E4,1652 EBANK= +MGA
025927,000050: 35,2000 COUNT* $$/P30
025928,000051: 35,2000 05504 P30 TC UPFLAG # SET UPDATE FLAG
025929,000052: 35,2001 00027 ADRES UPDATFLG
025930,000053: 35,2002 05504 TC UPFLAG # SET TRACK FLAG
025931,000054: 35,2003 00031 ADRES TRACKFLG
025932,000055:
025933,000056: 35,2004 32025 P30N33 CAF V06N33 # T OF IGN
025934,000057: 35,2005 03712 TC VNPOOH # RETURNS ON PROCEED, POOH ON TERMINATE
025935,000058:
025936,000059: 35,2006 33727 CAF V06N81 # DISPLAY DELTA V (LV)
025937,000060: 35,2007 03712 TC VNPOOH # REDISPLAY ON RECYCLE
025938,000061:
025939,000062: 35,2010 05516 TC DOWNFLAG # RESET UPDATE FLAG
025940,000063: 35,2011 00027 ADRES UPDATFLG
025941,000064: 35,2012 06037 TC INTPRET
025942,000065: 35,2013 77624 CALL
025943,000066: 35,2014 70000 S30.1
025944,000067: 35,2015 77414 SET EXIT
025945,000068: 35,2016 00470 UPDATFLG
025946,000069: 35,2017 32026 PARAM30 CAF V06N42 # DISPLAY APOGEE,PERIGEE,DELTA V
025947,000070: 35,2020 03712 TC VNPOOH
Page 615 |
025949,000072:
025950,000073: 35,2021 06037 TC INTPRET
025951,000074: 35,2022 77614 SETGO
025952,000075: 35,2023 01027 XDELVFLG # FOR P40'S: EXTERNAL DELTA-V GUIDANCE.
025953,000076: 35,2024 72540 REVN1645 # TRKMKCNT, TGO, +MGA DISPLAY
025954,000077:
025955,000078: 35,2025 01441 V06N33 VN 0633
025956,000079: 35,2026 01452 V06N42 VN 0642
025957,000080:
Page 616 |
025959,000082: # PROGRAM DESCRIPTION S30.1 DATE 9NOV66
025960,000083: # MOD NO 1 LOG SECTION P30,P37
025961,000084: # MOD BY RAMA AIYAWAR **
025962,000085:
025963,000086: # FUNCTIONAL DESCRIPTION
025964,000087: # BASED ON STORED TARGET PARAMETERS (R OF IGNITION (RTIG), V OF
025965,000088: # IGNITION (VTIG), TIME OF IGNITION (TIG)), COMPUTE PERIGEE ALTITUDE
025966,000089: # APOGEE ALTITUDE AND DELTAV REQUIRED (DELVSIN).
025967,000090:
025968,000091: # CALLING SEQUENCE
025969,000092: # L CALL
025970,000093: # L+1 S30.1
025971,000094:
025972,000095: # NORMAL EXIT MODE
025973,000096: # AT L+2 OR CALLING SEQUENCE (GOTO L+2)
025974,000097:
025975,000098: # SUBROUTINES CALLED
025976,000099: # LEMPREC
025977,000100: # PERIAPO
025978,000101:
025979,000102: # ALARM OR ABORT EXIT MODES
025980,000103: # NONE
025981,000104:
025982,000105: # ERASABLE INITIALIZATION REQUIRED
025983,000106: # TIG TIME OF IGNITION DP B28CS
025984,000107: # DELVSLV SPECIFIED DELTA-V IN LOCAL VERT.
025985,000108: # COORDS. OF ACTIVE VEHICLE AT
025986,000109: # TIME OF IGNITION VECTOR B+7 METERS/CS
025987,000110:
025988,000111: # OUTPUT
025989,000112: # RTIG POSITION AT TIG VECTOR B+29 METERS
025990,000113: # VTIG VELOCITY AT TIG VECTOR B+29 METERS/CS
025991,000114: # PDL 4D APOGEE ALTITUDE DP B+29 M, B+27 METERS.
025992,000115: # HAPO APOGEE ALTITUDE DP B+29 METERS
025993,000116: # PDL 8D PERIGEE ALTITUDE DP B+29 M, B+27 METERS.
025994,000117: # HPER PERIGEE ALTITUDE DP B+29 METERS
025995,000118: # DELVSIN SPECIFIED DELTA-V IN INERTIAL
025996,000119: # COORD. OF ACTIVE VEHICLE AT
025997,000120: # TIME OF IGNITION VECTOR B+7 METERS/CS
025998,000121: # DELVSAB MAG. OF DELVSIN VECTOR B+7 METERS/CS
025999,000122:
026000,000123: # DEBRIS QTEMP TEMP.ERASABLE
026001,000124: # QPRET, MPAC
026002,000125: # PUSHLIST
026003,000126:
026004,000127: 34,2000 SETLOC P30S1
026005,000128: 34,2000 BANK
026006,000129:
026007,000130: 34,2000 COUNT* $$/S30S
026008,000131:
026009,000132: 34,2000 71220 S30.1 STQ DLOAD
026010,000133: 34,2001 03632 QTEMP
026011,000134: 34,2002 03442 TIG # TIME IGNITION SCALED AT 2(+28)CS
026012,000135: 34,2003 34041 STCALL TDEC1
026013,000136: 34,2004 27057 LEMPREC # ENCKE ROUTINE FOR LEM
026014,000137:
026015,000138: 34,2005 67175 VLOAD SXA,2
Page 617 |
026017,000140: 34,2006 00001 RATT
026018,000141: 34,2007 02777 RTX2
026019,000142: 34,2010 03642 STORE RTIG # RADIUS VECTOR AT IGNITION TIME
026020,000143: 34,2011 57456 UNIT VCOMP
026021,000144: 34,2012 27656 STOVL DELVSIN # ZRF/LV IN DELVSIN SCALED AT 2
026022,000145: 34,2013 00007 VATT # VELOCITY VECTOR AT TIG, SCALED 2(7) M/CS
026023,000146: 34,2014 03650 STORE VTIG
026024,000147: 34,2015 53435 VXV UNIT
026025,000148: 34,2016 03642 RTIG
026026,000149: 34,2017 66001 SETPD SXA,1
026027,000150: 34,2020 00001 0
026028,000151: 34,2021 02776 RTX1
026029,000152: 34,2022 47206 PUSH VXV # YRF/LV PDL 0 SCALED AT 2
026030,000153: 34,2023 03656 DELVSIN
026031,000154: 34,2024 63372 VSL1 PDVL
026032,000155: 34,2025 63315 PDVL PDVL # YRF/LV PDL 6 SCALED AT 2
026033,000156: 34,2026 03656 DELVSIN # ZRF/LV PDL 12D SCALED AT 2
026034,000157: 34,2027 03434 DELVSLV
026035,000158: 34,2030 76505 VXM VSL1
026036,000159: 34,2031 00001 0
026037,000160: 34,2032 03656 STORE DELVSIN # DELTAV IN INERT. COOR. SCALED TO B+7M/CS
026038,000161: 34,2033 77646 ABVAL
026039,000162: 34,2034 27664 STOVL DELVSAB # DELTA V MAG.
026040,000163: 34,2035 03642 RTIG # (FOR PERIAPO)
026041,000164: 34,2036 53315 PDVL VAD # VREQUIRED = VTIG + DELVSIN (FOR PERIAPO)
026042,000165: 34,2037 03650 VTIG
026043,000166: 34,2040 03656 DELVSIN
026044,000167: 34,2041 77624 CALL
026045,000168: 34,2042 46316 PERIAPO1
026046,000169: 34,2043 77624 CALL
026047,000170: 34,2044 46426 SHIFTR1 # RESCALE IF NEEDED
026048,000171: 34,2045 77624 CALL # LIMIT DISPLAY TO 9999.9 N. MI.
026049,000172: 34,2046 45636 MAXCHK
026050,000173: 34,2047 16321 STODL HPER # PERIGEE ALT 2(29) METERS, FOR DISPLAY
026051,000174: 34,2050 00005 4D
026052,000175: 34,2051 77624 CALL
026053,000176: 34,2052 46426 SHIFTR1 # RESCALE IF NEEDED
026054,000177: 34,2053 77624 CALL # LIMIT DISPLAY TO 9999.9 N. MI.
026055,000178: 34,2054 45636 MAXCHK
026056,000179: 34,2055 36317 STCALL HAPO # APOGEE ALT 2(29) METERS, FOR DISPLAY
026057,000180: 34,2056 03632 QTEMP
026058,000181:
026059,000182:
End of include-file P30,P37.agc. Parent file is MAIN.agc