Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, 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 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

060476,000002:                                                                                                  ## Copyright:   Public domain.
060477,000003:                                                                                                  ## Filename:    T6-RUPT_PROGRAMS.agc
060478,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
060479,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
060480,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
060481,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
060482,000008:                                                                                                  ##              that the code format has been changed to conform to the
060483,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
060484,000010:                                                                                                  ##              original YUL assembler.
060485,000011:                                                                                                  ## Reference:   pp. 1400-1402
060486,000012:                                                                                                  ## Assembler:   yaYUL
060487,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
060488,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
060489,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
060490,000016:                                                                                                  ##              2016-11-30 RRB  Updated from Luminary210 images.
060491,000017:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
060492,000018:                                                                                                  ##                              and corrected errors found.
060493,000019:                                                                                                  ##              2017-08-29 MAS  Fixed a comment-text error found while transcribing
060494,000020:                                                                                                  ##                              Zerlina 56.
060495,000021: 

Page 1400

060497,000023:                                                                                                  #  PROGRAM NAMES:        (1) T6JOBCHK    MOD. NO. 5      OCTOBER 2, 1967
060498,000024:                                                                                                  #                        (2) DOT6RUPT
060499,000025:                                                                                                  #  MODIFICATION BY:      LOWELL G HULL (A.C.ELECTRONICS)
060500,000026: 
060501,000027:                                                                                                  #  THESE PROGRAMS ENABLE THE LM DAP TO CONTROL THE THRUST TIMES OF THE REACTION CONTROL SYSTEM JETS BY USING TIME6.
060502,000028:                                                                                                  #  SINCE THE LM DAP MAINTAINS EXCLUSIVE CONTROL OVER TIME6 AND ITS INTERRUPTS, THE FOLLOWING CONVENTIONS HAVE BEEN
060503,000029:                                                                                                  #  ESTABLISHED AND MUST NOT BE TAMPERED WITH:
060504,000030:                                                                                                  #        1.      NO NUMBER IS EVER PLACED INTO TIME6 EXCEPT BY LM DAP.
060505,000031:                                                                                                  #        2.      NO PROGRAM OTHER THAN LM DAP ENABLES THE TIME6 COUNTER.
060506,000032:                                                                                                  #        3.      TO USE TIME6, THE FOLLOWING SEQUENCE IS ALWAYS EMPLOYED:
060507,000033:                                                                                                  #                A.      A POSITIVE (NON-ZERO) NUMBER IS STORED IN TIME6.
060508,000034:                                                                                                  #                B.      THE TIME6 CLOCK IS ENABLED.
060509,000035:                                                                                                  #                C.      TIME6 IS INTERROGATED AND IS:
060510,000036:                                                                                                  #                        I.      NEVER FOUND NEGATIVE (NON-ZERO) OR +0.
060511,000037:                                                                                                  #                        II.     SOMETIMES FOUND POSITIVE (BETWEEN 1 AND 240D) INDICATING THAT IT IS ACTIVE.
060512,000038:                                                                                                  #                        III.    SOMETIMES FOUND POSMAX INDICATING THAT IT IS INACTIVE AND NOT ENABLED.
060513,000039:                                                                                                  #                        IV.     SOMETIMES FOUND NEGATIVE ZERO INDICATING THAT:
060514,000040:                                                                                                  #                                A.      A T6RUPT IS ABOUT TO OCCUR AT THE NEXT DINC, OR
060515,000041:                                                                                                  #                                B.      A T6RUPT IS WAITING IN THE PRIORITY CHAIN, OR
060516,000042:                                                                                                  #                                C.      A T6RUPT IS IN PROCESS NOW.
060517,000043:                                                                                                  #        4)      ALL PROGRAMS WHICH OPERATE IN EITHER INTERRUPT MODE OR WITH INTERRUPT INHIBITED MUST CALL T6JOBCHK
060518,000044:                                                                                                  #                EVERY 5 MILLISECONDS TO PROCESS A POSSIBLE WAITING T6RUPT BEFORE IT CAN BE HONORED BY THE HARDWARE.
060519,000045: 
060520,000046:                                                                                                  #       (5.      PROGRAM JTLST, IN Q,R-AXES, HANDLES THE INPUT LIST.)
060521,000047: 
060522,000048:                                                                                                  #  T6JOBCHK CALLING SEQUENCE:
060523,000049:                                                                                                  #                L       TC      T6JOBCHK
060524,000050:                                                                                                  #                L+1     (RETURN)
060525,000051: 
060526,000052:                                                                                                  #  DOT6RUPT CALLING SEQUENCE:
060527,000053:                                                                                                  #                        DXCH    ARUPT           T6RUPT LEAD IN AT LOCATION 4004.
060528,000054:                                                                                                  #                        EXTEND
060529,000055:                                                                                                  #                        DCA     T6ADR
060530,000056:                                                                                                  #                        DTCB
060531,000057: 
060532,000058:                                                                                                  #  SUBROUTINES CALLED:   DOT6RUPT CALLS T6JOBCHK.
060533,000059: 
060534,000060:                                                                                                  #  NORMAL EXIT MODES:    T6JOBCHK RETURNS TO L +1.
060535,000061:                                                                                                  #                        DOT6RUPT TRANSFERS CONTROL TO RESUME.
060536,000062: 
060537,000063:                                                                                                  #  ALARM/ABORT MODES:    NONE.
060538,000064: 
060539,000065:                                                                                                  #  INPUT:        TIME6           NXT6ADR         OUTPUT:         TIME6           NXT6ADR         CHANNEL 5
060540,000066:                                                                                                  #                T6NEXT          T6NEXT +1                       T6NEXT          T6NEXT +1       CHANNEL 6
060541,000067:                                                                                                  #                T6FURTHA        T6FURTHA +1                     T6FURTHA        T6FURTHA +1     BIT15/CH13
060542,000068: 
060543,000069:                                                                                                  #  DEBRIS:       T6JOBCHK CLOBBERS A.  DOT6RUPT CLOBBERS NOTHING.
060544,000070: 
060545,000071:    5747                                           BLOCK    02                                    

