Source Code

These source-code files are part of a reconstructed copy of Luminary 96, the original release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. 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 96 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.

058877,000002:                                                                                                  ## Copyright:   Public domain.
058878,000003:                                                                                                  ## Filename:    T6-RUPT_PROGRAMS.agc
058879,000004:                                                                                                  ## Purpose:     A section of Luminary revision 96.
058880,000005:                                                                                                  ##              It is part of the reconstructed source code for the
058881,000006:                                                                                                  ##              original release of the flight software for the Lunar 
058882,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
058883,000008:                                                                                                  ##              The code has been recreated from a previously reconstructed
058884,000009:                                                                                                  ##              copy of Luminary 97 by undoing changes described in anomaly
058885,000010:                                                                                                  ##              report LNY-59. The code has been adapted such that the
058886,000011:                                                                                                  ##              resulting bugger words exactly match those specified for
058887,000012:                                                                                                  ##              Luminary 96 in NASA drawing 2021152D, which gives relatively
058888,000013:                                                                                                  ##              high confidence that the reconstruction is correct.
058889,000014:                                                                                                  ## Reference:   pp. 1403-1405
058890,000015:                                                                                                  ## Assembler:   yaYUL
058891,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
058892,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
058893,000018:                                                                                                  ## Mod history: 2019-08-04 MAS  Created from Luminary 97.
058894,000019: 

Page 1403

058896,000021:                                                                                                  #  PROGRAM NAMES:        (1) T6JOBCHK    MOD. NO. 5      OCTOBER 2, 1967
058897,000022:                                                                                                  #                        (2) DOT6RUPT
058898,000023:                                                                                                  #  MODIFICATION BY:      LOWELL G HULL (A.C.ELECTRONICS)
058899,000024: 
058900,000025:                                                                                                  #  THESE PROGRAMS ENABLE THE LM DAP TO CONTROL THE THRUST TIMES OF THE REACTION CONTROL SYSTEM JETS BY USING TIME6.
058901,000026:                                                                                                  #  SINCE THE LM DAP MAINTAINS EXCLUSIVE CONTROL OVER TIME6 AND ITS INTERRUPTS, THE FOLLOWING CONVENTIONS HAVE BEEN
058902,000027:                                                                                                  #  ESTABLISHED AND MUST NOT BE TAMPERED WITH:
058903,000028:                                                                                                  #        1.      NO NUMBER IS EVER PLACED INTO TIME6 EXCEPT BY LM DAP.
058904,000029:                                                                                                  #        2.      NO PROGRAM OTHER THAN LM DAP ENABLES THE TIME6 COUNTER.
058905,000030:                                                                                                  #        3.      TO USE TIME6, THE FOLLOWING SEQUENCE IS ALWAYS EMPLOYED:
058906,000031:                                                                                                  #                A.      A POSITIVE (NON-ZERO) NUMBER IS STORED IN TIME6.
058907,000032:                                                                                                  #                B.      THE TIME6 CLOCK IS ENABLED.
058908,000033:                                                                                                  #                C.      TIME6 IS INTERROGATED AND IS:
058909,000034:                                                                                                  #                        I.      NEVER FOUND NEGATIVE (NON-ZERO) OR +0.
058910,000035:                                                                                                  #                        II.     SOMETIMES FOUND POSITIVE (BETWEEN 1 AND 240D) INDICATING THAT IT IS ACTIVE.
058911,000036:                                                                                                  #                        III.    SOMETIMES FOUND POSMAX INDICATING THAT IT IS INACTIVE AND NOT ENABLED.
058912,000037:                                                                                                  #                        IV.     SOMETIMES FOUND NEGATIVE ZERO INDICATING THAT:
058913,000038:                                                                                                  #                                A.      A T6RUPT IS ABOUT TO OCCUR AT THE NEXT DINC, OR
058914,000039:                                                                                                  #                                B.      A T6RUPT IS WAITING IN THE PRIORITY CHAIN, OR
058915,000040:                                                                                                  #                                C.      A T6RUPT IS IN PROCESS NOW.
058916,000041:                                                                                                  #        4)      ALL PROGRAMS WHICH OPERATE IN EITHER INTERRUPT MODE OR WITH INTERRUPT INHIBITED MUST CALL T6JOBCHK
058917,000042:                                                                                                  #                EVERY 5 MILLISECONDS TO PROCESS A POSSIBLE WAITING T6RUPT BEFORE IT CAN BE HONORED BY THE HARDWARE.
058918,000043:                                                                                                  #       (5.      PROGRAM JTLST, IN Q,R-AXES, HANDLES THE INPUT LIST.)
058919,000044: 
058920,000045:                                                                                                  #  T6JOBCHK CALLING SEQUENCE:
058921,000046:                                                                                                  #                L       TC      T6JOBCHK
058922,000047:                                                                                                  #                L+1     (RETURN)
058923,000048: 
058924,000049:                                                                                                  #  DOT6RUPT CALLING SEQUENCE:
058925,000050:                                                                                                  #                        DXCH    ARUPT           T6RUPT LEAD IN AT LOCATION 4004.
058926,000051:                                                                                                  #                        EXTEND
058927,000052:                                                                                                  #                        DCA     T6ADR
058928,000053:                                                                                                  #                        DTCB
058929,000054: 
058930,000055:                                                                                                  #  SUBROUTINES CALLED:   DOT6RUPT CALLS T6JOBCHK.
058931,000056: 
058932,000057:                                                                                                  #  NORMAL EXIT MODES:    T6JOBCHK RETURNS TO L +1.
058933,000058:                                                                                                  #                        DOT6RUPT TRANSFERS CONTROL TO RESUME.
058934,000059: 
058935,000060:                                                                                                  #  ALARM/ABORT MODES:    NONE.
058936,000061: 
058937,000062:                                                                                                  #  INPUT:        TIME6           NXT6ADR         OUTPUT:         TIME6           NXT6ADR         CHANNEL 5
058938,000063:                                                                                                  #                T6NEXT          T6NEXT +1                       T6NEXT          T6NEXT +1       CHANNEL 6
058939,000064:                                                                                                  #                T6FURTHA        T6FURTHA +1                     T6FURTHA        T6FURTHA +1     BIT15/CH13
058940,000065: 
058941,000066:                                                                                                  #  DEBRIS:       T6JOBCHK CLOBBERS A.  DOT6RUPT CLOBBERS NOTHING.
058942,000067: 
058943,000068:    5753                                           BLOCK    02                                    

