Source Code

These source-code files are part of a reconstructed copy of Luminary 97, the second release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software. It was created to fix two incorrect ephemeris constants in Luminary 96, as described by anomaly report LNY-59.

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memos 83 and 85, using asterisks indicating changed lines in the listing as a guide. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 97 listing.

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.

059209,000002:                                                                                                  ## Copyright:   Public domain.
059210,000003:                                                                                                  ## Filename:    T6-RUPT_PROGRAMS.agc
059211,000004:                                                                                                  ## Purpose:     A section of Luminary revision 97.
059212,000005:                                                                                                  ##              It is part of the reconstructed source code for the
059213,000006:                                                                                                  ##              second release of the flight software for the Lunar 
059214,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
059215,000008:                                                                                                  ##              It was created to fix two incorrect ephemeris constants in
059216,000009:                                                                                                  ##              Luminary 96, as described by anomaly report LNY-59.
059217,000010:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
059218,000011:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
059219,000012:                                                                                                  ##              the listing and Luminary Memos #83 and #85, which list 
059220,000013:                                                                                                  ##              changes between Luminary 97 and 98, and 98 and 99. The
059221,000014:                                                                                                  ##              code has been adapted such that the resulting bugger words
059222,000015:                                                                                                  ##              exactly match those specified for Luminary 97 in NASA drawing
059223,000016:                                                                                                  ##              2021152D, which gives relatively high confidence that the
059224,000017:                                                                                                  ##              reconstruction is correct.
059225,000018:                                                                                                  ## Reference:   pp. 1403-1405
059226,000019:                                                                                                  ## Assembler:   yaYUL
059227,000020:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059228,000021:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
059229,000022:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99.
059230,000023: 

Page 1403

