Source Code

These source code files are an attempted reconstruction of Sundance revision 306, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

001368,000002:                                                                                                  ## Copyright:   Public domain.
001369,000003:                                                                                                  ## Filename:    INPUT_OUTPUT_CHANNEL_BIT_DESCRIPTIONS.agc
001370,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
001371,000005:                                                                                                  ##              as closely as possible with available information. Sundance
001372,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
001373,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
001374,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
001375,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
001376,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
001377,000011:                                                                                                  ##              or the Sundance GSOPs.
001378,000012:                                                                                                  ## Assembler:   yaYUL
001379,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
001380,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
001381,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
001382,000016: 
001383,000017: 
001384,000018: 
001385,000019:                                                                                                  #  *** CHANNEL DESCRIPTIONSF WORDS ARE ALLOCATED IN ERASABLE ASSIGNMENTS ***
001386,000020: 
001387,000021:                                                                                                  #      CHANNEL 1     IDENTICAL TO COMPUTER REGISTER L (0001)
001388,000022: 
001389,000023: 
001390,000024:                                                                                                  #      CHANNEL 2     IDENTICAL TO COMPUTER REGISTER Q (0002)
001391,000025: 
001392,000026: 
001393,000027:                                                                                                  #      CHANNEL 3     HISCALAR; INPUT CHANNEL; MOST SIGNIFICANT 14 BITS FROM 33 STAGE BINARY COUNTER. SCALE
001394,000028:                                                                                                  #                    FACTOR IS B23 IN CSEC, SO MAX VALUE ABOUT 23.3 HOURS AND LEAST SIGNIFICANT BIT 5.12 SECS.
001395,000029: 
001396,000030: 
001397,000031:                                                                                                  #      CHANNEL 4     LOSCALAR; INPUT CHANNEL; NEXT MOST SIGNIFICANT 14 BITS FROM THE 33 STAGE BINARY COUNTER
001398,000032:                                                                                                  #                    ASSOCIATED WITH CHANNEL 3. SCALE FACTOR IS B9 IN  CSEC. SO MAX VAL IS 5.12 SEC AND LEAST
001399,000033:                                                                                                  #                    SIGNIFICANT BIT IS 1/3200 SEC. SCALE FACTOR OF D.P. WORD WITH CHANNEL 3 IS B23 CSEC.
001400,000034: 
001401,000035: 
001402,000036:                                                                                                  #      CHANNEL 5     PYJETS; OUTPUT CHANNEL; PITCH RCS JET CONTROL.   (REACTION CONTROL SYSTEM) USES BITS 1-8.
001403,000037: 
001404,000038: 
001405,000039:                                                                                                  #      CHANNEL 6     ROLLJETS; OUTPUT CHANNEL; ROLL RCS JET CONTROL.   (REACTION CONTROL SYSTEM) USES BIT 1-8.
001406,000040: 
001407,000041: 
001408,000042:                                                                                                  #      CHANNEL 7     SUPERBNK; OUTPUT CHANNEL; NOT RESET BY RESTART;   FIXED EXTENSION BITS USED TO SELECT THE
001409,000043:                                                                                                  #                    APPROPRIATE FIXED MEMORY BANK IF FBANK IS 30 OCTAL OR MORE. USES BITS 5-7.
001410,000044: 
001411,000045: 
001412,000046:                                                                                                  #      CHANNEL 10    OUTO; OUTPUT CHANNEL; REGISTER USED TO TRANSMIT   LATCHING-RELAY DRIVING INFORMATION FOR
001413,000047:                                                                                                  #                    THE DISPLAY SYSTEM. BITS 15-12 ARE SET TO THE ROW NUMBER (1-14 OCTAL) OF THE RELAY TO BE
001414,000048:                                                                                                  #                    CHANGED AND BITS 11-1 CONTAIN THE REQUIRED SETTINGS FOR THE RELAYS IN THE ROW.
001415,000049: 
001416,000050: 
001417,000051:                                                                                                  #      CHANNEL 11    DSALMOUT; OUTPUT CHANNEL; REGISTER WHOSE BITS ARE USED FOR ENGINE ON-OFF CONTROL AND TO
001418,000052:                                                                                                  #                    DRIVE INDIVIDUAL INDICATORS OF THE DISPLAY SYSTEM. BITS 1-7 ARE A RELAYS.
001419,000053: 
001420,000054:                                                                                                  #        BIT 1       ISS WARNING
001421,000055: 
001422,000056:                                                                                                  #        BIT 2       LIGHT COMPUTER ACTIVITY LAMP
001423,000057: 
001424,000058:                                                                                                  #        BIT 3       LIGHT UPLINK ACTIVITY LAMP
001425,000059: 
001426,000060:                                                                                                  #        BIT 4       LIGHT TEMP CAUTION LAMP
001427,000061: 
001428,000062:                                                                                                  #        BIT 5       LIGHT KEYBOARD RELEASE LAMP
001429,000063: 
001430,000064:                                                                                                  #        BIT 6       FLASH VERB AND NOUN LAMPS
001431,000065: 
001432,000066:                                                                                                  #        BIT 7       LIGHT OPERATOR ERROR LAMP
001433,000067: 
001434,000068: 
001435,000069:                                                                                                  #        BIT 8       SPARE
001436,000070: 
001437,000071:                                                                                                  #        BIT 9       TEST CONNECTOR OUTBIT
001438,000072: 
001439,000073:                                                                                                  #        BIT 10      CAUTION RESET
001440,000074: 
001441,000075:                                                                                                  #        BIT 11      SPARE
001442,000076: 
001443,000077:                                                                                                  #        BIT 12      SPARE
001444,000078: 
001445,000079:                                                                                                  #        BIT 13      ENGINE ON
001446,000080: 
001447,000081:                                                                                                  #        BIT 14      ENGINE OFF
001448,000082: 
001449,000083:                                                                                                  #        BIT 15      SPARE
001450,000084: 
001451,000085: 
001452,000086:                                                                                                  #      CHANNEL 12    CHAN12; OUTPUT CHANNEL; BITS USED TO DRIVE NAVIGATION AND SPAECRAFT HARDWARE
001453,000087: 
001454,000088:                                                                                                  #        BIT 1       ZERO RR CDU; CDU'S GIVE RRADAR INFORMATION FOR LM
001455,000089: 
001456,000090:                                                                                                  #        BIT 2       ENABLE CDU RADAR ERROR COUNTERS
001457,000091: 
001458,000092:                                                                                                  #        BIT 3       NOT USED
001459,000093: 
001460,000094:                                                                                                  #        BIT 4       COARSE ALIGN ENABLE OF IMU
001461,000095: 
001462,000096:                                                                                                  #        BIT 5       ZERO IMU CDU'S
001463,000097: 
001464,000098:                                                                                                  #        BIT 6       ENABLE IMU ERROR COUNTER, CDU ERROR COUNTER.
001465,000099: 
001466,000100:                                                                                                  #        BIT 7       SPARE
001467,000101: 
001468,000102:                                                                                                  #        BIT 8       DISPLAY INERTIAL DATA
001469,000103: 
001470,000104:                                                                                                  #        BIT 9       -PITCH GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
001471,000105: 
001472,000106:                                                                                                  #        BIT 10      +PITCH GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
001473,000107: 
001474,000108:                                                                                                  #        BIT 11      -ROLL GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
001475,000109: 
001476,000110:                                                                                                  #        BIT 12      +ROLL GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
001477,000111: 
001478,000112:                                                                                                  #        BIT 13      LR POSITION 2 COMMAND
001479,000113: 
001480,000114:                                                                                                  #        BIT 14      ENABLE RENDESVOUS RADAR LOCK-ON;AUTO ANGLE TRACK'G
001481,000115: 
001482,000116:                                                                                                  #        BIT 15      ISS TURN ON DELAY COMPLETE
001483,000117: 
001484,000118: 
001485,000119:                                                                                                  #      CHANNEL 13    CHAN13; OUTPUT CHANNEL
001486,000120: 
001487,000121:                                                                                                  #        BIT 1       RADAR C         PROPER SETTING OF THE A,B,C MATRIX
001488,000122:                                                                                                  #        BIT 2       RADAR B         SELECTS CERTAIN RADAR
001489,000123:                                                                                                  #        BIT 3       RADAR A         PARAMETERS TO BE READ.
001490,000124: 
001491,000125:                                                                                                  #        BIT 4       RADAR ACTIVITY
001492,000126: 
001493,000127:                                                                                                  #        BIT 5       NOT USED (CONNECTS AN ALTERNATE INPUT TO UPLINK)
001494,000128: 
001495,000129:                                                                                                  #        BIT 6       BLOCK INPUTS TO UPLINK CELL
001496,000130: 
001497,000131:                                                                                                  #        BIT 7       DOWNLINK TELEMETRY WORD ORDER CODE BIT
001498,000132: 
001499,000133:                                                                                                  #        BIT 8       RHC COUNTER ENABLE (READ HAND CONTROLLER ANGLES)
001500,000134: 
001501,000135:                                                                                                  #        BIT 9       START RHC READ INTO COUNTERS IF BIT 8 SET
001502,000136: 
001503,000137:                                                                                                  #        BIT 10      TEST ALARMS, TEST DSKY LIGHTS
001504,000138: 
001505,000139:                                                                                                  #        BIT 11      ENABLE STANDBY
001506,000140: 
001507,000141:                                                                                                  #        BIT 12      RESET TRAP 31-A    ALWAYS APPEAR TO BE SET TO 0
001508,000142: 
001509,000143:                                                                                                  #        BIT 13      RESET TRAP 31-B    ALWAYS APPEAR TO BE SET TO 0
001510,000144: 
001511,000145:                                                                                                  #        BIT 14      RESET TRAP 32      ALWAYS APPEAR TO BE SET TO 0
001512,000146: 
001513,000147:                                                                                                  #        BIT 15      ENABLE T6 RUPT
001514,000148: 
001515,000149: 
001516,000150:                                                                                                  #      CHANNEL 14    CHAN14; OUTPUT CHANNEL; USED TO CONTROL COMPUTER COUNTER CELLS (CDU,GYRO,SPACECRAFT FUNC.
001517,000151: 
001518,000152:                                                                                                  #        BIT 1       OUTLINK ACTIVITY (NOT USED)
001519,000153: 
001520,000154:                                                                                                  #        BIT 2       ALTITUDE RATE OR ALTITIDE SELECTOR
001521,000155: 
001522,000156:                                                                                                  #        BIT 3       ALTITUDE METER ACTIVITY
001523,000157: 
001524,000158:                                                                                                  #        BIT 4       THRUST DRIVE ACTIVITY FOR DESCENT ENGINE
001525,000159: 
001526,000160:                                                                                                  #        BIT 5       SPARE
001527,000161: 
001528,000162:                                                                                                  #        BIT 6       GYRO ENABLE POWER FOR PULSES
001529,000163: 
001530,000164:                                                                                                  #        BIT 7       GYRO SELECT B    PAIR OF BITS IDENTIFIES AXIS OF -
001531,000165:                                                                                                  #        BIT 8       GYRO SELECT A    GYRO SYSTEM TO BE TORQUED.
001532,000166: 
001533,000167:                                                                                                  #        BIT 9       GYRO TORQUING COMMAND IN NEGATIVE DIRECTION
001534,000168: 
001535,000169: 
001536,000170:                                                                                                  #        BIT 10      GYRO ACTIVITY
001537,000171: 
001538,000172:                                                                                                  #        BIT 11      DRIVE CDU S
001539,000173: 
001540,000174:                                                                                                  #        BIT 12      DRIVE CDU T
001541,000175: 
001542,000176:                                                                                                  #        BIT 13      DRIVE CDU Z
001543,000177: 
001544,000178:                                                                                                  #        BIT 14      DRIVE CDU Y
001545,000179: 
001546,000180:                                                                                                  #        BIT 15      DRIVE CDU X
001547,000181: 
001548,000182: 
001549,000183:                                                                                                  #      CHANNEL 15    MNKEYIN; INPUT CHANNEL;KEY CODE INPUT FROM KEYBOARD OF DSKY, SENSED BY PROGRAM WHEN
001550,000184:                                                                                                  #                    PROGRAM INTERRUPT #5 IS RECEIVED. USES BITS 5-1
001551,000185: 
001552,000186: 
001553,000187:                                                                                                  #      CHANNEL 16    NAVKEYIN; INPUT CHANNEL; OPTICS MARK INFORMATION AND NAVIGA ION PANEL DSKY (CM) OR THRUST
001554,000188:                                                                                                  #                    CONTROL (LM) SENSED BY PROGRAM WHEN PROGRAM INTER-RUPT #6 IS RECEIVED. USES BITS 3-7 ONLY.
001555,000189: 
001556,000190:                                                                                                  #        BIT 1       NOT ASSIGNED
001557,000191: 
001558,000192:                                                                                                  #        BIT 2       NOT ASSIGNED
001559,000193: 
001560,000194:                                                                                                  #        BIT 3       OPTICS X-AXIS MARK SIGNAL FOR ALIGN OPTICAL TSCOPE
001561,000195: 
001562,000196:                                                                                                  #        BIT 4       OPTICS Y-AXIS MARK SIGNAL FOR AOT
001563,000197: 
001564,000198:                                                                                                  #        BIT 5       OPTICS MARK REJECT SIGNAL
001565,000199: 
001566,000200:                                                                                                  #        BIT 6       DESCENT+ ; CREW DESIRED SLOWING RATE OF DESCENT
001567,000201: 
001568,000202:                                                                                                  #        BIT 7       DESCENT- ; CREW DESIRED SPEEDING UP RATE OF D'CENT
001569,000203: 
001570,000204: 
001571,000205:                                                                                                  #      NOTE: ALL BITS IN CHANNELS 30-33 ARE INVERTED AS SENSED BY THE PROGRAM, SO THAT A VALUE OF ZERO MEANS
001572,000206:                                                                                                  #      THAT THE INDICATED SIGNAL IS PRESENT.
001573,000207: 
001574,000208: 
001575,000209:                                                                                                  #      CHANNEL 30    INPUT CHANNEL
001576,000210: 
001577,000211:                                                                                                  #        BIT 1       ABORT WITH DESCENT STAGE
001578,000212: 
001579,000213:                                                                                                  #        BIT 2       STAGE VERIFY SIGNAL
001580,000214: 
001581,000215:                                                                                                  #        BIT 3       ENGINE ARMED SIGNAL
001582,000216: 
001583,000217:                                                                                                  #        BIT 4       ABORT WITH ASCENT ENGINE STAGE
001584,000218: 
001585,000219:                                                                                                  #        BIT 5       AUTO THROTTLE; COMPUTER CONTROL OF DESCENT ENGINE
001586,000220: 
001587,000221:                                                                                                  #        BIT 6       DISPLAY INERTIAL DATA
001588,000222: 
001589,000223:                                                                                                  #        BIT 7       RR CDU FAIL
001590,000224: 
001591,000225:                                                                                                  #        BIT 8       SPARE
001592,000226: 
001593,000227:                                                                                                  #        BIT 9       IMU OPERATE WITH NO MALFUNCTION
001594,000228: 
001595,000229:                                                                                                  #        BIT 10      LM COMPUTER (NOT AGS) HAS CONTROL OF LM
001596,000230: 
001597,000231:                                                                                                  #        BIT 11      IMU CAGE COMMAND TO DRIVE IMU GIMBAL ANGLES TO 0.
001598,000232: 
001599,000233:                                                                                                  #        BIT 12      IMU CDU FAIL (MALFUNCTION OF IMU CDU,S)
001600,000234: 
001601,000235:                                                                                                  #        BIT 13      IMU FAIL (MALFUNCTION OF IMU STABILIZATION LOOPS)
001602,000236: 
001603,000237:                                                                                                  #        BIT 14      ISS TURN ON REQUESTED
001604,000238: 
001605,000239:                                                                                                  #        BIT 15      TEMPERATURE OF STABLE MEMBER WITHIN DESIGN LIMITS
001606,000240: 
001607,000241: 
001608,000242:                                                                                                  #      CHANNEL 31    INPUT CHANNEL; BITS ASSOCIATED WITH THE ATTITUDE  CONTROLLER, TRANSLATIONAL CONTROLLER,
001609,000243:                                                                                                  #                    AND SPACECRAFT ATTITUDE CONTROL; USED BY RCS DAP
001610,000244: 
001611,000245:                                                                                                  #        BIT 1       ROTATION (BY RHC) COMMANDED IN POSITIVE PITCH DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
001612,000246:                                                                                                  #                    ALSO POSITIVE ELEVATION CHANGE FOR LANDING POINT  DESIGNATOR
001613,000247: 
001614,000248:                                                                                                  #        BIT 2       AS BIT 1 EXCEPT NEGATIVE PITCH AND ELEVATION
001615,000249: 
001616,000250:                                                                                                  #        BIT 3       ROTATION (BY RHC) COMMANDED IN POSITIVE YAW DIRECTION; MUST BE IN MINUMUM IMPULSE MODE.
001617,000251: 
001618,000252:                                                                                                  #        BIT 4       AS BIT 3 EXCEPT NEGATIVE YAW
001619,000253: 
001620,000254:                                                                                                  #        BIT 5       ROTATION (BY RHC) COMMANDED IN POSITIVE ROLL DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
001621,000255:                                                                                                  #                    ALSO POSITIVE AZIMUTH CHANGE FOR LANDING POINT DESIGNATOR
001622,000256: 
001623,000257:                                                                                                  #        BIT 6       AS BIT 5 EXCEPT NEGATIVE ROLL AND AZIMUTH
001624,000258: 
001625,000259:                                                                                                  #        BIT 7       TRANSLATION IN +X DIRECTION COMMANDED BY THC
001626,000260: 
001627,000261:                                                                                                  #        BIT 8       TRANSLATION IN -X DIRECTION COMMANDED BY THC
001628,000262: 
001629,000263:                                                                                                  #        BIT 9       TRANSLATION IN +Y DIRECTION COMMANDED BY THC
001630,000264: 
001631,000265:                                                                                                  #        BIT 10      TRANSLATION IN -Y DIRECTION COMMANDED BY THC
001632,000266: 
001633,000267:                                                                                                  #        BIT 11      TRANSLATION IN +Z DIRECTION COMMANDED BY THC
001634,000268: 
001635,000269:                                                                                                  #        BIT 12      TRANSLATION IN -Z DIRECTION COMMANDED BY THC
001636,000270: 
001637,000271: 
001638,000272:                                                                                                  #        BIT 13      ATTITUDE HOLD MODE ON SCS MODE CONTROL SWITCH
001639,000273: 
001640,000274:                                                                                                  #        BIT 14      AUTO STABILIZATION OF ATTITUDE ON SCS MODE SWITCH
001641,000275: 
001642,000276:                                                                                                  #        BIT 15      ATTITUDE CONTROL OUT OF DETENT (RHC NOT IN NEUTRAL
001643,000277: 
001644,000278: 
001645,000279:                                                                                                  #      CHANNEL 32       INPUT CHANNEL.
001646,000280: 
001647,000281:                                                                                                  #        BIT 1          THRUSTERS 2 & 4 DISABLED BY CREW
001648,000282: 
001649,000283:                                                                                                  #        BIT 2          THRUSTERS 5 & 8 DISABLED BY CREW
001650,000284: 
001651,000285:                                                                                                  #        BIT 3          THRUSTERS 1 & 3 DISABLED BY CREW
001652,000286: 
001653,000287:                                                                                                  #        BIT 4          THRUSTERS 6 & 7 DISABLED BY CREW
001654,000288: 
001655,000289:                                                                                                  #        BIT 5          THRUSTERS 14 & 16 DISABLED BY CREW
001656,000290: 
001657,000291:                                                                                                  #        BIT 6          THRUSTERS 13 & 15 DISABLED BY CREW
001658,000292: 
001659,000293:                                                                                                  #        BIT 7          THRUSTERS 9  & 12 DISABLED BY CREW
001660,000294: 
001661,000295:                                                                                                  #        BIT 8          THRUSTERS 10 & 11 DISABLED BY CREW
001662,000296: 
001663,000297:                                                                                                  #        BIT 9          DESCENT ENGINE GIMBALS DISABLED BY CREW
001664,000298: 
001665,000299:                                                                                                  #        BIT 10         APPARENT DESCENT ENGINE GIMBAL FAILURE
001666,000300: 
001667,000301:                                                                                                  #        BIT 14      INDICATES PROCEED KEY IS DEPRESSED
001668,000302: 
001669,000303: 
001670,000304:                                                                                                  #      CHANNEL 33    CHAN33; INPUT CHANNEL; FOR HARDWARE STATUS AND COMMAND INFORMATION. BITS 15-11 ARE FLIP-
001671,000305:                                                                                                  #                    FLOP BITS RESET BY A CHANNEL "WRITE" COMMAND THAT ARE RESET BY A RESTART & BY T4RUPT LOOP.
001672,000306: 
001673,000307:                                                                                                  #        BIT 1       SPARE
001674,000308: 
001675,000309:                                                                                                  #        BIT 2       RR AUTO-POWER ON
001676,000310: 
001677,000311:                                                                                                  #        BIT 3       RR RANGE LOW SCALE
001678,000312: 
001679,000313:                                                                                                  #        BIT 4       RR DATA GOOD
001680,000314: 
001681,000315:                                                                                                  #        BIT 5       LR RANGE DATA GOOD
001682,000316: 
001683,000317:                                                                                                  #        BIT 6       LR POS1
001684,000318: 
001685,000319:                                                                                                  #        BIT 7       LR POS2
001686,000320: 
001687,000321: 
001688,000322:                                                                                                  #        BIT 8       LR VEL DATA GOOD
001689,000323: 
001690,000324:                                                                                                  #        BIT 9       LR RANGE LOW SCALE
001691,000325: 
001692,000326:                                                                                                  #        BIT 10      BLOCK UPLINK INPUT
001693,000327: 
001694,000328:                                                                                                  #        BIT 11      UPLINK TOO FAST
001695,000329: 
001696,000330:                                                                                                  #        BIT 12      DOWNLINK TOO FAST
001697,000331: 
001698,000332:                                                                                                  #        BIT 13      PIPA FAIL
001699,000333: 
001700,000334:                                                                                                  #        BIT 14      WARNING OF REPEATED ALARMS: RESTART,COUNTER FAIL, VOLTAGE FAIL,AND SCALAR DOUBLE.
001701,000335: 
001702,000336:                                                                                                  #        BIT 15      LGC OSCILLATOR STOPPED
001703,000337: 
001704,000338: 
001705,000339:                                                                                                  #      CHANNEL 34    DNT M1; OUTPUT CHANNEL; DOWNLINK 1  FIRST OF TWO WORDS SERIALIZATION.
001706,000340:                                                                                                  #      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