Source Code
These source-code files were transcribed from scans made from Don Eyles's personal
copy of Luminary 069. They were scanned at archive.org's Boston
facility, and the scanning was sponsored by Onno Hommes. The code was transcribed
from these scans by a team of volunteers who are referenced in the program
comments. Comments from the original source code are prefixed with a single '#' symbol,
whereas comments added later are prefixed by "##" or "###". In some cases, where
similar code blocks exist in previously-transcribed AGC programs (primarily
Luminary 99, from Apollo 11) those code blocks were used as a starting point and
then corrected to agree with the Luminary 69 scans. The full scans are available
at the Virtual AGC
project's collection at archive.org, while more-convenient reduced-size (but reduced-quality)
images are available at
the main Virtual AGC website. Report any errors noted by creating an
issue report at the Virtual AGC
project's GitHub repository. Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011 19:02 NOV. 25,1968Note that the date is the date of the printout, not the date of the program revision. |
008894,000002: ## Copyright: Public domain.
008895,000003: ## Filename: RCS_FAILURE_MONITOR.agc
008896,000004: ## Purpose: The main source file for Luminary revision 069.
008897,000005: ## It is part of the source code for the original release
008898,000006: ## of the flight software for the Lunar Module's (LM) Apollo
008899,000007: ## Guidance Computer (AGC) for Apollo 10. The actual flown
008900,000008: ## version was Luminary 69 revision 2, which included a
008901,000009: ## newer lunar gravity model and only affected module 2.
008902,000010: ## This file is intended to be a faithful transcription, except
008903,000011: ## that the code format has been changed to conform to the
008904,000012: ## requirements of the yaYUL assembler rather than the
008905,000013: ## original YUL assembler.
008906,000014: ## Reference: pp. 205-207
008907,000015: ## Assembler: yaYUL
008908,000016: ## Contact: Ron Burkey <info@sandroid.org>.
008909,000017: ## Website: www.ibiblio.org/apollo/index.html
008910,000018: ## Mod history: 2016-12-13 MAS Created from Luminary 99.
008911,000019: ## 2016-01-06 HG Transcribed
008912,000020: ## 2017-01-25 RSB Proofed comment text using octopus/prooferComments
008913,000021: ## but no errors found.
008914,000022: ## 2017-03-16 RSB Comment-text fixes identified in 5-way
008915,000023: ## side-by-side diff of Luminary 69/99/116/131/210.
008916,000024: ## 2017-08-18 RSB Comment-text bug identified in ZERLINA 56.
008917,000025:
Page 205 |
008919,000027: # PROGRAM DESCRIPTION
008920,000028:
008921,000029: # AUTHOR: J S MILLER
008922,000030:
008923,000031: # MODIFIED 6 MARCH 1968 BY P S WEISSMAN TO SET UP JOB FOR 1/ACCS WHEN THE MASKS ARE CHANGED.
008924,000032:
008925,000033: # THIS ROUTINE IS ATTACHED TO T4RUPT, AND IS ENTERED EVERY 480 MS. ITS FUNCTION IS TO EXAMINE THE LOW 8 BITS
008926,000034: # OF CHANNEL 32 TO SEE IF ANY ISOLATION-VALVE CLOSURE BITS HAVE APPEARED OR DISAPPEARED (THE CREW IS WARNED OF JET
008927,000035: # FAILURES BY LAMPS LIT BY THE GRUMMAN FAILURE-DETECTION CIRCUITRY; THEY MAY RESPOND BY OPERATING SWITCHES WHICH
008928,000036: # ISOLATE PAIRS OF JETS FROM THE PROPELLANT TANKS AND SET BITS IN CHANNEL 32). IN THE EVENT THAT CHANNEL 32 BITS
008929,000037: # DIFFER FROM 'PVALVEST', THE RECORD OF ACTIONS TAKEN BY THIS ROUTINE, THE APPROPRIATE BITS IN 'CH5MASK' &
008930,000038: # 'CH6MASK', USED BY THE DAP JET-SELECTION LOGIC, ARE UPDATED, AS IS 'PVALVEST'. TO SPEED UP & SHORTEN THE
008931,000039: # ROUTINE, NO MORE THAN ONE CHANGE IS ACCEPTED PER ENTRY. THE HIGHEST-NUMBERED BIT IN CHANNEL 32 WHICH REQUIRES
008932,000040: # ACTION IS THE ONE PROCESSED.
008933,000041:
008934,000042: # THE CODING IN THE FAILURE MONITOR HAS BEEN WRITTEN SO AS TO HAVE ALMOST COMPLETE RESTART PROTECTION. FOR
008935,000043: # EXAMPLE, NO ASSUMPTION IS MADE WHEN SETTING A 'CH5MASK' BIT TO 1 THAT THE PREVIOUS STATE IS 0, ALTHOUGH IT OF
008936,000044: # COURSE SHOULD BE. ONE CASE WHICH MAY BE SEEN TO EVADE PROTECTION IS THE OCCURRENCE OF A RESTART AFTER UPDATING
008937,000045: # ONE OR BOTH DAP MASK-WORDS BUT BEFORE UPDATING 'PVALVEST', COUPLED WITH A CHANGE IN THE VALVE-BIT BACK TO ITS
008938,000046: # FORMER STATE. THE CONSEQUENCE OF THIS IS THAT THE NEXT ENTRY WOULD NOT SEE THE CHANGE INCOMPLETELY INCORP-
008939,000047: # ORATED BY THE LAST PASS (BECAUSE IT WENT AWAY AT JUST THE RIGHT TIME), BUT THE DAP MASK-WORDS WILL BE INCORRECT.
008940,000048: # THIS COMBINATION OF EVENTS SEEMS QUITE REMOTE, BUT NOT IMPOSSIBLE UNLESS THE CREW OPERATES THE SWITCHES AT HALF-
008941,000049: # SECOND INTERVALS OR LONGER. IN ANY EVENT, A DISAGREEMENT BETWEEN REALITY AND THE DAP MASKS WILL BE CURED IF
008942,000050: # THE MISINTERPRETED SWITCH IS REVERSED AND THEN RESTORED TO ITS CORRECT POSITION (SLOWLY).
008943,000051:
008944,000052: # CALLING SEQUENCE:
008945,000053:
008946,000054: # TCF RCSMONIT (IN INTERRUPT MODE, EVERY 480 MS.)
008947,000055:
008948,000056: # EXIT: TCF RCSMONEX (ALL PATHS EXIT VIA SUCH AN INSTRUCTION)
008949,000057: 06,3156 5270 RCSMONEX EQUALS RESUME
008950,000058:
008951,000059: # ERASABLE INITIALIZATION REQUIRED:
008952,000060:
008953,000061: # VIA FRESH START: PVALVEST = +0 (ALL JETS ENABLED)
008954,000062: # CH5MASK, CH6MASK = +0 (ALL JETS OK)
008955,000063:
008956,000064: # OUTPUT: CH5MASK & CH6MASK UPDATED (1'S WHERE JETS NOT TO BE USED, IN CHANNEL 5 & 6 FORMAT)
008957,000065: # PVALTEST UPDATED (1,S WHEN VALVE CLOSURES HAVE BEEN TRANSLATED INTO CH5MASK & CH6MASK; CHAN 32 FORMAT)
008958,000066: # JOB TO DO 1/ACCS.
008959,000067:
008960,000068: # DEBRIS: A, L, Q AND DEBRIS OF NOVAC.
008961,000069:
008962,000070: # SUBROUTINE CALLED: NOVAC.
008963,000071:
008964,000072: 06,3156 1262 EBANK= CH5MASK
008965,000073:
008966,000074: 23,2000 BANK 23
008967,000075: 06,2000 SETLOC RCSMONT
008968,000076: 06,2000 BANK
008969,000077:
Page 206 |
008971,000079: 06,3156 COUNT* $$/T4RCS
008972,000080:
008973,000081: 06,3156 06,3156 RCSMONIT EQUALS RCSMON
008974,000082:
008975,000083: 06,3156 44755 RCSMON CS ZERO
008976,000084: 06,3157 00006 EXTEND
008977,000085: 06,3160 06032 RXOR CHAN32 # PICK UP + INVERT INVERTED CHANNEL 32.
008978,000086: 06,3161 74357 MASK LOW8 # KEEP JET-FAIL BITS ONLY.
008979,000087: 06,3162 54002 TS Q
008980,000088:
008981,000089: 06,3163 41276 CS PVALVEST # - -
008982,000090: 06,3164 70002 MASK Q # FORM PC + PC.
008983,000091: 06,3165 54001 TS L # (P = PREVIOUS ISOLATION VALVE STATE,
008984,000092: 06,3166 40002 CS Q # C = CURRENT VALVE STATE (CH32)).
008985,000093: 06,3167 71276 MASK PVALVEST
008986,000094: 06,3170 26001 ADS L # RESULT NZ INDICATES ACTION REQUIRED.
008987,000095:
008988,000096: 06,3171 00006 EXTEND
008989,000097: 06,3172 15270 BZF RCSMONEX # QUIT IF NO ACTION REQUIRED.
008990,000098:
008991,000099: 06,3173 00006 EXTEND
008992,000100: 06,3174 74745 MP BIT7 # MOVE BITS 8 - 1 OF A TO 14 - 7 OF L.
008993,000101: 06,3175 56001 XCH L # ZERO TO L IN THE PROCESS.
008994,000102:
008995,000103: 06,3176 24001 -3 INCR L
008996,000104: 06,3177 60000 DOUBLE # BOUND TO GET OVERFLOW IN THIS LOOP,
008997,000105: 06,3200 54000 OVSK # SINCE WE ASSURED INITIAL NZ IN A.
008998,000106: 06,3201 13176 TCF -3
008999,000107:
009000,000108: 06,3202 50001 INDEX L
009001,000109: 06,3203 34743 CA BIT8 -1 # SAVE THE RELEVANT BIT (8 - 1).
009002,000110: 06,3204 54002 TS Q
009003,000111: 06,3205 71276 MASK PVALVEST # LOOK AT PREVIOUS VALVE STATE BIT.
009004,000112: 06,3206 10000 CCS A
009005,000113: 06,3207 13223 TCF VOPENED # THE VALVE HAS JUST BEEN OPENED.
009006,000114:
009007,000115: 06,3210 41262 CS CH5MASK # THE VALVE HAS JUST BEEN CLOSED.
009008,000116: 06,3211 50001 INDEX L
009009,000117: 06,3212 73242 MASK 5FAILTAB
009010,000118: 06,3213 27262 ADS CH5MASK # SET INHIBIT BIT FOR CHANNEL 5 JET.
009011,000119:
009012,000120: 06,3214 41263 CS CH6MASK
009013,000121: 06,3215 50001 INDEX L
009014,000122: 06,3216 73252 MASK 6FAILTAB
009015,000123: 06,3217 27263 ADS CH6MASK # SET INGIBIT BIT FOR CHANNEL 6 JET.
009016,000124:
009017,000125: 06,3220 30002 CA Q
009018,000126: 06,3221 27276 ADS PVALVEST # RECORD ACTION TAKEN.
009019,000127:
009020,000128: 06,3222 13236 TCF 1/ACCFIX # SET UP 1/ACCJOB AND EXIT.
009021,000129:
Page 207 |
009023,000131: 06,3223 50001 VOPENED INDEX L # A VALVE HAS JUST BEEN OPENED.
009024,000132: 06,3224 43242 CS 5FAILTAB
009025,000133: 06,3225 71262 MASK CH5MASK
009026,000134: 06,3226 55262 TS CH5MASK # REMOVE INHIBIT BIT FOR CHANNEL 5 JET.
009027,000135:
009028,000136: 06,3227 50001 INDEX L
009029,000137: 06,3230 43252 CS 6FAILTAB
009030,000138: 06,3231 71263 MASK CH6MASK
009031,000139: 06,3232 55263 TS CH6MASK # REMOVE INHIBIT BIT FOR CHANNEL 6 JET.
009032,000140:
009033,000141: 06,3233 40002 CS Q
009034,000142: 06,3234 71276 MASK PVALVEST
009035,000143: 06,3235 55276 TS PVALVEST # RECORD ACTION TAKEN.
009036,000144:
009037,000145: 06,3236 37714 1/ACCFIX CAF PRIO27 # SET UP 1/ACCS SO THAT THE SWITCH CURVES
009038,000146: 06,3237 05072 TC NOVAC # FOR TJETLAW CAN BE MODIFIED IF CH5MASK
009039,000147: 06,3240 E6,1537 EBANK= AOSQ # HAS BEEN ALTERED.
009040,000148: 06,3240 02454 40106 2CADR 1/ACCJOB
009041,000149:
009042,000150: 06,3242 15270 TCF RCSMONEX # EXIT.
009043,000151:
009044,000152: 06,3243 5FAILTAB EQUALS -1 # CH 5 JET BIT CORRESPONDING TO CH 32 BIT:
009045,000153: 06,3243 00040 OCT 00040 # 8
009046,000154: 06,3244 00020 OCT 00020 # 7
009047,000155: 06,3245 00100 OCT 00100 # 6
009048,000156: 06,3246 00200 OCT 00200 # 5
009049,000157: 06,3247 00010 OCT 00010 # 4
009050,000158: 06,3250 00001 OCT 00001 # 3
009051,000159: 06,3251 00004 OCT 00004 # 2
009052,000160: 06,3252 00002 OCT 00002 # 1
009053,000161:
009054,000162: 06,3253 6FAILTAB EQUALS -1 # CH 6 JET BIT CORRESPONDING TO CH 32 BIT:
009055,000163: 06,3253 00010 OCT 00010 # 8
009056,000164: 06,3254 00020 OCT 00020 # 7
009057,000165: 06,3255 00004 OCT 00004 # 6
009058,000166: 06,3256 00200 OCT 00200 # 5
009059,000167: 06,3257 00001 OCT 00001 # 4
009060,000168: 06,3260 00002 OCT 00002 # 3
009061,000169: 06,3261 00040 OCT 00040 # 2
009062,000170: 06,3262 00100 OCT 00100 # 1
End of include-file RCS_FAILURE_MONITOR.agc. Parent file is MAIN.agc