Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston facility, and the scanning was sponsored by Mike Stewart. 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 in ALL-CAPS, whereas comments added later in transcription are in Mixed-Case. 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 BURST120 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:

	YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 
	BY NASA 2021106-031 DEC 7, 1967

	THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED 
	FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE 
	UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.
Note that the date is the date of the printout, not the date of the program revision.

023817,000002:                                                                                                  ## Copyright:   Public domain.
023818,000003:                                                                                                  ## Filename:    RCS_FAILURE_MONITOR.agc
023819,000004:                                                                                                  ## Purpose:     A module for revision 0 of BURST120 (Sunburst). It
023820,000005:                                                                                                  ##              is part of the source code for the Lunar Module's
023821,000006:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 5.
023822,000007:                                                                                                  ## Assembler:   yaYUL
023823,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
023824,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
023825,000010:                                                                                                  ## Mod history: 2016-09-30 RSB  Created draft version.
023826,000011:                                                                                                  ##              2016-10-30 HG   Transcribed
023827,000012:                                                                                                  ##              2016-10-31 RSB   Typos.
023828,000013:                                                                                                  ##              2016-12-06 RSB  Comment proofing via octopus/ProoferComments
023829,000014:                                                                                                  ##                              performed, and changes made.
023830,000015: 

Page 569

023832,000017:                                                                                                  #  PROGRAM DESCRIPTION                                     DATE: 7 JAN 67 
023833,000018: 
023834,000019:                                                                                                  #           AUTHOR:  J S MILLER    (MIT INSTRUMENTATION LAB)
023835,000020: 
023836,000021:                                                                                                  #           THIS ROUTINE IS ATTACHED TO T4RUPT, AND IS ENTERED EVERY 960 MS.  ITS FUNCTION IS TO EXAMINE THE STATE
023837,000022:                                                                                                  #  OF THE LOW 8 BITS OF CHAN 32 TO SEE IF RCS-JET FAILURE BITS HAVE APPEARED OR DISAPPEARED.  WHEN A STATE CHANGE
023838,000023:                                                                                                  #  IS DETECTED WHICH PERSISTS FOR 2 SAMPLES (TO FILTER OUT NOISY SIGNALS), AN LMP COMMAND IS SENT (BUT AT MOST ONE
023839,000024:                                                                                                  #  SUCH COMMAND PER SAMPLE) TO ISOLATE THE APPROPRIATE JET PAIR IF THE FAILURE SIGNAL HAS JUST APPEARED.  IF, ON
023840,000025:                                                                                                  #  THE OTHER HAND, THE DISAPPEARANCE OF A FAIL-BIT IS DETECTED, THE EVENT IS PRESUMED TO BE THE RESULT OF THE
023841,000026:                                                                                                  #  GROUND HAVING SENT AN LMP COMMAND TO OPEN THE ISOLATION VALVE AND NO SUBSEQUENT FAILURE HAVING BEEN DETECTED BY
023842,000027:                                                                                                  #  THE DETECTION CIRCUITRY.  IN EITHER CASE, THIS FAILURE-MONITOR PROGRAM RESPONDS BY UPDATING ITS RECORD OF THE
023843,000028:                                                                                                  #  STATE OF THE ISOLATION VALVES, AND ALSO THE PAIR OF WORDS IT MAINTAINS FOR USE BY THE DAP IN THE JET-POLICY
023844,000029:                                                                                                  #  SELECTION LOGIC.
023845,000030: 
023846,000031:                                                                                                  #           A FEW WORDS ABOUT LMP-RESET COMMANDS:  IN THE CYCLE IN WHICH A VALVE-CLOSURE COMMAND IS ISSUED, THE
023847,000032:                                                                                                  #  CORRESPONDING RESET COMMAND IS STORED IN THE REGISTER "JETRESET".  THIS REGISTER IS EXAMINED AT THE BEGINNING OF
023848,000033:                                                                                                  #  EACH RCSMONIT CYCLE, AND IF A COMMAND IS WAITING, IT IS SENT IMMEDIATELY.  THIS CAUSES RESET COMMANDS TO BE
023849,000034:                                                                                                  #  ISSUED AT ABOUT 960 MS AFTER THE SET COMMANDS.  THIS TECHNIQUE ASSURES THAT NO MORE THAN ONE UN-RESET SET-
023850,000035:                                                                                                  #  COMMAND IS ON AT ANY TIME (ALTHOUGH GROUND ACTIONS WILL BE SUPERIMPOSED ON THIS, HOWEVER).
023851,000036: 
023852,000037:                                                                                                  #  CALLING SEQUENCE:
023853,000038: 
023854,000039:                                                                                                  #           TC     RCSMONIT        (IN INTERRUPT MODE, EVERY 960 MS.)
023855,000040:                                                                                                  #  EXIT:
023856,000041: 
023857,000042:                                                                                                  #           TCF    RCSMONEX    (ALL PATHS EXIT VIA SUCH AN INSTRUCTION.  RCSMONEX IS PRESENTLY EQUATED TO RESUME.)
023858,000043: 
023859,000044:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
023860,000045: 
023861,000046:                                                                                                  #           VIA SLAP1:  JETRESET          = -0  (RESET-CMD BUFFER EMPTY)
023862,000047:                                                                                                  #                       THISCH32          = +0  (NO FAILURES SENSED YET)
023863,000048:                                                                                                  #                       CH5MASK, CH6MASK  = +0  (0'S IF JETS ARE OK)
023864,000049:                                                                                                  #                       LMPJFAIL          = +0  (ISOLATION VALVES ALL OPEN)
023865,000050: 
023866,000051:                                                                                                  #  OUTPUT:
023867,000052: 
023868,000053:                                                                                                  #           CH5MASK & CH6MASK UPDATED  (1'S WHERE JETS NOT TO BE USED)
023869,000054:                                                                                                  #           THISCH32 SET TO INVERTED LOW 8 BITS OF CHAN 32 (HIGH 7 = 0)
023870,000055:                                                                                                  #           LMPJFAIL UPDATED  (1'S WHEN ISOLATION COMMANDS HAVE BEEN SENT)
023871,000056:                                                                                                  #           JETRESET CONTAINS RESET-COMMANDS TO BE SENT NEXT CYCLE THRU.
023872,000057: 
023873,000058:                                                                                                  #  DEBRIS:
023874,000059: 
023875,000060:                                                                                                  #           A, L, Q, & RCSMONT1 - 4  (PRESENTLY EQUATED TO RUPTREG1 - 4)
023876,000061: 
023877,000062:                                                                                                  #  SUBROUTINES CALLED:
023878,000063: 
023879,000064:                                                                                                  #           STORCOM  (PART OF 1LMP ROUTINE)
023880,000065: 

