Source Code

This is a reconstructed version of Luminary 130, the initial AGC program released in November 1969 for the Apollo 13 LM. Three more releases followed before the flown revision was finally manufactured in February 1970.

This reconstruction was created from a previous transcription of the original listing of Luminary 131, combined with Luminary memo #129 which describes the small difference between the Luminary 130 and 131. The reconstructed source code was verified by matching memory-bank checksums to those listed for Luminary 130 in drawing 2021152G.

In this source code, program comments from the original (Luminary 131) code are prefixed with '#', while those added later by the Virtual AGC project are prefixed with '##'.

059202,000002:                                                                                                  ## Copyright:   Public domain.
059203,000003:                                                                                                  ## Filename:    T6-RUPT_PROGRAMS.agc
059204,000004:                                                                                                  ## Purpose:     A section of the reconstructed source code for Luminary 130.
059205,000005:                                                                                                  ##              This was the original program released for the Apollo 13 LM,
059206,000006:                                                                                                  ##              although several more revisions would follow. It has been
059207,000007:                                                                                                  ##              reconstructed from a listing of Luminary 131, from which it
059208,000008:                                                                                                  ##              differs on only two lines in P70-P71. The difference is
059209,000009:                                                                                                  ##              described in detail in Luminary memo #129, which was used
059210,000010:                                                                                                  ##              to perform the reconstruction. This file is intended to be a
059211,000011:                                                                                                  ##              faithful reconstruction, except that the code format has been
059212,000012:                                                                                                  ##              changed to conform to the requirements of the yaYUL assembler
059213,000013:                                                                                                  ##              rather than the original YUL assembler.
059214,000014:                                                                                                  ## Reference:   pp. 1395-1397
059215,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059216,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
059217,000017:                                                                                                  ## Mod history: 06/07/03 RSB.   Began transcribing.
059218,000018:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
059219,000019:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
059220,000020:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
059221,000021:                                                                                                  ##                              numbers in 1701.pdf.
059222,000022:                                                                                                  ##              2017-02-28 RSB  Proofed comment text using octopus/ProoferComments.
059223,000023:                                                                                                  ##              2017-08-29 MAS  Fixed a comment-text error found while transcribing
059224,000024:                                                                                                  ##                              Zerlina 56.
059225,000025:                                                                                                  ##              2018-09-04 MAS  Copied from Luminary 131 for Luminary 130.
059226,000026: 

Page 1395

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

Page 1396