Page 1404

058945,000070: 17,2027                                           BANK     17                                    
058946,000071: 17,2000                                           SETLOC   DAPS2                                 
058947,000072: 17,2000                                           BANK                                           
058948,000073: 17,2027  E6,1466                                  EBANK=   T6NEXT                                
058949,000074: 17,2027                                           COUNT*   $$/DAPT6                              
058950,000075: 
058951,000076: 17,2027           10031        T6JOBCHK           CCS      TIME6                                 #  CHECK TIME6 FOR WAITING T6RUPT:
058952,000077: 17,2030           00002                           TC       Q                                     #  NONE: CLOCK COUTING DOWN.
058953,000078: 17,2031           05705                           TC       CCSHOLE                               
058954,000079: 17,2032           02032                           TC       T6JOBCHK   +3                         
058955,000080: 
058956,000081:                                                                                                  #  CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
058957,000082: 
058958,000083: 17,2033           34733        T6JOB              CAF      POSMAX                                #  DISABLE CLOCK: NEEDED SINCE RUPT OCCURS
058959,000084: 17,2034           00006                           EXTEND                                         #  1 DINC AFTER T6 = 77777. FOR 625 MUSECS
058960,000085: 17,2035           03013                           WAND     CHAN13                                #  MUST NOT HAVE T6 = +0 WITH ENABLE SET
058961,000086: 
058962,000087: 17,2036           34733                           CA       POSMAX                                
058963,000088: 17,2037           22007                           ZL                                             
058964,000089: 17,2040           53471                           DXCH     T6FURTHA                              
058965,000090: 17,2041           53467                           DXCH     T6NEXT                                
058966,000091: 17,2042           23465                           LXCH     NXT6ADR                               
058967,000092: 17,2043           54031                           TS       TIME6                                 
058968,000093: 
058969,000094: 17,2044           67725                           AD       PRIO37                                
058970,000095: 17,2045           54000                           TS       A                                     
058971,000096: 17,2046           12052                           TCF      ENABLET6                              
058972,000097: 17,2047           34733                           CA       POSMAX                                
058973,000098: 17,2050           54031                           TS       TIME6                                 
058974,000099: 17,2051           12063                           TCF      GOCH56                                
058975,000100: 17,2052           34735        ENABLET6           CA       BIT15                                 
058976,000101: 17,2053           00006                           EXTEND                                         
058977,000102: 17,2054           05013                           WOR      CHAN13                                
058978,000103: 17,2055           31466                           CA       T6NEXT                                
058979,000104: 17,2056           67725                           AD       PRIO37                                
058980,000105: 17,2057           54000                           TS       A                                     
058981,000106: 17,2060           12063                           TCF      GOCH56                                
058982,000107: 17,2061           34733                           CA       POSMAX                                
058983,000108: 17,2062           55466                           TS       T6NEXT                                
058984,000109: 17,2063           50001        GOCH56             INDEX    L                                     
058985,000110: 17,2064           15753                           TCF      WRITEP     -1                         
058986,000111: 
058987,000112:    5753                                           BLOCK    02                                    
058988,000113:    4000                                           SETLOC   FFTAG9                                
058989,000114:    4000                                           BANK                                           
058990,000115:    5753  E6,1635                                  EBANK=   CDUXD                                 
058991,000116:    5753                                           COUNT*   $$/DAPT6                              
058992,000117: 
058993,000118:    5753           31472                           CA       NEXTP                                 
058994,000119:    5754           00006        WRITEP             EXTEND                                         
058995,000120:    5755           01006                           WRITE    CHAN6                                 

