Source Code

These source-code files derive from a printout of Luminary 116 (the Apollo 12 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Ron Burkey, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071
	19:09 AUG. 11,1969
Note that the date is the date of the printout, not the date of the program revision.

059216,000002:                                                                                                  ## Copyright:   Public domain.
059217,000003:                                                                                                  ## Filename:    T6-RUPT_PROGRAMS.agc
059218,000004:                                                                                                  ## Purpose:     A section of Luminary revision 116.
059219,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM) 
059220,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 12.
059221,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
059222,000008:                                                                                                  ##              that the code format has been changed to conform to the
059223,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
059224,000010:                                                                                                  ##              original YUL assembler.
059225,000011:                                                                                                  ## Reference:   pp. 1393-1395
059226,000012:                                                                                                  ## Assembler:   yaYUL
059227,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059228,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
059229,000015:                                                                                                  ## Mod history: 2017-01-22 MAS  Created from Luminary 99.
059230,000016:                                                                                                  ##              2017-02-07 NV   Updated for Luminary 116.
059231,000017:                                                                                                  ##              2017-03-14 RSB  Proofed comment text via 3-way diff vs
059232,000018:                                                                                                  ##                              Luminary 99 and 131 ... no problems found.
059233,000019:                                                                                                  ##              2017-08-29 MAS  Fixed a comment-text error found while transcribing
059234,000020:                                                                                                  ##                              Zerlina 56.
059235,000021: 

Page 1393

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

Page 1394

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

Page 1395

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

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