Source Code

These source-code files are part of a reconstructed copy of Luminary 69/2, the flown, final release of the Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction is based on the source code of Luminary 69 — i.e., the initial, unflown version, "revision 0" — of which a contemporary listing was available. The code was then updated by incorporating the differences between Luminary 69 and Luminary 69/2, known from other contemporary documentation. The only such difference is the implementation in Luminary 69/2 of the "R-2 Lunar Potential Model", the source code for which was taken from program Luminary 99/1 (Apollo 11 LM), of which a contemporary listing was also available. Finally, the now-reconstructed Luminary 69/2 was then validated by assembling it to executable form and verifying that its memory banks had the correct checksums, known from still other contemporary documentation.

Note that page numbers in the reconstructed code match those in the original Luminary 69 program listing, or in the ORBITAL INTEGRATION log section, in Luminary 99/1. Page numbers would certainly differ somewhat in a contemporary Luminary 69/2 listing. Moreover, annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change in Luminary 69/2 relative to Luminary 69. Here's a guide to the Apollo documentation referenced in those annotations:
Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

060369,000002:                                                                                                  ## Copyright:   Public domain.
060370,000003:                                                                                                  ## Filename:    T6-RUPT_PROGRAMS.agc
060371,000004:                                                                                                  ## Purpose:     A section of LUM69 revision 2.
060372,000005:                                                                                                  ##              It is part of the reconstructed source code for the flown
060373,000006:                                                                                                  ##              version of the flight software for the Lunar Module's (LM)
060374,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 10. The code has
060375,000008:                                                                                                  ##              been recreated from a copy of Luminary revsion 069, using
060376,000009:                                                                                                  ##              changes present in Luminary 099 which were described in
060377,000010:                                                                                                  ##              Luminary memos 75 and 78. The code has been adapted such
060378,000011:                                                                                                  ##              that the resulting bugger words exactly match those specified
060379,000012:                                                                                                  ##              for LUM69 revision 2 in NASA drawing 2021152B, which gives
060380,000013:                                                                                                  ##              relatively high confidence that the reconstruction is correct.
060381,000014:                                                                                                  ## Reference:   pp. 1398-1400
060382,000015:                                                                                                  ## Assembler:   yaYUL
060383,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
060384,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
060385,000018:                                                                                                  ## Mod history: 2019-07-27 MAS  Created from Luminary 69.
060386,000019: 

Page 1398

