Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

060663,000002:                                                                                                  ## Copyright:   Public domain.
060664,000003:                                                                                                  ## Filename:    T6-RUPT_PROGRAMS.agc
060665,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
060666,000005:                                                                                                  ##              It is part of the source code for the original release
060667,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
060668,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
060669,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
060670,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
060671,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
060672,000011:                                                                                                  ##              that the code format has been changed to conform to the
060673,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
060674,000013:                                                                                                  ##              original YUL assembler.
060675,000014:                                                                                                  ## Reference:   pp. 1398-1400
060676,000015:                                                                                                  ## Assembler:   yaYUL
060677,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
060678,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
060679,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
060680,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
060681,000020:                                                                                                  ##              2016-12-24 RRB  Updated for Luminary 69.
060682,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
060683,000022:                                                                                                  ##                              but no errors found.
060684,000023:                                                                                                  ##              2017-08-29 MAS  Fixed a comment-text error found while transcribing
060685,000024:                                                                                                  ##                              Zerlina 56.
060686,000025: 

Page 1398

060688,000027:                                                                                                  #  PROGRAM NAMES:        (1) T6JOBCHK    MOD. NO. 5      OCTOBER 2, 1967
060689,000028:                                                                                                  #                        (2) DOT6RUPT
060690,000029:                                                                                                  #  MODIFICATION BY:      LOWELL G HULL (A.C.ELECTRONICS)
060691,000030: 
060692,000031:                                                                                                  #  THESE PROGRAMS ENABLE THE LM DAP TO CONTROL THE THRUST TIMES OF THE REACTION CONTROL SYSTEM JETS BY USING TIME6.
060693,000032:                                                                                                  #  SINCE THE LM DAP MAINTAINS EXCLUSIVE CONTROL OVER TIME6 AND ITS INTERRUPTS, THE FOLLOWING CONVENTIONS HAVE BEEN
060694,000033:                                                                                                  #  ESTABLISHED AND MUST NOT BE TAMPERED WITH:
060695,000034:                                                                                                  #        1.      NO NUMBER IS EVER PLACED INTO TIME6 EXCEPT BY LM DAP.
060696,000035:                                                                                                  #        2.      NO PROGRAM OTHER THAN LM DAP ENABLES THE TIME6 COUNTER.
060697,000036:                                                                                                  #        3.      TO USE TIME6, THE FOLLOWING SEQUENCE IS ALWAYS EMPLOYED:
060698,000037:                                                                                                  #                A.      A POSITIVE (NON-ZERO) NUMBER IS STORED IN TIME6.
060699,000038:                                                                                                  #                B.      THE TIME6 CLOCK IS ENABLED.
060700,000039:                                                                                                  #                C.      TIME6 IS INTERROGATED AND IS:
060701,000040:                                                                                                  #                        I.      NEVER FOUND NEGATIVE (NON-ZERO) OR +0.
060702,000041:                                                                                                  #                        II.     SOMETIMES FOUND POSITIVE (BETWEEN 1 AND 240D) INDICATING THAT IT IS ACTIVE.
060703,000042:                                                                                                  #                        III.    SOMETIMES FOUND POSMAX INDICATING THAT IT IS INACTIVE AND NOT ENABLED.
060704,000043:                                                                                                  #                        IV.     SOMETIMES FOUND NEGATIVE ZERO INDICATING THAT:
060705,000044:                                                                                                  #                                A.      A T6RUPT IS ABOUT TO OCCUR AT THE NEXT DINC, OR
060706,000045:                                                                                                  #                                B.      A T6RUPT IS WAITING IN THE PRIORITY CHAIN, OR
060707,000046:                                                                                                  #                                C.      A T6RUPT IS IN PROCESS NOW.
060708,000047:                                                                                                  #        4)      ALL PROGRAMS WHICH OPERATE IN EITHER INTERRUPT MODE OR WITH INTERRUPT INHIBITED MUST CALL T6JOBCHK
060709,000048:                                                                                                  #                EVERY 5 MILLISECONDS TO PROCESS A POSSIBLE WAITING T6RUPT BEFORE IT CAN BE HONORED BY THE HARDWARE.
060710,000049:                                                                                                  #       (5.      PROGRAM JTLST, IN Q,R-AXES, HANDLES THE INPUT LIST.)
060711,000050: 
060712,000051:                                                                                                  #  T6JOBCHK CALLING SEQUENCE:
060713,000052:                                                                                                  #                L       TC      T6JOBCHK
060714,000053:                                                                                                  #                L+1     (RETURN)
060715,000054: 
060716,000055:                                                                                                  #  DOT6RUPT CALLING SEQUENCE:
060717,000056:                                                                                                  #                        DXCH    ARUPT           T6RUPT LEAD IN AT LOCATION 4004.
060718,000057:                                                                                                  #                        EXTEND
060719,000058:                                                                                                  #                        DCA     T6ADR
060720,000059:                                                                                                  #                        DTCB
060721,000060: 
060722,000061:                                                                                                  #  SUBROUTINES CALLED:   DOT6RUPT CALLS T6JOBCHK.
060723,000062: 
060724,000063:                                                                                                  #  NORMAL EXIT MODES:    T6JOBCHK RETURNS TO L +1.
060725,000064:                                                                                                  #                        DOT6RUPT TRANSFERS CONTROL TO RESUME.
060726,000065: 
060727,000066:                                                                                                  #  ALARM/ABORT MODES:    NONE.
060728,000067: 
060729,000068:                                                                                                  #  INPUT:        TIME6           NXT6ADR         OUTPUT:         TIME6           NXT6ADR         CHANNEL 5
060730,000069:                                                                                                  #                T6NEXT          T6NEXT +1                       T6NEXT          T6NEXT +1       CHANNEL 6
060731,000070:                                                                                                  #                T6FURTHA        T6FURTHA +1                     T6FURTHA        T6FURTHA +1     BIT15/CH13
060732,000071: 
060733,000072:                                                                                                  #  DEBRIS:       T6JOBCHK CLOBBERS A.  DOT6RUPT CLOBBERS NOTHING.
060734,000073: 
060735,000074:    5744                                           BLOCK    02                                    

