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,1968
Note that the date is the date of the printout, not the date of the program revision.

008891,000002:                                                                                                  ## Copyright:   Public domain.
008892,000003:                                                                                                  ## Filename:    RCS_FAILURE_MONITOR.agc
008893,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
008894,000005:                                                                                                  ##              It is part of the source code for the original release
008895,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
008896,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
008897,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
008898,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
008899,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
008900,000011:                                                                                                  ##              that the code format has been changed to conform to the
008901,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
008902,000013:                                                                                                  ##              original YUL assembler.
008903,000014:                                                                                                  ## Reference:   pp. 205-207
008904,000015:                                                                                                  ## Assembler:   yaYUL
008905,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
008906,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
008907,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
008908,000019:                                                                                                  ##              2016-01-06 HG   Transcribed
008909,000020:                                                                                                  ##              2017-01-25 RSB  Proofed comment text using octopus/prooferComments
008910,000021:                                                                                                  ##                              but no errors found.
008911,000022:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
008912,000023:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
008913,000024:                                                                                                  ##              2017-08-18 RSB  Comment-text bug identified in ZERLINA 56.
008914,000025: 

Page 205

008916,000027:                                                                                                  #  PROGRAM DESCRIPTION
008917,000028: 
008918,000029:                                                                                                  #  AUTHOR:  J S MILLER
008919,000030: 
008920,000031:                                                                                                  #  MODIFIED 6 MARCH 1968 BY P S WEISSMAN TO SET UP JOB FOR 1/ACCS WHEN THE MASKS ARE CHANGED.
008921,000032: 
008922,000033:                                                                                                  #       THIS ROUTINE IS ATTACHED TO T4RUPT, AND IS ENTERED EVERY 480 MS.  ITS FUNCTION IS TO EXAMINE THE LOW 8 BITS
008923,000034:                                                                                                  #  OF CHANNEL 32 TO SEE IF ANY ISOLATION-VALVE CLOSURE BITS HAVE APPEARED OR DISAPPEARED (THE CREW IS WARNED OF JET
008924,000035:                                                                                                  #  FAILURES BY LAMPS LIT BY THE GRUMMAN FAILURE-DETECTION CIRCUITRY; THEY MAY RESPOND BY OPERATING SWITCHES WHICH
008925,000036:                                                                                                  #  ISOLATE PAIRS OF JETS FROM THE PROPELLANT TANKS AND SET BITS IN CHANNEL 32).  IN THE EVENT THAT CHANNEL 32 BITS
008926,000037:                                                                                                  #  DIFFER FROM 'PVALVEST', THE RECORD OF ACTIONS TAKEN BY THIS ROUTINE, THE APPROPRIATE BITS IN 'CH5MASK' &
008927,000038:                                                                                                  #  'CH6MASK', USED BY THE DAP JET-SELECTION LOGIC, ARE UPDATED, AS IS 'PVALVEST'.  TO SPEED UP & SHORTEN THE
008928,000039:                                                                                                  #  ROUTINE, NO MORE THAN ONE CHANGE IS ACCEPTED PER ENTRY.  THE HIGHEST-NUMBERED BIT IN CHANNEL 32 WHICH REQUIRES
008929,000040:                                                                                                  #  ACTION IS THE ONE PROCESSED.
008930,000041: 
008931,000042:                                                                                                  #       THE CODING IN THE FAILURE MONITOR HAS BEEN WRITTEN SO AS TO HAVE ALMOST COMPLETE RESTART PROTECTION.  FOR
008932,000043:                                                                                                  #  EXAMPLE, NO ASSUMPTION IS MADE WHEN SETTING A 'CH5MASK' BIT TO 1 THAT THE PREVIOUS STATE IS 0, ALTHOUGH IT OF
008933,000044:                                                                                                  #  COURSE SHOULD BE.  ONE CASE WHICH MAY BE SEEN TO EVADE PROTECTION IS THE OCCURRENCE OF A RESTART AFTER UPDATING
008934,000045:                                                                                                  #  ONE OR BOTH DAP MASK-WORDS BUT BEFORE UPDATING 'PVALVEST', COUPLED WITH A CHANGE IN THE VALVE-BIT BACK TO ITS
008935,000046:                                                                                                  #  FORMER STATE.  THE CONSEQUENCE OF THIS IS THAT THE NEXT ENTRY WOULD NOT SEE THE CHANGE INCOMPLETELY INCORP-
008936,000047:                                                                                                  #  ORATED BY THE LAST PASS (BECAUSE IT WENT AWAY AT JUST THE RIGHT TIME), BUT THE DAP MASK-WORDS WILL BE INCORRECT.
008937,000048:                                                                                                  #  THIS COMBINATION OF EVENTS SEEMS QUITE REMOTE, BUT NOT IMPOSSIBLE UNLESS THE CREW OPERATES THE SWITCHES AT HALF-
008938,000049:                                                                                                  #  SECOND INTERVALS OR LONGER.  IN ANY EVENT, A DISAGREEMENT BETWEEN REALITY AND THE DAP MASKS WILL BE CURED IF
008939,000050:                                                                                                  #  THE MISINTERPRETED SWITCH IS REVERSED AND THEN RESTORED TO ITS CORRECT POSITION (SLOWLY).
008940,000051: 
008941,000052:                                                                                                  #  CALLING SEQUENCE:
008942,000053: 
008943,000054:                                                                                                  #           TCF    RCSMONIT        (IN INTERRUPT MODE, EVERY 480 MS.)
008944,000055: 
008945,000056:                                                                                                  #  EXIT:  TCF  RCSMONEX  (ALL PATHS EXIT VIA SUCH AN INSTRUCTION)
008946,000057: 06,3156     5270               RCSMONEX           EQUALS   RESUME                                
008947,000058: 
008948,000059:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
008949,000060: 
008950,000061:                                                                                                  #           VIA FRESH START:  PVALVEST          = +0  (ALL JETS ENABLED)
008951,000062:                                                                                                  #                             CH5MASK, CH6MASK  = +0  (ALL JETS OK)
008952,000063: 
008953,000064:                                                                                                  #  OUTPUT:  CH5MASK & CH6MASK UPDATED  (1'S WHERE JETS NOT TO BE USED, IN CHANNEL 5 & 6 FORMAT)
008954,000065:                                                                                                  #           PVALTEST UPDATED  (1,S WHEN VALVE CLOSURES HAVE BEEN TRANSLATED INTO CH5MASK & CH6MASK; CHAN 32 FORMAT)
008955,000066:                                                                                                  #           JOB TO DO 1/ACCS.
008956,000067: 
008957,000068:                                                                                                  #  DEBRIS:  A, L, Q AND DEBRIS OF NOVAC.
008958,000069: 
008959,000070:                                                                                                  #  SUBROUTINE CALLED:  NOVAC.
008960,000071: 
008961,000072: 06,3156     1262                                  EBANK=   CH5MASK                               
008962,000073: 
008963,000074: 23,2000                                           BANK     23                                    
008964,000075: 06,2000                                           SETLOC   RCSMONT                               
008965,000076: 06,2000                                           BANK                                           
008966,000077: 