059277,000077: 17,2055                                           BANK     17                                    
059278,000078: 17,2000                                           SETLOC   DAPS2                                 
059279,000079: 17,2000                                           BANK                                           
059280,000080: 17,2055  E6,1466                                  EBANK=   T6NEXT                                
059281,000081: 17,2055                                           COUNT*   $$/DAPT6                              
059282,000082: 
059283,000083: 17,2055           10031        T6JOBCHK           CCS      TIME6                                 #  CHECK TIME6 FOR WAITING T6RUPT:
059284,000084: 17,2056           00002                           TC       Q                                     #  NONE: CLOCK COUTING DOWN.
059285,000085: 17,2057           05675                           TC       CCSHOLE                               
059286,000086: 17,2060           05675                           TC       CCSHOLE                               
059287,000087: 
059288,000088:                                                                                                  #  CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
059289,000089: 
059290,000090: 17,2061           34733        T6JOB              CA       POSMAX                                
059291,000091: 17,2062           22007                           ZL                                             
059292,000092: 17,2063           53471                           DXCH     T6FURTHA                              
059293,000093: 17,2064           53467                           DXCH     T6NEXT                                
059294,000094: 17,2065           23465                           LXCH     NXT6ADR                               
059295,000095: 17,2066           54031                           TS       TIME6                                 
059296,000096: 
059297,000097: 17,2067           67730                           AD       PRIO37                                
059298,000098: 17,2070           54000                           TS       A                                     
059299,000099: 17,2071           12075                           TCF      ENABLET6                              
059300,000100: 17,2072           34733                           CA       POSMAX                                
059301,000101: 17,2073           54031                           TS       TIME6                                 
059302,000102: 17,2074           12115                           TCF      GOCH56                                
059303,000103: 17,2075           00006        ENABLET6           EXTEND                                         
059304,000104: 17,2076           23265                           QXCH     C13QSAV                               
059305,000105: 17,2077           22070                           LXCH     RUPTREG1                              
059306,000106: 17,2100           06022                           TC       C13STALL                              
059307,000107: 17,2101           00006                           EXTEND                                         
059308,000108: 17,2102           23265                           QXCH     C13QSAV                               
059309,000109: 17,2103           22070                           LXCH     RUPTREG1                              
059310,000110: 17,2104           34735                           CAF      BIT15                                 
059311,000111: 17,2105           00006                           EXTEND                                         
059312,000112: 17,2106           05013                           WOR      CHAN13                                
059313,000113: 17,2107           31466                           CA       T6NEXT                                
059314,000114: 17,2110           67730                           AD       PRIO37                                
059315,000115: 17,2111           54000                           TS       A                                     
059316,000116: 17,2112           12115                           TCF      GOCH56                                
059317,000117: 17,2113           34733                           CA       POSMAX                                
059318,000118: 17,2114           55466                           TS       T6NEXT                                
059319,000119: 17,2115           50001        GOCH56             INDEX    L                                     
059320,000120: 17,2116           15743                           TCF      WRITEP     -1                         
059321,000121: 
059322,000122:    5743                                           BLOCK    02                                    
059323,000123:    4000                                           SETLOC   FFTAG9                                
059324,000124:    4000                                           BANK                                           
059325,000125:    5743  E6,1634                                  EBANK=   CDUXD                                 
059326,000126:    5743                                           COUNT*   $$/DAPT6                              

Page 1397

059328,000128:    5743           31472                           CA       NEXTP                                 
059329,000129:    5744           00006        WRITEP             EXTEND                                         
059330,000130:    5745           01006                           WRITE    CHAN6                                 
059331,000131:    5746           00002                           TC       Q                                     
059332,000132: 
059333,000133:    5747           31473                           CA       NEXTU                                 
059334,000134:    5750           54001        WRITEU             TS       L                                     
059335,000135:    5751           45764                           CS       00314OCT                              
059336,000136:    5752           00006                           EXTEND                                         
059337,000137:    5753           02005                           RAND     CHAN5                                 
059338,000138:    5754           60001                           AD       L                                     
059339,000139:    5755           00006                           EXTEND                                         
059340,000140:    5756           01005                           WRITE    CHAN5                                 
059341,000141:    5757           00002                           TC       Q                                     
059342,000142: 
059343,000143:    5760           31474                           CA       NEXTV                                 
059344,000144:    5761           54001        WRITEV             TS       L                                     
059345,000145:    5762           35764                           CA       00314OCT                              
059346,000146:    5763           15752                           TCF      -9D                                   
059347,000147:    5764           00314        00314OCT           OCT      00314                                 
059348,000148: 
059349,000149: 17,2117                                           BANK     17                                    
059350,000150: 17,2000                                           SETLOC   DAPS2                                 
059351,000151: 17,2000                                           BANK                                           
059352,000152: 
059353,000153: 17,2117  E6,1466                                  EBANK=   T6NEXT                                
059354,000154: 17,2117                                           COUNT*   $$/DAPT6                              
059355,000155: 
059356,000156: 17,2117           22016        DOT6RUPT           LXCH     BANKRUPT                              #  (INTERRUPT LEAD INS CONTINUED)
059357,000157: 17,2120           00006                           EXTEND                                         
059358,000158: 17,2121           22012                           QXCH     QRUPT                                 
059359,000159: 
059360,000160: 17,2122           02055                           TC       T6JOBCHK                              #  CALL T6JOBCHK.
059361,000161: 
059362,000162: 17,2123           15270                           TCF      RESUME                                #  END TIME6 INTERRUPT PROCESSOR.
059363,000163: 
059364,000164: 

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