Source Code
This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the third release
of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 96 and 97.
A bug (which had been around since at least Apollo 10, Luminary 69) was
discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute
revision into Rev 1,
which is what actually flew rather than
the Rev 0 presented here. A hardcopy of Rev 0 is known to
exist — it belonged to AGC developer Allan Klumpp for many years — but
unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus
the code you see here had been reconstructed (we believe accurately) rather than
transcribed. The first step of the reconstruction of the Rev 0 source code was
the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection.
The process of reverting the active portion of the source code (i.e., other than
program comments) from Rev 1 to Rev 0 was very minor, consisting
only of moving the position of the STARTSB1 label in
FRESH START AND RESTART. Allan had previously given
us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums
identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read,
in part:GAP: ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051 A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here. |
015558,000002: ## Copyright: Public domain.
015559,000003: ## Filename: GIMBAL_LOCK_AVOIDANCE.agc
015560,000004: ## Purpose: Part of the reconstructed source code for LMY99 Rev 0,
015561,000005: ## otherwise known as Luminary Rev 99, the third release
015562,000006: ## of the Apollo Guidance Computer (AGC) software for Apollo 11.
015563,000007: ## It differs from LMY99 Rev 1 (the flown version) only in the
015564,000008: ## placement of a single label. The corrections shown here have
015565,000009: ## been verified to have the same bank checksums as AGC developer
015566,000010: ## Allan Klumpp's copy of Luminary Rev 99, and so are believed
015567,000011: ## to be accurate. This file is intended to be a faithful
015568,000012: ## recreation, except that the code format has been changed to
015569,000013: ## conform to the requirements of the yaYUL assembler rather than
015570,000014: ## the original YUL assembler.
015571,000015: ##
015572,000016: ## Assembler: yaYUL
015573,000017: ## Contact: Ron Burkey <info@sandroid.org>.
015574,000018: ## Website: www.ibiblio.org/apollo.
015575,000019: ## Pages: 364
015576,000020: ## Mod history: 2009-05-17 RSB Adapted from the corresponding
015577,000021: ## Luminary131 file, using page
015578,000022: ## images from Luminary 1A.
015579,000023: ## 2010-12-31 JL Fixed page number comment.
015580,000024: ## 2016-12-14 RSB Proofed text comments with octopus/ProoferComments
015581,000025: ## but no errors found.
015582,000026: ## 2017-08-01 MAS Created from LMY99 Rev 1.
015583,000027: ## 2017-08-22 RSB Fixed comment-text typo identified in ZERLINA 56.
015584,000028:
015585,000029: ## This source code has been transcribed or otherwise adapted from
015586,000030: ## digitized images of a hardcopy from the MIT Museum. The digitization
015587,000031: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
015588,000032: ## the Museum. Many thanks to both. The images (with suitable reduction
015589,000033: ## in storage size and consequent reduction in image quality as well) are
015590,000034: ## available online at www.ibiblio.org/apollo. If for some reason you
015591,000035: ## find that the images are illegible, contact me at info@sandroid.org
015592,000036: ## about getting access to the (much) higher-quality images which Paul
015593,000037: ## actually created.
015594,000038: ##
015595,000039: ## The code has been modified to match LMY99 Revision 0, otherwise
015596,000040: ## known as Luminary Revision 99, the Apollo 11 software release preceeding
015597,000041: ## the listing from which it was transcribed. It has been verified to
015598,000042: ## contain the same bank checksums as AGC developer Allan Klumpp's listing
015599,000043: ## of Luminary Revision 99 (for which we do not have scans).
015600,000044: ##
015601,000045: ## Notations on Allan Klumpp's listing read, in part:
015602,000046: ##
015603,000047: ## ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
015604,000048:
Page 364 |
015606,000050: 15,2050 BANK 15
015607,000051:
015608,000052: 22,2000 SETLOC KALCMON1
015609,000053: 22,2000 BANK
015610,000054:
015611,000055: # DETECTING GIMBAL LOCK
015612,000056: 22,2744 22,2744 LOCSKIRT EQUALS NOGIMLOC
015613,000057:
015614,000058: 22,2744 77614 NOGIMLOC SET
015615,000059: 22,2745 01074 CALCMAN3
015616,000060: 22,2746 70740 WCALC LXC,1 DLOAD*
015617,000061: 22,2747 01325 RATEINDX # CHOOSE THE DESIRED MANEUVER RATE
015618,000062: 22,2750 04772 ARATE,1 # FROM A LIST OF FOUR
015619,000063: 22,2751 45002 SR4 CALL # COMPUTE THE INCREMENTAL ROTATION MATRIX
015620,000064: 22,2752 44527 DELCOMP # DEL CORRESPONDING TO A 1 SEC ROTATION
015621,000065: # ABOUT COF
015622,000066: 22,2753 74343 DLOAD* VXSC
015623,000067: 22,2754 04772 ARATE,1
015624,000068: 22,2755 03271 COF
015625,000069: 22,2756 17326 STODL BRATE # COMPONENT MANEUVER RATES 45 DEG/SEC
015626,000070: 22,2757 03336 AM
015627,000071: 22,2760 55605 DMP DDV*
015628,000072: 22,2761 05002 ANGLTIME
015629,000073: 22,2762 04772 ARATE,1
015630,000074: 22,2763 77661 SR
015631,000075: 22,2764 20606 5
015632,000076: 22,2765 03334 STORE TM # MANEUVER EXECUTION TIME SCALED AS T2
015633,000077: 22,2766 77614 SETGO
015634,000078: 22,2767 01035 CALCMAN2 # 0(OFF) = CONTINUE MANEUVER
015635,000079: 22,2770 45010 NEWANGL +1 # 1(ON) = START MANEUVER
015636,000080:
015637,000081: # THE FOUR SELECTABLE FREE FALL MANEUVER RATES SELECTED BY
015638,000082: # LOADING RATEINDX WITH 0, 2, 4, 6, RESPECTIVELY
015639,000083:
015640,000084: 22,2771 00221 24255 ARATE 2DEC .0088888888 # = 0.2 DEG/SEC $ 22.5 DEG/SEC
015641,000085:
015642,000086: 22,2773 00554 02660 2DEC .0222222222 # = 0.5 DEG/SEC $ 22.5 DEG/SEC
015643,000087:
015644,000088: 22,2775 02660 13301 2DEC .0888888888 # = 2.0 DEG/SEC $ 22.5 DEG/SEC
015645,000089:
015646,000090: 22,2777 16161 30707 2DEC .4444444444 # = 10.0 DEG/SEC $ 22.5 DEG/SEC
015647,000091:
015648,000092: 22,3001 00003 04000 ANGLTIME 2DEC .0001907349 # = 100B-19 FUDGE FACTOR TO CONVERT
015649,000093: # MANEUVER ANGLE TO MANEUVER TIME
015650,000094:
015651,000095:
End of include-file GIMBAL_LOCK_AVOIDANCE.agc. Parent file is MAIN.agc