Source Code

These source-code files were transcribed from a printout in Don Eyles's personal collection, scanned by archive.org, and financially sponsored by Peter McDermott. A team of volunteers performed the transcription and proof-reading. The scanned page images are available at the Virtual AGC Project website, as well as higher-quality (but much larger) images at the Virtual AGC Project's collection in the Internet Archive. Report any problems by creating "issues" at the Virtual AGC Project's GitHub Repository.

Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: NEW PROGRAM SHEPATIN BY EYLES
	DEC 13, 1966

	THIS PROGRAM WAS ASSEMBLED AS A VERSION OF REVISION 37 
        OF PROGRAM SUNBURST BY LEM GROUP
Note that the date is the date of the printout, not the date of the program revision.

019916,000002:                                                                                                  ## Copyright:   Public domain.
019917,000003:                                                                                                  ## Filename:    T6-RUPT_PROGRAMS.agc
019918,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
019919,000005:                                                                                                  ##              It is part of an early development version of the software
019920,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
019921,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
019922,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
019923,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
019924,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
019925,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
019926,000012:                                                                                                  ##              that the code format has been changed to conform to the
019927,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
019928,000014:                                                                                                  ##              original YUL assembler.
019929,000015:                                                                                                  ## Reference:   pp. 460-462
019930,000016:                                                                                                  ## Assembler:   yaYUL
019931,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
019932,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
019933,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
019934,000020:                                                                                                  ##              2017-05-30 HG   Transcribed
019935,000021:                                                                                                  ##              2017-06-22 RSB  Proofed comment text with
019936,000022:                                                                                                  ##                              octopus/ProoferComments.
019937,000023: 

Page 460

019939,000025:                                                                                                  #  PROGRAM NAMES: (1) DOT6RUPT     MOD. NO. 2  DATE: NOVEMBER 15, 1966
019940,000026: 
019941,000027:                                                                                                  #                 (2) T6JOBCHK
019942,000028: 
019943,000029:                                                                                                  #  MODIFICATION BY: JONATHAN D. ADDELSTON (ADAMS ASSOCIATES)
019944,000030: 
019945,000031:                                                                                                  #  THESE PROGRAMS ENABLE THE LM DAP TO CONTROL THE THRUST TIMES OF THE REACTION CONTROL SYSTEM JETS BY USING TIME6.
019946,000032:                                                                                                  #  SINCE THE LM DAP MAINTAINS EXCLUSIVE CONTROL OVER TIME6 AND ITS INTERRUPTS, THE FOLLOWING CONVENTIONS HAVE BEEN
019947,000033:                                                                                                  #  ESTABLISHED AND MUST NOT BE TAMPERED WITH:
019948,000034:                                                                                                  #           1. NO NUMBER IS EVER PLACED INTO TIME6 EXCEPT BY LM DAP.
019949,000035:                                                                                                  #           2. NO PROGRAM OTHER THAN LM DAP ENABLES THE TIME6 COUNTER.
019950,000036:                                                                                                  #           3. ONLY POSITIVE NUMBERS ARE ENTERED INTO TIME6, SO IT COUNTS DOWN TO -0 (MINUS ZERO) TO INTERRUPT.
019951,000037:                                                                                                  #           4. IF -0 IS NOT IN TIME6 WHEN THE INTERRUPT OCCURS, THEN THE INTERRUPT HAS ALREADY BEEN PROCESSED.
019952,000038:                                                                                                  #           5. ALL PROGRAMS WHICH OPERATE IN EITHER INTERRUPT MODE OR WITH INTERRUPT INHIBITED MUST CALL T6JOBCHK
019953,000039:                                                                                                  #              EVERY 6 MILLISECONDS TO PROCESS A POSSIBLE WAITING T6RUPT BEFORE IT CAN BE HONORED BY THE HARDWARE.
019954,000040: 
019955,000041:                                                                                                  #  DOT6RUPT CALLING SEQUENCE:
019956,000042: 
019957,000043:                                                                                                  #  REF   1                 4004  52 011 0           DXCH   ARUPT           T6RUPT
019958,000044:                                                                                                  #                          4005  0 0006 1           EXTEND
019959,000045:                                                                                                  #  REF   1                 4006  3 5045 0           DCA    T6ADR
019960,000046:                                                                                                  #                          4007  52 006 0           DTCB
019961,000047: 
019962,000048:                                                                                                  #  T6JOBCHK CALLING SEQUENCE:
019963,000049: 
019964,000050:                                                                                                  #  REF   0              23,1000  0 4200 1           TC     T6JOBCHK
019965,000051: 
019966,000052:                                                                                                  #  SUBROUTINES CALLED:   DOT6RUPT CALLS T6JOBCHK.
019967,000053: 
019968,000054:                                                                                                  #  NORMAL EXIT MODES:    DOT6RUPT TRANSFERS CONTROL TO RESUME.
019969,000055:                                                                                                  #                        T6JOBCHK TRANSFERS CONTROL TO CALLER AT LOCATION AFTER CALL.
019970,000056: 
019971,000057:                                                                                                  #  ALARM/ABORT MODES:    NONE.
019972,000058: 
019973,000059:                                                                                                  #  INPUT: TIME6,T6NEXT REGS,T6NEXTJT REGS.
019974,000060: 
019975,000061:                                                                                                  #  OUTPUT: (SAME AS INPUT.)
019976,000062: 
019977,000063:                                                                                                  #  DEBRIS: DOT6RUPT: NONE.  T6JOBCHK: A,L
019978,000064: 
019979,000065:                                                                                                  #  *** NOTE: AS OF MOD. NO. 2, T6NEXT AND T6NEXTJT LISTS ARE IN UNSWITCHED ERASABLE. ***
019980,000066: 