059232,000025:                                                                                                  #  PROGRAM NAMES:        (1) T6JOBCHK    MOD. NO. 5      OCTOBER 2, 1967
059233,000026:                                                                                                  #                        (2) DOT6RUPT
059234,000027:                                                                                                  #  MODIFICATION BY:      LOWELL G HULL (A.C.ELECTRONICS)
059235,000028: 
059236,000029:                                                                                                  #  THESE PROGRAMS ENABLE THE LM DAP TO CONTROL THE THRUST TIMES OF THE REACTION CONTROL SYSTEM JETS BY USING TIME6.
059237,000030:                                                                                                  #  SINCE THE LM DAP MAINTAINS EXCLUSIVE CONTROL OVER TIME6 AND ITS INTERRUPTS, THE FOLLOWING CONVENTIONS HAVE BEEN
059238,000031:                                                                                                  #  ESTABLISHED AND MUST NOT BE TAMPERED WITH:
059239,000032:                                                                                                  #        1.      NO NUMBER IS EVER PLACED INTO TIME6 EXCEPT BY LM DAP.
059240,000033:                                                                                                  #        2.      NO PROGRAM OTHER THAN LM DAP ENABLES THE TIME6 COUNTER.
059241,000034:                                                                                                  #        3.      TO USE TIME6, THE FOLLOWING SEQUENCE IS ALWAYS EMPLOYED:
059242,000035:                                                                                                  #                A.      A POSITIVE (NON-ZERO) NUMBER IS STORED IN TIME6.
059243,000036:                                                                                                  #                B.      THE TIME6 CLOCK IS ENABLED.
059244,000037:                                                                                                  #                C.      TIME6 IS INTERROGATED AND IS:
059245,000038:                                                                                                  #                        I.      NEVER FOUND NEGATIVE (NON-ZERO) OR +0.
059246,000039:                                                                                                  #                        II.     SOMETIMES FOUND POSITIVE (BETWEEN 1 AND 240D) INDICATING THAT IT IS ACTIVE.
059247,000040:                                                                                                  #                        III.    SOMETIMES FOUND POSMAX INDICATING THAT IT IS INACTIVE AND NOT ENABLED.
059248,000041:                                                                                                  #                        IV.     SOMETIMES FOUND NEGATIVE ZERO INDICATING THAT:
059249,000042:                                                                                                  #                                A.      A T6RUPT IS ABOUT TO OCCUR AT THE NEXT DINC, OR
059250,000043:                                                                                                  #                                B.      A T6RUPT IS WAITING IN THE PRIORITY CHAIN, OR
059251,000044:                                                                                                  #                                C.      A T6RUPT IS IN PROCESS NOW.
059252,000045:                                                                                                  #        4)      ALL PROGRAMS WHICH OPERATE IN EITHER INTERRUPT MODE OR WITH INTERRUPT INHIBITED MUST CALL T6JOBCHK
059253,000046:                                                                                                  #                EVERY 5 MILLISECONDS TO PROCESS A POSSIBLE WAITING T6RUPT BEFORE IT CAN BE HONORED BY THE HARDWARE.
059254,000047:                                                                                                  #       (5.      PROGRAM JTLST, IN Q,R-AXES, HANDLES THE INPUT LIST.)
059255,000048: 
059256,000049:                                                                                                  #  T6JOBCHK CALLING SEQUENCE:
059257,000050:                                                                                                  #                L       TC      T6JOBCHK
059258,000051:                                                                                                  #                L+1     (RETURN)
059259,000052: 
059260,000053:                                                                                                  #  DOT6RUPT CALLING SEQUENCE:
059261,000054:                                                                                                  #                        DXCH    ARUPT           T6RUPT LEAD IN AT LOCATION 4004.
059262,000055:                                                                                                  #                        EXTEND
059263,000056:                                                                                                  #                        DCA     T6ADR
059264,000057:                                                                                                  #                        DTCB
059265,000058: 
059266,000059:                                                                                                  #  SUBROUTINES CALLED:   DOT6RUPT CALLS T6JOBCHK.
059267,000060: 
059268,000061:                                                                                                  #  NORMAL EXIT MODES:    T6JOBCHK RETURNS TO L +1.
059269,000062:                                                                                                  #                        DOT6RUPT TRANSFERS CONTROL TO RESUME.
059270,000063: 
059271,000064:                                                                                                  #  ALARM/ABORT MODES:    NONE.
059272,000065: 
059273,000066:                                                                                                  #  INPUT:        TIME6           NXT6ADR         OUTPUT:         TIME6           NXT6ADR         CHANNEL 5
059274,000067:                                                                                                  #                T6NEXT          T6NEXT +1                       T6NEXT          T6NEXT +1       CHANNEL 6
059275,000068:                                                                                                  #                T6FURTHA        T6FURTHA +1                     T6FURTHA        T6FURTHA +1     BIT15/CH13
059276,000069: 
059277,000070:                                                                                                  #  DEBRIS:       T6JOBCHK CLOBBERS A.  DOT6RUPT CLOBBERS NOTHING.
059278,000071: 
059279,000072:    5753                                           BLOCK    02                                    

Page 1404

