Source Code

These source-code files are part of a reconstructed copy of Luminary 163, the first (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 173. Changes between revision 163 and 173 were backed out, as described by Luminary memos 157 and 158. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 163 listing would be different.

Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

002277,000002:                                                                                                  ## Copyright:   Public domain.
002278,000003:                                                                                                  ## Filename:    INPUT_OUTPUT_CHANNEL_BIT_DESCRIPTIONS.agc
002279,000004:                                                                                                  ## Purpose:     A section of Luminary revision 163.
002280,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
002281,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
002282,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
002283,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
002284,000009:                                                                                                  ##              Luminary 173, as well as Luminary memos 157 amd 158.
002285,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
002286,000011:                                                                                                  ##              exactly match those specified for Luminary 163 in NASA
002287,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
002288,000013:                                                                                                  ##              that the reconstruction is correct.
002289,000014:                                                                                                  ## Reference:   pp. 55-61
002290,000015:                                                                                                  ## Assembler:   yaYUL
002291,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
002292,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
002293,000018:                                                                                                  ## Mod history: 2019-08-21 MAS  Created from Luminary 173.
002294,000019: 

Page 55

002296,000021: 
002297,000022: 
002298,000023:                                                                                                  #  *** CHANNEL DESCRIPTIONSF WORDS ARE ALLOCATED IN ERASABLE ASSIGNMENTS ***
002299,000024: 
002300,000025: 
002301,000026:                                                                                                  #      CHANNEL 1    IDENTICAL TO COMPUTER REGISTER L (0001)
002302,000027: 
002303,000028: 
002304,000029:                                                                                                  #      CHANNEL 2    IDENTICAL TO COMPUTER REGISTER Q (0002)
002305,000030: 
002306,000031: 
002307,000032:                                                                                                  #      CHANNEL 3    HISCALAR; INPUT CHANNEL; MOST SIGNIFICANT 14 BITS FROM 33 STAGE BINARY COUNTER. SCALE
002308,000033:                                                                                                  #                   FACTOR IS B23 IN CSEC, SO MAX VALUE ABOUT 23.3 HOURS AND LEAST SIGNIFICANT BIT 5.12 SECS.
002309,000034: 
002310,000035: 
002311,000036:                                                                                                  #      CHANNEL 4    LOSCALAR; INPUT CHANNEL; NEXT MOST SIGNIFICANT 14 BITS FROM THE 33 STAGE BINARY COUNTER
002312,000037:                                                                                                  #                   ASSOCIATED WITH CHANNEL 3. SCALE FACTOR IS B9 IN  CSEC. SO MAX VAL IS 5.12 SEC AND LEAST
002313,000038:                                                                                                  #                   SIGNIFICANT BIT IS 1/3200 SEC. SCALE FACTOR OF D.P. WORD WITH CHANNEL 3 IS B23 CSEC.
002314,000039: 
002315,000040: 
002316,000041:                                                                                                  #      CHANNEL 5    PYJETS; OUTPUT CHANNEL; PITCH RCS JET CONTROL.   (REACTION CONTROL SYSTEM) USES BITS 1-8.
002317,000042: 
002318,000043: 
002319,000044:                                                                                                  #      CHANNEL 6    ROLLJETS; OUTPUT CHANNEL; ROLL RCS JET CONTROL.   (REACTION CONTROL SYSTEM) USES BIT 1-8.
002320,000045: 
002321,000046: 
002322,000047:                                                                                                  #      CHANNEL 7    SUPERBNK; OUTPUT CHANNEL; NOT RESET BY RESTART;   FIXED EXTENSION BITS USED TO SELECT THE
002323,000048:                                                                                                  #                   APPROPRIATE FIXED MEMORY BANK IF FBANK IS 30 OCTAL OR MORE. USES BITS 5-7.
002324,000049: 
002325,000050: 
002326,000051:                                                                                                  #      CHANNEL 10   OUTO; OUTPUT CHANNEL; REGISTER USED TO TRANSMIT   LATCHING-RELAY DRIVING INFORMATION FOR
002327,000052:                                                                                                  #                   THE DISPLAY SYSTEM. BITS 15-12 ARE SET TO THE ROW NUMBER (1-14 OCTAL) OF THE RELAY TO BE
002328,000053:                                                                                                  #                   CHANGED AND BITS 11-1 CONTAIN THE REQUIRED SETTINGS FOR THE RELAYS IN THE ROW.
002329,000054: 
002330,000055: 
002331,000056:                                                                                                  #      CHANNEL 11   DSALMOUT; OUTPUT CHANNEL; REGISTER WHOSE BITS ARE USED FOR ENGINE ON-OFF CONTROL AND TO
002332,000057:                                                                                                  #                   DRIVE INDIVIDUAL INDICATORS OF THE DISPLAY SYSTEM. BITS 1-7 ARE A RELAYS.
002333,000058: 
002334,000059:                                                                                                  #        BIT 1      ISS WARNING
002335,000060: 
002336,000061:                                                                                                  #        BIT 2      LIGHT COMPUTER ACTIVITY LAMP
002337,000062: 
002338,000063:                                                                                                  #        BIT 3      LIGHT UPLINK ACTIVITY LAMP
002339,000064: 
002340,000065:                                                                                                  #        BIT 4      LIGHT TEMP CAUTION LAMP
002341,000066: 
002342,000067:                                                                                                  #        BIT 5      LIGHT KEYBOARD RELEASE LAMP
002343,000068: 
002344,000069:                                                                                                  #        BIT 6      FLASH VERB AND NOUN LAMPS
002345,000070: 
002346,000071:                                                                                                  #        BIT 7      LIGHT OPERATOR ERROR LAMP
002347,000072: 

Page 56

002349,000074:                                                                                                  #        BIT 8      SPARE
002350,000075: 
002351,000076:                                                                                                  #        BIT 9      TEST CONNECTOR OUTBIT
002352,000077: 
002353,000078:                                                                                                  #        BIT 10     CAUTION RESET
002354,000079: 
002355,000080:                                                                                                  #        BIT 11     SPARE
002356,000081: 
002357,000082:                                                                                                  #        BIT 12     SPARE
002358,000083: 
002359,000084:                                                                                                  #        BIT 13     ENGINE ON
002360,000085: 
002361,000086:                                                                                                  #        BIT 14     ENGINE OFF
002362,000087: 
002363,000088:                                                                                                  #        BIT 15     SPARE
002364,000089: 
002365,000090: 
002366,000091:                                                                                                  #      CHANNEL 12   CHAN12; OUTPUT CHANNEL; BITS USED TO DRIVE NAVIGATION AND SPAECRAFT HARDWARE
002367,000092: 
002368,000093:                                                                                                  #        BIT 1      ZERO RR CDU; CDU'S GIVE RRADAR INFORMATION FOR LM
002369,000094: 
002370,000095:                                                                                                  #        BIT 2      ENABLE CDU RADAR ERROR COUNTERS
002371,000096: 
002372,000097:                                                                                                  #        BIT 3      NOT USED
002373,000098: 
002374,000099:                                                                                                  #        BIT 4      COARSE ALIGN ENABLE OF IMU
002375,000100: 
002376,000101:                                                                                                  #        BIT 5      ZERO IMU CDU'S
002377,000102: 
002378,000103:                                                                                                  #        BIT 6      ENABLE IMU ERROR COUNTER, CDU ERROR COUNTER.
002379,000104: 
002380,000105:                                                                                                  #        BIT 7      SPARE
002381,000106: 
002382,000107:                                                                                                  #        BIT 8      DISPLAY INERTIAL DATA
002383,000108: 
002384,000109:                                                                                                  #        BIT 9      -PITCH GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002385,000110: 
002386,000111:                                                                                                  #        BIT 10     +PITCH GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002387,000112: 
002388,000113:                                                                                                  #        BIT 11     -ROLL GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002389,000114: 
002390,000115:                                                                                                  #        BIT 12     +ROLL GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
002391,000116: 
002392,000117:                                                                                                  #        BIT 13     LR POSITION 2 COMMAND
002393,000118: 
002394,000119:                                                                                                  #        BIT 14     ENABLE RENDESVOUS RADAR LOCK-ON;AUTO ANGLE TRACK'G
002395,000120: 
002396,000121:                                                                                                  #        BIT 15     ISS TURN ON DELAY COMPLETE
002397,000122: 
002398,000123: 

Page 57

002400,000125:                                                                                                  #      CHANNEL 13   CHAN13; OUTPUT CHANNEL
002401,000126: 
002402,000127:                                                                                                  #        BIT 1      RADAR C         PROPER SETTING OF THE A,B,C MATRIX
002403,000128:                                                                                                  #        BIT 2      RADAR B         SELECTS CERTAIN RADAR
002404,000129:                                                                                                  #        BIT 3      RADAR A         PARAMETERS TO BE READ.
002405,000130: 
002406,000131:                                                                                                  #        BIT 4      RADAR ACTIVITY
002407,000132: 
002408,000133:                                                                                                  #        BIT 5      NOT USED (CONNECTS AN ALTERNATE INPUT TO UPLINK)
002409,000134: 
002410,000135:                                                                                                  #        BIT 6      SPARE
002411,000136: 
002412,000137:                                                                                                  #        BIT 7      DOWNLINK TELEMETRY WORD ORDER CODE BIT
002413,000138: 
002414,000139:                                                                                                  #        BIT 8      RHC COUNTER ENABLE (READ HAND CONTROLLER ANGLES)
002415,000140: 
002416,000141:                                                                                                  #        BIT 9      START RHC READ INTO COUNTERS IF BIT 8 SET
002417,000142: 
002418,000143:                                                                                                  #        BIT 10     TEST ALARMS, TEST DSKY LIGHTS
002419,000144: 
002420,000145:                                                                                                  #        BIT 11     ENABLE STANDBY
002421,000146: 
002422,000147:                                                                                                  #        BIT 12     RESET TRAP 31-A    ALWAYS APPEAR TO BE SET TO 0
002423,000148: 
002424,000149:                                                                                                  #        BIT 13     RESET TRAP 31-B    ALWAYS APPEAR TO BE SET TO 0
002425,000150: 
002426,000151:                                                                                                  #        BIT 14     RESET TRAP 32      ALWAYS APPEAR TO BE SET TO 0
002427,000152: 
002428,000153:                                                                                                  #        BIT 15     ENABLE T6 RUPT
002429,000154: 
002430,000155: 
002431,000156:                                                                                                  #      CHANNEL 14   CHAN14; OUTPUT CHANNEL; USED TO CONTROL COMPUTER  COUNTER CELLS (CDU,GYRO,SPACECRAFT FUNC.
002432,000157: 
002433,000158:                                                                                                  #        BIT 1      OUTLINK ACTIVITY (NOT USED)
002434,000159: 
002435,000160:                                                                                                  #        BIT 2      ALTITUDE RATE OR ALTITIDE SELECTOR
002436,000161: 
002437,000162:                                                                                                  #        BIT 3      ALTITUDE METER ACTIVITY
002438,000163: 
002439,000164:                                                                                                  #        BIT 4      THRUST DRIVE ACTIVITY FOR DESCENT ENGINE
002440,000165: 
002441,000166:                                                                                                  #        BIT 5      SPARE
002442,000167: 
002443,000168:                                                                                                  #        BIT 6      GYRO ENABLE POWER FOR PULSES
002444,000169: 
002445,000170:                                                                                                  #        BIT 7      GYRO SELECT B    PAIR OF BITS IDENTIFIES AXIS OF -
002446,000171:                                                                                                  #        BIT 8      GYRO SELECT A    GYRO SYSTEM TO BE TORQUED.
002447,000172: 
002448,000173:                                                                                                  #        BIT 9      GYRO TORQUING COMMAND IN NEGATIVE DIRECTION
002449,000174: 

Page 58

002451,000176:                                                                                                  #        BIT 10     GYRO ACTIVITY
002452,000177: 
002453,000178:                                                                                                  #        BIT 11     DRIVE CDU S
002454,000179: 
002455,000180:                                                                                                  #        BIT 12     DRIVE CDU T
002456,000181: 
002457,000182:                                                                                                  #        BIT 13     DRIVE CDU Z
002458,000183: 
002459,000184:                                                                                                  #        BIT 14     DRIVE CDU Y
002460,000185: 
002461,000186:                                                                                                  #        BIT 15     DRIVE CDU X
002462,000187: 
002463,000188: 
002464,000189:                                                                                                  #      CHANNEL 15   MNKEYIN; INPUT CHANNEL;KEY CODE INPUT FROM KEYBOARD OF DSKY, SENSED BY PROGRAM WHEN
002465,000190:                                                                                                  #                   PROGRAM INTERRUPT #5 IS RECEIVED. USES BITS 5-1
002466,000191: 
002467,000192: 
002468,000193:                                                                                                  #      CHANNEL 16   NAVKEYIN; INPUT CHANNEL; OPTICS MARK INFORMATION AND NAVIGA ION PANEL DSKY (CM) OR THRUST
002469,000194:                                                                                                  #                   CONTROL (LM) SENSED BY PROGRAM WHEN PROGRAM INTER-RUPT #6 IS RECEIVED.  USES BITS 3-7 ONLY.
002470,000195: 
002471,000196:                                                                                                  #        BIT 1      NOT ASSIGNED
002472,000197: 
002473,000198:                                                                                                  #        BIT 2      NOT ASSIGNED
002474,000199: 
002475,000200:                                                                                                  #        BIT 3      OPTICS X-AXIS MARK SIGNAL FOR ALIGN OPTICAL TSCOPE
002476,000201: 
002477,000202:                                                                                                  #        BIT 4      OPTICS Y-AXIS MARK SIGNAL FOR AOT
002478,000203: 
002479,000204:                                                                                                  #        BIT 5      OPTICS MARK REJECT SIGNAL
002480,000205: 
002481,000206:                                                                                                  #        BIT 6      DESCENT+ ; CREW DESIRED SLOWING RATE OF DESCENT
002482,000207: 
002483,000208:                                                                                                  #        BIT 7      DESCENT- ; CREW DESIRED SPEEDING UP RATE OF D'CENT
002484,000209: 
002485,000210: 
002486,000211:                                                                                                  #      NOTE: ALL BITS IN CHANNELS 30-33 ARE INVERTED AS SENSED BY THE  PROGRAM, SO THAT A VALUE OF ZERO MEANS
002487,000212:                                                                                                  #      THAT THE INDICATED SIGNAL IS PRESENT.
002488,000213: 
002489,000214: 
002490,000215:                                                                                                  #      CHANNEL 30   INPUT CHANNEL
002491,000216: 
002492,000217:                                                                                                  #        BIT 1      ABORT WITH DESCENT STAGE
002493,000218: 
002494,000219:                                                                                                  #        BIT 2         UNUSED
002495,000220: 
002496,000221:                                                                                                  #        BIT 3      ENGINE ARMED SIGNAL
002497,000222: 
002498,000223:                                                                                                  #        BIT 4      ABORT WITH ASCENT ENGINE STAGE
002499,000224: 
002500,000225:                                                                                                  #        BIT 5      AUTO THROTTLE; COMPUTER CONTROL OF DESCENT ENGINE

Page 59

002502,000227:                                                                                                  #        BIT 6      DISPLAY INERTIAL DATA
002503,000228: 
002504,000229:                                                                                                  #        BIT 7      RR CDU FAIL
002505,000230: 
002506,000231:                                                                                                  #        BIT 8      SPARE
002507,000232: 
002508,000233:                                                                                                  #        BIT 9      IMU OPERATE WITH NO MALFUNCTION
002509,000234: 
002510,000235:                                                                                                  #        BIT 10     LM COMPUTER (NOT AGS) HAS CONTROL OF LM
002511,000236: 
002512,000237:                                                                                                  #        BIT 11     IMU CAGE COMMAND TO DRIVE IMU GIMBAL ANGLES TO 0.
002513,000238: 
002514,000239:                                                                                                  #        BIT 12     IMU CDU FAIL (MALFUNCTION OF IMU CDU,S)
002515,000240: 
002516,000241:                                                                                                  #        BIT 13     IMU FAIL (MALFUNCTION OF IMU STABILIZATION LOOPS)
002517,000242: 
002518,000243:                                                                                                  #        BIT 14     ISS TURN ON REQUESTED
002519,000244: 
002520,000245:                                                                                                  #        BIT 15     TEMPERATURE OF STABLE MEMBER WITHIN DESIGN LIMITS
002521,000246: 
002522,000247: 
002523,000248:                                                                                                  #      CHANNEL 31   INPUT CHANNEL; BITS ASSOCIATED WITH THE ATTITUDE  CONTROLLER, TRANSLATIONAL CONTROLLER,
002524,000249:                                                                                                  #                   AND SPACECRAFT ATTITUDE CONTROL; USED BY RCS DAP
002525,000250: 
002526,000251:                                                                                                  #        BIT 1      ROTATION (BY RHC) COMMANDED IN POSITIVE PITCH DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
002527,000252:                                                                                                  #                   ALSO POSITIVE ELEVATION CHANGE FOR LANDING POINT  DESIGNATOR
002528,000253: 
002529,000254:                                                                                                  #        BIT 2      AS BIT 1 EXCEPT NEGATIVE PITCH AND ELEVATION
002530,000255: 
002531,000256:                                                                                                  #        BIT 3      ROTATION (BY RHC) COMMANDED IN POSITIVE YAW DIRECTION; MUST BE IN MINUMUM IMPULSE MODE.
002532,000257: 
002533,000258:                                                                                                  #        BIT 4      AS BIT 3 EXCEPT NEGATIVE YAW
002534,000259: 
002535,000260:                                                                                                  #        BIT 5      ROTATION (BY RHC) COMMANDED IN POSITIVE ROLL DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
002536,000261:                                                                                                  #                   ALSO POSITIVE AZIMUTH CHANGE FOR LANDING POINT DESIGNATOR
002537,000262: 
002538,000263:                                                                                                  #        BIT 6      AS BIT 5 EXCEPT NEGATIVE ROLL AND AZIMUTH
002539,000264: 
002540,000265:                                                                                                  #        BIT 7      TRANSLATION IN +X DIRECTION COMMANDED BY THC
002541,000266: 
002542,000267:                                                                                                  #        BIT 8      TRANSLATION IN -X DIRECTION COMMANDED BY THC
002543,000268: 
002544,000269:                                                                                                  #        BIT 9      TRANSLATION IN +Y DIRECTION COMMANDED BY THC
002545,000270: 
002546,000271:                                                                                                  #        BIT 10     TRANSLATION IN -Y DIRECTION COMMANDED BY THC
002547,000272: 
002548,000273:                                                                                                  #        BIT 11     TRANSLATION IN +Z DIRECTION COMMANDED BY THC
002549,000274: 
002550,000275:                                                                                                  #        BIT 12     TRANSLATION IN -Z DIRECTION COMMANDED BY THC

Page 60

002552,000277: 
002553,000278:                                                                                                  #        BIT 13     ATTITUDE HOLD MODE ON SCS MODE CONTROL SWITCH
002554,000279: 
002555,000280:                                                                                                  #        BIT 14     AUTO STABILIZATION OF ATTITUDE ON SCS MODE SWITCH
002556,000281: 
002557,000282:                                                                                                  #        BIT 15     ATTITUDE CONTROL OUT OF DETENT (RHC NOT IN NEUTRAL
002558,000283: 
002559,000284: 
002560,000285:                                                                                                  #      CHANNEL 32      INPUT CHANNEL.
002561,000286: 
002562,000287:                                                                                                  #        BIT 1         THRUSTERS 2 & 4 DISABLED BY CREW
002563,000288: 
002564,000289:                                                                                                  #        BIT 2         THRUSTERS 5 & 8 DISABLED BY CREW
002565,000290: 
002566,000291:                                                                                                  #        BIT 3         THRUSTERS 1 & 3 DISABLED BY CREW
002567,000292: 
002568,000293:                                                                                                  #        BIT 4         THRUSTERS 6 & 7 DISABLED BY CREW
002569,000294: 
002570,000295:                                                                                                  #        BIT 5         THRUSTERS 14 & 16 DISABLED BY CREW
002571,000296: 
002572,000297:                                                                                                  #        BIT 6         THRUSTERS 13 & 15 DISABLED BY CREW
002573,000298: 
002574,000299:                                                                                                  #        BIT 7         THRUSTERS 9  & 12 DISABLED BY CREW
002575,000300: 
002576,000301:                                                                                                  #        BIT 8         THRUSTERS 10 & 11 DISABLED BY CREW
002577,000302: 
002578,000303:                                                                                                  #        BIT 9         DESCENT ENGINE GIMBALS DISABLED BY CREW
002579,000304: 
002580,000305:                                                                                                  #        BIT 10        APPARENT DESCENT ENGINE GIMBAL FAILURE
002581,000306: 
002582,000307:                                                                                                  #        BIT 14     INDICATES PROCEED KEY IS DEPRESSED
002583,000308: 
002584,000309: 
002585,000310:                                                                                                  #      CHANNEL 33   CHAN33; INPUT CHANNEL; FOR HARDWARE STATUS AND COMMAND INFORMATION. BITS 15-11 ARE FLIP-
002586,000311:                                                                                                  #                   FLOP BITS RESET BY A CHANNEL "WRITE" COMMAND THAT ARE RESET BY A RESTART & BY T4RUPT LOOP.
002587,000312: 
002588,000313:                                                                                                  #        BIT 1      SPARE
002589,000314: 
002590,000315:                                                                                                  #        BIT 2      RR AUTO-POWER ON
002591,000316: 
002592,000317:                                                                                                  #        BIT 3      RR RANGE LOW SCALE
002593,000318: 
002594,000319:                                                                                                  #        BIT 4      RR DATA GOOD
002595,000320: 
002596,000321:                                                                                                  #        BIT 5      LR RANGE DATA GOOD
002597,000322: 
002598,000323:                                                                                                  #        BIT 6      LR POS1
002599,000324: 
002600,000325:                                                                                                  #        BIT 7      LR POS2
002601,000326: 

Page 61

002603,000328:                                                                                                  #        BIT 8      LR VEL DATA GOOD
002604,000329: 
002605,000330:                                                                                                  #        BIT 9      LR RANGE LOW SCALE
002606,000331: 
002607,000332:                                                                                                  #        BIT 10     BLOCK UPLINK INPUT
002608,000333: 
002609,000334:                                                                                                  #        BIT 11     UPLINK TOO FAST
002610,000335: 
002611,000336:                                                                                                  #        BIT 12     DOWNLINK TOO FAST
002612,000337: 
002613,000338:                                                                                                  #        BIT 13     PIPA FAIL
002614,000339: 
002615,000340:                                                                                                  #        BIT 14     WARNING OF REPEATED ALARMS: RESTART,COUNTER FAIL, VOLTAGE FAIL,AND SCALAR DOUBLE.
002616,000341: 
002617,000342:                                                                                                  #        BIT 15     LGC OSCILLATOR STOPPED
002618,000343: 
002619,000344: 
002620,000345:                                                                                                  #     CHANNEL 34    DNT M1; OUTPUT CHANNEL; DOWNLINK 1  FIRST OF TWO WORDS SERIALIZATION.
002621,000346:                                                                                                  #     CHANNEL 35    DNT M2; OUTPUT CHANNEL DOWNLINK 2 SOCOND OF TWO   WORDS SERIALIZATION.

End of include-file INPUT_OUTPUT_CHANNEL_BIT_DESCRIPTIONS.agc.  Parent file is MAIN.agc