Source Code
These source-code files derive from a printout of Luminary 210 (Apollo 15-17
Lunar Module guidance computer program), from the personal library of
original AGC developer Don Eyles, digitally photographed at archive.org,
financially sponsored by Jim Lawton, and transcribed to source code by a
team of volunteers. This colorized, syntax-highlighted form was created
by assembling that transcribed source code. Note that the full page images
are available on the
Virtual AGC project page at archive.org, while reduced-size images
are presented at the VirtualAGC project website. Report or fix any
transcription errors at
the Virtual AGC project code repository. Notations on the program listing read, in part: GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY BY NASA 2021112-161 17:11 MAR. 19,1971Note that the date is the date of the printout, not the date of the program revision. |
008542,000002: ## Copyright: Public domain.
008543,000003: ## Filename: RCS_FAILURE_MONITOR.agc
008544,000004: ## Purpose: A section of Luminary revision 210.
008545,000005: ## It is part of the source code for the Lunar Module's (LM)
008546,000006: ## Apollo Guidance Computer (AGC) for Apollo 15-17.
008547,000007: ## This file is intended to be a faithful transcription, except
008548,000008: ## that the code format has been changed to conform to the
008549,000009: ## requirements of the yaYUL assembler rather than the
008550,000010: ## original YUL assembler.
008551,000011: ## Reference: pp. 201-203
008552,000012: ## Assembler: yaYUL
008553,000013: ## Contact: Ron Burkey <info@sandroid.org>.
008554,000014: ## Website: www.ibiblio.org/apollo/index.html
008555,000015: ## Mod history: 2016-11-17 JL Created from Luminary131 version.
008556,000016: ## 2016-11-21 HG Transcribed
008557,000017: ## 2016-12-23 RSB Proofed comment text with octopus/ProoferComments
008558,000018: ## and fixed all errors found.
008559,000019: ## 2017-08-18 RSB Comment-text bug identified in ZERLINA 56.
008560,000020:
Page 201 |
008562,000022: # PROGRAM DESCRIPTION
008563,000023:
008564,000024: # AUTHOR: J S MILLER
008565,000025:
008566,000026: # MODIFIED 6 MARCH 1968 BY P S WEISSMAN TO SET UP JOB FOR 1/ACCS WHEN THE MASKS ARE CHANGED.
008567,000027:
008568,000028: # THIS ROUTINE IS ATTACHED TO T4RUPT, AND IS ENTERED EVERY 480 MS. ITS FUNCTION IS TO EXAMINE THE LOW 8 BITS
008569,000029: # OF CHANNEL 32 TO SEE IF ANY ISOLATION-VALVE CLOSURE BITS HAVE APPEARED OR DISAPPEARED (THE CREW IS WARNED OF JET
008570,000030: # FAILURES BY LAMPS LIT BY THE GRUMMAN FAILURE-DETECTION CIRCUITRY; THEY MAY RESPOND BY OPERATING SWITCHES WHICH
008571,000031: # ISOLATE PAIRS OF JETS FROM THE PROPELLANT TANKS AND SET BITS IN CHANNEL 32). IN THE EVENT THAT CHANNEL 32 BITS
008572,000032: # DIFFER FROM 'PVALVEST', THE RECORD OF ACTIONS TAKEN BY THIS ROUTINE, THE APPROPRIATE BITS IN 'CH5MASK' &
008573,000033: # 'CH6MASK', USED BY THE DAP JET-SELECTION LOGIC, ARE UPDATED, AS IS 'PVALVEST'. TO SPEED UP & SHORTEN THE
008574,000034: # ROUTINE, NO MORE THAN ONE CHANGE IS ACCEPTED PER ENTRY. THE HIGHEST-NUMBERED BIT IN CHANNEL 32 WHICH REQUIRES
008575,000035: # ACTION IS THE ONE PROCESSED.
008576,000036:
008577,000037: # THE CODING IN THE FAILURE MONITOR HAS BEEN WRITTEN SO AS TO HAVE ALMOST COMPLETE RESTART PROTECTION. FOR
008578,000038: # EXAMPLE, NO ASSUMPTION IS MADE WHEN SETTING A 'CH5MASK' BIT TO 1 THAT THE PREVIOUS STATE IS 0, ALTHOUGH IT OF
008579,000039: # COURSE SHOULD BE. ONE CASE WHICH MAY BE SEEN TO EVADE PROTECTION IS THE OCCURRENCE OF A RESTART AFTER UPDATING
008580,000040: # ONE OR BOTH DAP MASK-WORDS BUT BEFORE UPDATING 'PVALVEST', COUPLED WITH A CHANGE IN THE VALVE-BIT BACK TO ITS
008581,000041: # FORMER STATE. THE CONSEQUENCE OF THIS IS THAT THE NEXT ENTRY WOULD NOT SEE THE CHANGE INCOMPLETELY INCORP-
008582,000042: # ORATED BY THE LAST PASS (BECAUSE IT WENT AWAY AT JUST THE RIGHT TIME), BUT THE DAP MASK-WORDS WILL BE INCORRECT.
008583,000043: # THIS COMBINATION OF EVENTS SEEMS QUITE REMOTE, BUT NOT IMPOSSIBLE UNLESS THE CREW OPERATES THE SWITCHES AT HALF-
008584,000044: # SECOND INTERVALS OR LONGER. IN ANY EVENT, A DISAGREEMENT BETWEEN REALITY AND THE DAP MASKS WILL BE CURED IF
008585,000045: # THE MISINTERPRETED SWITCH IS REVERSED AND THEN RESTORED TO ITS CORRECT POSITION (SLOWLY).
008586,000046:
008587,000047: # CALLING SEQUENCE:
008588,000048:
008589,000049: # TCF RCSMONIT (IN INTERRUPT MODE, EVERY 480 MS.)
008590,000050:
008591,000051: # EXIT: TCF RCSMONEX (ALL PATHS EXIT VIA SUCH AN INSTRUCTION)
008592,000052: 06,3213 5272 RCSMONEX EQUALS RESUME
008593,000053:
008594,000054: # ERASABLE INITIALIZATION REQUIRED:
008595,000055:
008596,000056: # VIA FRESH START: PVALVEST = +0 (ALL JETS ENABLED)
008597,000057: # CH5MASK,CH6MASK = +0 (ALL JETS OK)
008598,000058:
008599,000059: # OUTPUT: CH5MASK & CH6MASK UPDATED (1'S WHERE JETS NOT TO BE USED, IN CHANNEL 5 & 6 FORMAT)
008600,000060: # PVALTEST UPDATED (1,S WHEN VALVE CLOSURES HAVE BEEN TRANSLATED INTO CH5MASK & CH6MASK; CHAN 32 FORMAT)
008601,000061: # JOB TO DO 1/ACCS.
008602,000062:
008603,000063: # DEBRIS: A, L, Q AND DEBRIS OF NOVAC.
008604,000064:
008605,000065: # SUBROUTINE CALLED: NOVAC.
008606,000066:
008607,000067: 06,3213 1257 EBANK= CH5MASK
008608,000068:
008609,000069: 23,2000 BANK 23
008610,000070: 06,2000 SETLOC RCSMONT
008611,000071: 06,2000 BANK
008612,000072:
Page 202 |
008614,000074: 06,3213 COUNT* $$/T4RCS
008615,000075:
008616,000076: 06,3213 06,3213 RCSMONIT EQUALS RCSMON
008617,000077:
008618,000078: 06,3213 44746 RCSMON CS ZERO
008619,000079: 06,3214 00006 EXTEND
008620,000080: 06,3215 06032 RXOR CHAN32 # PICK UP + INVERT INVERTED CHANNEL 32.
008621,000081: 06,3216 74350 MASK LOW8 # KEEP JET-FAIL BITS ONLY.
008622,000082: 06,3217 54002 TS Q
008623,000083:
008624,000084: 06,3220 41273 CS PVALVEST # - -
008625,000085: 06,3221 70002 MASK Q # FORM PC + PC.
008626,000086: 06,3222 54001 TS L # (P = PREVIOUS ISOLATION VALVE STATE,
008627,000087: 06,3223 40002 CS Q # C = CURRENT VALVE STATE (CH 32)).
008628,000088: 06,3224 71273 MASK PVALVEST
008629,000089: 06,3225 26001 ADS L # RESULT NZ INDICATES ACTION REQUIRED.
008630,000090:
008631,000091: 06,3226 00006 EXTEND
008632,000092: 06,3227 15272 BZF RCSMONEX # QUIT IF NO ACTION REQUIRED.
008633,000093:
008634,000094: 06,3230 00006 EXTEND
008635,000095: 06,3231 74736 MP BIT7 # MOVE BITS 8 - 1 OF A TO 14 - 7 OF L.
008636,000096: 06,3232 56001 XCH L # ZERO TO L IN THE PROCESS.
008637,000097:
008638,000098: 06,3233 24001 -3 INCR L
008639,000099: 06,3234 60000 DOUBLE # BOUND TO GET OVERFLOW IN THIS LOOP,
008640,000100: 06,3235 54000 OVSK # SINCE WE ASSURED INITIAL NZ IN A.
008641,000101: 06,3236 13233 TCF -3
008642,000102:
008643,000103: 06,3237 50001 INDEX L
008644,000104: 06,3240 34734 CA BIT8 -1 # SAVE THE RELEVANT BIT (8 - 1).
008645,000105: 06,3241 54002 TS Q
008646,000106: 06,3242 71273 MASK PVALVEST # LOOK AT PREVIOUS VALVE STATE BIT.
008647,000107: 06,3243 10000 CCS A
008648,000108: 06,3244 13260 TCF VOPENED # THE VALVE HAS JUST BEEN OPENED.
008649,000109:
008650,000110: 06,3245 41257 CS CH5MASK # THE VALVE HAS JUST BEEN CLOSED.
008651,000111: 06,3246 50001 INDEX L
008652,000112: 06,3247 73277 MASK 5FAILTAB
008653,000113: 06,3250 27257 ADS CH5MASK # SET INHIBIT BIT FOR CHANNEL 5 JET.
008654,000114:
008655,000115: 06,3251 41260 CS CH6MASK
008656,000116: 06,3252 50001 INDEX L
008657,000117: 06,3253 73307 MASK 6FAILTAB
008658,000118: 06,3254 27260 ADS CH6MASK # SET INGIBIT BIT FOR CHANNEL 6 JET.
008659,000119:
008660,000120: 06,3255 30002 CA Q
008661,000121: 06,3256 27273 ADS PVALVEST # RECORD ACTION TAKEN.
008662,000122:
008663,000123: 06,3257 13273 TCF 1/ACCFIX # SET UP 1/ACCJOB AND EXIT.
008664,000124:
Page 203 |
008666,000126: 06,3260 50001 VOPENED INDEX L # A VALVE HAS JUST BEEN OPENED.
008667,000127: 06,3261 43277 CS 5FAILTAB
008668,000128: 06,3262 71257 MASK CH5MASK
008669,000129: 06,3263 55257 TS CH5MASK # REMOVE INHIBIT BIT FOR CHANNEL 5 JET.
008670,000130:
008671,000131: 06,3264 50001 INDEX L
008672,000132: 06,3265 43307 CS 6FAILTAB
008673,000133: 06,3266 71260 MASK CH6MASK
008674,000134: 06,3267 55260 TS CH6MASK # REMOVE INHIBIT BIT FOR CHANNEL 6 JET.
008675,000135:
008676,000136: 06,3270 40002 CS Q
008677,000137: 06,3271 71273 MASK PVALVEST
008678,000138: 06,3272 55273 TS PVALVEST # RECORD ACTION TAKEN.
008679,000139:
008680,000140: 06,3273 37736 1/ACCFIX CAF PRIO27 # SET UP 1/ACCS SO THAT THE SWITCH CURVES
008681,000141: 06,3274 05063 TC NOVAC # FOR TJETLAW CAN BE MODIFIED IF CH5MASK
008682,000142: 06,3275 E6,1536 EBANK= AOSQ # HAS BEEN ALTERED.
008683,000143: 06,3275 03603 42106 2CADR 1/ACCJOB
008684,000144:
008685,000145: 06,3277 15272 TCF RCSMONEX # EXIT.
008686,000146:
008687,000147: 06,3300 5FAILTAB EQUALS -1 # CH 5 JET BIT CORRESPONDING TO CH 32 BIT:
008688,000148: 06,3300 00040 OCT 00040 # 8
008689,000149: 06,3301 00020 OCT 00020 # 7
008690,000150: 06,3302 00100 OCT 00100 # 6
008691,000151: 06,3303 00200 OCT 00200 # 5
008692,000152: 06,3304 00010 OCT 00010 # 4
008693,000153: 06,3305 00001 OCT 00001 # 3
008694,000154: 06,3306 00004 OCT 00004 # 2
008695,000155: 06,3307 00002 OCT 00002 # 1
008696,000156:
008697,000157: 06,3310 6FAILTAB EQUALS -1 # CH 6 JET BIT CORRESPONDING TO CH 32 BIT:
008698,000158: 06,3310 00010 OCT 00010 # 8
008699,000159: 06,3311 00020 OCT 00020 # 7
008700,000160: 06,3312 00004 OCT 00004 # 6
008701,000161: 06,3313 00200 OCT 00200 # 5
008702,000162: 06,3314 00001 OCT 00001 # 4
008703,000163: 06,3315 00002 OCT 00002 # 3
008704,000164: 06,3316 00040 OCT 00040 # 2
008705,000165: 06,3317 00100 OCT 00100 # 1
End of include-file RCS_FAILURE_MONITOR.agc. Parent file is MAIN.agc