Page 206

008968,000079: 06,3156                                           COUNT*   $$/T4RCS                              
008969,000080: 
008970,000081: 06,3156  06,3156               RCSMONIT           EQUALS   RCSMON                                
008971,000082: 
008972,000083: 06,3156           44755        RCSMON             CS       ZERO                                  
008973,000084: 06,3157           00006                           EXTEND                                         
008974,000085: 06,3160           06032                           RXOR     CHAN32                                #  PICK UP + INVERT INVERTED CHANNEL 32.
008975,000086: 06,3161           74357                           MASK     LOW8                                  #  KEEP JET-FAIL BITS ONLY.
008976,000087: 06,3162           54002                           TS       Q                                     
008977,000088: 
008978,000089: 06,3163           41276                           CS       PVALVEST                              #        -   -
008979,000090: 06,3164           70002                           MASK     Q                                     #  FORM PC + PC.
008980,000091: 06,3165           54001                           TS       L                                     #    (P = PREVIOUS ISOLATION VALVE STATE,
008981,000092: 06,3166           40002                           CS       Q                                     #     C = CURRENT VALVE STATE (CH32)).
008982,000093: 06,3167           71276                           MASK     PVALVEST                              
008983,000094: 06,3170           26001                           ADS      L                                     #  RESULT NZ INDICATES ACTION REQUIRED.
008984,000095: 
008985,000096: 06,3171           00006                           EXTEND                                         
008986,000097: 06,3172           15270                           BZF      RCSMONEX                              #  QUIT IF NO ACTION REQUIRED.
008987,000098: 
008988,000099: 06,3173           00006                           EXTEND                                         
008989,000100: 06,3174           74745                           MP       BIT7                                  #  MOVE BITS 8 - 1 OF A TO 14 - 7 OF L.
008990,000101: 06,3175           56001                           XCH      L                                     #  ZERO TO L IN THE PROCESS.
008991,000102: 
008992,000103: 06,3176           24001                 -3        INCR     L                                     
008993,000104: 06,3177           60000                           DOUBLE                                         #  BOUND TO GET OVERFLOW IN THIS LOOP,
008994,000105: 06,3200           54000                           OVSK                                           #  SINCE WE ASSURED INITIAL NZ IN A.
008995,000106: 06,3201           13176                           TCF      -3                                    
008996,000107: 
008997,000108: 06,3202           50001                           INDEX    L                                     
008998,000109: 06,3203           34743                           CA       BIT8       -1                         #  SAVE THE RELEVANT BIT (8 - 1).
008999,000110: 06,3204           54002                           TS       Q                                     
009000,000111: 06,3205           71276                           MASK     PVALVEST                              #  LOOK AT PREVIOUS VALVE STATE BIT.
009001,000112: 06,3206           10000                           CCS      A                                     
009002,000113: 06,3207           13223                           TCF      VOPENED                               #  THE VALVE HAS JUST BEEN OPENED.
009003,000114: 
009004,000115: 06,3210           41262                           CS       CH5MASK                               #  THE VALVE HAS JUST BEEN CLOSED.
009005,000116: 06,3211           50001                           INDEX    L                                     
009006,000117: 06,3212           73242                           MASK     5FAILTAB                              
009007,000118: 06,3213           27262                           ADS      CH5MASK                               #  SET INHIBIT BIT FOR CHANNEL 5 JET.
009008,000119: 
009009,000120: 06,3214           41263                           CS       CH6MASK                               
009010,000121: 06,3215           50001                           INDEX    L                                     
009011,000122: 06,3216           73252                           MASK     6FAILTAB                              
009012,000123: 06,3217           27263                           ADS      CH6MASK                               #  SET INGIBIT BIT FOR CHANNEL 6 JET.
009013,000124: 
009014,000125: 06,3220           30002                           CA       Q                                     
009015,000126: 06,3221           27276                           ADS      PVALVEST                              #  RECORD ACTION TAKEN.
009016,000127: 
009017,000128: 06,3222           13236                           TCF      1/ACCFIX                              #  SET UP 1/ACCJOB AND EXIT.
009018,000129: 

