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. |
002117,000002: ## Copyright: Public domain.
002118,000003: ## Filename: INPUT_OUTPUT_CHANNEL_BIT_DESCRIPTIONS.agc
002119,000004: ## Purpose: Part of the reconstructed source code for LMY99 Rev 0,
002120,000005: ## otherwise known as Luminary Rev 99, the third release
002121,000006: ## of the Apollo Guidance Computer (AGC) software for Apollo 11.
002122,000007: ## It differs from LMY99 Rev 1 (the flown version) only in the
002123,000008: ## placement of a single label. The corrections shown here have
002124,000009: ## been verified to have the same bank checksums as AGC developer
002125,000010: ## Allan Klumpp's copy of Luminary Rev 99, and so are believed
002126,000011: ## to be accurate. This file is intended to be a faithful
002127,000012: ## recreation, except that the code format has been changed to
002128,000013: ## conform to the requirements of the yaYUL assembler rather than
002129,000014: ## the original YUL assembler.
002130,000015: ##
002131,000016: ## Assembler: yaYUL
002132,000017: ## Contact: Onno Hommes <ohommes@cmu.edu>.
002133,000018: ## Website: www.ibiblio.org/apollo.
002134,000019: ## Pages: 0054-0060
002135,000020: ## Mod history: 2009-05-14 OH Transcribed from page images.
002136,000021: ## 2016-12-13 RSB Proofed text comments with octopus/ProoferComments
002137,000022: ## and corrected the errors found.
002138,000023: ## 2017-03-02 RSB Corrected various comment-text errors found whilst
002139,000024: ## proofing Luminary 116.
002140,000025: ## 2017-08-01 MAS Created from LMY99 Rev 1.
002141,000026:
002142,000027: ## This source code has been transcribed or otherwise adapted from
002143,000028: ## digitized images of a hardcopy from the MIT Museum. The digitization
002144,000029: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
002145,000030: ## the Museum. Many thanks to both. The images (with suitable reduction
002146,000031: ## in storage size and consequent reduction in image quality as well) are
002147,000032: ## available online at www.ibiblio.org/apollo. If for some reason you
002148,000033: ## find that the images are illegible, contact me at info@sandroid.org
002149,000034: ## about getting access to the (much) higher-quality images which Paul
002150,000035: ## actually created.
002151,000036: ##
002152,000037: ## The code has been modified to match LMY99 Revision 0, otherwise
002153,000038: ## known as Luminary Revision 99, the Apollo 11 software release preceeding
002154,000039: ## the listing from which it was transcribed. It has been verified to
002155,000040: ## contain the same bank checksums as AGC developer Allan Klumpp's listing
002156,000041: ## of Luminary Revision 99 (for which we do not have scans).
002157,000042: ##
002158,000043: ## Notations on Allan Klumpp's listing read, in part:
002159,000044: ##
002160,000045: ## ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
002161,000046:
Page 54 |
002163,000048:
002164,000049: # *** CHANNEL DESCRIPTIONSF WORDS ARE ALLOCATED IN ERASABLE ASSIGNMENTS ***
002165,000050:
002166,000051: # CHANNEL 1 IDENTICAL TO COMPUTER REGISTER L (0001)
002167,000052:
002168,000053: # CHANNEL 2 IDENTICAL TO COMPUTER REGISTER Q (0002)
002169,000054:
002170,000055: # CHANNEL 3 HISCALAR; INPUT CHANNEL; MOST SIGNIFICANT 14 BITS FROM 33 STAGE BINARY COUNTER. SCALE
002171,000056: # FACTOR IS B23 IN CSEC, SO MAX VALUE ABOUT 23.3 HOURS AND LEAST SIGNIFICANT BIT 5.12 SECS.
002172,000057:
002173,000058: # CHANNEL 4 LOSCALAR; INPUT CHANNEL; NEXT MOST SIGNIFICANT 14 BITS FROM THE 33 STAGE BINARY COUNTER
002174,000059: # ASSOCIATED WITH CHANNEL 3. SCALE FACTOR IS B9 IN CSEC. SO MAX VAL IS 5.12 SEC AND LEAST
002175,000060: # SIGNIFICANT BIT IS 1/3200 SEC. SCALE FACTOR OF D.P. WORD WITH CHANNEL 3 IS B23 CSEC.
002176,000061:
002177,000062: # CHANNEL 5 PYJETS; OUTPUT CHANNEL; PITCH RCS JET CONTROL. (REACTION CONTROL SYSTEM) USES BITS 1-8.
002178,000063:
002179,000064: # CHANNEL 6 ROLLJETS; OUTPUT CHANNEL; ROLL RCS JET CONTROL. (REACTION CONTROL SYSTEM) USES BIT 1-8.
002180,000065:
002181,000066: # CHANNEL 7 SUPERBNK; OUTPUT CHANNEL; NOT RESET BY RESTART; FIXED EXTENSION BITS USED TO SELECT THE
002182,000067: # APPROPRIATE FIXED MEMORY BANK IF FBANK IS 30 OCTAL OR MORE. USES BITS 5-7.
002183,000068:
002184,000069: # CHANNEL 10 OUTO; OUTPUT CHANNEL; REGISTER USED TO TRANSMIT LATCHING-RELAY DRIVING INFORMATION FOR
002185,000070: # THE DISPLAY SYSTEM. BITS 15-12 ARE SET TO THE ROW NUMBER (1-14 OCTAL) OF THE RELAY TO BE
002186,000071: # CHANGED AND BITS 11-1 CONTAIN THE REQUIRED SETTINGS FOR THE RELAYS IN THE ROW.
002187,000072:
002188,000073: # CHANNEL 11 DSALMOUT; OUTPUT CHANNEL; REGISTER WHOSE BITS ARE USED FOR ENGINE ON-OFF CONTROL AND TO
002189,000074: # DRIVE INDIVIDUAL INDICATORS OF THE DISPLAY SYSTEM. BITS 1-7 ARE A RELAYS.
002190,000075:
002191,000076: # BIT 1 ISS WARNING
002192,000077: # BIT 2 LIGHT COMPUTER ACTIVITY LAMP
002193,000078: # BIT 3 LIGHT UPLINK ACTIVITY LAMP
002194,000079: # BIT 4 LIGHT TEMP CAUTION LAMP
002195,000080: # BIT 5 LIGHT KEYBOARD RELEASE LAMP
002196,000081: # BIT 6 FLASH VERB AND NOUN LAMPS
002197,000082: # BIT 7 LIGHT OPERATOR ERROR LAMP
Page 55 |
002199,000084: # BIT 8 SPARE
002200,000085: # BIT 9 TEST CONNECTOR OUTBIT
002201,000086: # BIT 10 CAUTION RESET
002202,000087: # BIT 11 SPARE
002203,000088: # BIT 12 SPARE
002204,000089: # BIT 13 ENGINE ON
002205,000090: # BIT 14 ENGINE OFF
002206,000091: # BIT 15 SPARE
002207,000092:
002208,000093: # CHANNEL 12 CHAN12; OUTPUT CHANNEL; BITS USED TO DRIVE NAVIGATION AND SPAECRAFT HARDWARE
002209,000094:
002210,000095: # BIT 1 ZERO RR CDU; CDU'S GIVE RRADAR INFORMATION FOR LM
002211,000096: # BIT 2 ENABLE CDU RADAR ERROR COUNTERS
002212,000097: # BIT 3 NOT USED
002213,000098: # BIT 4 COARSE ALIGN ENABLE OF IMU
002214,000099: # BIT 5 ZERO IMU CDU'S
002215,000100: # BIT 6 ENABLE IMU ERROR COUNTER, CDU ERROR COUNTER.
002216,000101: # BIT 7 SPARE
002217,000102: # BIT 8 DISPLAY INERTIAL DATA
002218,000103: # BIT 9 -PITCH GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002219,000104: # BIT 10 +PITCH GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002220,000105: # BIT 11 -ROLL GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002221,000106: # BIT 12 +ROLL GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002222,000107: # BIT 13 LR POSITION 2 COMMAND
002223,000108: # BIT 14 ENABLE RENDESVOUS RADAR LOCK-ON; AUTO ANGLE TRACK'G
002224,000109: # BIT 15 ISS TURN ON DELAY COMPLETE
002225,000110:
Page 56 |
002227,000112: # CHANNEL 13 CHAN13; OUTPUT CHANNEL
002228,000113:
002229,000114: # BIT 1 RADAR C PROPER SETTING OF THE A,B,C MATRIX
002230,000115: # BIT 2 RADAR B SELECTS CERTAIN RADAR
002231,000116: # BIT 3 RADAR A PARAMETERS TO BE READ.
002232,000117: # BIT 4 RADAR ACTIVITY
002233,000118: # BIT 5 NOT USED (CONNECTS AN ALTERNATE INPUT TO UPLINK)
002234,000119: # BIT 6 BLOCK INPUTS TO UPLINK CELL
002235,000120: # BIT 7 DOWNLINK TELEMETRY WORD ORDER CODE BIT
002236,000121: # BIT 8 RHC COUNTER ENABLE (READ HAND CONTROLLER ANGLES)
002237,000122: # BIT 9 START RHC READ INTO COUNTERS IF BIT 8 SET
002238,000123: # BIT 10 TEST ALARMS, TEST DSKY LIGHTS
002239,000124: # BIT 11 ENABLE STANDBY
002240,000125: # BIT 12 RESET TRAP 31-A ALWAYS APPEAR TO BE SET TO 0
002241,000126: # BIT 13 RESET TRAP 31-B ALWAYS APPEAR TO BE SET TO 0
002242,000127: # BIT 14 RESET TRAP 32 ALWAYS APPEAR TO BE SET TO 0
002243,000128: # BIT 15 ENABLE T6 RUPT
002244,000129:
002245,000130: # CHANNEL 14 CHAN14; OUTPUT CHANNEL; USED TO CONTROL COMPUTER COUNTER CELLS (CDU, GYRO, SPACECRAFT FUNC.
002246,000131:
002247,000132: # BIT 1 OUTLINK ACTIVITY (NOT USED)
002248,000133: # BIT 2 ALTITUDE RATE OR ALTITIDE SELECTOR
002249,000134: # BIT 3 ALTITUDE METER ACTIVITY
002250,000135: # BIT 4 THRUST DRIVE ACTIVITY FOR DESCENT ENGINE
002251,000136: # BIT 5 SPARE
002252,000137: # BIT 6 GYRO ENABLE POWER FOR PULSES
002253,000138: # BIT 7 GYRO SELECT B PAIR OF BITS IDENTIFIES AXIS OF -
002254,000139: # BIT 8 GYRO SELECT A GYRO SYSTEM TO BE TORQUED.
002255,000140: # BIT 9 GYRO TORQUING COMMAND IN NEGATIVE DIRECTION
Page 57 |
002257,000142: # BIT 10 GYRO ACTIVITY
002258,000143: # BIT 11 DRIVE CDU S
002259,000144: # BIT 12 DRIVE CDU T
002260,000145: # BIT 13 DRIVE CDU Z
002261,000146: # BIT 14 DRIVE CDU Y
002262,000147: # BIT 15 DRIVE CDU X
002263,000148:
002264,000149: # CHANNEL 15 MNKEYIN; INPUT CHANNEL; KEY CODE INPUT FROM KEYBOARD OF DSKY, SENSED BY PROGRAM WHEN
002265,000150: # PROGRAM INTERRUPT #5 IS RECEIVED. USES BITS 5-1
002266,000151:
002267,000152: # CHANNEL 16 NAVKEYIN; INPUT CHANNEL; OPTICS MARK INFORMATION AND NAVIGA ION PANEL DSKY (CM) OR THRUST
002268,000153: # CONTROL (LM) SENSED BY PROGRAM WHEN PROGRAM INTER-RUPT #6 IS RECEIVED. USES BITS 3-7 ONLY.
002269,000154:
002270,000155: # BIT 1 NOT ASSIGNED
002271,000156: # BIT 2 NOT ASSIGNED
002272,000157: # BIT 3 OPTICS X-AXIS MARK SIGNAL FOR ALIGN OPTICAL TSCOPE
002273,000158: # BIT 4 OPTICS Y-AXIS MARK SIGNAL FOR AOT
002274,000159: # BIT 5 OPTICS MARK REJECT SIGNAL
002275,000160: # BIT 6 DESCENT+ ; CREW DESIRED SLOWING RATE OF DESCENT
002276,000161: # BIT 7 DESCENT- ; CREW DESIRED SPEEDING UP RATE OF D'CENT
002277,000162:
002278,000163: # NOTE: ALL BITS IN CHANNELS 30-33 ARE INVERTED AS SENSED BY THE PROGRAM, SO THAT A VALUE OF ZERO MEANS
002279,000164: # THAT THE INDICATED SIGNAL IS PRESENT.
002280,000165:
002281,000166: # CHANNEL 30 INPUT CHANNEL
002282,000167:
002283,000168: # BIT 1 ABORT WITH DESCENT STAGE
002284,000169: # BIT 2 UNUSED
002285,000170: # BIT 3 ENGINE ARMED SIGNAL
002286,000171: # BIT 4 ABORT WITH ASCENT ENGINE STAGE
002287,000172: # BIT 5 AUTO THROTTLE; COMPUTER CONTROL OF DESCENT ENGINE
Page 58 |
002289,000174: # BIT 6 DISPLAY INERTIAL DATA
002290,000175: # BIT 7 RR CDU FAIL
002291,000176: # BIT 8 SPARE
002292,000177: # BIT 9 IMU OPERATE WITH NO MALFUNCTION
002293,000178: # BIT 10 LM COMPUTER (NOT AGS) HAS CONTROL OF LM
002294,000179: # BIT 11 IMU CAGE COMMAND TO DRIVE IMU GIMBAL ANGLES TO 0.
002295,000180: # BIT 12 IMU CDU FAIL (MALFUNCTION OF IMU CDU,S)
002296,000181: # BIT 13 IMU FAIL (MALFUNCTION OF IMU STABILIZATION LOOPS)
002297,000182: # BIT 14 ISS TURN ON REQUESTED
002298,000183: # BIT 15 TEMPERATURE OF STABLE MEMBER WITHIN DESIGN LIMITS
002299,000184:
002300,000185: # CHANNEL 31 INPUT CHANNEL; BITS ASSOCIATED WITH THE ATTITUDE CONTROLLER, TRANSLATIONAL CONTROLLER,
002301,000186: # AND SPACECRAFT ATTITUDE CONTROL; USED BY RCS DAP
002302,000187:
002303,000188: # BIT 1 ROTATION (BY RHC) COMMANDED IN POSITIVE PITCH DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
002304,000189: # ALSO POSITIVE ELEVATION CHANGE FOR LANDING POINT DESIGNATOR
002305,000190: # BIT 2 AS BIT 1 EXCEPT NEGATIVE PITCH AND ELEVATION
002306,000191: # BIT 3 ROTATION (BY RHC) COMMANDED IN POSITIVE YAW DIRECTION; MUST BE IN MINUMUM IMPULSE MODE.
002307,000192: # BIT 4 AS BIT 3 EXCEPT NEGATIVE YAW
002308,000193: # BIT 5 ROTATION (BY RHC) COMMANDED IN POSITIVE ROLL DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
002309,000194: # ALSO POSITIVE AZIMUTH CHANGE FOR LANDING POINT DESIGNATOR
002310,000195: # BIT 6 AS BIT 5 EXCEPT NEGATIVE ROLL AND AZIMUTH
002311,000196: # BIT 7 TRANSLATION IN +X DIRECTION COMMANDED BY THC
002312,000197: # BIT 8 TRANSLATION IN -X DIRECTION COMMANDED BY THC
002313,000198: # BIT 9 TRANSLATION IN +Y DIRECTION COMMANDED BY THC
002314,000199: # BIT 10 TRANSLATION IN -Y DIRECTION COMMANDED BY THC
002315,000200: # BIT 11 TRANSLATION IN +Z DIRECTION COMMANDED BY THC
002316,000201: # BIT 12 TRANSLATION IN -Z DIRECTION COMMANDED BY THC
Page 59 |
002318,000203: # BIT 13 ATTITUDE HOLD MODE ON SCS MODE CONTROL SWITCH
002319,000204: # BIT 14 AUTO STABILIZATION OF ATTITUDE ON SCS MODE SWITCH
002320,000205: # BIT 15 ATTITUDE CONTROL OUT OF DETENT (RHC NOT IN NEUTRAL
002321,000206:
002322,000207: # CHANNEL 32 INPUT CHANNEL.
002323,000208:
002324,000209: # BIT 1 THRUSTERS 2 & 4 DISABLED BY CREW
002325,000210: # BIT 2 THRUSTERS 5 & 8 DISABLED BY CREW
002326,000211: # BIT 3 THRUSTERS 1 & 3 DISABLED BY CREW
002327,000212: # BIT 4 THRUSTERS 6 & 7 DISABLED BY CREW
002328,000213: # BIT 5 THRUSTERS 14 & 16 DISABLED BY CREW
002329,000214: # BIT 6 THRUSTERS 13 & 15 DISABLED BY CREW
002330,000215: # BIT 7 THRUSTERS 9 & 12 DISABLED BY CREW
002331,000216: # BIT 8 THRUSTERS 10 & 11 DISABLED BY CREW
002332,000217: # BIT 9 DESCENT ENGINE GIMBALS DISABLED BY CREW
002333,000218: # BIT 10 APPARENT DESCENT ENGINE GIMBAL FAILURE
002334,000219: # BIT 14 INDICATES PROCEED KEY IS DEPRESSED
002335,000220:
002336,000221: # CHANNEL 33 CHAN33; INPUT CHANNEL; FOR HARDWARE STATUS AND COMMAND INFORMATION. BITS 15-11 ARE FLIP-
002337,000222: # FLOP BITS RESET BY A CHANNEL "WRITE" COMMAND THAT ARE RESET BY A RESTART & BY T4RUPT LOOP.
002338,000223:
002339,000224: # BIT 1 SPARE
002340,000225: # BIT 2 RR AUTO-POWER ON
002341,000226: # BIT 3 RR RANGE LOW SCALE
002342,000227: # BIT 4 RR DATA GOOD
002343,000228: # BIT 5 LR RANGE DATA GOOD
002344,000229: # BIT 6 LR POS1
002345,000230: # BIT 7 LR POS2
Page 60 |
002347,000232: # BIT 8 LR VEL DATA GOOD
002348,000233: # BIT 9 LR RANGE LOW SCALE
002349,000234: # BIT 10 BLOCK UPLINK INPUT
002350,000235: # BIT 11 UPLINK TOO FAST
002351,000236: # BIT 12 DOWNLINK TOO FAST
002352,000237: # BIT 13 PIPA FAIL
002353,000238: # BIT 14 WARNING OF REPEATED ALARMS: RESTART, COUNTER FAIL, VOLTAGE FAIL, AND SCALAR DOUBLE.
002354,000239: # BIT 15 LGC OSCILLATOR STOPPED
002355,000240:
002356,000241: # CHANNEL 34 DNT M1; OUTPUT CHANNEL; DOWNLINK 1 FIRST OF TWO WORDS SERIALIZATION.
002357,000242: # CHANNEL 35 DNT M2; OUTPUT CHANNEL DOWNLINK 2 SOCOND OF TWO WORDS SERIALIZATION.
002358,000243:
002359,000244:
End of include-file INPUT_OUTPUT_CHANNEL_BIT_DESCRIPTIONS.agc. Parent file is MAIN.agc