060388,000021:                                                                                                  #  PROGRAM NAMES:        (1) T6JOBCHK    MOD. NO. 5      OCTOBER 2, 1967
060389,000022:                                                                                                  #                        (2) DOT6RUPT
060390,000023:                                                                                                  #  MODIFICATION BY:      LOWELL G HULL (A.C.ELECTRONICS)
060391,000024: 
060392,000025:                                                                                                  #  THESE PROGRAMS ENABLE THE LM DAP TO CONTROL THE THRUST TIMES OF THE REACTION CONTROL SYSTEM JETS BY USING TIME6.
060393,000026:                                                                                                  #  SINCE THE LM DAP MAINTAINS EXCLUSIVE CONTROL OVER TIME6 AND ITS INTERRUPTS, THE FOLLOWING CONVENTIONS HAVE BEEN
060394,000027:                                                                                                  #  ESTABLISHED AND MUST NOT BE TAMPERED WITH:
060395,000028:                                                                                                  #        1.      NO NUMBER IS EVER PLACED INTO TIME6 EXCEPT BY LM DAP.
060396,000029:                                                                                                  #        2.      NO PROGRAM OTHER THAN LM DAP ENABLES THE TIME6 COUNTER.
060397,000030:                                                                                                  #        3.      TO USE TIME6, THE FOLLOWING SEQUENCE IS ALWAYS EMPLOYED:
060398,000031:                                                                                                  #                A.      A POSITIVE (NON-ZERO) NUMBER IS STORED IN TIME6.
060399,000032:                                                                                                  #                B.      THE TIME6 CLOCK IS ENABLED.
060400,000033:                                                                                                  #                C.      TIME6 IS INTERROGATED AND IS:
060401,000034:                                                                                                  #                        I.      NEVER FOUND NEGATIVE (NON-ZERO) OR +0.
060402,000035:                                                                                                  #                        II.     SOMETIMES FOUND POSITIVE (BETWEEN 1 AND 240D) INDICATING THAT IT IS ACTIVE.
060403,000036:                                                                                                  #                        III.    SOMETIMES FOUND POSMAX INDICATING THAT IT IS INACTIVE AND NOT ENABLED.
060404,000037:                                                                                                  #                        IV.     SOMETIMES FOUND NEGATIVE ZERO INDICATING THAT:
060405,000038:                                                                                                  #                                A.      A T6RUPT IS ABOUT TO OCCUR AT THE NEXT DINC, OR
060406,000039:                                                                                                  #                                B.      A T6RUPT IS WAITING IN THE PRIORITY CHAIN, OR
060407,000040:                                                                                                  #                                C.      A T6RUPT IS IN PROCESS NOW.
060408,000041:                                                                                                  #        4)      ALL PROGRAMS WHICH OPERATE IN EITHER INTERRUPT MODE OR WITH INTERRUPT INHIBITED MUST CALL T6JOBCHK
060409,000042:                                                                                                  #                EVERY 5 MILLISECONDS TO PROCESS A POSSIBLE WAITING T6RUPT BEFORE IT CAN BE HONORED BY THE HARDWARE.
060410,000043:                                                                                                  #       (5.      PROGRAM JTLST, IN Q,R-AXES, HANDLES THE INPUT LIST.)
060411,000044: 
060412,000045:                                                                                                  #  T6JOBCHK CALLING SEQUENCE:
060413,000046:                                                                                                  #                L       TC      T6JOBCHK
060414,000047:                                                                                                  #                L+1     (RETURN)
060415,000048: 
060416,000049:                                                                                                  #  DOT6RUPT CALLING SEQUENCE:
060417,000050:                                                                                                  #                        DXCH    ARUPT           T6RUPT LEAD IN AT LOCATION 4004.
060418,000051:                                                                                                  #                        EXTEND
060419,000052:                                                                                                  #                        DCA     T6ADR
060420,000053:                                                                                                  #                        DTCB
060421,000054: 
060422,000055:                                                                                                  #  SUBROUTINES CALLED:   DOT6RUPT CALLS T6JOBCHK.
060423,000056: 
060424,000057:                                                                                                  #  NORMAL EXIT MODES:    T6JOBCHK RETURNS TO L +1.
060425,000058:                                                                                                  #                        DOT6RUPT TRANSFERS CONTROL TO RESUME.
060426,000059: 
060427,000060:                                                                                                  #  ALARM/ABORT MODES:    NONE.
060428,000061: 
060429,000062:                                                                                                  #  INPUT:        TIME6           NXT6ADR         OUTPUT:         TIME6           NXT6ADR         CHANNEL 5
060430,000063:                                                                                                  #                T6NEXT          T6NEXT +1                       T6NEXT          T6NEXT +1       CHANNEL 6
060431,000064:                                                                                                  #                T6FURTHA        T6FURTHA +1                     T6FURTHA        T6FURTHA +1     BIT15/CH13
060432,000065: 
060433,000066:                                                                                                  #  DEBRIS:       T6JOBCHK CLOBBERS A.  DOT6RUPT CLOBBERS NOTHING.
060434,000067: 
060435,000068:    5744                                           BLOCK    02                                    

Page 1399

