Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

060214,000002:                                                                                                  ## Copyright:   Public domain.
060215,000003:                                                                                                  ## Filename:    T6-RUPT_PROGRAMS.agc
060216,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
060217,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
060218,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
060219,000007:                                                                                                  ## Assembler:   yaYUL
060220,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
060221,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
060222,000010:                                                                                                  ## Pages:       1403-1405
060223,000011:                                                                                                  ## Mod history: 2009-05-10 SN   (Sergio Navarro).  Started adapting
060224,000012:                                                                                                  ##                              from the Luminary131/ file of the same
060225,000013:                                                                                                  ##                              name, using Luminary099 page images.
060226,000014:                                                                                                  ##              2016-12-18 RSB  Proofed text comments with octopus/ProoferComments
060227,000015:                                                                                                  ##                              and corrected the errors found.
060228,000016:                                                                                                  ##              2017-08-29 MAS  Fixed a comment-text error found while transcribing
060229,000017:                                                                                                  ##                              Zerlina 56.
060230,000018:                                                                                                  ##
060231,000019:                                                                                                  ## This source code has been transcribed or otherwise adapted from
060232,000020:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
060233,000021:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
060234,000022:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
060235,000023:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
060236,000024:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
060237,000025:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
060238,000026:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
060239,000027:                                                                                                  ## actually created.
060240,000028:                                                                                                  ##
060241,000029:                                                                                                  ## Notations on the hardcopy document read, in part:
060242,000030:                                                                                                  ##
060243,000031:                                                                                                  ##      Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
060244,000032:                                                                                                  ##      16:27 JULY 14, 1969 
060245,000033: 

Page 1403