Page 570

023882,000067: 12,3166                                           BANK     12                                    
023883,000068: 12,3166     0074                                  EBANK=   STATE                                 #  NO SWITCHED ERASABLE USED.
023884,000069: 
023885,000070: 12,3166           11162        RCSMONIT           CCS      JETRESET                              #  CHECK WHETHER A RESET IS WAITING.
023886,000071: 12,3167           05063                           TC       STORCOM    -1                         #  THERE IS A RESET TO SEND.  DO IT.
023887,000072: 12,3170           47767                           CS       ZERO                                  
023888,000073: 12,3171           55162                           TS       JETRESET                              #  DEACTIVATE THE BUFFER.
023889,000074: 
023890,000075: 12,3172           47767        AFTRESET           CS       ZERO                                  
023891,000076: 12,3173           00006                           EXTEND                                         #  PICK UP & INVERT INVERTED CHANNEL 32.
023892,000077: 12,3174           06032                           RXOR     32                                    
023893,000078: 12,3175           74564                           MASK     LOW8                                  #  KEEP JET-FAIL BITS ONLY.
023894,000079: 12,3176           57163                           XCH      THISCH32                              
023895,000080: 12,3177           54071                           TS       RCSMONT2                              #  HANG ON TO PREVIOUS CH32 STATE.
023896,000081: 
023897,000082: 12,3200           71163                           MASK     THISCH32                              #         -   --
023898,000083: 12,3201           54001                           TS       L                                     #  FORM PTL + PTL.
023899,000084: 12,3202           40101                           CS       LMPJFAIL                              #    (  P = PREVIOUS CH 32 STATE,
023900,000085: 12,3203           70001                           MASK     L                                     #       T = THIS CH 32 STATE,
023901,000086: 12,3204           54072                           TS       RCSMONT3                              #       L = LMP ISOLATION VALVE CMD STATE )
023902,000087: 12,3205           40071                           CS       RCSMONT2                              
023903,000088: 12,3206           54001                           TS       L                                     
023904,000089: 12,3207           41163                           CS       THISCH32                              
023905,000090: 12,3210           70001                           MASK     L                                     
023906,000091: 12,3211           70101                           MASK     LMPJFAIL                              
023907,000092: 12,3212           26072                           ADS      RCSMONT3                              #  BITS HERE NZ IF ACTION IS DUE NOW.
023908,000093: 
023909,000094: 12,3213           00006                           EXTEND                                         
023910,000095: 12,3214           15733                           BZF      RCSMONEX                              #  QUIT NOW IF NO ACTION REQUIRED.
023911,000096: 
023912,000097: 12,3215           00006                           EXTEND                                         
023913,000098: 12,3216           33221                           DCA      RCSMONAD                              
023914,000099: 12,3217           52006                           DTCB                                           
023915,000100: 
023916,000101: 
023917,000102: 
023918,000103: 12,3220     0074                                  EBANK=   STATE                                 #  NO SWITCHED ERASABLE USED.
023919,000104: 12,3220           02576 54060  RCSMONAD           2CADR    RCSMON                                
023920,000105: 