Page 207

009020,000131: 06,3223           50001        VOPENED            INDEX    L                                     #  A VALVE HAS JUST BEEN OPENED.
009021,000132: 06,3224           43242                           CS       5FAILTAB                              
009022,000133: 06,3225           71262                           MASK     CH5MASK                               
009023,000134: 06,3226           55262                           TS       CH5MASK                               #  REMOVE INHIBIT BIT FOR CHANNEL 5 JET.
009024,000135: 
009025,000136: 06,3227           50001                           INDEX    L                                     
009026,000137: 06,3230           43252                           CS       6FAILTAB                              
009027,000138: 06,3231           71263                           MASK     CH6MASK                               
009028,000139: 06,3232           55263                           TS       CH6MASK                               #  REMOVE INHIBIT BIT FOR CHANNEL 6 JET.
009029,000140: 
009030,000141: 06,3233           40002                           CS       Q                                     
009031,000142: 06,3234           71276                           MASK     PVALVEST                              
009032,000143: 06,3235           55276                           TS       PVALVEST                              #  RECORD ACTION TAKEN.
009033,000144: 
009034,000145: 06,3236           37714        1/ACCFIX           CAF      PRIO27                                #  SET UP 1/ACCS SO THAT THE SWITCH CURVES
009035,000146: 06,3237           05072                           TC       NOVAC                                 #    FOR TJETLAW CAN BE MODIFIED IF CH5MASK
009036,000147: 06,3240  E6,1537                                  EBANK=   AOSQ                                  #    HAS BEEN ALTERED.
009037,000148: 06,3240           02454 40106                     2CADR    1/ACCJOB                              
009038,000149: 
009039,000150: 06,3242           15270                           TCF      RCSMONEX                              #  EXIT.
009040,000151: 
009041,000152: 06,3243                        5FAILTAB           EQUALS   -1                                    #  CH 5 JET BIT CORRESPONDING TO CH 32 BIT:
009042,000153: 06,3243           00040                           OCT      00040                                 #  8
009043,000154: 06,3244           00020                           OCT      00020                                 #  7
009044,000155: 06,3245           00100                           OCT      00100                                 #  6
009045,000156: 06,3246           00200                           OCT      00200                                 #  5
009046,000157: 06,3247           00010                           OCT      00010                                 #  4
009047,000158: 06,3250           00001                           OCT      00001                                 #  3
009048,000159: 06,3251           00004                           OCT      00004                                 #  2
009049,000160: 06,3252           00002                           OCT      00002                                 #  1
009050,000161: 
009051,000162: 06,3253                        6FAILTAB           EQUALS   -1                                    #  CH 6 JET BIT CORRESPONDING TO CH 32 BIT:
009052,000163: 06,3253           00010                           OCT      00010                                 #  8
009053,000164: 06,3254           00020                           OCT      00020                                 #  7
009054,000165: 06,3255           00004                           OCT      00004                                 #  6
009055,000166: 06,3256           00200                           OCT      00200                                 #  5
009056,000167: 06,3257           00001                           OCT      00001                                 #  4
009057,000168: 06,3260           00002                           OCT      00002                                 #  3
009058,000169: 06,3261           00040                           OCT      00040                                 #  2
009059,000170: 06,3262           00100                           OCT      00100                                 #  1

End of include-file RCS_FAILURE_MONITOR.agc.  Parent file is MAIN.agc