060247,000035:                                                                                                  #  PROGRAM NAMES:        (1) T6JOBCHK    MOD. NO. 5      OCTOBER 2, 1967
060248,000036:                                                                                                  #                        (2) DOT6RUPT
060249,000037:                                                                                                  #  MODIFICATION BY:      LOWELL G HULL (A.C.ELECTRONICS)
060250,000038: 
060251,000039:                                                                                                  #  THESE PROGRAMS ENABLE THE LM DAP TO CONTROL THE THRUST TIMES OF THE REACTION CONTROL SYSTEM JETS BY USING TIME6.
060252,000040:                                                                                                  #  SINCE THE LM DAP MAINTAINS EXCLUSIVE CONTROL OVER TIME6 AND ITS INTERRUPTS, THE FOLLOWING CONVENTIONS HAVE BEEN
060253,000041:                                                                                                  #  ESTABLISHED AND MUST NOT BE TAMPERED WITH:
060254,000042:                                                                                                  #        1.      NO NUMBER IS EVER PLACED INTO TIME6 EXCEPT BY LM DAP.
060255,000043:                                                                                                  #        2.      NO PROGRAM OTHER THAN LM DAP ENABLES THE TIME6 COUNTER.
060256,000044:                                                                                                  #        3.      TO USE TIME6, THE FOLLOWING SEQUENCE IS ALWAYS EMPLOYED:
060257,000045:                                                                                                  #                A.      A POSITIVE (NON-ZERO) NUMBER IS STORED IN TIME6.
060258,000046:                                                                                                  #                B.      THE TIME6 CLOCK IS ENABLED.
060259,000047:                                                                                                  #                C.      TIME6 IS INTERROGATED AND IS:
060260,000048:                                                                                                  #                        I.      NEVER FOUND NEGATIVE (NON-ZERO) OR +0.
060261,000049:                                                                                                  #                        II.     SOMETIMES FOUND POSITIVE (BETWEEN 1 AND 240D) INDICATING THAT IT IS ACTIVE.
060262,000050:                                                                                                  #                        III.    SOMETIMES FOUND POSMAX INDICATING THAT IT IS INACTIVE AND NOT ENABLED.
060263,000051:                                                                                                  #                        IV.     SOMETIMES FOUND NEGATIVE ZERO INDICATING THAT:
060264,000052:                                                                                                  #                                A.      A T6RUPT IS ABOUT TO OCCUR AT THE NEXT DINC, OR
060265,000053:                                                                                                  #                                B.      A T6RUPT IS WAITING IN THE PRIORITY CHAIN, OR
060266,000054:                                                                                                  #                                C.      A T6RUPT IS IN PROCESS NOW.
060267,000055:                                                                                                  #        4)      ALL PROGRAMS WHICH OPERATE IN EITHER INTERRUPT MODE OR WITH INTERRUPT INHIBITED MUST CALL T6JOBCHK
060268,000056:                                                                                                  #                EVERY 5 MILLISECONDS TO PROCESS A POSSIBLE WAITING T6RUPT BEFORE IT CAN BE HONORED BY THE HARDWARE.
060269,000057:                                                                                                  #       (5.      PROGRAM JTLST, IN Q,R-AXES, HANDLES THE INPUT LIST.)
060270,000058: 
060271,000059:                                                                                                  #  T6JOBCHK CALLING SEQUENCE:
060272,000060:                                                                                                  #                L       TC      T6JOBCHK
060273,000061:                                                                                                  #                L+1     (RETURN)
060274,000062: 
060275,000063:                                                                                                  #  DOT6RUPT CALLING SEQUENCE:
060276,000064:                                                                                                  #                        DXCH    ARUPT           T6RUPT LEAD IN AT LOCATION 4004.
060277,000065:                                                                                                  #                        EXTEND
060278,000066:                                                                                                  #                        DCA     T6ADR
060279,000067:                                                                                                  #                        DTCB
060280,000068: 
060281,000069:                                                                                                  #  SUBROUTINES CALLED:   DOT6RUPT CALLS T6JOBCHK.
060282,000070: 
060283,000071:                                                                                                  #  NORMAL EXIT MODES:    T6JOBCHK RETURNS TO L +1.
060284,000072:                                                                                                  #                        DOT6RUPT TRANSFERS CONTROL TO RESUME.
060285,000073: 
060286,000074:                                                                                                  #  ALARM/ABORT MODES:    NONE.
060287,000075: 
060288,000076:                                                                                                  #  INPUT:        TIME6           NXT6ADR         OUTPUT:         TIME6           NXT6ADR         CHANNEL 5
060289,000077:                                                                                                  #                T6NEXT          T6NEXT +1                       T6NEXT          T6NEXT +1       CHANNEL 6
060290,000078:                                                                                                  #                T6FURTHA        T6FURTHA +1                     T6FURTHA        T6FURTHA +1     BIT15/CH13
060291,000079: 
060292,000080:                                                                                                  #  DEBRIS:       T6JOBCHK CLOBBERS A.  DOT6RUPT CLOBBERS NOTHING.
060293,000081: 
060294,000082:    5753                                           BLOCK    02                                    

Page 1404

