Source Code
![]() |
These source-code files were from the printout at the MIT Museum, with many thanks
to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing
it to us. The printout was digitally photographed by Paul Fjeld. A team of
volunteers transcribed the source code manually from these images or, where
appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13)
source code to agree with the images from the printout. Note that the page images
presented online are of reduced quality, and that higher-quality images
are available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061 20'35 OCT. 28,1968Note that the date is the date of the printout, not the date of the program revision. |
026398,000002: ## Copyright: Public domain.
026399,000003: ## Filename: P30_P37.agc
026400,000004: ## Purpose: Part of the source code for Luminary 1A build 099.
026401,000005: ## It is part of the source code for the Lunar Module's (LM)
026402,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
026403,000007: ## Assembler: yaYUL
026404,000008: ## Contact: Ron Burkey <info@sandroid.org>.
026405,000009: ## Website: www.ibiblio.org/apollo.
026406,000010: ## Pages: 614-617
026407,000011: ## Mod history: 2009-05-17 RSB Adapted from the corresponding
026408,000012: ## Luminary131 file, using page
026409,000013: ## images from Luminary 1A.
026410,000014: ## 2009-06-05 RSB Removed 4 lines of code that shouldn't
026411,000015: ## have survived from Luminary 131.
026412,000016: ## 2016-12-13 RSB GOTOP00H -> GOTOPOOH
026413,000017: ## 2016-12-14 RSB VNP00H -> VNPOOH.
026414,000018: ## 2016-12-14 RSB Proofed text comments with octopus/ProoferComments
026415,000019: ## and corrected the errors found.
026416,000020: ##
026417,000021: ## This source code has been transcribed or otherwise adapted from
026418,000022: ## digitized images of a hardcopy from the MIT Museum. The digitization
026419,000023: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
026420,000024: ## the Museum. Many thanks to both. The images (with suitable reduction
026421,000025: ## in storage size and consequent reduction in image quality as well) are
026422,000026: ## available online at www.ibiblio.org/apollo. If for some reason you
026423,000027: ## find that the images are illegible, contact me at info@sandroid.org
026424,000028: ## about getting access to the (much) higher-quality images which Paul
026425,000029: ## actually created.
026426,000030: ##
026427,000031: ## Notations on the hardcopy document read, in part:
026428,000032: ##
026429,000033: ## Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
026430,000034: ## 16:27 JULY 14, 1969
026431,000035:
![]() |
Page 614 |
026433,000037: # PROGRAM DESCRIPTION P30 DATE 3-6-67
026434,000038:
026435,000039: # MOD.1 BY RAMA AIYAWAR
026436,000040:
026437,000041: # FUNCTIONAL DESCRIPTION
026438,000042: # ACCEPT ASTRONAUT INPUTS OF TIG,DELV(LV)
026439,000043: # CALL IMU STATUS CHECK ROUTINE (R02)
026440,000044: # DISPLAY TIME TO GO, APOGEE, PERIGEE, DELV(MAG), MGA AT IGN
026441,000045: # REQUEST BURN PROGRAM
026442,000046:
026443,000047: # CALLING SEQUENCE VIA JOB FROM V37
026444,000048:
026445,000049: # EXIT VIA V37 CALL OR TO GOTOPOOH (V34E)
026446,000050:
026447,000051: # SUBROUTINE CALLS - FLAGUP, PHASCHNG, BANKCALL, ENDOFJOB, GOFLASH, GOFLASHR
026448,000052: # GOPERF3R, INTPRET, BLANKET, GOTOPOOH, R02BOTH, S30.1,
026449,000053: # TTG/N35, MIDGIM, DISPMGA
026450,000054:
026451,000055: # ERASABLE INITIALIZATION - STATE VECTOR
026452,000056:
026453,000057: # OUTPUT - RINIT, VINIT, +MGA, VTIG, RTIG, DELVSIN, DELVSAB, DELVSLV, HAPO,
026454,000058: # HPER, TTOGO
026455,000059:
026456,000060: # DEBRIS - A, L, MPAC, PUSHLIST
026457,000061:
026458,000062: 32,2776 BANK 32
026459,000063: 35,2000 SETLOC P30S
026460,000064: 35,2000 BANK
026461,000065: 35,2000 E4,1652 EBANK= +MGA
026462,000066: 35,2000 COUNT* $$/P30
026463,000067: 35,2000 05504 P30 TC UPFLAG # SET UPDATE FLAG
026464,000068: 35,2001 00027 ADRES UPDATFLG
026465,000069: 35,2002 05504 TC UPFLAG # SET TRACK FLAG
026466,000070: 35,2003 00031 ADRES TRACKFLG
026467,000071:
026468,000072: 35,2004 32025 P30N33 CAF V06N33 # T OF IGN
026469,000073: 35,2005 03712 TC VNPOOH # RETURNS ON PROCEED, POOH ON TERMINATE
026470,000074:
026471,000075: 35,2006 33727 CAF V06N81 # DISPLAY DELTA V (LV)
026472,000076: 35,2007 03712 TC VNPOOH # REDISPLAY ON RECYCLE
026473,000077:
026474,000078: 35,2010 05516 TC DOWNFLAG # RESET UPDATE FLAG
026475,000079: 35,2011 00027 ADRES UPDATFLG
026476,000080: 35,2012 06037 TC INTPRET
026477,000081: 35,2013 77624 CALL
026478,000082: 35,2014 70000 S30.1
026479,000083: 35,2015 77414 SET EXIT
026480,000084: 35,2016 00470 UPDATFLG
026481,000085: 35,2017 32026 PARAM30 CAF V06N42 # DISPLAY APOGEE,PERIGEE,DELTA V
026482,000086: 35,2020 03712 TC VNPOOH
![]() |
Page 615 |
026484,000088:
026485,000089: 35,2021 06037 TC INTPRET
026486,000090: 35,2022 77614 SETGO
026487,000091: 35,2023 01027 XDELVFLG # FOR P40'S: EXTERNAL DELTA-V GUIDANCE.
026488,000092: 35,2024 72540 REVN1645 # TRKMKCNT, TGO, +MGA DISPLAY
026489,000093:
026490,000094: 35,2025 01441 V06N33 VN 0633
026491,000095: 35,2026 01452 V06N42 VN 0642
026492,000096:
![]() |
Page 616 |
026494,000098: # PROGRAM DESCRIPTION S30.1 DATE 9NOV66
026495,000099: # MOD NO 1 LOG SECTION P30,P37
026496,000100: # MOD BY RAMA AIYAWAR **
026497,000101:
026498,000102: # FUNCTIONAL DESCRIPTION
026499,000103: # BASED ON STORED TARGET PARAMETERS (R OF IGNITION (RTIG), V OF
026500,000104: # IGNITION (VTIG), TIME OF IGNITION (TIG)), COMPUTE PERIGEE ALTITUDE
026501,000105: # APOGEE ALTITUDE AND DELTAV REQUIRED (DELVSIN).
026502,000106:
026503,000107: # CALLING SEQUENCE
026504,000108: # L CALL
026505,000109: # L+1 S30.1
026506,000110:
026507,000111: # NORMAL EXIT MODE
026508,000112: # AT L+2 OR CALLING SEQUENCE (GOTO L+2)
026509,000113:
026510,000114: # SUBROUTINES CALLED
026511,000115: # LEMPREC
026512,000116: # PERIAPO
026513,000117:
026514,000118: # ALARM OR ABORT EXIT MODES
026515,000119: # NONE
026516,000120:
026517,000121: # ERASABLE INITIALIZATION REQUIRED
026518,000122: # TIG TIME OF IGNITION DP B28CS
026519,000123: # DELVSLV SPECIFIED DELTA-V IN LOCAL VERT.
026520,000124: # COORDS. OF ACTIVE VEHICLE AT
026521,000125: # TIME OF IGNITION VECTOR B+7 METERS/CS
026522,000126:
026523,000127: # OUTPUT
026524,000128: # RTIG POSITION AT TIG VECTOR B+29 METERS
026525,000129: # VTIG VELOCITY AT TIG VECTOR B+29 METERS/CS
026526,000130: # PDL 4D APOGEE ALTITUDE DP B+29 M, B+27 METERS.
026527,000131: # HAPO APOGEE ALTITUDE DP B+29 METERS
026528,000132: # PDL 8D PERIGEE ALTITUDE DP B+29 M, B+27 METERS.
026529,000133: # HPER PERIGEE ALTITUDE DP B+29 METERS
026530,000134: # DELVSIN SPECIFIED DELTA-V IN INERTIAL
026531,000135: # COORD. OF ACTIVE VEHICLE AT
026532,000136: # TIME OF IGNITION VECTOR B+7 METERS/CS
026533,000137: # DELVSAB MAG. OF DELVSIN VECTOR B+7 METERS/CS
026534,000138:
026535,000139: # DEBRIS QTEMP TEMP.ERASABLE
026536,000140: # QPRET, MPAC
026537,000141: # PUSHLIST
026538,000142:
026539,000143: 34,2000 SETLOC P30S1
026540,000144: 34,2000 BANK
026541,000145:
026542,000146: 34,2000 COUNT* $$/S30S
026543,000147:
026544,000148: 34,2000 71220 S30.1 STQ DLOAD
026545,000149: 34,2001 03632 QTEMP
026546,000150: 34,2002 03442 TIG # TIME IGNITION SCALED AT 2(+28)CS
026547,000151: 34,2003 34041 STCALL TDEC1
026548,000152: 34,2004 27057 LEMPREC # ENCKE ROUTINE FOR LEM
026549,000153:
026550,000154: 34,2005 67175 VLOAD SXA,2
![]() |
Page 617 |
026552,000156: 34,2006 00001 RATT
026553,000157: 34,2007 02777 RTX2
026554,000158: 34,2010 03642 STORE RTIG # RADIUS VECTOR AT IGNITION TIME
026555,000159: 34,2011 57456 UNIT VCOMP
026556,000160: 34,2012 27656 STOVL DELVSIN # ZRF/LV IN DELVSIN SCALED AT 2
026557,000161: 34,2013 00007 VATT # VELOCITY VECTOR AT TIG, SCALED 2(7) M/CS
026558,000162: 34,2014 03650 STORE VTIG
026559,000163: 34,2015 53435 VXV UNIT
026560,000164: 34,2016 03642 RTIG
026561,000165: 34,2017 66001 SETPD SXA,1
026562,000166: 34,2020 00001 0
026563,000167: 34,2021 02776 RTX1
026564,000168: 34,2022 47206 PUSH VXV # YRF/LV PDL 0 SCALED AT 2
026565,000169: 34,2023 03656 DELVSIN
026566,000170: 34,2024 63372 VSL1 PDVL
026567,000171: 34,2025 63315 PDVL PDVL # YRF/LV PDL 6 SCALED AT 2
026568,000172: 34,2026 03656 DELVSIN # ZRF/LV PDL 12D SCALED AT 2
026569,000173: 34,2027 03434 DELVSLV
026570,000174: 34,2030 76505 VXM VSL1
026571,000175: 34,2031 00001 0
026572,000176: 34,2032 03656 STORE DELVSIN # DELTAV IN INERT. COOR. SCALED TO B+7M/CS
026573,000177: 34,2033 77646 ABVAL
026574,000178: 34,2034 27664 STOVL DELVSAB # DELTA V MAG.
026575,000179: 34,2035 03642 RTIG # (FOR PERIAPO)
026576,000180: 34,2036 53315 PDVL VAD # VREQUIRED = VTIG + DELVSIN (FOR PERIAPO)
026577,000181: 34,2037 03650 VTIG
026578,000182: 34,2040 03656 DELVSIN
026579,000183: 34,2041 77624 CALL
026580,000184: 34,2042 46316 PERIAPO1
026581,000185: 34,2043 77624 CALL
026582,000186: 34,2044 46426 SHIFTR1 # RESCALE IF NEEDED
026583,000187: 34,2045 77624 CALL # LIMIT DISPLAY TO 9999.9 N. MI.
026584,000188: 34,2046 45636 MAXCHK
026585,000189: 34,2047 16321 STODL HPER # PERIGEE ALT 2(29) METERS, FOR DISPLAY
026586,000190: 34,2050 00005 4D
026587,000191: 34,2051 77624 CALL
026588,000192: 34,2052 46426 SHIFTR1 # RESCALE IF NEEDED
026589,000193: 34,2053 77624 CALL # LIMIT DISPLAY TO 9999.9 N. MI.
026590,000194: 34,2054 45636 MAXCHK
026591,000195: 34,2055 36317 STCALL HAPO # APOGEE ALT 2(29) METERS, FOR DISPLAY
026592,000196: 34,2056 03632 QTEMP
026593,000197:
026594,000198:
End of include-file P30,P37.agc. Parent file is MAIN.agc