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. |
061416,000002: ## Copyright: Public domain.
061417,000003: ## Filename: T6-RUPT_PROGRAMS.agc
061418,000004: ## Purpose: Part of the reconstructed source code for LMY99 Rev 0,
061419,000005: ## otherwise known as Luminary Rev 99, the third release
061420,000006: ## of the Apollo Guidance Computer (AGC) software for Apollo 11.
061421,000007: ## It differs from LMY99 Rev 1 (the flown version) only in the
061422,000008: ## placement of a single label. The corrections shown here have
061423,000009: ## been verified to have the same bank checksums as AGC developer
061424,000010: ## Allan Klumpp's copy of Luminary Rev 99, and so are believed
061425,000011: ## to be accurate. This file is intended to be a faithful
061426,000012: ## recreation, except that the code format has been changed to
061427,000013: ## conform to the requirements of the yaYUL assembler rather than
061428,000014: ## the original YUL assembler.
061429,000015: ##
061430,000016: ## Assembler: yaYUL
061431,000017: ## Contact: Ron Burkey <info@sandroid.org>.
061432,000018: ## Website: www.ibiblio.org/apollo.
061433,000019: ## Pages: 1403-1405
061434,000020: ## Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
061435,000021: ## from the Luminary131/ file of the same
061436,000022: ## name, using Luminary099 page images.
061437,000023: ## 2016-12-18 RSB Proofed text comments with octopus/ProoferComments
061438,000024: ## and corrected the errors found.
061439,000025: ## 2017-08-01 MAS Created from LMY99 Rev 1.
061440,000026: ## 2017-08-29 MAS Fixed a comment-text error found while transcribing
061441,000027: ## Zerlina 56.
061442,000028:
061443,000029: ## This source code has been transcribed or otherwise adapted from
061444,000030: ## digitized images of a hardcopy from the MIT Museum. The digitization
061445,000031: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
061446,000032: ## the Museum. Many thanks to both. The images (with suitable reduction
061447,000033: ## in storage size and consequent reduction in image quality as well) are
061448,000034: ## available online at www.ibiblio.org/apollo. If for some reason you
061449,000035: ## find that the images are illegible, contact me at info@sandroid.org
061450,000036: ## about getting access to the (much) higher-quality images which Paul
061451,000037: ## actually created.
061452,000038: ##
061453,000039: ## The code has been modified to match LMY99 Revision 0, otherwise
061454,000040: ## known as Luminary Revision 99, the Apollo 11 software release preceeding
061455,000041: ## the listing from which it was transcribed. It has been verified to
061456,000042: ## contain the same bank checksums as AGC developer Allan Klumpp's listing
061457,000043: ## of Luminary Revision 99 (for which we do not have scans).
061458,000044: ##
061459,000045: ## Notations on Allan Klumpp's listing read, in part:
061460,000046: ##
061461,000047: ## ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
061462,000048:
Page 1403 |
061464,000050: # PROGRAM NAMES: (1) T6JOBCHK MOD. NO. 5 OCTOBER 2, 1967
061465,000051: # (2) DOT6RUPT
061466,000052: # MODIFICATION BY: LOWELL G HULL (A.C.ELECTRONICS)
061467,000053:
061468,000054: # THESE PROGRAMS ENABLE THE LM DAP TO CONTROL THE THRUST TIMES OF THE REACTION CONTROL SYSTEM JETS BY USING TIME6.
061469,000055: # SINCE THE LM DAP MAINTAINS EXCLUSIVE CONTROL OVER TIME6 AND ITS INTERRUPTS, THE FOLLOWING CONVENTIONS HAVE BEEN
061470,000056: # ESTABLISHED AND MUST NOT BE TAMPERED WITH:
061471,000057: # 1. NO NUMBER IS EVER PLACED INTO TIME6 EXCEPT BY LM DAP.
061472,000058: # 2. NO PROGRAM OTHER THAN LM DAP ENABLES THE TIME6 COUNTER.
061473,000059: # 3. TO USE TIME6, THE FOLLOWING SEQUENCE IS ALWAYS EMPLOYED:
061474,000060: # A. A POSITIVE (NON-ZERO) NUMBER IS STORED IN TIME6.
061475,000061: # B. THE TIME6 CLOCK IS ENABLED.
061476,000062: # C. TIME6 IS INTERROGATED AND IS:
061477,000063: # I. NEVER FOUND NEGATIVE (NON-ZERO) OR +0.
061478,000064: # II. SOMETIMES FOUND POSITIVE (BETWEEN 1 AND 240D) INDICATING THAT IT IS ACTIVE.
061479,000065: # III. SOMETIMES FOUND POSMAX INDICATING THAT IT IS INACTIVE AND NOT ENABLED.
061480,000066: # IV. SOMETIMES FOUND NEGATIVE ZERO INDICATING THAT:
061481,000067: # A. A T6RUPT IS ABOUT TO OCCUR AT THE NEXT DINC, OR
061482,000068: # B. A T6RUPT IS WAITING IN THE PRIORITY CHAIN, OR
061483,000069: # C. A T6RUPT IS IN PROCESS NOW.
061484,000070: # 4) ALL PROGRAMS WHICH OPERATE IN EITHER INTERRUPT MODE OR WITH INTERRUPT INHIBITED MUST CALL T6JOBCHK
061485,000071: # EVERY 5 MILLISECONDS TO PROCESS A POSSIBLE WAITING T6RUPT BEFORE IT CAN BE HONORED BY THE HARDWARE.
061486,000072: # (5. PROGRAM JTLST, IN Q,R-AXES, HANDLES THE INPUT LIST.)
061487,000073:
061488,000074: # T6JOBCHK CALLING SEQUENCE:
061489,000075: # L TC T6JOBCHK
061490,000076: # L+1 (RETURN)
061491,000077:
061492,000078: # DOT6RUPT CALLING SEQUENCE:
061493,000079: # DXCH ARUPT T6RUPT LEAD IN AT LOCATION 4004.
061494,000080: # EXTEND
061495,000081: # DCA T6ADR
061496,000082: # DTCB
061497,000083:
061498,000084: # SUBROUTINES CALLED: DOT6RUPT CALLS T6JOBCHK.
061499,000085:
061500,000086: # NORMAL EXIT MODES: T6JOBCHK RETURNS TO L +1.
061501,000087: # DOT6RUPT TRANSFERS CONTROL TO RESUME.
061502,000088:
061503,000089: # ALARM/ABORT MODES: NONE.
061504,000090:
061505,000091: # INPUT: TIME6 NXT6ADR OUTPUT: TIME6 NXT6ADR CHANNEL 5
061506,000092: # T6NEXT T6NEXT +1 T6NEXT T6NEXT +1 CHANNEL 6
061507,000093: # T6FURTHA T6FURTHA +1 T6FURTHA T6FURTHA +1 BIT15/CH13
061508,000094:
061509,000095: # DEBRIS: T6JOBCHK CLOBBERS A. DOT6RUPT CLOBBERS NOTHING.
061510,000096:
061511,000097: 5753 BLOCK 02
Page 1404 |
061513,000099: 17,2027 BANK 17
061514,000100: 17,2000 SETLOC DAPS2
061515,000101: 17,2000 BANK
061516,000102: 17,2027 E6,1466 EBANK= T6NEXT
061517,000103: 17,2027 COUNT* $$/DAPT6
061518,000104:
061519,000105: 17,2027 10031 T6JOBCHK CCS TIME6 # CHECK TIME6 FOR WAITING T6RUPT:
061520,000106: 17,2030 00002 TC Q # NONE: CLOCK COUTING DOWN.
061521,000107: 17,2031 05705 TC CCSHOLE
061522,000108: 17,2032 02032 TC T6JOBCHK +3
061523,000109:
061524,000110: # CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
061525,000111:
061526,000112: 17,2033 34733 T6JOB CAF POSMAX # DISABLE CLOCK: NEEDED SINCE RUPT OCCURS
061527,000113: 17,2034 00006 EXTEND # 1 DINC AFTER T6 = 77777. FOR 625 MUSECS
061528,000114: 17,2035 03013 WAND CHAN13 # MUST NOT HAVE T6 = +0 WITH ENABLE SET
061529,000115:
061530,000116: 17,2036 34733 CA POSMAX
061531,000117: 17,2037 22007 ZL
061532,000118: 17,2040 53471 DXCH T6FURTHA
061533,000119: 17,2041 53467 DXCH T6NEXT
061534,000120: 17,2042 23465 LXCH NXT6ADR
061535,000121: 17,2043 54031 TS TIME6
061536,000122:
061537,000123: 17,2044 67725 AD PRIO37
061538,000124: 17,2045 54000 TS A
061539,000125: 17,2046 12052 TCF ENABLET6
061540,000126: 17,2047 34733 CA POSMAX
061541,000127: 17,2050 54031 TS TIME6
061542,000128: 17,2051 12063 TCF GOCH56
061543,000129: 17,2052 34735 ENABLET6 CA BIT15
061544,000130: 17,2053 00006 EXTEND
061545,000131: 17,2054 05013 WOR CHAN13
061546,000132: 17,2055 31466 CA T6NEXT
061547,000133: 17,2056 67725 AD PRIO37
061548,000134: 17,2057 54000 TS A
061549,000135: 17,2060 12063 TCF GOCH56
061550,000136: 17,2061 34733 CA POSMAX
061551,000137: 17,2062 55466 TS T6NEXT
061552,000138: 17,2063 50001 GOCH56 INDEX L
061553,000139: 17,2064 15753 TCF WRITEP -1
061554,000140:
061555,000141: 5753 BLOCK 02
061556,000142: 4000 SETLOC FFTAG9
061557,000143: 4000 BANK
061558,000144: 5753 E6,1635 EBANK= CDUXD
061559,000145: 5753 COUNT* $$/DAPT6
061560,000146:
061561,000147: 5753 31472 CA NEXTP
061562,000148: 5754 00006 WRITEP EXTEND
061563,000149: 5755 01006 WRITE CHAN6
Page 1405 |
061565,000151: 5756 00002 TC Q
061566,000152:
061567,000153: 5757 31473 CA NEXTU
061568,000154: 5760 54001 WRITEU TS L
061569,000155: 5761 45774 CS 00314OCT
061570,000156: 5762 00006 EXTEND
061571,000157: 5763 02005 RAND CHAN5
061572,000158: 5764 60001 AD L
061573,000159: 5765 00006 EXTEND
061574,000160: 5766 01005 WRITE CHAN5
061575,000161: 5767 00002 TC Q
061576,000162:
061577,000163: 5770 31474 CA NEXTV
061578,000164: 5771 54001 WRITEV TS L
061579,000165: 5772 35774 CA 00314OCT
061580,000166: 5773 15762 TCF -9D
061581,000167: 5774 00314 00314OCT OCT 00314
061582,000168:
061583,000169: 17,2065 BANK 17
061584,000170: 17,2000 SETLOC DAPS2
061585,000171: 17,2000 BANK
061586,000172:
061587,000173: 17,2065 E6,1466 EBANK= T6NEXT
061588,000174: 17,2065 COUNT* $$/DAPT6
061589,000175:
061590,000176: 17,2065 22016 DOT6RUPT LXCH BANKRUPT # (INTERRUPT LEAD INS CONTINUED)
061591,000177: 17,2066 00006 EXTEND
061592,000178: 17,2067 22012 QXCH QRUPT
061593,000179:
061594,000180: 17,2070 02027 TC T6JOBCHK # CALL T6JOBCHK.
061595,000181:
061596,000182: 17,2071 15270 TCF RESUME # END TIME6 INTERRUPT PROCESSOR.
061597,000183:
End of include-file T6-RUPT_PROGRAMS.agc. Parent file is MAIN.agc