060296,000084: 17,2027                                           BANK     17                                    
060297,000085: 17,2000                                           SETLOC   DAPS2                                 
060298,000086: 17,2000                                           BANK                                           
060299,000087: 17,2027  E6,1466                                  EBANK=   T6NEXT                                
060300,000088: 17,2027                                           COUNT*   $$/DAPT6                              
060301,000089: 
060302,000090: 17,2027           10031        T6JOBCHK           CCS      TIME6                                 #  CHECK TIME6 FOR WAITING T6RUPT:
060303,000091: 17,2030           00002                           TC       Q                                     #  NONE: CLOCK COUTING DOWN.
060304,000092: 17,2031           05705                           TC       CCSHOLE                               
060305,000093: 17,2032           02032                           TC       T6JOBCHK   +3                         
060306,000094: 
060307,000095:                                                                                                  #  CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
060308,000096: 
060309,000097: 17,2033           34733        T6JOB              CAF      POSMAX                                #  DISABLE CLOCK: NEEDED SINCE RUPT OCCURS
060310,000098: 17,2034           00006                           EXTEND                                         #  1 DINC AFTER T6 = 77777. FOR 625 MUSECS
060311,000099: 17,2035           03013                           WAND     CHAN13                                #  MUST NOT HAVE T6 = +0 WITH ENABLE SET
060312,000100: 
060313,000101: 17,2036           34733                           CA       POSMAX                                
060314,000102: 17,2037           22007                           ZL                                             
060315,000103: 17,2040           53471                           DXCH     T6FURTHA                              
060316,000104: 17,2041           53467                           DXCH     T6NEXT                                
060317,000105: 17,2042           23465                           LXCH     NXT6ADR                               
060318,000106: 17,2043           54031                           TS       TIME6                                 
060319,000107: 
060320,000108: 17,2044           67725                           AD       PRIO37                                
060321,000109: 17,2045           54000                           TS       A                                     
060322,000110: 17,2046           12052                           TCF      ENABLET6                              
060323,000111: 17,2047           34733                           CA       POSMAX                                
060324,000112: 17,2050           54031                           TS       TIME6                                 
060325,000113: 17,2051           12063                           TCF      GOCH56                                
060326,000114: 17,2052           34735        ENABLET6           CA       BIT15                                 
060327,000115: 17,2053           00006                           EXTEND                                         
060328,000116: 17,2054           05013                           WOR      CHAN13                                
060329,000117: 17,2055           31466                           CA       T6NEXT                                
060330,000118: 17,2056           67725                           AD       PRIO37                                
060331,000119: 17,2057           54000                           TS       A                                     
060332,000120: 17,2060           12063                           TCF      GOCH56                                
060333,000121: 17,2061           34733                           CA       POSMAX                                
060334,000122: 17,2062           55466                           TS       T6NEXT                                
060335,000123: 17,2063           50001        GOCH56             INDEX    L                                     
060336,000124: 17,2064           15753                           TCF      WRITEP     -1                         
060337,000125: 
060338,000126:    5753                                           BLOCK    02                                    
060339,000127:    4000                                           SETLOC   FFTAG9                                
060340,000128:    4000                                           BANK                                           
060341,000129:    5753  E6,1635                                  EBANK=   CDUXD                                 
060342,000130:    5753                                           COUNT*   $$/DAPT6                              
060343,000131: 
060344,000132:    5753           31472                           CA       NEXTP                                 
060345,000133:    5754           00006        WRITEP             EXTEND                                         
060346,000134:    5755           01006                           WRITE    CHAN6                                 

Page 1405

060348,000136:    5756           00002                           TC       Q                                     
060349,000137: 
060350,000138:    5757           31473                           CA       NEXTU                                 
060351,000139:    5760           54001        WRITEU             TS       L                                     
060352,000140:    5761           45774                           CS       00314OCT                              
060353,000141:    5762           00006                           EXTEND                                         
060354,000142:    5763           02005                           RAND     CHAN5                                 
060355,000143:    5764           60001                           AD       L                                     
060356,000144:    5765           00006                           EXTEND                                         
060357,000145:    5766           01005                           WRITE    CHAN5                                 
060358,000146:    5767           00002                           TC       Q                                     
060359,000147: 
060360,000148:    5770           31474                           CA       NEXTV                                 
060361,000149:    5771           54001        WRITEV             TS       L                                     
060362,000150:    5772           35774                           CA       00314OCT                              
060363,000151:    5773           15762                           TCF      -9D                                   
060364,000152:    5774           00314        00314OCT           OCT      00314                                 
060365,000153: 
060366,000154: 17,2065                                           BANK     17                                    
060367,000155: 17,2000                                           SETLOC   DAPS2                                 
060368,000156: 17,2000                                           BANK                                           
060369,000157: 
060370,000158: 17,2065  E6,1466                                  EBANK=   T6NEXT                                
060371,000159: 17,2065                                           COUNT*   $$/DAPT6                              
060372,000160: 
060373,000161: 17,2065           22016        DOT6RUPT           LXCH     BANKRUPT                              #  (INTERRUPT LEAD INS CONTINUED)
060374,000162: 17,2066           00006                           EXTEND                                         
060375,000163: 17,2067           22012                           QXCH     QRUPT                                 
060376,000164: 
060377,000165: 17,2070           02027                           TC       T6JOBCHK                              #  CALL T6JOBCHK.
060378,000166: 
060379,000167: 17,2071           15270                           TCF      RESUME                                #  END TIME6 INTERRUPT PROCESSOR.
060380,000168: 

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