Page 1401

060547,000073: 17,2055                                           BANK     17                                    
060548,000074: 17,2000                                           SETLOC   DAPS2                                 
060549,000075: 17,2000                                           BANK                                           
060550,000076: 17,2055  E6,1466                                  EBANK=   T6NEXT                                
060551,000077: 17,2055                                           COUNT*   $$/DAPT6                              
060552,000078: 
060553,000079: 17,2055           10031        T6JOBCHK           CCS      TIME6                                 #  CHECK TIME6 FOR WAITING T6RUPT:
060554,000080: 17,2056           00002                           TC       Q                                     #  NONE: CLOCK COUTING DOWN.
060555,000081: 17,2057           05701                           TC       CCSHOLE                               
060556,000082: 17,2060           05701                           TC       CCSHOLE                               
060557,000083: 
060558,000084:                                                                                                  #  CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
060559,000085: 
060560,000086: 17,2061           34724        T6JOB              CA       POSMAX                                
060561,000087: 17,2062           22007                           ZL                                             
060562,000088: 17,2063           53471                           DXCH     T6FURTHA                              
060563,000089: 17,2064           53467                           DXCH     T6NEXT                                
060564,000090: 17,2065           23465                           LXCH     NXT6ADR                               
060565,000091: 17,2066           54031                           TS       TIME6                                 
060566,000092: 
060567,000093: 17,2067           67746                           AD       PRIO37                                
060568,000094: 17,2070           54000                           TS       A                                     
060569,000095: 17,2071           12075                           TCF      ENABLET6                              
060570,000096: 17,2072           34724                           CA       POSMAX                                
060571,000097: 17,2073           54031                           TS       TIME6                                 
060572,000098: 17,2074           12115                           TCF      GOCH56                                
060573,000099: 17,2075           00006        ENABLET6           EXTEND                                         
060574,000100: 17,2076           23265                           QXCH     C13QSAV                               
060575,000101: 17,2077           22070                           LXCH     RUPTREG1                              
060576,000102: 17,2100           06040                           TC       C13STALL                              
060577,000103: 17,2101           00006                           EXTEND                                         
060578,000104: 17,2102           23265                           QXCH     C13QSAV                               
060579,000105: 17,2103           22070                           LXCH     RUPTREG1                              
060580,000106: 17,2104           34726                           CAF      BIT15                                 
060581,000107: 17,2105           00006                           EXTEND                                         
060582,000108: 17,2106           05013                           WOR      CHAN13                                
060583,000109: 17,2107           31466                           CA       T6NEXT                                
060584,000110: 17,2110           67746                           AD       PRIO37                                
060585,000111: 17,2111           54000                           TS       A                                     
060586,000112: 17,2112           12115                           TCF      GOCH56                                
060587,000113: 17,2113           34724                           CA       POSMAX                                
060588,000114: 17,2114           55466                           TS       T6NEXT                                
060589,000115: 17,2115           50001        GOCH56             INDEX    L                                     
060590,000116: 17,2116           15747                           TCF      WRITEP     -1                         
060591,000117: 
060592,000118:    5747                                           BLOCK    02                                    
060593,000119:    4000                                           SETLOC   FFTAG9                                
060594,000120:    4000                                           BANK                                           
060595,000121:    5747  E6,1634                                  EBANK=   CDUXD                                 
060596,000122:    5747                                           COUNT*   $$/DAPT6                              

