Source Code
These source-code files are part of a reconstructed copy of Luminary 96, the
original release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer
(AGC) software.
The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 96 listing. 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. |
007530,000002: ## Copyright: Public domain.
007531,000003: ## Filename: RCS_FAILURE_MONITOR.agc
007532,000004: ## Purpose: A section of Luminary revision 96.
007533,000005: ## It is part of the reconstructed source code for the
007534,000006: ## original release of the flight software for the Lunar
007535,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
007536,000008: ## The code has been recreated from a previously reconstructed
007537,000009: ## copy of Luminary 97 by undoing changes described in anomaly
007538,000010: ## report LNY-59. The code has been adapted such that the
007539,000011: ## resulting bugger words exactly match those specified for
007540,000012: ## Luminary 96 in NASA drawing 2021152D, which gives relatively
007541,000013: ## high confidence that the reconstruction is correct.
007542,000014: ## Reference: pp. 190-192
007543,000015: ## Assembler: yaYUL
007544,000016: ## Contact: Ron Burkey <info@sandroid.org>.
007545,000017: ## Website: www.ibiblio.org/apollo/index.html
007546,000018: ## Mod history: 2019-08-04 MAS Created from Luminary 97.
007547,000019:
Page 190 |
007549,000021: # PROGRAM DESCRIPTION
007550,000022:
007551,000023: # AUTHOR: J S MILLER
007552,000024:
007553,000025: # MODIFIED 6 MARCH 1968 BY P S WEISSMAN TO SET UP JOB FOR 1/ACCS WHEN THE MASKS ARE CHANGED.
007554,000026:
007555,000027: # THIS ROUTINE IS ATTACHED TO T4RUPT, AND IS ENTERED EVERY 480 MS. ITS FUNCTION IS TO EXAMINE THE LOW 8 BITS
007556,000028: # OF CHANNEL 32 TO SEE IF ANY ISOLATION-VALVE CLOSURE BITS HAVE APPEARED OR DISAPPEARED (THE CREW IS WARNED OF JET
007557,000029: # FAILURES BY LAMPS LIT BY THE GRUMMAN FAILURE-DETECTION CIRCUITRY; THEY MAY RESPOND BY OPERATING SWITCHES WHICH
007558,000030: # ISOLATE PAIRS OF JETS FROM THE PROPELLANT TANKS AND SET BITS IN CHANNEL 32). IN THE EVENT THAT CHANNEL 32 BITS
007559,000031: # DIFFER FROM 'PVALVEST', THE RECORD OF ACTIONS TAKEN BY THIS ROUTINE, THE APPROPRIATE BITS IN 'CH5MASK' &
007560,000032: # 'CH6MASK', USED BY THE DAP JET-SELECTION LOGIC, ARE UPDATED, AS IS 'PVALVEST'. TO SPEED UP & SHORTEN THE
007561,000033: # ROUTINE, NO MORE THAN ONE CHANGE IS ACCEPTED PER ENTRY. THE HIGHEST-NUMBERED BIT IN CHANNEL 32 WHICH REQUIRES
007562,000034: # ACTION IS THE ONE PROCESSED.
007563,000035:
007564,000036: # THE CODING IN THE FAILURE MONITOR HAS BEEN WRITTEN SO AS TO HAVE ALMOST COMPLETE RESTART PROTECTION. FOR
007565,000037: # EXAMPLE, NO ASSUMPTION IS MADE WHEN SETTING A 'CH5MASK' BIT TO 1 THAT THE PREVIOUS STATE IS 0, ALTHOUGH IT OF
007566,000038: # COURSE SHOULD BE. ONE CASE WHICH MAY BE SEEN TO EVADE PROTECTION IS THE OCCURRENCE OF A RESTART AFTER UPDATING
007567,000039: # ONE OR BOTH DAP MASK-WORDS BUT BEFORE UPDATING 'PVALVEST', COUPLED WITH A CHANGE IN THE VALVE-BIT BACK TO ITS
007568,000040: # FORMER STATE. THE CONSEQUENCE OF THIS IS THAT THE NEXT ENTRY WOULD NOT SEE THE CHANGE INCOMPLETELY INCORP-
007569,000041: # ORATED BY THE LAST PASS (BECAUSE IT WENT AWAY AT JUST THE RIGHT TIME), BUT THE DAP MASK-WORDS WILL BE INCORRECT.
007570,000042: # THIS COMBINATION OF EVENTS SEEMS QUITE REMOTE, BUT NOT IMPOSSIBLE UNLESS THE CREW OPERATES THE SWITCHES AT HALF-
007571,000043: # SECOND INTERVALS OR LONGER. IN ANY EVENT, A DISAGREEMENT BETWEEN REALITY AND THE DAP MASKS WILL BE CURED IF
007572,000044: # THE MISINTERPRETED SWITCH IS REVERSED AND THEN RESTORED TO ITS CORRECT POSITION (SLOWLY).
007573,000045:
007574,000046: # CALLING SEQUENCE:
007575,000047:
007576,000048: # TCF RCSMONIT (IN INTERRUPT MODE, EVERY 480 MS.)
007577,000049:
007578,000050: # EXIT: TCF RCSMONEX (ALL PATHS EXIT VIA SUCH AN INSTRUCTION)
007579,000051:
007580,000052: 06,3156 5270 RCSMONEX EQUALS RESUME
007581,000053:
007582,000054: # ERASABLE INITIALIZATION REQUIRED:
007583,000055:
007584,000056: # VIA FRESH START: PVALVEST = +0 (ALL JETS ENABLED)
007585,000057: # CH5MASK,CH6MASK = +0 (ALL JETS OK)
007586,000058:
007587,000059: # OUTPUT: CH5MASK & CH6MASK UPDATED (1'S WHERE JETS NOT TO BE USED, IN CHANNEL 5 & 6 FORMAT)
007588,000060: # PVALTEST UPDATED (1,S WHEN VALVE CLOSURES HAVE BEEN TRANSLATED INTO CH5MASK & CH6MASK; CHAN 32 FORMAT)
007589,000061: # JOB TO DO 1/ACCS.
007590,000062:
007591,000063: # DEBRIS: A, L, Q AND DEBRIS OF NOVAC.
007592,000064:
007593,000065: # SUBROUTINE CALLED: NOVAC.
007594,000066:
007595,000067: 06,3156 1262 EBANK= CH5MASK
007596,000068:
007597,000069: 23,2000 BANK 23
007598,000070: 06,2000 SETLOC RCSMONT
007599,000071: 06,2000 BANK
Page 191 |
007601,000073: 06,3156 COUNT* $$/T4RCS
007602,000074:
007603,000075: 06,3156 06,3156 RCSMONIT EQUALS RCSMON
007604,000076:
007605,000077: 06,3156 44755 RCSMON CS ZERO
007606,000078: 06,3157 00006 EXTEND
007607,000079: 06,3160 06032 RXOR CHAN32 # PICK UP + INVERT INVERTED CHANNEL 32.
007608,000080: 06,3161 74357 MASK LOW8 # KEEP JET-FAIL BITS ONLY.
007609,000081: 06,3162 54002 TS Q
007610,000082:
007611,000083: 06,3163 41276 CS PVALVEST # - -
007612,000084: 06,3164 70002 MASK Q # FORM PC + PC.
007613,000085: 06,3165 54001 TS L # (P = PREVIOUS ISOLATION VALVE STATE,
007614,000086: 06,3166 40002 CS Q # C = CURRENT VALVE STATE (CH32)).
007615,000087: 06,3167 71276 MASK PVALVEST
007616,000088: 06,3170 26001 ADS L # RESULT NZ INDICATES ACTION REQUIRED.
007617,000089:
007618,000090: 06,3171 00006 EXTEND
007619,000091: 06,3172 15270 BZF RCSMONEX # QUIT IF NO ACTION REQUIRED.
007620,000092:
007621,000093: 06,3173 00006 EXTEND
007622,000094: 06,3174 74745 MP BIT7 # MOVE BITS 8-1 OF A TO 14-7 OF L.
007623,000095: 06,3175 56001 XCH L # ZERO TO L IN THE PROCESS.
007624,000096:
007625,000097: 06,3176 24001 -3 INCR L
007626,000098: 06,3177 60000 DOUBLE # BOUND TO GET OVERFLOW IN THIS LOOP,
007627,000099: 06,3200 54000 OVSK # SINCE WE ASSURED INITIAL NZ IN A.
007628,000100: 06,3201 13176 TCF -3
007629,000101:
007630,000102: 06,3202 50001 INDEX L
007631,000103: 06,3203 34743 CA BIT8 -1 # SAVE THE RELEVANT BIT (8-1).
007632,000104: 06,3204 54002 TS Q
007633,000105: 06,3205 71276 MASK PVALVEST # LOOK AT PREVIOUS VALVE STATE BIT.
007634,000106: 06,3206 10000 CCS A
007635,000107: 06,3207 13223 TCF VOPENED # THE VALVE HAS JUST BEEN OPENED.
007636,000108:
007637,000109: 06,3210 41262 CS CH5MASK # THE VALVE HAS JUST BEEN CLOSED.
007638,000110: 06,3211 50001 INDEX L
007639,000111: 06,3212 73242 MASK 5FAILTAB
007640,000112: 06,3213 27262 ADS CH5MASK # SET INHIBIT BIT FOR CHANNEL 5 JET.
007641,000113:
007642,000114: 06,3214 41263 CS CH6MASK
007643,000115: 06,3215 50001 INDEX L
007644,000116: 06,3216 73252 MASK 6FAILTAB
007645,000117: 06,3217 27263 ADS CH6MASK # SET INGIBIT BIT FOR CHANNEL 6 JET.
007646,000118:
007647,000119: 06,3220 30002 CA Q
007648,000120: 06,3221 27276 ADS PVALVEST # RECORD ACTION TAKEN.
007649,000121:
007650,000122: 06,3222 13236 TCF 1/ACCFIX # SET UP 1/ACCJOB AND EXIT.
007651,000123:
Page 192 |
007653,000125: 06,3223 50001 VOPENED INDEX L # A VALVE HAS JUST BEEN OPENED.
007654,000126: 06,3224 43242 CS 5FAILTAB
007655,000127: 06,3225 71262 MASK CH5MASK
007656,000128: 06,3226 55262 TS CH5MASK # REMOVE INHIBIT BIT FOR CHANNEL 5 JET.
007657,000129:
007658,000130: 06,3227 50001 INDEX L
007659,000131: 06,3230 43252 CS 6FAILTAB
007660,000132: 06,3231 71263 MASK CH6MASK
007661,000133: 06,3232 55263 TS CH6MASK # REMOVE INHIBIT BIT FOR CHANNEL 6 JET.
007662,000134:
007663,000135: 06,3233 40002 CS Q
007664,000136: 06,3234 71276 MASK PVALVEST
007665,000137: 06,3235 55276 TS PVALVEST # RECORD ACTION TAKEN.
007666,000138:
007667,000139: 06,3236 37715 1/ACCFIX CAF PRIO27 # SET UP 1/ACCS SO THAT THE SWITCH CURVES
007668,000140: 06,3237 05072 TC NOVAC # FOR TJETLAW CAN BE MODIFIED IF CH5MASK
007669,000141: 06,3240 E6,1537 EBANK= AOSQ # HAS BEEN ALTERED.
007670,000142: 06,3240 02454 40106 2CADR 1/ACCJOB
007671,000143:
007672,000144: 06,3242 15270 TCF RCSMONEX # EXIT.
007673,000145:
007674,000146: 06,3243 5FAILTAB EQUALS -1 # CH 5 JET BIT CORRESPONDING TO CH 32 BIT:
007675,000147: 06,3243 00040 OCT 00040 # 8
007676,000148: 06,3244 00020 OCT 00020 # 7
007677,000149: 06,3245 00100 OCT 00100 # 6
007678,000150: 06,3246 00200 OCT 00200 # 5
007679,000151: 06,3247 00010 OCT 00010 # 4
007680,000152: 06,3250 00001 OCT 00001 # 3
007681,000153: 06,3251 00004 OCT 00004 # 2
007682,000154: 06,3252 00002 OCT 00002 # 1
007683,000155:
007684,000156: 06,3253 6FAILTAB EQUALS -1 # CH 6 JET BIT CORRESPONDING TO CH 32 BIT:
007685,000157: 06,3253 00010 OCT 00010 # 8
007686,000158: 06,3254 00020 OCT 00020 # 7
007687,000159: 06,3255 00004 OCT 00004 # 6
007688,000160: 06,3256 00200 OCT 00200 # 5
007689,000161: 06,3257 00001 OCT 00001 # 4
007690,000162: 06,3260 00002 OCT 00002 # 3
007691,000163: 06,3261 00040 OCT 00040 # 2
007692,000164: 06,3262 00100 OCT 00100 # 1
007693,000165:
007694,000166:
End of include-file RCS_FAILURE_MONITOR.agc. Parent file is MAIN.agc