Page 461

019982,000068: 
019983,000069:    5037                                           BLOCK    02                                    
019984,000070:    5037     1002                                  EBANK=   T6NEXT                                
019985,000071: 
019986,000072:    5037     1002                                  EBANK=   T6NEXT                                
019987,000073:    5037           02077 34002  T6ADR              2CADR    DOT6RUPT                              #  2CADR OF INTERRUPT PROCESSOR.
019988,000074: 
019989,000075: 16,2077                                           BANK     16                                    
019990,000076: 16,2077     1002                                  EBANK=   T6NEXT                                
019991,000077: 
019992,000078: 16,2077           22016        DOT6RUPT           LXCH     BANKRUPT                              #  (INTERRUPT LEAD IN CONTINUED)
019993,000079: 16,2100           00006                           EXTEND                                         
019994,000080: 16,2101           22012                           QXCH     QRUPT                                 
019995,000081: 
019996,000082: 16,2102           05041                           TC       T6JOBCHK                              #  CALL T6JOBCHK
019997,000083: 
019998,000084: 16,2103           15751                           TCF      RESUME                                #  END TIME6 RUPT
019999,000085: 
020000,000086: 
020001,000087: 
020002,000088:    5041                                           BLOCK    02                                    
020003,000089:    5041     1002                                  EBANK=   T6NEXT                                
020004,000090: 
020005,000091:    5041           10031        T6JOBCHK           CCS      TIME6                                 #  CHECK TIME6 FOR WAITING T6RUPT:
020006,000092:    5042           00002                           TC       Q                                     #  NONE: CLOCK COUTING DOWN.
020007,000093:    5043           00002                           TC       Q                                     #  NONE: T6RUPT ALREADY PROCESSED.
020008,000094:    5044           00002                           TC       Q                                     #  NONE: INVALID VALUE. (POSSIBLE ABORT.)
020009,000095: 
020010,000096:                                                                                                  #  CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
020011,000097: 
020012,000098:    5045           37761        T6JOB              CAF      ZERO                                  #  UPDATE ORDERED LIST OF TIME6 DT'S:
020013,000099:    5046           57003                           XCH      T6NEXT     +1                         #  1) PUSH FIRST ENTRY INTO TIME6.
020014,000100:    5047           57002                           XCH      T6NEXT                                #  2) PUSH SECOND ENTRY INTO FIRST PLACE.
020015,000101: 
020016,000102:    5050           54031                           TS       TIME6                                 #  3) ZERO LAST (SECOND) DT IN LIST.
020017,000103: 
020018,000104:    5051           10031                           CCS      TIME6                                 #  TIME6 EITHER POSITIVE OR PLUS ZERO:
020019,000105:    5052           15055                           TCF      T6NZERO                               #  (BRANCH IF TIME6 STILL ACTIVE.)
020020,000106: 
020021,000107:    5053           31004                           CAE      T6NEXTJT                              #  THESE ARE TRANSLATION JETS (NO DT),
020022,000108:    5054           16010                           TCF      WRITEJTS                              #  DETERMINE CHANNEL AND WRITE.
020023,000109: 
020024,000110:    5055           37737        T6NZERO            CAF      BIT15                                 #  ENABLE TIME6 COUNTER TO START TIMING
020025,000111:    5056           00006                           EXTEND                                         #  THIS JET FIRING (PROPER JETS NOT YET
020026,000112:    5057           05013                           WOR      13                                    #  WRITTEN INTO CHANNEL, BUT WILL BE SOON).
020027,000113: 
020028,000114:    5060           37761                           CAF      ZERO                                  #  UPDATE ORDERED LIST OF JET POLICIES:
020029,000115:    5061           57006                           XCH      T6NEXTJT   +2                         #  1) LEAVE JETS TO GO ON NOW IN A.
020030,000116:    5062           57005                           XCH      T6NEXTJT   +1                         #  2) CYCLE LIST UP TOWARD TOP.
020031,000117:    5063           57004                           XCH      T6NEXTJT                              #  3) ZERO LAST ENTRY IN LIST.
020032,000118: 
020033,000119:    5064           16010                           TCF      WRITEJTS                              #  TEMP. FIX UNTIL NEXT REV: JON A.
020034,000120: 

