Source Code
These source code files are an attempted reconstruction of Sundance revision 306, the Apollo 9
LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of
original core rope program modules, as follows:
|
006799,000002: ## Copyright: Public domain.
006800,000003: ## Filename: RCS_FAILURE_MONITOR.agc
006801,000004: ## Purpose: A section of an attempt to reconstruct Sundance revision 306
006802,000005: ## as closely as possible with available information. Sundance
006803,000006: ## 306 is the source code for the Lunar Module's (LM) Apollo
006804,000007: ## Guidance Computer (AGC) for Apollo 9. This program was created
006805,000008: ## using the mixed-revision SundanceXXX as a starting point, and
006806,000009: ## pulling back features from Luminary 69 believed to have been
006807,000010: ## added based on memos, checklists, observed address changes,
006808,000011: ## or the Sundance GSOPs.
006809,000012: ## Assembler: yaYUL
006810,000013: ## Contact: Ron Burkey <info@sandroid.org>.
006811,000014: ## Website: www.ibiblio.org/apollo/index.html
006812,000015: ## Mod history: 2020-07-24 MAS Created from SundanceXXX.
006813,000016:
006814,000017:
006815,000018:
006816,000019: # PROGRAM DESCRIPTION
006817,000020:
006818,000021: # AUTHOR: J S MILLER
006819,000022:
006820,000023: # MODIFIED 6 MARCH 1968 BY P S WEISSMAN TO SET UP JOB FOR 1/ACCS WHEN THE MASKS ARE CHANGED.
006821,000024:
006822,000025: # THIS ROUTINE IS ATTACHED TO T4RUPT, AND IS ENTERED EVERY 480 MS. ITS FUNCTION IS TO EXAMINE THE LOW 8 BITS
006823,000026: # OF CHANNEL 32 TO SEE IF ANY ISOLATION-VALVE CLOSURE BITS HAVE APPEARED OR DISAPPEARED (THE CREW IS WARNED OF JET
006824,000027: # FAILURES BY LAMPS LIT BY THE GRUMMAN FAILURE-DETECTION CIRCUITRY; THEY MAY RESPOND BY OPERATING SWITCHES WHICH
006825,000028: # ISOLATE PAIRS OF JETS FROM THE PROPELLANT TANKS AND SET BITS IN CHANNEL 32). IN THE EVENT THAT CHANNEL 32 BITS
006826,000029: # DIFFER FROM 'PVALVEST', THE RECORD OF ACTIONS TAKEN BY THIS ROUTINE, THE APPROPRIATE BITS IN 'CH5MASK' &
006827,000030: # 'CH6MASK', USED BY THE DAP JET-SELECTION LOGIC, ARE UPDATED, AS IS 'PVALVEST'. TO SPEED UP & SHORTEN THE
006828,000031: # ROUTINE, NO MORE THAN ONE CHANGE IS ACCEPTED PER ENTRY. THE HIGHEST-NUMBERED BIT IN CHANNEL 32 WHICH REQUIRES
006829,000032: # ACTION IS THE ONE PROCESSED.
006830,000033:
006831,000034: # THE CODING IN THE FAILURE MONITOR HAS BEEN WRITTEN SO AS TO HAVE ALMOST COMPLETE RESTART PROTECTION. FOR
006832,000035: # EXAMPLE, NO ASSUMPTION IS MADE WHEN SETTING A 'CH5MASK' BIT TO 1 THAT THE PREVIOUS STATE IS 0, ALTHOUGH IT OF
006833,000036: # COURSE SHOULD BE. ONE CASE WHICH MAY BE SEEN TO EVADE PROTECTION IS THE OCCURRENCE OF A RESTART AFTER UPDATING
006834,000037: # ONE OR BOTH DAP MASK-WORDS BUT BEFORE UPDATING 'PVALVEST', COUPLED WITH A CHANGE IN THE VALVE-BIT BACK TO ITS
006835,000038: # FORMER STATE. THE CONSEQUENCE OF THIS IS THAT THE NEXT ENTRY WOULD NOT SEE THE CHANGE INCOMPLETELY INCORP-
006836,000039: # ORATED BY THE LAST PASS (BECAUSE IT WENT AWAY AT JUST THE RIGHT TIME), BUT THE DAP MASK-WORDS WILL BE INCORRECT.
006837,000040: # THIS COMBINATION OF EVENTS SEEMS QUITE REMOTE, BUT NOT IMPOSSIBLE UNLESS THE CREW OPERATES THE SWITCHES AT HALF-
006838,000041: # SECOND INTERVALS OR LONGER. IN ANY EVENT, A DISAGREEMENT BETWEEN REALITY AND THE DAP MASKS WILL BE CURED IF
006839,000042: # THE MISINTERPRETED SWITCH IS REVERSED AND THEN RESTORED TO ITS CORRECT POSITION (SLOWLY).
006840,000043:
006841,000044: # CALLING SEQUENCE:
006842,000045:
006843,000046: # TCF RCSMONIT (IN INTERRUPT MODE, EVERY 480 MS.)
006844,000047:
006845,000048: # EXIT: TCF RCSMONEX (ALL PATHS EXIT VIA SUCH AN INSTRUCTION)
006846,000049: 06,3153 06,3260 RCSMONEX EQUALS STAGEMON
006847,000050:
006848,000051: # ERASABLE INITIALIZATION REQUIRED:
006849,000052:
006850,000053: # VIA FRESH START: PVALVEST = +0 (ALL JETS ENABLED)
006851,000054: # CH5MASK, CH6MASK = +0 (ALL JETS OK)
006852,000055:
006853,000056: # OUTPUT: CH5MASK & CH6MASK UPDATED (1'S WHERE JETS NOT TO BE USED, IN CHANNEL 5 & 6 FORMAT)
006854,000057: # PVALTEST UPDATED (1,S WHEN VALVE CLOSURES HAVE BEEN TRANSLATED INTO CH5MASK & CH6MASK; CHAN 32 FORMAT)
006855,000058: # JOB TO DO 1/ACCS.
006856,000059:
006857,000060: # DEBRIS: A, L, Q AND DEBRIS OF NOVAC.
006858,000061:
006859,000062: # SUBROUTINE CALLED: NOVAC.
006860,000063:
006861,000064: 06,3153 1264 EBANK= CH5MASK
006862,000065:
006863,000066: 23,2000 BANK 23
006864,000067: 06,2000 SETLOC RCSMONT
006865,000068: 06,2000 BANK
006866,000069:
006867,000070: 06,3153 COUNT* $$/T4RCS
006868,000071:
006869,000072: 06,3153 06,3153 RCSMONIT EQUALS RCSMON
006870,000073:
006871,000074: 06,3153 45030 RCSMON CS ZERO
006872,000075: 06,3154 00006 EXTEND
006873,000076: 06,3155 06032 RXOR CHAN32 # PICK UP + INVERT INVERTED CHANNEL 32.
006874,000077: 06,3156 74371 MASK LOW8 # KEEP JET-FAIL BITS ONLY.
006875,000078: 06,3157 54002 TS Q
006876,000079:
006877,000080: 06,3160 41300 CS PVALVEST # - -
006878,000081: 06,3161 70002 MASK Q # FORM PC + PC.
006879,000082: 06,3162 54001 TS L # (P = PREVIOUS ISOLATION VALVE STATE,
006880,000083: 06,3163 40002 CS Q # C = CURRENT VALVE STATE (CH32)).
006881,000084: 06,3164 71300 MASK PVALVEST
006882,000085: 06,3165 26001 ADS L # RESULT NZ INDICATES ACTION REQUIRED.
006883,000086:
006884,000087: 06,3166 00006 EXTEND
006885,000088: 06,3167 13260 BZF RCSMONEX # QUIT IF NO ACTION REQUIRED.
006886,000089:
006887,000090: 06,3170 00006 EXTEND
006888,000091: 06,3171 75020 MP BIT7 # MOVE BITS 8 - 1 OF A TO 14 - 7 OF L.
006889,000092: 06,3172 56001 XCH L # ZERO TO L IN THE PROCESS.
006890,000093:
006891,000094: 06,3173 24001 -3 INCR L
006892,000095: 06,3174 60000 DOUBLE # BOUND TO GET OVERFLOW IN THIS LOOP,
006893,000096: 06,3175 54000 OVSK # SINCE WE ASSURED INITIAL NZ IN A.
006894,000097: 06,3176 13173 TCF -3
006895,000098:
006896,000099: 06,3177 50001 INDEX L
006897,000100: 06,3200 35016 CA BIT8 -1 # SAVE THE RELEVANT BIT (8 - 1).
006898,000101: 06,3201 54002 TS Q
006899,000102: 06,3202 71300 MASK PVALVEST # LOOK AT PREVIOUS VALVE STATE BIT.
006900,000103: 06,3203 10000 CCS A
006901,000104: 06,3204 13220 TCF VOPENED # THE VALVE HAS JUST BEEN OPENED.
006902,000105:
006903,000106: 06,3205 41264 CS CH5MASK # THE VALVE HAS JUST BEEN CLOSED.
006904,000107: 06,3206 50001 INDEX L
006905,000108: 06,3207 73237 MASK 5FAILTAB
006906,000109: 06,3210 27264 ADS CH5MASK # SET INHIBIT BIT FOR CHANNEL 5 JET.
006907,000110:
006908,000111: 06,3211 41265 CS CH6MASK
006909,000112: 06,3212 50001 INDEX L
006910,000113: 06,3213 73247 MASK 6FAILTAB
006911,000114: 06,3214 27265 ADS CH6MASK # SET INGIBIT BIT FOR CHANNEL 6 JET.
006912,000115:
006913,000116: 06,3215 30002 CA Q
006914,000117: 06,3216 27300 ADS PVALVEST # RECORD ACTION TAKEN.
006915,000118:
006916,000119: 06,3217 13233 TCF 1/ACCFIX # SET UP 1/ACCJOB AND EXIT.
006917,000120:
006918,000121: 06,3220 50001 VOPENED INDEX L # A VALVE HAS JUST BEEN OPENED.
006919,000122: 06,3221 43237 CS 5FAILTAB
006920,000123: 06,3222 71264 MASK CH5MASK
006921,000124: 06,3223 55264 TS CH5MASK # REMOVE INHIBIT BIT FOR CHANNEL 5 JET.
006922,000125:
006923,000126: 06,3224 50001 INDEX L
006924,000127: 06,3225 43247 CS 6FAILTAB
006925,000128: 06,3226 71265 MASK CH6MASK
006926,000129: 06,3227 55265 TS CH6MASK # REMOVE INHIBIT BIT FOR CHANNEL 6 JET.
006927,000130:
006928,000131: 06,3230 40002 CS Q
006929,000132: 06,3231 71300 MASK PVALVEST
006930,000133: 06,3232 55300 TS PVALVEST # RECORD ACTION TAKEN.
006931,000134:
006932,000135: 06,3233 37667 1/ACCFIX CAF PRIO27 # SET UP 1/ACCS SO THAT THE SWITCH CURVES
006933,000136: 06,3234 05142 TC NOVAC # FOR TJETLAW CAN BE MODIFIED IF CH5MASK
006934,000137: 06,3235 E6,1532 EBANK= AOSQ # HAS BEEN ALTERED.
006935,000138: 06,3235 02312 40006 2CADR 1/ACCJOB
006936,000139:
006937,000140: 06,3237 13260 TCF RCSMONEX # EXIT.
006938,000141:
006939,000142: 06,3240 5FAILTAB EQUALS -1 # CH 5 JET BIT CORRESPONDING TO CH 32 BIT:
006940,000143: 06,3240 00040 OCT 00040 # 8
006941,000144: 06,3241 00020 OCT 00020 # 7
006942,000145: 06,3242 00100 OCT 00100 # 6
006943,000146: 06,3243 00200 OCT 00200 # 5
006944,000147: 06,3244 00010 OCT 00010 # 4
006945,000148: 06,3245 00001 OCT 00001 # 3
006946,000149: 06,3246 00004 OCT 00004 # 2
006947,000150: 06,3247 00002 OCT 00002 # 1
006948,000151:
006949,000152: 06,3250 6FAILTAB EQUALS -1 # CH 6 JET BIT CORRESPONDING TO CH 32 BIT:
006950,000153: 06,3250 00010 OCT 00010 # 8
006951,000154: 06,3251 00020 OCT 00020 # 7
006952,000155: 06,3252 00004 OCT 00004 # 6
006953,000156: 06,3253 00200 OCT 00200 # 5
006954,000157: 06,3254 00001 OCT 00001 # 4
006955,000158: 06,3255 00002 OCT 00002 # 3
006956,000159: 06,3256 00040 OCT 00040 # 2
006957,000160: 06,3257 00100 OCT 00100 # 1
End of include-file RCS_FAILURE_MONITOR.agc. Parent file is MAIN.agc