Page 1402

060598,000124:    5747           31472                           CA       NEXTP                                 
060599,000125:    5750           00006        WRITEP             EXTEND                                         
060600,000126:    5751           01006                           WRITE    CHAN6                                 
060601,000127:    5752           00002                           TC       Q                                     
060602,000128: 
060603,000129:    5753           31473                           CA       NEXTU                                 
060604,000130:    5754           54001        WRITEU             TS       L                                     
060605,000131:    5755           45770                           CS       00314OCT                              
060606,000132:    5756           00006                           EXTEND                                         
060607,000133:    5757           02005                           RAND     CHAN5                                 
060608,000134:    5760           60001                           AD       L                                     
060609,000135:    5761           00006                           EXTEND                                         
060610,000136:    5762           01005                           WRITE    CHAN5                                 
060611,000137:    5763           00002                           TC       Q                                     
060612,000138: 
060613,000139:    5764           31474                           CA       NEXTV                                 
060614,000140:    5765           54001        WRITEV             TS       L                                     
060615,000141:    5766           35770                           CA       00314OCT                              
060616,000142:    5767           15756                           TCF      -9D                                   
060617,000143:    5770           00314        00314OCT           OCT      00314                                 
060618,000144: 
060619,000145: 17,2117                                           BANK     17                                    
060620,000146: 17,2000                                           SETLOC   DAPS2                                 
060621,000147: 17,2000                                           BANK                                           
060622,000148: 
060623,000149: 17,2117  E6,1466                                  EBANK=   T6NEXT                                
060624,000150: 17,2117                                           COUNT*   $$/DAPT6                              
060625,000151: 
060626,000152: 17,2117           22016        DOT6RUPT           LXCH     BANKRUPT                              #  (INTERRUPT LEAD INS CONTINUED)
060627,000153: 17,2120           00006                           EXTEND                                         
060628,000154: 17,2121           22012                           QXCH     QRUPT                                 
060629,000155: 
060630,000156: 17,2122           02055                           TC       T6JOBCHK                              #  CALL T6JOBCHK.
060631,000157: 
060632,000158: 17,2123           15272                           TCF      RESUME                                #  END TIME6 INTERRUPT PROCESSOR.

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