Page 571

023922,000107: 26,2576                                           BANK     26                                    
023923,000108: 
023924,000109: 26,2576           30072        RCSMON             CA       RCSMONT3                              
023925,000110: 26,2577           00006                           EXTEND                                         
023926,000111: 26,2600           77755                           MP       BIT7                                  #  MOVE BITS 8 - 1 OF A TO 14 - 7 OF L.
023927,000112: 26,2601           56001                           XCH      L                                     #  ZERO TO L IN THE PROCESS.
023928,000113: 
023929,000114: 26,2602           24001                 -3        INCR     L                                     
023930,000115: 26,2603           60000                           DOUBLE                                         #  BOUND TO GET AN OVERFLOW, SINCE WE
023931,000116: 26,2604           54000                           OVSK                                           #  ASSURED INITIAL NZ IN A.
023932,000117: 26,2605           12602                           TCF      -3                                    
023933,000118: 
023934,000119: 26,2606           10001                           CCS      L                                     #  PICK UP C(L)-1.
023935,000120: 26,2607           60000                           DOUBLE                                         
023936,000121: 26,2610           54073                           TS       RCSMONT4                              #  STORE FOR LATER.
023937,000122: 
023938,000123: 26,2611           50001                           INDEX    L                                     
023939,000124: 26,2612           37753                           CA       BIT8       -1                         
023940,000125: 26,2613           54072                           TS       RCSMONT3                              #  SAVE THE RELEVANT BIT (8 - 1)
023941,000126: 26,2614           70101                           MASK     LMPJFAIL                              
023942,000127: 26,2615           10000                           CCS      A                                     
023943,000128: 26,2616           12637                           TCF      LMPBIT=1                              
023944,000129: 
023945,000130: 26,2617           00006                           EXTEND                                         #  LMPBIT = 0.
023946,000131: 26,2620           50073                           INDEX    RCSMONT4                              
023947,000132: 26,2621           32654                           DCA      KILLPAIR                              #  COMMAND TO ISOLATE A PAIR, & ITS RESET.
023948,000133: 26,2622           23162                           LXCH     JETRESET                              #  PUT THE RESET COMMAND AWAY FOR NEXT TIME
023949,000134: 26,2623           05064                           TC       STORCOM                               #  SEND THE ISOLATION COMMAND.
023950,000135: 
023951,000136: 26,2624           30072                           CA       RCSMONT3                              
023952,000137: 26,2625           26101                           ADS      LMPJFAIL                              #  SET THE BIT SHOWING COMMAND SENT.
023953,000138: 
023954,000139: 26,2626           40102                           CS       CH5MASK                               #  SET THE JET-FAIL BITS IN CH5MASK &
023955,000140: 26,2627           50073                           INDEX    RCSMONT4                              #  CH6MASK.
023956,000141: 26,2630           72673                           MASK     FAILTABL                              
023957,000142: 26,2631           26102                           ADS      CH5MASK                               
023958,000143: 
023959,000144: 26,2632           40103                           CS       CH6MASK                               
023960,000145: 26,2633           50073                           INDEX    RCSMONT4                              
023961,000146: 26,2634           72674                           MASK     FAILTABL   +1                         
023962,000147: 26,2635           26103                           ADS      CH6MASK                               
023963,000148: 
023964,000149: 26,2636           15733                           TCF      RCSMONEX                              #  DONE.
023965,000150: 

