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.

055483,000002:                                                                                                  ## Copyright:   Public domain.
055484,000003:                                                                                                  ## Filename:    T6-RUPT_PROGRAMS.agc
055485,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
055486,000005:                                                                                                  ##              as closely as possible with available information. Sundance
055487,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
055488,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
055489,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
055490,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
055491,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
055492,000011:                                                                                                  ##              or the Sundance GSOPs.
055493,000012:                                                                                                  ## Assembler:   yaYUL
055494,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
055495,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
055496,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
055497,000016: 
055498,000017: 
055499,000018: 
055500,000019:                                                                                                  #  PROGRAM NAMES:        (1) T6JOBCHK    MOD. NO. 5      OCTOBER 2, 1967
055501,000020:                                                                                                  #                        (2) DOT6RUPT
055502,000021:                                                                                                  #  MODIFICATION BY:      LOWELL G HULL (A.C.ELECTRONICS)
055503,000022: 
055504,000023:                                                                                                  #  THESE PROGRAMS ENABLE THE LM DAP TO CONTROL THE THRUST TIMES OF THE REACTION CONTROL SYSTEM JETS BY USING TIME6.
055505,000024:                                                                                                  #  SINCE THE LM DAP MAINTAINS EXCLUSIVE CONTROL OVER TIME6 AND ITS INTERRUPTS, THE FOLLOWING CONVENTIONS HAVE BEEN
055506,000025:                                                                                                  #  ESTABLISHED AND MUST NOT BE TAMPERED WITH:
055507,000026:                                                                                                  #        1.      NO NUMBER IS EVER PLACED INTO TIME6 EXCEPT BY LM DAP.
055508,000027:                                                                                                  #        2.      NO PROGRAM OTHER THAN LM DAP ENABLES THE TIME6 COUNTER.
055509,000028:                                                                                                  #        3.      TO USE TIME6, THE FOLLOWING SEQUENCE IS ALWAYS EMPLOYED:
055510,000029:                                                                                                  #                A.      A POSITIVE (NON-ZERO) NUMBER IS STORED IN TIME6.
055511,000030:                                                                                                  #                B.      THE TIME6 CLOCK IS ENABLED.
055512,000031:                                                                                                  #                C.      TIME6 IS INTERROGATED AND IS:
055513,000032:                                                                                                  #                        I.      NEVER FOUND NEGATIVE (NON-ZERO) OR +0.
055514,000033:                                                                                                  #                        II.     SOMETIMES FOUND POSITIVE (BETWEEN 1 AND 240D) INDICATING THAT IT IS ACTIVE.
055515,000034:                                                                                                  #                        III.    SOMETIMES FOUND POSMAX INDICATING THAT IT IS INACTIVE AND NOT ENABLED.
055516,000035:                                                                                                  #                        IV.     SOMETIMES FOUND NEGATIVE ZERO INDICATING THAT:
055517,000036:                                                                                                  #                                A.      A T6RUPT IS ABOUT TO OCCUR AT THE NEXT DINC, OR
055518,000037:                                                                                                  #                                B.      A T6RUPT IS WAITING IN THE PRIORITY CHAIN, OR
055519,000038:                                                                                                  #                                C.      A T6RUPT IS IN PROCESS NOW.
055520,000039:                                                                                                  #        4)      ALL PROGRAMS WHICH OPERATE IN EITHER INTERRUPT MODE OR WITH INTERRUPT INHIBITED MUST CALL T6JOBCHK
055521,000040:                                                                                                  #                EVERY 5 MILLISECONDS TO PROCESS A POSSIBLE WAITING T6RUPT BEFORE IT CAN BE HONORED BY THE HARDWARE.
055522,000041:                                                                                                  #       (5.      PROGRAM JTLST, IN Q,R-AXES, HANDLES THE INPUT LIST.)
055523,000042: 
055524,000043:                                                                                                  #  T6JOBCHK CALLING SEQUENCE:
055525,000044:                                                                                                  #                L       TC      T6JOBCHK
055526,000045:                                                                                                  #                L+1     (RETURN)
055527,000046: 
055528,000047:                                                                                                  #  DOT6RUPT CALLING SEQUENCE:
055529,000048:                                                                                                  #                        DXCH    ARUPT           T6RUPT LEAD IN AT LOCATION 4004.
055530,000049:                                                                                                  #                        EXTEND
055531,000050:                                                                                                  #                        DCA     T6ADR
055532,000051:                                                                                                  #                        DTCB
055533,000052: 
055534,000053:                                                                                                  #  SUBROUTINES CALLED:   DOT6RUPT CALLS T6JOBCHK.
055535,000054: 
055536,000055:                                                                                                  #  NORMAL EXIT MODES:    T6JOBCHK RETURNS TO L +1.
055537,000056:                                                                                                  #                        DOT6RUPT TRANSFERS CONTROL TO RESUME.
055538,000057: 
055539,000058:                                                                                                  #  ALARM/ABORT MODES:    NONE.
055540,000059: 
055541,000060:                                                                                                  #  INPUT:        TIME6           NXT6ADR         OUTPUT:         TIME6           NXT6ADR         CHANNEL 5
055542,000061:                                                                                                  #                T6NEXT          T6NEXT +1                       T6NEXT          T6NEXT +1       CHANNEL 6
055543,000062:                                                                                                  #                T6FURTHA        T6FURTHA +1                     T6FURTHA        T6FURTHA +1     BIT15/CH13
055544,000063: 
055545,000064:                                                                                                  #  DEBRIS:       T6JOBCHK CLOBBERS A.  DOT6RUPT CLOBBERS NOTHING.
055546,000065: 
055547,000066:    5750                                           BLOCK    02                                    
055548,000067: 16,2000                                           BANK     16                                    
055549,000068: 16,2000                                           SETLOC   DAPS1                                 
055550,000069: 16,2000                                           BANK                                           
055551,000070: 16,2000  E6,1454                                  EBANK=   T6NEXT                                
055552,000071: 16,2000                                           COUNT*   $$/DAPT6                              
055553,000072: 
055554,000073: 16,2000           10031        T6JOBCHK           CCS      TIME6                                 #  CHECK TIME6 FOR WAITING T6RUPT:
055555,000074: 16,2001           00002                           TC       Q                                     #  NONE: CLOCK COUTING DOWN.
055556,000075: 16,2002           05726                           TC       CCSHOLE                               
055557,000076: 16,2003           02003                           TC       T6JOBCHK   +3                         
055558,000077: 
055559,000078:                                                                                                  #  CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
055560,000079: 
055561,000080: 16,2004           35006        T6JOB              CAF      POSMAX                                #  DISABLE CLOCK: NEEDED SINCE RUPT OCCURS
055562,000081: 16,2005           00006                           EXTEND                                         #  1 DINC AFTER T6 = 77777. FOR 625 MUSECS
055563,000082: 16,2006           03013                           WAND     CHAN13                                #  MUST NOT HAVE T6 = +0 WITH ENABLE SET
055564,000083: 
055565,000084: 16,2007           35006                           CA       POSMAX                                
055566,000085: 16,2010           22007                           ZL                                             
055567,000086: 16,2011           53457                           DXCH     T6FURTHA                              
055568,000087: 16,2012           53455                           DXCH     T6NEXT                                
055569,000088: 16,2013           23453                           LXCH     NXT6ADR                               
055570,000089: 16,2014           54031                           TS       TIME6                                 
055571,000090: 
055572,000091: 16,2015           67677                           AD       PRIO37                                
055573,000092: 16,2016           54000                           TS       A                                     
055574,000093: 16,2017           12023                           TCF      ENABLET6                              
055575,000094: 16,2020           35006                           CA       POSMAX                                
055576,000095: 16,2021           54031                           TS       TIME6                                 
055577,000096: 16,2022           12034                           TCF      GOCH56                                
055578,000097: 16,2023           35010        ENABLET6           CA       BIT15                                 
055579,000098: 16,2024           00006                           EXTEND                                         
055580,000099: 16,2025           05013                           WOR      CHAN13                                
055581,000100: 16,2026           31454                           CA       T6NEXT                                
055582,000101: 16,2027           67677                           AD       PRIO37                                
055583,000102: 16,2030           54000                           TS       A                                     
055584,000103: 16,2031           12034                           TCF      GOCH56                                
055585,000104: 16,2032           35006                           CA       POSMAX                                
055586,000105: 16,2033           55454                           TS       T6NEXT                                
055587,000106: 16,2034           50001        GOCH56             INDEX    L                                     
055588,000107: 16,2035           15754                           TCF      WRITEP     -1                         
055589,000108: 
055590,000109: 
055591,000110:    5750                                           BLOCK    02                                    
055592,000111:    4000                                           SETLOC   FFTAG9                                
055593,000112:    4000                                           BANK                                           
055594,000113:    5750  E6,1632                                  EBANK=   CDUXD                                 
055595,000114:    5750                                           COUNT*   $$/DAPT6                              
055596,000115: 
055597,000116:    5750           00155        NARROWDB           OCTAL    00155                                 #  0.3 DEGREE SCALED AT 45.
055598,000117:    5751           03434        WIDEDB             OCTAL    03434                                 #  5.0 DEGREES SCALED AT 45.
055599,000118: 
055600,000119:    5752  E6,1454                                  EBANK=   T6NEXT                                
055601,000120:    5752           02036 34106  T6ADR              2CADR    DOT6RUPT                              #  2CADR OF INTERRUPT PROCESSOR.
055602,000121: 
055603,000122:    5754           31460                           CA       NEXTP                                 
055604,000123:    5755           00006        WRITEP             EXTEND                                         
055605,000124:    5756           01006                           WRITE    CHAN6                                 
055606,000125:    5757           00002                           TC       Q                                     
055607,000126: 
055608,000127:    5760           31461                           CA       NEXTU                                 
055609,000128:    5761           54001        WRITEU             TS       L                                     
055610,000129:    5762           45775                           CS       00314OCT                              
055611,000130:    5763           00006                           EXTEND                                         
055612,000131:    5764           02005                           RAND     CHAN5                                 
055613,000132:    5765           60001                           AD       L                                     
055614,000133:    5766           00006                           EXTEND                                         
055615,000134:    5767           01005                           WRITE    CHAN5                                 
055616,000135:    5770           00002                           TC       Q                                     
055617,000136: 
055618,000137:    5771           31462                           CA       NEXTV                                 
055619,000138:    5772           54001        WRITEV             TS       L                                     
055620,000139:    5773           35775                           CA       00314OCT                              
055621,000140:    5774           15763                           TCF      -9D                                   
055622,000141:    5775           00314        00314OCT           OCT      00314                                 
055623,000142: 
055624,000143: 
055625,000144: 16,2036                                           BANK     16                                    
055626,000145: 16,2000                                           SETLOC   DAPS1                                 
055627,000146: 16,2000                                           BANK                                           
055628,000147: 
055629,000148: 16,2036  E6,1454                                  EBANK=   T6NEXT                                
055630,000149: 16,2036                                           COUNT*   $$/DAPT6                              
055631,000150: 
055632,000151: 16,2036           22016        DOT6RUPT           LXCH     BANKRUPT                              #  (INTERRUPT LEAD INS CONTINUED)
055633,000152: 16,2037           00006                           EXTEND                                         
055634,000153: 16,2040           22012                           QXCH     QRUPT                                 
055635,000154: 
055636,000155: 16,2041           02000                           TC       T6JOBCHK                              #  CALL T6JOBCHK.
055637,000156: 
055638,000157: 16,2042           15340                           TCF      RESUME                                #  END TIME6 INTERRUPT PROCESSOR.
055639,000158: 

End of include-file T6-RUPT_PROGRAMS.agc.  Parent file is MAIN.agc