Page 1405

058997,000122:    5756           00002                           TC       Q                                     
058998,000123: 
058999,000124:    5757           31473                           CA       NEXTU                                 
059000,000125:    5760           54001        WRITEU             TS       L                                     
059001,000126:    5761           45774                           CS       00314OCT                              
059002,000127:    5762           00006                           EXTEND                                         
059003,000128:    5763           02005                           RAND     CHAN5                                 
059004,000129:    5764           60001                           AD       L                                     
059005,000130:    5765           00006                           EXTEND                                         
059006,000131:    5766           01005                           WRITE    CHAN5                                 
059007,000132:    5767           00002                           TC       Q                                     
059008,000133: 
059009,000134:    5770           31474                           CA       NEXTV                                 
059010,000135:    5771           54001        WRITEV             TS       L                                     
059011,000136:    5772           35774                           CA       00314OCT                              
059012,000137:    5773           15762                           TCF      -9D                                   
059013,000138:    5774           00314        00314OCT           OCT      00314                                 
059014,000139: 
059015,000140: 17,2065                                           BANK     17                                    
059016,000141: 17,2000                                           SETLOC   DAPS2                                 
059017,000142: 17,2000                                           BANK                                           
059018,000143: 
059019,000144: 17,2065  E6,1466                                  EBANK=   T6NEXT                                
059020,000145: 17,2065                                           COUNT*   $$/DAPT6                              
059021,000146: 
059022,000147: 17,2065           22016        DOT6RUPT           LXCH     BANKRUPT                              #  (INTERRUPT LEAD INS CONTINUED)
059023,000148: 17,2066           00006                           EXTEND                                         
059024,000149: 17,2067           22012                           QXCH     QRUPT                                 
059025,000150: 
059026,000151: 17,2070           02027                           TC       T6JOBCHK                              #  CALL T6JOBCHK.
059027,000152: 
059028,000153: 17,2071           15270                           TCF      RESUME                                #  END TIME6 INTERRUPT PROCESSOR.
059029,000154: 

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