Page 462

020036,000122:                                                                                                  #  THE FOLLOWING JET-ON LOGIC MAY BE USED AS A SUBROUTINE (3 ENTRY POINTS):
020037,000123: 
020038,000124:                                                                                                  #  FIRST, LET SGN(A) DETERMINE THE JET CHANNEL:
020039,000125:                                                                                                  #           POSITIVE IMPLIES P-AXIS POLICY.
020040,000126:                                                                                                  #           NEGATIVE IMPLIES Q,R-AXES POLICY.
020041,000127: 
020042,000128:    6010                                           BLOCK    03                                    
020043,000129: 
020044,000130:    6010           00006        WRITEJTS           EXTEND                                         #  TEST FOR CHANNEL TO WRITE POLICY IN:
020045,000131:    6011           66015                           BZMF     WRITEQR                               #  NEG: Q,R-AXES JETS IN CHANNEL 5
020046,000132: 
020047,000133:                                                                                                  #  SECOND, FOR P-AXIS JET POLICIES:
020048,000134: 
020049,000135:    6012           00006        WRITEP             EXTEND                                         #  POS: P-AXIS   JETS IN CHANNEL 6
020050,000136: 
020051,000137:    6013           01006                           WRITE    6                                     
020052,000138:    6014           00002                           TC       Q                                     #  RETURN.
020053,000139: 
020054,000140:                                                                                                  #  THIRD, FOR Q,R-AXES JET POLICIES:
020055,000141: 
020056,000142:    6015           00006        WRITEQR            EXTEND                                         #  Q,R-AXES JETS IN CHANNEL 5
020057,000143:    6016           01005                           WRITE    5                                     
020058,000144:    6017           00002                           TC       Q                                     #  RETURN.

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