Page 1399

060737,000076: 17,2000                                           BANK     17                                    
060738,000077: 17,2000                                           SETLOC   DAPS2                                 
060739,000078: 17,2000                                           BANK                                           
060740,000079: 17,2000  E6,1464                                  EBANK=   T6NEXT                                
060741,000080: 17,2000                                           COUNT*   $$/DAPT6                              
060742,000081: 
060743,000082: 17,2000           10031        T6JOBCHK           CCS      TIME6                                 #  CHECK TIME6 FOR WAITING T6RUPT:
060744,000083: 17,2001           00002                           TC       Q                                     #  NONE: CLOCK COUTING DOWN.
060745,000084: 17,2002           05677                           TC       CCSHOLE                               
060746,000085: 17,2003           02003                           TC       T6JOBCHK   +3                         
060747,000086: 
060748,000087:                                                                                                  #  CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
060749,000088: 
060750,000089: 17,2004           34733        T6JOB              CAF      POSMAX                                #  DISABLE CLOCK: NEEDED SINCE RUPT OCCURS
060751,000090: 17,2005           00006                           EXTEND                                         #  1 DINC AFTER T6 = 77777. FOR 625 MUSECS
060752,000091: 17,2006           03013                           WAND     CHAN13                                #  MUST NOT HAVE T6 = +0 WITH ENABLE SET
060753,000092: 
060754,000093: 17,2007           34733                           CA       POSMAX                                
060755,000094: 17,2010           22007                           ZL                                             
060756,000095: 17,2011           53467                           DXCH     T6FURTHA                              
060757,000096: 17,2012           53465                           DXCH     T6NEXT                                
060758,000097: 17,2013           23463                           LXCH     NXT6ADR                               
060759,000098: 17,2014           54031                           TS       TIME6                                 
060760,000099: 
060761,000100: 17,2015           67724                           AD       PRIO37                                
060762,000101: 17,2016           54000                           TS       A                                     
060763,000102: 17,2017           12023                           TCF      ENABLET6                              
060764,000103: 17,2020           34733                           CA       POSMAX                                
060765,000104: 17,2021           54031                           TS       TIME6                                 
060766,000105: 17,2022           12034                           TCF      GOCH56                                
060767,000106: 17,2023           34735        ENABLET6           CA       BIT15                                 
060768,000107: 17,2024           00006                           EXTEND                                         
060769,000108: 17,2025           05013                           WOR      CHAN13                                
060770,000109: 17,2026           31464                           CA       T6NEXT                                
060771,000110: 17,2027           67724                           AD       PRIO37                                
060772,000111: 17,2030           54000                           TS       A                                     
060773,000112: 17,2031           12034                           TCF      GOCH56                                
060774,000113: 17,2032           34733                           CA       POSMAX                                
060775,000114: 17,2033           55464                           TS       T6NEXT                                
060776,000115: 17,2034           50001        GOCH56             INDEX    L                                     
060777,000116: 17,2035           15744                           TCF      WRITEP     -1                         
060778,000117: 
060779,000118:    5744                                           BLOCK    02                                    
060780,000119:    4000                                           SETLOC   FFTAG9                                
060781,000120:    4000                                           BANK                                           
060782,000121:    5744  E6,1633                                  EBANK=   CDUXD                                 
060783,000122:    5744                                           COUNT*   $$/DAPT6                              
060784,000123: 
060785,000124:    5744           31470                           CA       NEXTP                                 
060786,000125:    5745           00006        WRITEP             EXTEND                                         
060787,000126:    5746           01006                           WRITE    CHAN6                                 

