Source Code
This source code is very close to the Apollo Guidance Computer software for the
Apollo 13 Lunar module. This revision of the Luminary 131 program is from December
of 1969, whereas there was a later revision in January of 1970, and still another
revision in February, which is the code that flew on the mission.
As far as this transcription is concerned, it was originally from a copy made in 1991 of
a printout from the collection of AGC developer Don Eyles for collector David Craig.
It was subsequently scanned by Gary Neff, reprocessed for online
presentation at the now-discontinued History of Recent Science and Technology (HRST) website
of MIT's Dibner Institute (the full-quality scans being discarded in the process),
and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a
high-quality replacement scan for a completely illegible page was later provided by Gary
Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many
errors to be introduced into the transcription. Accordingly, a second scan of the same physical
printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive,
and used to correct the transcription errors. All of the scanned materials mentioned,
as well as other Luminary 131 related material, are available online.
Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017,
so the two scans are not identical in that respect. The page-headings in the printout read, in part:GAP: ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091 17:53 DEC. 19, 1969Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together. |
002076,000002: ## Copyright: Public domain.
002077,000003: ## Filename: INPUT_OUTPUT_CHANNEL_BIT_DESCRIPTIONS.agc
002078,000004: ## Purpose: The main source file for Luminary 1C, revision 131.
002079,000005: ## It is part of the source code for the Lunar Module's (LM)
002080,000006: ## Apollo Guidance Computer (AGC) for Apollo 13.
002081,000007: ## Assembler: yaYUL
002082,000008: ## Reference: pp. 54-60
002083,000009: ## Contact: Ron Burkey <info@sandroid.org>.
002084,000010: ## Website: www.ibiblio.org/apollo/index.html
002085,000011: ## Mod history: 04/23/03 RSB. Began.
002086,000012: ## 05/14/05 RSB Corrected website reference above.
002087,000013: ## 2017-01-06 RSB Page numbers now agree with those on the
002088,000014: ## original hardcopy, as opposed to the PDF page
002089,000015: ## numbers in 1701.pdf.
002090,000016: ## 2017-02-12 RSB Proofed comment text using octopus/ProoferComments.
002091,000017: ## 2017-03-02 RSB OUT0 --> OUTO.
002092,000018:
Page 54 |
002094,000020:
002095,000021: # *** CHANNEL DESCRIPTIONSF WORDS ARE ALLOCATED IN ERASABLE ASSIGNMENTS ***
002096,000022:
002097,000023: # CHANNEL 1 IDENTICAL TO COMPUTER REGISTER L (0001)
002098,000024:
002099,000025: # CHANNEL 2 IDENTICAL TO COMPUTER REGISTER Q (0002)
002100,000026:
002101,000027: # CHANNEL 3 HISCALAR; INPUT CHANNEL; MOST SIGNIFICANT 14 BITS FROM 33 STAGE BINARY COUNTER. SCALE
002102,000028: # FACTOR IS B23 IN CSEC, SO MAX VALUE ABOUT 23.3 HOURS AND LEAST SIGNIFICANT BIT 5.12 SECS.
002103,000029:
002104,000030: # CHANNEL 4 LOSCALAR; INPUT CHANNEL; NEXT MOST SIGNIFICANT 14 BITS FROM THE 33 STAGE BINARY COUNTER
002105,000031: # ASSOCIATED WITH CHANNEL 3. SCALE FACTOR IS B9 IN CSEC. SO MAX VAL IS 5.12 SEC AND LEAST
002106,000032: # SIGNIFICANT BIT IS 1/3200 SEC. SCALE FACTOR OF D.P. WORD WITH CHANNEL 3 IS B23 CSEC.
002107,000033:
002108,000034: # CHANNEL 5 PYJETS; OUTPUT CHANNEL; PITCH RCS JET CONTROL. (REACTION CONTROL SYSTEM) USES BITS 1-8.
002109,000035:
002110,000036: # CHANNEL 6 ROLLJETS; OUTPUT CHANNEL; ROLL RCS JET CONTROL. (REACTION CONTROL SYSTEM) USES BIT 1-8.
002111,000037:
002112,000038: # CHANNEL 7 SUPERBNK; OUTPUT CHANNEL; NOT RESET BY RESTART; FIXED EXTENSION BITS USED TO SELECT THE
002113,000039: # APPROPRIATE FIXED MEMORY BANK IF FBANK IS 30 OCTAL OR MORE. USES BITS 5-7.
002114,000040:
002115,000041: # CHANNEL 10 OUTO; OUTPUT CHANNEL; REGISTER USED TO TRANSMIT LATCHING-RELAY DRIVING INFORMATION FOR
002116,000042: # THE DISPLAY SYSTEM. BITS 15-12 ARE SET TO THE ROW NUMBER (1-14 OCTAL) OF THE RELAY TO BE
002117,000043: # CHANGED AND BITS 11-1 CONTAIN THE REQUIRED SETTINGS FOR THE RELAYS IN THE ROW.
002118,000044:
002119,000045: # CHANNEL 11 DSALMOUT; OUTPUT CHANNEL; REGISTER WHOSE BITS ARE USED FOR ENGINE ON-OFF CONTROL AND TO
002120,000046: # DRIVE INDIVIDUAL INDICATORS OF THE DISPLAY SYSTEM. BITS 1-7 ARE A RELAYS.
002121,000047:
002122,000048: # BIT 1 ISS WARNING
002123,000049: # BIT 2 LIGHT COMPUTER ACTIVITY LAMP
002124,000050: # BIT 3 LIGHT UPLINK ACTIVITY LAMP
002125,000051: # BIT 4 LIGHT TEMP CAUTION LAMP
002126,000052: # BIT 5 LIGHT KEYBOARD RELEASE LAMP
002127,000053: # BIT 6 FLASH VERB AND NOUN LAMPS
002128,000054: # BIT 7 LIGHT OPERATOR ERROR LAMP
Page 55 |
002130,000056: # BIT 8 SPARE
002131,000057: # BIT 9 TEST CONNECTOR OUTBIT
002132,000058: # BIT 10 CAUTION RESET
002133,000059: # BIT 11 SPARE
002134,000060: # BIT 12 SPARE
002135,000061: # BIT 13 ENGINE ON
002136,000062: # BIT 14 ENGINE OFF
002137,000063: # BIT 15 SPARE
002138,000064:
002139,000065: # CHANNEL 12 CHAN12; OUTPUT CHANNEL; BITS USED TO DRIVE NAVIGATION AND SPAECRAFT HARDWARE
002140,000066:
002141,000067: # BIT 1 ZERO RR CDU; CDU'S GIVE RRADAR INFORMATION FOR LM
002142,000068: # BIT 2 ENABLE CDU RADAR ERROR COUNTERS
002143,000069: # BIT 3 NOT USED
002144,000070: # BIT 4 COARSE ALIGN ENABLE OF IMU
002145,000071: # BIT 5 ZERO IMU CDU'S
002146,000072: # BIT 6 ENABLE IMU ERROR COUNTER, CDU ERROR COUNTER.
002147,000073: # BIT 7 SPARE
002148,000074: # BIT 8 DISPLAY INERTIAL DATA
002149,000075: # BIT 9 -PITCH GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002150,000076: # BIT 10 +PITCH GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002151,000077: # BIT 11 -ROLL GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002152,000078: # BIT 12 +ROLL GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002153,000079: # BIT 13 LR POSITION 2 COMMAND
002154,000080: # BIT 14 ENABLE RENDESVOUS RADAR LOCK-ON; AUTO ANGLE TRACK'G
002155,000081: # BIT 15 ISS TURN ON DELAY COMPLETE
002156,000082:
Page 56 |
002158,000084: # CHANNEL 13 CHAN13; OUTPUT CHANNEL
002159,000085:
002160,000086: # BIT 1 RADAR C PROPER SETTING OF THE A,B,C MATRIX
002161,000087: # BIT 2 RADAR B SELECTS CERTAIN RADAR
002162,000088: # BIT 3 RADAR A PARAMETERS TO BE READ.
002163,000089: # BIT 4 RADAR ACTIVITY
002164,000090: # BIT 5 NOT USED (CONNECTS AN ALTERNATE INPUT TO UPLINK)
002165,000091: # BIT 6 SPARE
002166,000092: # BIT 7 DOWNLINK TELEMETRY WORD ORDER CODE BIT
002167,000093: # BIT 8 RHC COUNTER ENABLE (READ HAND CONTROLLER ANGLES)
002168,000094: # BIT 9 START RHC READ INTO COUNTERS IF BIT 8 SET
002169,000095: # BIT 10 TEST ALARMS, TEST DSKY LIGHTS
002170,000096: # BIT 11 ENABLE STANDBY
002171,000097: # BIT 12 RESET TRAP 31-A ALWAYS APPEAR TO BE SET TO 0
002172,000098: # BIT 13 RESET TRAP 31-B ALWAYS APPEAR TO BE SET TO 0
002173,000099: # BIT 14 RESET TRAP 32 ALWAYS APPEAR TO BE SET TO 0
002174,000100: # BIT 15 ENABLE T6 RUPT
002175,000101:
002176,000102: # CHANNEL 14 CHAN14; OUTPUT CHANNEL; USED TO CONTROL COMPUTER COUNTER CELLS (CDU, GYRO, SPACECRAFT FUNC.
002177,000103:
002178,000104: # BIT 1 OUTLINK ACTIVITY (NOT USED)
002179,000105: # BIT 2 ALTITUDE RATE OR ALTITIDE SELECTOR
002180,000106: # BIT 3 ALTITUDE METER ACTIVITY
002181,000107: # BIT 4 THRUST DRIVE ACTIVITY FOR DESCENT ENGINE
002182,000108: # BIT 5 SPARE
002183,000109: # BIT 6 GYRO ENABLE POWER FOR PULSES
002184,000110: # BIT 7 GYRO SELECT B PAIR OF BITS IDENTIFIES AXIS OF -
002185,000111: # BIT 8 GYRO SELECT A GYRO SYSTEM TO BE TORQUED.
002186,000112: # BIT 9 GYRO TORQUING COMMAND IN NEGATIVE DIRECTION
Page 57 |
002188,000114: # BIT 10 GYRO ACTIVITY
002189,000115: # BIT 11 DRIVE CDU S
002190,000116: # BIT 12 DRIVE CDU T
002191,000117: # BIT 13 DRIVE CDU Z
002192,000118: # BIT 14 DRIVE CDU Y
002193,000119: # BIT 15 DRIVE CDU X
002194,000120:
002195,000121: # CHANNEL 15 MNKEYIN; INPUT CHANNEL; KEY CODE INPUT FROM KEYBOARD OF DSKY, SENSED BY PROGRAM WHEN
002196,000122: # PROGRAM INTERRUPT #5 IS RECEIVED. USES BITS 5-1
002197,000123:
002198,000124: # CHANNEL 16 NAVKEYIN; INPUT CHANNEL; OPTICS MARK INFORMATION AND NAVIGA ION PANEL DSKY (CM) OR THRUST
002199,000125: # CONTROL (LM) SENSED BY PROGRAM WHEN PROGRAM INTER-RUPT #6 IS RECEIVED. USES BITS 3-7 ONLY.
002200,000126:
002201,000127: # BIT 1 NOT ASSIGNED
002202,000128: # BIT 2 NOT ASSIGNED
002203,000129: # BIT 3 OPTICS X-AXIS MARK SIGNAL FOR ALIGN OPTICAL TSCOPE
002204,000130: # BIT 4 OPTICS Y-AXIS MARK SIGNAL FOR AOT
002205,000131: # BIT 5 OPTICS MARK REJECT SIGNAL
002206,000132: # BIT 6 DESCENT+ ; CREW DESIRED SLOWING RATE OF DESCENT
002207,000133: # BIT 7 DESCENT- ; CREW DESIRED SPEEDING UP RATE OF D'CENT
002208,000134:
002209,000135: # NOTE: ALL BITS IN CHANNELS 30-33 ARE INVERTED AS SENSED BY THE PROGRAM, SO THAT A VALUE OF ZERO MEANS
002210,000136: # THAT THE INDICATED SIGNAL IS PRESENT.
002211,000137:
002212,000138: # CHANNEL 30 INPUT CHANNEL
002213,000139:
002214,000140: # BIT 1 ABORT WITH DESCENT STAGE
002215,000141: # BIT 2 UNUSED
002216,000142: # BIT 3 ENGINE ARMED SIGNAL
002217,000143: # BIT 4 ABORT WITH ASCENT ENGINE STAGE
002218,000144: # BIT 5 AUTO THROTTLE; COMPUTER CONTROL OF DESCENT ENGINE
Page 58 |
002220,000146: # BIT 6 DISPLAY INERTIAL DATA
002221,000147: # BIT 7 RR CDU FAIL
002222,000148: # BIT 8 SPARE
002223,000149: # BIT 9 IMU OPERATE WITH NO MALFUNCTION
002224,000150: # BIT 10 LM COMPUTER (NOT AGS) HAS CONTROL OF LM
002225,000151: # BIT 11 IMU CAGE COMMAND TO DRIVE IMU GIMBAL ANGLES TO 0.
002226,000152: # BIT 12 IMU CDU FAIL (MALFUNCTION OF IMU CDU,S)
002227,000153: # BIT 13 IMU FAIL (MALFUNCTION OF IMU STABILIZATION LOOPS)
002228,000154: # BIT 14 ISS TURN ON REQUESTED
002229,000155: # BIT 15 TEMPERATURE OF STABLE MEMBER WITHIN DESIGN LIMITS
002230,000156:
002231,000157: # CHANNEL 31 INPUT CHANNEL; BITS ASSOCIATED WITH THE ATTITUDE CONTROLLER, TRANSLATIONAL CONTROLLER,
002232,000158: # AND SPACECRAFT ATTITUDE CONTROL; USED BY RCS DAP
002233,000159:
002234,000160: # BIT 1 ROTATION (BY RHC) COMMANDED IN POSITIVE PITCH DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
002235,000161: # ALSO POSITIVE ELEVATION CHANGE FOR LANDING POINT DESIGNATOR
002236,000162: # BIT 2 AS BIT 1 EXCEPT NEGATIVE PITCH AND ELEVATION
002237,000163: # BIT 3 ROTATION (BY RHC) COMMANDED IN POSITIVE YAW DIRECTION; MUST BE IN MINUMUM IMPULSE MODE.
002238,000164: # BIT 4 AS BIT 3 EXCEPT NEGATIVE YAW
002239,000165: # BIT 5 ROTATION (BY RHC) COMMANDED IN POSITIVE ROLL DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
002240,000166: # ALSO POSITIVE AZIMUTH CHANGE FOR LANDING POINT DESIGNATOR
002241,000167: # BIT 6 AS BIT 5 EXCEPT NEGATIVE ROLL AND AZIMUTH
002242,000168: # BIT 7 TRANSLATION IN +X DIRECTION COMMANDED BY THC
002243,000169: # BIT 8 TRANSLATION IN -X DIRECTION COMMANDED BY THC
002244,000170: # BIT 9 TRANSLATION IN +Y DIRECTION COMMANDED BY THC
002245,000171: # BIT 10 TRANSLATION IN -Y DIRECTION COMMANDED BY THC
002246,000172: # BIT 11 TRANSLATION IN +Z DIRECTION COMMANDED BY THC
002247,000173: # BIT 12 TRANSLATION IN -Z DIRECTION COMMANDED BY THC
Page 59 |
002249,000175: # BIT 13 ATTITUDE HOLD MODE ON SCS MODE CONTROL SWITCH
002250,000176: # BIT 14 AUTO STABILIZATION OF ATTITUDE ON SCS MODE SWITCH
002251,000177: # BIT 15 ATTITUDE CONTROL OUT OF DETENT (RHC NOT IN NEUTRAL
002252,000178:
002253,000179: # CHANNEL 32 INPUT CHANNEL.
002254,000180:
002255,000181: # BIT 1 THRUSTERS 2 & 4 DISABLED BY CREW
002256,000182: # BIT 2 THRUSTERS 5 & 8 DISABLED BY CREW
002257,000183: # BIT 3 THRUSTERS 1 & 3 DISABLED BY CREW
002258,000184: # BIT 4 THRUSTERS 6 & 7 DISABLED BY CREW
002259,000185: # BIT 5 THRUSTERS 14 & 16 DISABLED BY CREW
002260,000186: # BIT 6 THRUSTERS 13 & 15 DISABLED BY CREW
002261,000187: # BIT 7 THRUSTERS 9 & 12 DISABLED BY CREW
002262,000188: # BIT 8 THRUSTERS 10 & 11 DISABLED BY CREW
002263,000189: # BIT 9 DESCENT ENGINE GIMBALS DISABLED BY CREW
002264,000190: # BIT 10 APPARENT DESCENT ENGINE GIMBAL FAILURE
002265,000191: # BIT 14 INDICATES PROCEED KEY IS DEPRESSED
002266,000192:
002267,000193: # CHANNEL 33 CHAN33; INPUT CHANNEL; FOR HARDWARE STATUS AND COMMAND INFORMATION. BITS 15-11 ARE FLIP-
002268,000194: # FLOP BITS RESET BY A CHANNEL "WRITE" COMMAND THAT ARE RESET BY A RESTART & BY T4RUPT LOOP.
002269,000195:
002270,000196: # BIT 1 SPARE
002271,000197: # BIT 2 RR AUTO-POWER ON
002272,000198: # BIT 3 RR RANGE LOW SCALE
002273,000199: # BIT 4 RR DATA GOOD
002274,000200: # BIT 5 LR RANGE DATA GOOD
002275,000201: # BIT 6 LR POS1
002276,000202: # BIT 7 LR POS2
Page 60 |
002278,000204: # BIT 8 LR VEL DATA GOOD
002279,000205: # BIT 9 LR RANGE LOW SCALE
002280,000206: # BIT 10 BLOCK UPLINK INPUT
002281,000207: # BIT 11 UPLINK TOO FAST
002282,000208: # BIT 12 DOWNLINK TOO FAST
002283,000209: # BIT 13 PIPA FAIL
002284,000210: # BIT 14 WARNING OF REPEATED ALARMS: RESTART, COUNTER FAIL, VOLTAGE FAIL, AND SCALAR DOUBLE.
002285,000211: # BIT 15 LGC OSCILLATOR STOPPED
002286,000212:
002287,000213: # CHANNEL 34 DNT M1; OUTPUT CHANNEL; DOWNLINK 1 FIRST OF TWO WORDS SERIALIZATION.
002288,000214:
002289,000215: # CHANNEL 35 DNT M2; OUTPUT CHANNEL DOWNLINK 2 SOCOND OF TWO WORDS SERIALIZATION.
002290,000216:
002291,000217:
End of include-file INPUT_OUTPUT_CHANNEL_BIT_DESCRIPTIONS.agc. Parent file is MAIN.agc