060437,000070: 17,2000                                           BANK     17                                    
060438,000071: 17,2000                                           SETLOC   DAPS2                                 
060439,000072: 17,2000                                           BANK                                           
060440,000073: 17,2000  E6,1464                                  EBANK=   T6NEXT                                
060441,000074: 17,2000                                           COUNT*   $$/DAPT6                              
060442,000075: 
060443,000076: 17,2000           10031        T6JOBCHK           CCS      TIME6                                 #  CHECK TIME6 FOR WAITING T6RUPT:
060444,000077: 17,2001           00002                           TC       Q                                     #  NONE: CLOCK COUTING DOWN.
060445,000078: 17,2002           05677                           TC       CCSHOLE                               
060446,000079: 17,2003           02003                           TC       T6JOBCHK   +3                         
060447,000080: 
060448,000081:                                                                                                  #  CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
060449,000082: 
060450,000083: 17,2004           34733        T6JOB              CAF      POSMAX                                #  DISABLE CLOCK: NEEDED SINCE RUPT OCCURS
060451,000084: 17,2005           00006                           EXTEND                                         #  1 DINC AFTER T6 = 77777. FOR 625 MUSECS
060452,000085: 17,2006           03013                           WAND     CHAN13                                #  MUST NOT HAVE T6 = +0 WITH ENABLE SET
060453,000086: 
060454,000087: 17,2007           34733                           CA       POSMAX                                
060455,000088: 17,2010           22007                           ZL                                             
060456,000089: 17,2011           53467                           DXCH     T6FURTHA                              
060457,000090: 17,2012           53465                           DXCH     T6NEXT                                
060458,000091: 17,2013           23463                           LXCH     NXT6ADR                               
060459,000092: 17,2014           54031                           TS       TIME6                                 
060460,000093: 
060461,000094: 17,2015           67724                           AD       PRIO37                                
060462,000095: 17,2016           54000                           TS       A                                     
060463,000096: 17,2017           12023                           TCF      ENABLET6                              
060464,000097: 17,2020           34733                           CA       POSMAX                                
060465,000098: 17,2021           54031                           TS       TIME6                                 
060466,000099: 17,2022           12034                           TCF      GOCH56                                
060467,000100: 17,2023           34735        ENABLET6           CA       BIT15                                 
060468,000101: 17,2024           00006                           EXTEND                                         
060469,000102: 17,2025           05013                           WOR      CHAN13                                
060470,000103: 17,2026           31464                           CA       T6NEXT                                
060471,000104: 17,2027           67724                           AD       PRIO37                                
060472,000105: 17,2030           54000                           TS       A                                     
060473,000106: 17,2031           12034                           TCF      GOCH56                                
060474,000107: 17,2032           34733                           CA       POSMAX                                
060475,000108: 17,2033           55464                           TS       T6NEXT                                
060476,000109: 17,2034           50001        GOCH56             INDEX    L                                     
060477,000110: 17,2035           15744                           TCF      WRITEP     -1                         
060478,000111: 
060479,000112:    5744                                           BLOCK    02                                    
060480,000113:    4000                                           SETLOC   FFTAG9                                
060481,000114:    4000                                           BANK                                           
060482,000115:    5744  E6,1633                                  EBANK=   CDUXD                                 
060483,000116:    5744                                           COUNT*   $$/DAPT6                              
060484,000117: 
060485,000118:    5744           31470                           CA       NEXTP                                 
060486,000119:    5745           00006        WRITEP             EXTEND                                         
060487,000120:    5746           01006                           WRITE    CHAN6                                 

Page 1400

060489,000122:    5747           00002                           TC       Q                                     
060490,000123: 
060491,000124:    5750           31471                           CA       NEXTU                                 
060492,000125:    5751           54001        WRITEU             TS       L                                     
060493,000126:    5752           45765                           CS       00314OCT                              
060494,000127:    5753           00006                           EXTEND                                         
060495,000128:    5754           02005                           RAND     CHAN5                                 
060496,000129:    5755           60001                           AD       L                                     
060497,000130:    5756           00006                           EXTEND                                         
060498,000131:    5757           01005                           WRITE    CHAN5                                 
060499,000132:    5760           00002                           TC       Q                                     
060500,000133: 
060501,000134:    5761           31472                           CA       NEXTV                                 
060502,000135:    5762           54001        WRITEV             TS       L                                     
060503,000136:    5763           35765                           CA       00314OCT                              
060504,000137:    5764           15753                           TCF      -9D                                   
060505,000138:    5765           00314        00314OCT           OCT      00314                                 
060506,000139: 
060507,000140: 17,2036                                           BANK     17                                    
060508,000141: 17,2000                                           SETLOC   DAPS2                                 
060509,000142: 17,2000                                           BANK                                           
060510,000143: 
060511,000144: 17,2036  E6,1464                                  EBANK=   T6NEXT                                
060512,000145: 17,2036                                           COUNT*   $$/DAPT6                              
060513,000146: 
060514,000147: 17,2036           22016        DOT6RUPT           LXCH     BANKRUPT                              #  (INTERRUPT LEAD INS CONTINUED)
060515,000148: 17,2037           00006                           EXTEND                                         
060516,000149: 17,2040           22012                           QXCH     QRUPT                                 
060517,000150: 
060518,000151: 17,2041           02000                           TC       T6JOBCHK                              #  CALL T6JOBCHK.
060519,000152: 
060520,000153: 17,2042           15270                           TCF      RESUME                                #  END TIME6 INTERRUPT PROCESSOR.
060521,000154: 

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