Page 1400

060789,000128:    5747           00002                           TC       Q                                     
060790,000129: 
060791,000130:    5750           31471                           CA       NEXTU                                 
060792,000131:    5751           54001        WRITEU             TS       L                                     
060793,000132:    5752           45765                           CS       00314OCT                              
060794,000133:    5753           00006                           EXTEND                                         
060795,000134:    5754           02005                           RAND     CHAN5                                 
060796,000135:    5755           60001                           AD       L                                     
060797,000136:    5756           00006                           EXTEND                                         
060798,000137:    5757           01005                           WRITE    CHAN5                                 
060799,000138:    5760           00002                           TC       Q                                     
060800,000139: 
060801,000140:    5761           31472                           CA       NEXTV                                 
060802,000141:    5762           54001        WRITEV             TS       L                                     
060803,000142:    5763           35765                           CA       00314OCT                              
060804,000143:    5764           15753                           TCF      -9D                                   
060805,000144:    5765           00314        00314OCT           OCT      00314                                 
060806,000145: 
060807,000146: 17,2036                                           BANK     17                                    
060808,000147: 17,2000                                           SETLOC   DAPS2                                 
060809,000148: 17,2000                                           BANK                                           
060810,000149: 
060811,000150: 17,2036  E6,1464                                  EBANK=   T6NEXT                                
060812,000151: 17,2036                                           COUNT*   $$/DAPT6                              
060813,000152: 
060814,000153: 17,2036           22016        DOT6RUPT           LXCH     BANKRUPT                              #  (INTERRUPT LEAD INS CONTINUED)
060815,000154: 17,2037           00006                           EXTEND                                         
060816,000155: 17,2040           22012                           QXCH     QRUPT                                 
060817,000156: 
060818,000157: 17,2041           02000                           TC       T6JOBCHK                              #  CALL T6JOBCHK.
060819,000158: 
060820,000159: 17,2042           15270                           TCF      RESUME                                #  END TIME6 INTERRUPT PROCESSOR.
060821,000160: 

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