Source Code
This is an attempt to recreate Luminary 99 Rev 2, otherwise known as LUM99R2, from Luminary 99 Rev 1 and ephemeris data from Luminary 116. The differences are confined to the last 10-12 lines of the CONTROLLED CONSTANTS. Luminary 99 Rev 1 source-code was transcribed from a printout in the MIT Museum, while Luminary 116 source code was transcribed from a printout belonging to Don Eyles. AGC developer James Kernan, the "rope mother" for the Apollo 11 Lunar Module's AGC, explains as follows: "At the last minute, Dan Lickly, our chief engineer, appeared with ephemerides updates and it took two tries to get it right. The result was that we created Lum99 Revision 1 and Lum99 Revision 2." It is suspected that the former is what's in the MIT Museum, and the latter is what we are trying to recreate here. As for which revision actually flew in Apollo 11, all of the other available surviving evidence points to Rev 1 rather than to Rev 2, so we're just not sure! |
007534,000002: ## Copyright: Public domain.
007535,000003: ## Filename: RCS_FAILURE_MONITOR.agc
007536,000004: ## Purpose: Part of the source code for Luminary 1A build 099.
007537,000005: ## It is part of the source code for the Lunar Module's (LM)
007538,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
007539,000007: ## Assembler: yaYUL
007540,000008: ## Contact: Hartmuth Gutsche <hgutsche@xplornet.com>.
007541,000009: ## Website: www.ibiblio.org/apollo.
007542,000010: ## Pages: 190-192
007543,000011: ## Mod history: 2009-05-19 HG Transcribed from page images.
007544,000012: ## 2016-12-13 RSB Proofed text comments with octopus/ProoferComments
007545,000013: ## and corrected the errors found.
007546,000014: ## 2017-03-03 RSB Snapshot of Luminary 99 Rev 1.
007547,000015: ## 2017-08-18 RSB Comment-text bug identified in ZERLINA 56.
007548,000016:
Page 190 |
007550,000018: # PROGRAM DESCRIPTION
007551,000019:
007552,000020: # AUTHOR: J S MILLER
007553,000021:
007554,000022: # MODIFIED 6 MARCH 1968 BY P S WEISSMAN TO SET UP JOB FOR 1/ACCS WHEN THE MASKS ARE CHANGED.
007555,000023:
007556,000024: # THIS ROUTINE IS ATTACHED TO T4RUPT, AND IS ENTERED EVERY 480 MS. ITS FUNCTION IS TO EXAMINE THE LOW 8 BITS
007557,000025: # OF CHANNEL 32 TO SEE IF ANY ISOLATION-VALVE CLOSURE BITS HAVE APPEARED OR DISAPPEARED (THE CREW IS WARNED OF JET
007558,000026: # FAILURES BY LAMPS LIT BY THE GRUMMAN FAILURE-DETECTION CIRCUITRY; THEY MAY RESPOND BY OPERATING SWITCHES WHICH
007559,000027: # ISOLATE PAIRS OF JETS FROM THE PROPELLANT TANKS AND SET BITS IN CHANNEL 32). IN THE EVENT THAT CHANNEL 32 BITS
007560,000028: # DIFFER FROM 'PVALVEST', THE RECORD OF ACTIONS TAKEN BY THIS ROUTINE, THE APPROPRIATE BITS IN 'CH5MASK' &
007561,000029: # 'CH6MASK', USED BY THE DAP JET-SELECTION LOGIC, ARE UPDATED, AS IS 'PVALVEST'. TO SPEED UP & SHORTEN THE
007562,000030: # ROUTINE, NO MORE THAN ONE CHANGE IS ACCEPTED PER ENTRY. THE HIGHEST-NUMBERED BIT IN CHANNEL 32 WHICH REQUIRES
007563,000031: # ACTION IS THE ONE PROCESSED.
007564,000032:
007565,000033: # THE CODING IN THE FAILURE MONITOR HAS BEEN WRITTEN SO AS TO HAVE ALMOST COMPLETE RESTART PROTECTION. FOR
007566,000034: # EXAMPLE, NO ASSUMPTION IS MADE WHEN SETTING A 'CH5MASK' BIT TO 1 THAT THE PREVIOUS STATE IS 0, ALTHOUGH IT OF
007567,000035: # COURSE SHOULD BE. ONE CASE WHICH MAY BE SEEN TO EVADE PROTECTION IS THE OCCURRENCE OF A RESTART AFTER UPDATING
007568,000036: # ONE OR BOTH DAP MASK-WORDS BUT BEFORE UPDATING 'PVALVEST', COUPLED WITH A CHANGE IN THE VALVE-BIT BACK TO ITS
007569,000037: # FORMER STATE. THE CONSEQUENCE OF THIS IS THAT THE NEXT ENTRY WOULD NOT SEE THE CHANGE INCOMPLETELY INCORP-
007570,000038: # ORATED BY THE LAST PASS (BECAUSE IT WENT AWAY AT JUST THE RIGHT TIME), BUT THE DAP MASK-WORDS WILL BE INCORRECT.
007571,000039: # THIS COMBINATION OF EVENTS SEEMS QUITE REMOTE, BUT NOT IMPOSSIBLE UNLESS THE CREW OPERATES THE SWITCHES AT HALF-
007572,000040: # SECOND INTERVALS OR LONGER. IN ANY EVENT, A DISAGREEMENT BETWEEN REALITY AND THE DAP MASKS WILL BE CURED IF
007573,000041: # THE MISINTERPRETED SWITCH IS REVERSED AND THEN RESTORED TO ITS CORRECT POSITION (SLOWLY).
007574,000042:
007575,000043: # CALLING SEQUENCE:
007576,000044:
007577,000045: # TCF RCSMONIT (IN INTERRUPT MODE, EVERY 480 MS.)
007578,000046:
007579,000047: # EXIT: TCF RCSMONEX (ALL PATHS EXIT VIA SUCH AN INSTRUCTION)
007580,000048:
007581,000049: 06,3156 5270 RCSMONEX EQUALS RESUME
007582,000050:
007583,000051: # ERASABLE INITIALIZATION REQUIRED:
007584,000052:
007585,000053: # VIA FRESH START: PVALVEST = +0 (ALL JETS ENABLED)
007586,000054: # CH5MASK,CH6MASK = +0 (ALL JETS OK)
007587,000055:
007588,000056: # OUTPUT: CH5MASK & CH6MASK UPDATED (1'S WHERE JETS NOT TO BE USED, IN CHANNEL 5 & 6 FORMAT)
007589,000057: # PVALTEST UPDATED (1,S WHEN VALVE CLOSURES HAVE BEEN TRANSLATED INTO CH5MASK & CH6MASK; CHAN 32 FORMAT)
007590,000058: # JOB TO DO 1/ACCS.
007591,000059:
007592,000060: # DEBRIS: A, L, Q AND DEBRIS OF NOVAC.
007593,000061:
007594,000062: # SUBROUTINE CALLED: NOVAC.
007595,000063:
007596,000064: 06,3156 1262 EBANK= CH5MASK
007597,000065:
007598,000066: 23,2000 BANK 23
007599,000067: 06,2000 SETLOC RCSMONT
007600,000068: 06,2000 BANK
Page 191 |
007602,000070: 06,3156 COUNT* $$/T4RCS
007603,000071:
007604,000072: 06,3156 06,3156 RCSMONIT EQUALS RCSMON
007605,000073:
007606,000074: 06,3156 44755 RCSMON CS ZERO
007607,000075: 06,3157 00006 EXTEND
007608,000076: 06,3160 06032 RXOR CHAN32 # PICK UP + INVERT INVERTED CHANNEL 32.
007609,000077: 06,3161 74357 MASK LOW8 # KEEP JET-FAIL BITS ONLY.
007610,000078: 06,3162 54002 TS Q
007611,000079:
007612,000080: 06,3163 41276 CS PVALVEST # _ _
007613,000081: 06,3164 70002 MASK Q # FORM PC + PC.
007614,000082: 06,3165 54001 TS L # (P = PREVIOUS ISOLATION VALVE STATE,
007615,000083: 06,3166 40002 CS Q # C = CURRENT VALVE STATE (CH32)).
007616,000084: 06,3167 71276 MASK PVALVEST
007617,000085: 06,3170 26001 ADS L # RESULT NZ INDICATES ACTION REQUIRED.
007618,000086:
007619,000087: 06,3171 00006 EXTEND
007620,000088: 06,3172 15270 BZF RCSMONEX # QUIT IF NO ACTION REQUIRED.
007621,000089:
007622,000090: 06,3173 00006 EXTEND
007623,000091: 06,3174 74745 MP BIT7 # MOVE BITS 8-1 OF A TO 14-7 OF L.
007624,000092: 06,3175 56001 XCH L # ZERO TO L IN THE PROCESS.
007625,000093:
007626,000094: 06,3176 24001 -3 INCR L
007627,000095: 06,3177 60000 DOUBLE # BOUND TO GET OVERFLOW IN THIS LOOP,
007628,000096: 06,3200 54000 OVSK # SINCE WE ASSURED INITIAL NZ IN A.
007629,000097: 06,3201 13176 TCF -3
007630,000098:
007631,000099: 06,3202 50001 INDEX L
007632,000100: 06,3203 34743 CA BIT8 -1 # SAVE THE RELEVANT BIT (8-1).
007633,000101: 06,3204 54002 TS Q
007634,000102: 06,3205 71276 MASK PVALVEST # LOOK AT PREVIOUS VALVE STATE BIT.
007635,000103: 06,3206 10000 CCS A
007636,000104: 06,3207 13223 TCF VOPENED # THE VALVE HAS JUST BEEN OPENED.
007637,000105:
007638,000106: 06,3210 41262 CS CH5MASK # THE VALVE HAS JUST BEEN CLOSED.
007639,000107: 06,3211 50001 INDEX L
007640,000108: 06,3212 73242 MASK 5FAILTAB
007641,000109: 06,3213 27262 ADS CH5MASK # SET INHIBIT BIT FOR CHANNEL 5 JET.
007642,000110:
007643,000111: 06,3214 41263 CS CH6MASK
007644,000112: 06,3215 50001 INDEX L
007645,000113: 06,3216 73252 MASK 6FAILTAB
007646,000114: 06,3217 27263 ADS CH6MASK # SET INGIBIT BIT FOR CHANNEL 6 JET.
007647,000115:
007648,000116: 06,3220 30002 CA Q
007649,000117: 06,3221 27276 ADS PVALVEST # RECORD ACTION TAKEN.
007650,000118:
007651,000119: 06,3222 13236 TCF 1/ACCFIX # SET UP 1/ACCJOB AND EXIT.
007652,000120:
Page 192 |
007654,000122: 06,3223 50001 VOPENED INDEX L # A VALVE HAS JUST BEEN OPENED.
007655,000123: 06,3224 43242 CS 5FAILTAB
007656,000124: 06,3225 71262 MASK CH5MASK
007657,000125: 06,3226 55262 TS CH5MASK # REMOVE INHIBIT BIT FOR CHANNEL 5 JET.
007658,000126:
007659,000127: 06,3227 50001 INDEX L
007660,000128: 06,3230 43252 CS 6FAILTAB
007661,000129: 06,3231 71263 MASK CH6MASK
007662,000130: 06,3232 55263 TS CH6MASK # REMOVE INHIBIT BIT FOR CHANNEL 6 JET.
007663,000131:
007664,000132: 06,3233 40002 CS Q
007665,000133: 06,3234 71276 MASK PVALVEST
007666,000134: 06,3235 55276 TS PVALVEST # RECORD ACTION TAKEN.
007667,000135:
007668,000136: 06,3236 37715 1/ACCFIX CAF PRIO27 # SET UP 1/ACCS SO THAT THE SWITCH CURVES
007669,000137: 06,3237 05072 TC NOVAC # FOR TJETLAW CAN BE MODIFIED IF CH5MASK
007670,000138: 06,3240 E6,1537 EBANK= AOSQ # HAS BEEN ALTERED.
007671,000139: 06,3240 02454 40106 2CADR 1/ACCJOB
007672,000140:
007673,000141: 06,3242 15270 TCF RCSMONEX # EXIT.
007674,000142:
007675,000143: 06,3243 5FAILTAB EQUALS -1 # CH 5 JET BIT CORRESPONDING TO CH 32 BIT:
007676,000144: 06,3243 00040 OCT 00040 # 8
007677,000145: 06,3244 00020 OCT 00020 # 7
007678,000146: 06,3245 00100 OCT 00100 # 6
007679,000147: 06,3246 00200 OCT 00200 # 5
007680,000148: 06,3247 00010 OCT 00010 # 4
007681,000149: 06,3250 00001 OCT 00001 # 3
007682,000150: 06,3251 00004 OCT 00004 # 2
007683,000151: 06,3252 00002 OCT 00002 # 1
007684,000152:
007685,000153: 06,3253 6FAILTAB EQUALS -1 # CH 6 JET BIT CORRESPONDING TO CH 32 BIT:
007686,000154: 06,3253 00010 OCT 00010 # 8
007687,000155: 06,3254 00020 OCT 00020 # 7
007688,000156: 06,3255 00004 OCT 00004 # 6
007689,000157: 06,3256 00200 OCT 00200 # 5
007690,000158: 06,3257 00001 OCT 00001 # 4
007691,000159: 06,3260 00002 OCT 00002 # 3
007692,000160: 06,3261 00040 OCT 00040 # 2
007693,000161: 06,3262 00100 OCT 00100 # 1
007694,000162:
007695,000163:
End of include-file RCS_FAILURE_MONITOR.agc. Parent file is MAIN.agc