Page 572

023967,000152: 26,2637           40072        LMPBIT=1           CS       RCSMONT3                              #  THE GROUND HAS RE-ENABLED A PAIR.
023968,000153: 26,2640           70101                           MASK     LMPJFAIL                              #  DON'T USE ADS BECAUSE OF THE -0 CASE.
023969,000154: 26,2641           54101                           TS       LMPJFAIL                              
023970,000155: 
023971,000156: 26,2642           50073                           INDEX    RCSMONT4                              #  TURN OFF THE JET-FAIL BITS IN CH5MASK &
023972,000157: 26,2643           42673                           CS       FAILTABL                              #  CH6MASK.
023973,000158: 26,2644           70102                           MASK     CH5MASK                               
023974,000159: 26,2645           54102                           TS       CH5MASK                               
023975,000160: 
023976,000161: 26,2646           50073                           INDEX    RCSMONT4                              
023977,000162: 26,2647           42674                           CS       FAILTABL   +1                         
023978,000163: 26,2650           70103                           MASK     CH6MASK                               
023979,000164: 26,2651           54103                           TS       CH6MASK                               
023980,000165: 26,2652           15733                           TCF      RCSMONEX                              #  DONE.
023981,000166: 
023982,000167: 
023983,000168: 
023984,000169: 26,2653     5733               RCSMONEX           EQUALS   RESUME                                #  CHANGE THIS TO ATTACH SOMETHING ON.
023985,000170: 

Page 573

023987,000172:                                                                                                  #           IN THE UPPER WORD OF EACH ENTRY OF THE KILLPAIR TABLE IS THE LMP COMMAND CODE TO ISOLATE A JET-PAIR.
023988,000173:                                                                                                  #  BIT 15 = 1 TO ALLOW USE OF THE "STORCOM" LMP ROUTINE.  THE LOWER WORD OF EACH ENTRY CONTAINS THE RESET-COMMAND
023989,000174:                                                                                                  #  CODE PLUS ONE, WHICH CORRESPONDS TO THE UPPER WORD.  (THE EXTRA +1 IS REMOVED BY THE CCS AT RCSMONIT.)
023990,000175: 
023991,000176: 26,2653           40250 00252  KILLPAIR           2OCT     40250      00252                      #  2A. JETS 10 & 11.  CMDS 168 & 169.
023992,000177: 26,2655           40170 00172                     2OCT     40170      00172                      #  2B. JETS  9 & 12.  CMDS 120 & 121.
023993,000178: 26,2657           40134 00136                     2OCT     40134      00136                      #  1A. JETS 13 & 15.  CMDS  92 &  93.
023994,000179: 26,2661           40154 00156                     2OCT     40154      00156                      #  1B. JETS 14 & 16.  CMDS 108 & 109.
023995,000180: 26,2663           40156 00160                     2OCT     40156      00160                      #  3B. JETS  6 &  7.  CMDS 110 & 111.
023996,000181: 26,2665           40310 00312                     2OCT     40310      00312                      #  4B. JETS  1 &  3.  CMDS 200 & 201.
023997,000182: 26,2667           40136 00140                     2OCT     40136      00140                      #  3A. JETS  5 &  8.  CMDS  94 &  95.
023998,000183: 26,2671           40350 00352                     2OCT     40350      00352                      #  4A. JETS  2 &  4.  CMDS 232 & 233.
023999,000184: 
024000,000185:                                                                                                  #           FAILTABL ENTRIES CONTAIN THE BIT FOR CH5MASK IN THE UPPER WORD, AND THE BIT FOR CH6MASK IN THE LOWER.
024001,000186: 
024002,000187: 26,2673           00040 00010  FAILTABL           2OCT     00040      00010                      
024003,000188: 26,2675           00020 00020                     2OCT     00020      00020                      
024004,000189: 26,2677           00100 00004                     2OCT     00100      00004                      
024005,000190: 26,2701           00200 00200                     2OCT     00200      00200                      
024006,000191: 26,2703           00010 00001                     2OCT     00010      00001                      
024007,000192: 26,2705           00001 00002                     2OCT     00001      00002                      
024008,000193: 26,2707           00004 00040                     2OCT     00004      00040                      
024009,000194: 26,2711           00002 00100                     2OCT     00002      00100                      

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