059281,000074: 17,2027                                           BANK     17                                    
059282,000075: 17,2000                                           SETLOC   DAPS2                                 
059283,000076: 17,2000                                           BANK                                           
059284,000077: 17,2027  E6,1466                                  EBANK=   T6NEXT                                
059285,000078: 17,2027                                           COUNT*   $$/DAPT6                              
059286,000079: 
059287,000080: 17,2027           10031        T6JOBCHK           CCS      TIME6                                 #  CHECK TIME6 FOR WAITING T6RUPT:
059288,000081: 17,2030           00002                           TC       Q                                     #  NONE: CLOCK COUTING DOWN.
059289,000082: 17,2031           05705                           TC       CCSHOLE                               
059290,000083: 17,2032           02032                           TC       T6JOBCHK   +3                         
059291,000084: 
059292,000085:                                                                                                  #  CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
059293,000086: 
059294,000087: 17,2033           34733        T6JOB              CAF      POSMAX                                #  DISABLE CLOCK: NEEDED SINCE RUPT OCCURS
059295,000088: 17,2034           00006                           EXTEND                                         #  1 DINC AFTER T6 = 77777. FOR 625 MUSECS
059296,000089: 17,2035           03013                           WAND     CHAN13                                #  MUST NOT HAVE T6 = +0 WITH ENABLE SET
059297,000090: 
059298,000091: 17,2036           34733                           CA       POSMAX                                
059299,000092: 17,2037           22007                           ZL                                             
059300,000093: 17,2040           53471                           DXCH     T6FURTHA                              
059301,000094: 17,2041           53467                           DXCH     T6NEXT                                
059302,000095: 17,2042           23465                           LXCH     NXT6ADR                               
059303,000096: 17,2043           54031                           TS       TIME6                                 
059304,000097: 
059305,000098: 17,2044           67725                           AD       PRIO37                                
059306,000099: 17,2045           54000                           TS       A                                     
059307,000100: 17,2046           12052                           TCF      ENABLET6                              
059308,000101: 17,2047           34733                           CA       POSMAX                                
059309,000102: 17,2050           54031                           TS       TIME6                                 
059310,000103: 17,2051           12063                           TCF      GOCH56                                
059311,000104: 17,2052           34735        ENABLET6           CA       BIT15                                 
059312,000105: 17,2053           00006                           EXTEND                                         
059313,000106: 17,2054           05013                           WOR      CHAN13                                
059314,000107: 17,2055           31466                           CA       T6NEXT                                
059315,000108: 17,2056           67725                           AD       PRIO37                                
059316,000109: 17,2057           54000                           TS       A                                     
059317,000110: 17,2060           12063                           TCF      GOCH56                                
059318,000111: 17,2061           34733                           CA       POSMAX                                
059319,000112: 17,2062           55466                           TS       T6NEXT                                
059320,000113: 17,2063           50001        GOCH56             INDEX    L                                     
059321,000114: 17,2064           15753                           TCF      WRITEP     -1                         
059322,000115: 
059323,000116:    5753                                           BLOCK    02                                    
059324,000117:    4000                                           SETLOC   FFTAG9                                
059325,000118:    4000                                           BANK                                           
059326,000119:    5753  E6,1635                                  EBANK=   CDUXD                                 
059327,000120:    5753                                           COUNT*   $$/DAPT6                              
059328,000121: 
059329,000122:    5753           31472                           CA       NEXTP                                 
059330,000123:    5754           00006        WRITEP             EXTEND                                         
059331,000124:    5755           01006                           WRITE    CHAN6                                 

Page 1405

059333,000126:    5756           00002                           TC       Q                                     
059334,000127: 
059335,000128:    5757           31473                           CA       NEXTU                                 
059336,000129:    5760           54001        WRITEU             TS       L                                     
059337,000130:    5761           45774                           CS       00314OCT                              
059338,000131:    5762           00006                           EXTEND                                         
059339,000132:    5763           02005                           RAND     CHAN5                                 
059340,000133:    5764           60001                           AD       L                                     
059341,000134:    5765           00006                           EXTEND                                         
059342,000135:    5766           01005                           WRITE    CHAN5                                 
059343,000136:    5767           00002                           TC       Q                                     
059344,000137: 
059345,000138:    5770           31474                           CA       NEXTV                                 
059346,000139:    5771           54001        WRITEV             TS       L                                     
059347,000140:    5772           35774                           CA       00314OCT                              
059348,000141:    5773           15762                           TCF      -9D                                   
059349,000142:    5774           00314        00314OCT           OCT      00314                                 
059350,000143: 
059351,000144: 17,2065                                           BANK     17                                    
059352,000145: 17,2000                                           SETLOC   DAPS2                                 
059353,000146: 17,2000                                           BANK                                           
059354,000147: 
059355,000148: 17,2065  E6,1466                                  EBANK=   T6NEXT                                
059356,000149: 17,2065                                           COUNT*   $$/DAPT6                              
059357,000150: 
059358,000151: 17,2065           22016        DOT6RUPT           LXCH     BANKRUPT                              #  (INTERRUPT LEAD INS CONTINUED)
059359,000152: 17,2066           00006                           EXTEND                                         
059360,000153: 17,2067           22012                           QXCH     QRUPT                                 
059361,000154: 
059362,000155: 17,2070           02027                           TC       T6JOBCHK                              #  CALL T6JOBCHK.
059363,000156: 
059364,000157: 17,2071           15270                           TCF      RESUME                                #  END TIME6 INTERRUPT PROCESSOR.
059365,000158: 

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