Source Code
This is a reconstructed version of Luminary 130, the initial AGC program released
in November 1969 for the Apollo 13 LM. Three more releases
followed before the flown revision was finally manufactured in February 1970.
This reconstruction was created from a previous transcription of the original listing of Luminary 131, combined with Luminary memo #129 which describes the small difference between the Luminary 130 and 131. The reconstructed source code was verified by matching memory-bank checksums to those listed for Luminary 130 in drawing 2021152G. In this source code, program comments from the original (Luminary 131) code are prefixed with '#', while those added later by the Virtual AGC project are prefixed with '##'. |
026459,000002: ## Copyright: Public domain.
026460,000003: ## Filename: P30,P37.agc
026461,000004: ## Purpose: A section of the reconstructed source code for Luminary 130.
026462,000005: ## This was the original program released for the Apollo 13 LM,
026463,000006: ## although several more revisions would follow. It has been
026464,000007: ## reconstructed from a listing of Luminary 131, from which it
026465,000008: ## differs on only two lines in P70-P71. The difference is
026466,000009: ## described in detail in Luminary memo #129, which was used
026467,000010: ## to perform the reconstruction. This file is intended to be a
026468,000011: ## faithful reconstruction, except that the code format has been
026469,000012: ## changed to conform to the requirements of the yaYUL assembler
026470,000013: ## rather than the original YUL assembler.
026471,000014: ## Reference: pp. 619-622
026472,000015: ## Contact: Ron Burkey <info@sandroid.org>.
026473,000016: ## Website: www.ibiblio.org/apollo
026474,000017: ## Mod history: 05/19/03 RSB. Began transcribing.
026475,000018: ## 2017-01-06 RSB Page numbers now agree with those on the
026476,000019: ## original harcopy, as opposed to the PDF page
026477,000020: ## numbers in 1701.pdf.
026478,000021: ## 2017-02-24 RSB Proofed comment text using octopus/ProoferComments.
026479,000022: ## 2017-03-09 RSB Fixed VNP00H to VNPOOH.
026480,000023: ## 2017-03-14 RSB Comment-text fixes noted in proofing Luminary 116.
026481,000024: ## 2018-09-04 MAS Copied from Luminary 131 for Luminary 130.
026482,000025:
Page 619 |
026484,000027: # PROGRAM DESCRIPTION P30 DATE 3-6-67
026485,000028: # MOD.1 BY RAMA AIYAWAR
026486,000029:
026487,000030: # FUNCTIONAL DESCRIPTION
026488,000031: # ACCEPT ASTRONAUT INPUTS OF TIG,DELV(LV)
026489,000032: # CALL IMU STATUS CHECK ROUTINE (R02)
026490,000033: # DISPLAY TIME TO GO, APOGEE, PERIGEE, DELV(MAG), MGA AT IGN
026491,000034: # REQUEST BURN PROGRAM
026492,000035:
026493,000036: # CALLING SEQUENCE VIA JOB FROM V37
026494,000037:
026495,000038: # EXIT VIA V37 CALL OR TO GOTOPOOH (V34E)
026496,000039:
026497,000040: # SUBROUTINE CALLS - FLAGUP, PHASCHNG, BANKCALL, ENDOFJOB, GOFLASH, GOFLASHR
026498,000041: # GOPERF3R, INTPRET, BLANKET, GOTOPOOH, R02BOTH, S30.1,
026499,000042: # TTG/N35, MIDGIM, DISPMGA
026500,000043:
026501,000044: # ERASABLE INITIALIZATION - STATE VECTOR
026502,000045:
026503,000046: # OUTPUT - RINIT, VINIT, +MGA, VTIG, RTIG, DELVSIN, DELVSAB, DELVSLV, HAPO,
026504,000047: # HPER, TTOGO
026505,000048:
026506,000049: # DEBRIS - A, L, MPAC, PUSHLIST
026507,000050:
026508,000051: 32,3000 BANK 32
026509,000052: 35,2000 SETLOC P30S
026510,000053: 35,2000 BANK
026511,000054: 35,2000 E4,1652 EBANK= +MGA
026512,000055: 35,2000 COUNT* $$/P30
026513,000056: 35,2000 05504 P30 TC UPFLAG # SET UPDATE FLAG
026514,000057: 35,2001 00027 ADRES UPDATFLG
026515,000058: 35,2002 05504 TC UPFLAG # SET TRACK FLAG
026516,000059: 35,2003 00031 ADRES TRACKFLG
026517,000060:
026518,000061: 35,2004 32032 P30N33 CAF V06N33 # T OF IGN
026519,000062: 35,2005 03621 TC VNPOOH # RETURNS ON PROCEED, POOH ON TERMINATE
026520,000063:
026521,000064: 35,2006 33636 CAF V06N81 # DISPLAY DELTA V (LV)
026522,000065: 35,2007 03621 TC VNPOOH # REDISPLAY ON RECYCLE
026523,000066:
026524,000067: 35,2010 05516 TC DOWNFLAG # RESET UPDATE FLAG
026525,000068: 35,2011 00027 ADRES UPDATFLG
026526,000069: 35,2012 06042 TC INTPRET
026527,000070: 35,2013 77624 CALL
026528,000071: 35,2014 70000 S30.1
026529,000072: 35,2015 43014 SET SET
026530,000073: 35,2016 00470 UPDATFLG
026531,000074: 35,2017 01067 XDELVFLG
026532,000075: 35,2020 77776 EXIT
026533,000076: 35,2021 32033 PARAM30 CAF V06N42 # DISPLAY APOGEE,PERIGEE,DELTA V
Page 620 |
026535,000078: 35,2022 03621 TC VNPOOH
026536,000079:
026537,000080: 35,2023 06042 TC INTPRET
026538,000081: 35,2024 77614 SET
026539,000082: 35,2025 01071 FINALFLG
026540,000083: 35,2026 77624 REVN1645 CALL
026541,000084: 35,2027 73515 VN1645
026542,000085: 35,2030 77650 GOTO # COMES HERE ON RECYCLE RESPONSE
026543,000086: 35,2031 72026 REVN1645
026544,000087:
026545,000088: 35,2032 01441 V06N33 VN 0633
026546,000089: 35,2033 01452 V06N42 VN 0642
026547,000090:
Page 621 |
026549,000092: # PROGRAM DESCRIPTION S30.1 DATE 9NOV66
026550,000093: # MOD NO 1 LOG SECTION P30,P37
026551,000094: # MOD BY RAMA AIYAWAR **
026552,000095:
026553,000096: # FUNCTIONAL DESCRIPTION
026554,000097: # BASED ON STORED TARGET PARAMETERS (R OF IGNITION (RTIG), V OF
026555,000098: # IGNITION (VTIG), TIME OF IGNITION (TIG)), COMPUTE PERIGEE ALTITUDE
026556,000099: # APOGEE ALTITUDE AND DELTAV REQUIRED (DELVSIN).
026557,000100:
026558,000101: # CALLING SEQUENCE
026559,000102: # L CALL
026560,000103: # L+1 S30.1
026561,000104:
026562,000105: # NORMAL EXIT MODE
026563,000106: # AT L+2 OR CALLING SEQUENCE (GOTO L+2)
026564,000107:
026565,000108: # SUBROUTINES CALLED
026566,000109: # LEMPREC
026567,000110: # PERIAPO
026568,000111:
026569,000112: # ALARM OR ABORT EXIT MODES
026570,000113: # NONE
026571,000114:
026572,000115: # ERASABLE INITIALIZATION REQUIRED
026573,000116: # TIG TIME OF IGNITION DP B28CS
026574,000117: # DELVSLV SPECIFIED DELTA-V INLOCAL VERT.
026575,000118: # COORDS. OF ACTIVE VEHICLE AT
026576,000119: # TIME OF IGNITION VECTOR B+7 METERS/CS
026577,000120:
026578,000121: # OUTPUT
026579,000122: # RTIG POSITION AT TIG VECTOR B+29 METERS
026580,000123: # VTIG VELOCITY AT TIG VECTOR B+29 METERS/CS
026581,000124: # PDL 4D APOGEE ALTITUDE DP B+29 M, B+27 METERS.
026582,000125: # HAPO APOGEE ALTITUDE DP B+29 METERS
026583,000126: # PDL 8D PERIGEE ALTITUDE DP B+29 M, B+27 METERS.
026584,000127: # HPER PERIGEE ALTITUDE DP B+29 METERS
026585,000128: # DELVSIN SPECIFIED DELTA-V IN INERTIAL
026586,000129: # COORD. OF ACTIVE VEHICLE AT
026587,000130: # TIME OF IGNITION VECTOR B+7 METERS/CS
026588,000131: # DELVSAB MAG. OF DELVSIN VECTOR B+7 METERS/CS
026589,000132:
026590,000133: # DEBRIS QTEMP TEMP.ERASABLE
026591,000134: # QPRET, MPAC
026592,000135: # PUSHLIST
026593,000136:
026594,000137: 34,2000 SETLOC P30S1
026595,000138: 34,2000 BANK
026596,000139:
026597,000140: 34,2000 COUNT* $$/S30S
026598,000141:
026599,000142: 34,2000 71220 S30.1 STQ DLOAD
026600,000143: 34,2001 03632 QTEMP
026601,000144: 34,2002 03442 TIG # TIME IGNITION SCALED AT 2(+28)CS
026602,000145: 34,2003 34041 STCALL TDEC1
026603,000146: 34,2004 27056 LEMPREC # ENCKE ROUTINE FOR LEM
026604,000147:
026605,000148: 34,2005 67175 VLOAD SXA,2
Page 622 |
026607,000150: 34,2006 00001 RATT
026608,000151: 34,2007 02777 RTX2
026609,000152: 34,2010 03642 STORE RTIG # RADIUS VECTOR AT IGNITION TIME
026610,000153: 34,2011 57456 UNIT VCOMP
026611,000154: 34,2012 27656 STOVL DELVSIN # ZRF/LV IN DELVSIN SCALED AT 2
026612,000155: 34,2013 00007 VATT # VELOCITY VECTOR AT TIG, SCALED 2(7) M/CS
026613,000156: 34,2014 03650 STORE VTIG
026614,000157: 34,2015 53435 VXV UNIT
026615,000158: 34,2016 03642 RTIG
026616,000159: 34,2017 66001 SETPD SXA,1
026617,000160: 34,2020 00001 0
026618,000161: 34,2021 02776 RTX1
026619,000162: 34,2022 47206 PUSH VXV # YRF/LV PDL 0 SCALED AT 2
026620,000163: 34,2023 03656 DELVSIN
026621,000164: 34,2024 63372 VSL1 PDVL
026622,000165: 34,2025 63315 PDVL PDVL # YRF/LV PDL 6 SCALED AT 2
026623,000166: 34,2026 03656 DELVSIN # ZRF/LV PDL 12D SCALED AT 2
026624,000167: 34,2027 03434 DELVSLV
026625,000168: 34,2030 76505 VXM VSL1
026626,000169: 34,2031 00001 0
026627,000170: 34,2032 03656 STORE DELVSIN # DELTAV IN INERT. COOR. SCALED TO B+7M/CS
026628,000171: 34,2033 77646 ABVAL
026629,000172: 34,2034 27664 STOVL DELVSAB # DELTA V MAG.
026630,000173: 34,2035 03642 RTIG # (FOR PERIAPO)
026631,000174: 34,2036 53315 PDVL VAD # VREQUIRED = VTIG + DELVSIN (FOR PERIAPO)
026632,000175: 34,2037 03650 VTIG
026633,000176: 34,2040 03656 DELVSIN
026634,000177: 34,2041 77624 CALL
026635,000178: 34,2042 46341 PERIAPO1
026636,000179: 34,2043 77624 CALL
026637,000180: 34,2044 46451 SHIFTR1 # RESCALE IF NEEDED
026638,000181: 34,2045 77624 CALL # LIMIT DISPLAY TO 9999.9 N. MI.
026639,000182: 34,2046 45636 MAXCHK
026640,000183: 34,2047 16321 STODL HPER # PERIGEE ALT 2(29) METERS, FOR DISPLAY
026641,000184: 34,2050 00005 4D
026642,000185: 34,2051 77624 CALL
026643,000186: 34,2052 46451 SHIFTR1 # RESCALE IF NEEDED
026644,000187: 34,2053 77624 CALL # LIMIT DISPLAY TO 9999.9 N. MI.
026645,000188: 34,2054 45636 MAXCHK
026646,000189: 34,2055 36317 STCALL HAPO # APOGEE ALT 2(29) METERS, FOR DISPLAY
026647,000190: 34,2056 03632 QTEMP
026648,000191:
026649,000192:
End of include-file P30,P37.agc. Parent file is MAIN.agc