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:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

031416,000002:                                                                                                  ## Copyright:   Public domain.
031417,000003:                                                                                                  ## Filename:    R13.agc
031418,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
031419,000005:                                                                                                  ##              as closely as possible with available information. Sundance
031420,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
031421,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
031422,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
031423,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
031424,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
031425,000011:                                                                                                  ##              or the Sundance GSOPs.
031426,000012:                                                                                                  ## Assembler:   yaYUL
031427,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
031428,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
031429,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
031430,000016:                                                                                                  ##              2021-05-30 ABS  Removed DEC66 symbol not present in Luminary 69.
031431,000017: 
031432,000018: 
031433,000019: 
031434,000020: 31,2171  E7,1606                                  EBANK=   E2DPS                                 
031435,000021: 
031436,000022:                                                                                                  #  ****************************************************************************************************************
031437,000023:                                                                                                  #  GUILDENSTERN:  AUTO-MODES MONITOR (R13)
031438,000024:                                                                                                  #  ****************************************************************************************************************
031439,000025: 
031440,000026: 31,2171                                           COUNT*   $$/R13                                
031441,000027: 
031442,000028:                                                                                                  #     HERE IS THE PHILOSOPHY OF GUILDENSTERN:    ON EVERY APPEARANCE OR DISAPPEARANCE OF THE MANUAL THROTTLE
031443,000029:                                                                                                  #  DISCRETE TO SELECT P67 OR P66 RESPECTIVELY;   ON EVERY APPEARANCE OF THE ATTITUDE-HOLD DISCRETE TO SELECT P66
031444,000030:                                                                                                  #  UNLESS THE CURRENT PROGRAM IS P67 IN WHICH CASE THERE IS NO CHANGE.
031445,000031: 
031446,000032: 31,2171           00006        GUILDEN            EXTEND                                         #  IS UN-AUTO-THROTTLE DISCRETE PRESENT?
031447,000033: 31,2172           00030                           READ     CHAN30                                
031448,000034: 31,2173           75022                           MASK     BIT5                                  
031449,000035: 31,2174           10000                           CCS      A                                     
031450,000036: 31,2175           12217                           TCF      STARTP67                              #  YES
031451,000037: 31,2176           05375        P67NOW?            TC       CHECKMM                               #  NO:   ARE WE IN P67 NOW?
031452,000038: 31,2177           00103                           DEC      67         B-14                       
031453,000039: 31,2200           12223                           TCF      STABL?                                #  NO
031454,000040: 31,2201           03562        STARTP66           TC       FASTCHNG                              #  YES
031455,000041: 31,2202           05361                           TC       NEWMODEX                              
031456,000042: 31,2203           00102                           DEC      66         B-14                       
031457,000043: 31,2204           00006                           EXTEND                                         #  INITIALIZE VDGVERT USING
031458,000044: 31,2205           31614                           DCA      VGU                                   #    PRESENT DOWNWARD VELOCITY
031459,000045: 31,2206           53654                           DXCH     VDGVERT                               
031460,000046: 31,2207           35030                           CAF      ZERO                                  
031461,000047: 31,2210           55655                           TS       RODCOUNT                              
031462,000048: 31,2211           55656        VRTSTART           TS       WCHVERT                               
031463,000049: 31,2212           32234                           CAF      VERTADR                               #  WCHPHASE = VERTICAL: P65,P66,P67
031464,000050: 31,2213           55606                           TS       WCHPHASE                              
031465,000051: 31,2214           05600                           TC       DOWNFLAG                              #  PERMIT X-AXIS OVERRIDE
031466,000052: 31,2215           17140                           CADR     XOVINFLG                              
031467,000053: 31,2216           12505                           TCF      GUILDRET                              
031468,000054: 
031469,000055: 31,2217           05361        STARTP67           TC       NEWMODEX                              #  NO HARM IN "STARTING" P67 OVER AND OVER
031470,000056: 31,2220           00103                           DEC      67         B-14                       #    SO NO NEED FOR A FASTCHNG AND NO NEED
031471,000057: 
031472,000058: 31,2221           34375                           CAF      TEN                                   #    TO SEE IF ALREADY IN P67
031473,000059: 31,2222           12211                           TCF      VRTSTART                              
031474,000060: 
031475,000061: 31,2223           35011        STABL?             CAF      BIT14                                 #  IS AUTO MODE DISCRETE PRESENT?
031476,000062: 31,2224           00006                           EXTEND                                         
031477,000063: 31,2225           02031                           RAND     CHAN31                                
031478,000064: 31,2226           00006                           EXTEND                                         
031479,000065: 31,2227           12505                           BZF      GUILDRET                              #  YES: ALL'S WELL
031480,000066: 31,2230           05375        P66NOW?            TC       CHECKMM                               #  NO:  ARE WE IN P66 NOW?
031481,000067: 31,2231           00102                           DEC      66         B-14                       
031482,000068: 31,2232           12201                           TCF      STARTP66                              #  NO
031483,000069: 31,2233           12505                           TCF      GUILDRET                              #  YES
031484,000070: 
031485,000071: 31,2234           02467        VERTADR            ADRES    VERTICAL                              

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