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.

034945,000002:                                                                                                  ## Copyright:   Public domain.
034946,000003:                                                                                                  ## Filename:    TUMBLE_MONITOR.agc
034947,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
034948,000005:                                                                                                  ##              It is part of an early development version of the software
034949,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
034950,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
034951,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
034952,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
034953,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
034954,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
034955,000012:                                                                                                  ##              that the code format has been changed to conform to the
034956,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
034957,000014:                                                                                                  ##              original YUL assembler.
034958,000015:                                                                                                  ## Reference:   pp. 777-779
034959,000016:                                                                                                  ## Assembler:   yaYUL
034960,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
034961,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
034962,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
034963,000020:                                                                                                  ##              2017-06-13 HG   Transcribed
034964,000021:                                                                                                  ##              2017-06-23 RSB  Proofed comment text with
034965,000022:                                                                                                  ##                              octopus/ProoferComments.
034966,000023: 

Page 777

034968,000025:                                                                                                  #  PROGRAM DETECTS SPIN ABOUT NAV.AXES AND SETS BIT 13 OF FLAGWORD1 ON IF SPIN IS IN EXCESS OF 2.99 DEGREES/SEC .
034969,000026:                                                                                                  #  NO CONTROL ACTION IS EXERTED . TO DISCONTINUE MONITORING , TURN BIT 14  OF FLAGWORD1 OFF . TO INITIATE MONITOR ,
034970,000027:                                                                                                  #  SET UP WAITLIST CALL FOR TUMTASK. IT IS ASSUMED THAT THE IMU,S ARE IN   FINE ALIGN .
034971,000028: 
034972,000029: 
034973,000030: 
034974,000031:                                                                                                  #  NAME=                           DATE=
034975,000032:                                                                                                  #    TUMBLE MONITOR                  29 AUGUST 1966
034976,000033: 
034977,000034:                                                                                                  #  PROGRAMMER=                     REVISIONS=
034978,000035:                                                                                                  #    G.MANSBACH EXT-182              NANSTONE/2
034979,000036:                                                                                                  #                                    NANSTONE/7
034980,000037:                                                                                                  #                                    NANSTONE/15   10/27/66
034981,000038:                                                                                                  #                                    NANSTONE/3    11/12/66
034982,000039:                                                                                                  #  CALLING SEQUENCE=               SUBROUTINES CALLED=
034983,000040:                                                                                                  #           CAF    (DT)              FLAG1UP
034984,000041:                                                                                                  #           TC     WAITLIST          FLAG1DOWN
034985,000042:                                                                                                  #           EBANK= OMEGA
034986,000043:                                                                                                  #           2CADR  TUMTASK
034987,000044: 
034988,000045:                                                                                                  #  NORMAL EXIT MODES=              ABORT MODE=
034989,000046:                                                                                                  #           TC     TASKOVER          TURN BIT 14 OF FLAGWORD1 OFF
034990,000047:                                                                                                  #  OUTPUT=
034991,000048:                                                                                                  #    SET BIT 13 OF FLAGWORD1 ON/OFF
034992,000049:                                                                                                  #  DEBRIS=
034993,000050:                                                                                                  #    PCDUY,PCDUZ,PCDUX,DCDUY,DCDUZ,OMEGA
034994,000051: 30,2402                                           BANK     30                                    
034995,000052: 30,2402  E6,1423                                  EBANK=   OMEGA                                 
034996,000053:                                                                                                  #  INITIALIZATION ROUTINE FOR TUMBLE
034997,000054:                                                                                                  #  MONITOR
034998,000055: 
034999,000056: 30,2402           04147        TUMTASK            TC       PHASCHNG                              #  IMMEDIATE RECALL
035000,000057: 
035001,000058: 30,2403           05013                           OCT      05013                                 #  *TUMTASK*
035002,000059: 30,2404           77777                           OCT      77777                                 
035003,000060: 30,2405           06020                           TC       FLAG1UP                               #  TURN TUMBLE MONITOR ON
035004,000061: 30,2406           20000                           OCT      20000                                 
035005,000062: 30,2407           02461                           TC       RESET                                 
035006,000063: 30,2410           05745                           TC       TASKOVER                              
035007,000064: 
035008,000065: 
035009,000066: 30,2411           37740        TMTSK              CA       BIT14                                 
035010,000067: 30,2412           70075                           MASK     FLAGWRD1                              #  IS TUMBLE MONITOR STILL NEEDED
035011,000068: 
035012,000069: 30,2413           00006                           EXTEND                                         
035013,000070: 30,2414           12454                           BZF      EOTUM                                 #  IT IS NOT.  DISCONTINUE MONITORING
035014,000071: 
035015,000072: 30,2415           02461                           TC       RESET                                 #  IT IS.
035016,000073:                                                                                                  #  COMPUTE ROTATION RATE ABOUT PILOT AXES
035017,000074:                                                                                                  #  USING OUTPUT OF *TRANSFORMATION MATRIX
035018,000075:                                                                                                  #  CALCULATION* OF *TRUPT PROGRAM*
035019,000076: 
035020,000077:                                                                                                  #  COMPUTE
035021,000078:                                                                                                  #         * OMEGAX *   *     *   * DCDUY *
035022,000079: 

Page 778

035024,000081:                                                                                                  #         * OMEGAY * = * M   * X * DCDUZ *
035025,000082: 
035026,000083:                                                                                                  #         * OMEGAZ *   *  GP *   *+DCDUX *
035027,000084: 
035028,000085: 30,2416           55423                           TS       OMEGA                                 #  COMPUTE OMEGAX
035029,000086: 30,2417           31404                           CA       M11                                   
035030,000087: 30,2420           02440                           TC       EVAL                                  
035031,000088: 30,2421           31401                           CA       M22                                   #  COMPUTE OMEGAY
035032,000089: 30,2422           00006                           EXTEND                                         
035033,000090: 30,2423           71421                           MP       DCDUZ                                 
035034,000091: 30,2424           55423                           TS       OMEGA                                 
035035,000092: 30,2425           31405                           CA       M21                                   
035036,000093: 30,2426           02440                           TC       EVAL                                  
035037,000094: 30,2427           31403                           CA       M32                                   #  COMPUTE OMEGAZ
035038,000095: 
035039,000096: 30,2430           00006                           EXTEND                                         
035040,000097: 30,2431           71421                           MP       DCDUZ                                 
035041,000098: 30,2432           55423                           TS       OMEGA                                 
035042,000099: 30,2433           31406                           CA       M31                                   
035043,000100: 30,2434           02440                           TC       EVAL                                  
035044,000101:                                                                                                  #  NO TUMBLE NOTED
035045,000102: 30,2435           06036                           TC       FLAG1DWN                              #  REMOVE TUMBLE FLAG
035046,000103: 30,2436           10000                           OCT      10000                                 
035047,000104: 30,2437           05745                           TC       TASKOVER                              
035048,000105: 30,2440           00006        EVAL               EXTEND                                         #  COMPLETE OMEGA CALCULATION
035049,000106: 
035050,000107: 30,2441           71417                           MP       DCDUY                                 
035051,000108: 30,2442           61423                           AD       OMEGA                                 #  SCALE FACTOR OF PI
035052,000109:                                                                                                  #  EVALUATE TUMBLE RATE
035053,000110: 30,2443           00006                           EXTEND                                         #  SET ALL VALUES NEG.
035054,000111: 30,2444           62446                           BZMF     +2                                    
035055,000112: 30,2445           40000                           CS       A                                     
035056,000113: 30,2446           62460                           AD       CRIT                                  #  CAUSE UNDERFLOW IF OMEGA IS GREATER THAN
035057,000114: 30,2447           54000                           OVSK                                           #  OR = TO 2.99 DEGREES/SEC
035058,000115: 30,2450           00002                           RETURN                                         #  NO TUMBLE . EVALUATE NEXT AXIS
035059,000116: 
035060,000117:                                                                                                  #  EXCESSIVE TUMBLE NOTED ABOUT AN AXIS
035061,000118: 30,2451           06020                           TC       FLAG1UP                               #  SET TUMBLE FLAG AND DISCONTINUE CALCS.
035062,000119: 30,2452           10000                           OCT      10000                                 
035063,000120: 30,2453           05745                           TC       TASKOVER                              
035064,000121: 30,2454           04147        EOTUM              TC       PHASCHNG                              
035065,000122: 30,2455           00003                           OCT      3                                     
035066,000123: 30,2456           05745                           TC       TASKOVER                              
035067,000124: 30,2457           00144        1SECTM             DEC      100        B-14                       #  1 SECOND
035068,000125: 30,2460           40417        CRIT               OCT      40417                                 #  NEGMAX + 00417   421 = 2.99 DEGREES
035069,000126: 
035070,000127: 
035071,000128:                                                                                                  #  RECALL MONITOR IN
035072,000129:                                                                                                  #     1 SECOND
035073,000130: 30,2461           00006        RESET              EXTEND                                         
035074,000131: 30,2462           23423                           QXCH     OMEGA                                 
035075,000132: 30,2463           32457                           CA       1SECTM                                
035076,000133: 30,2464           05701                           TC       WAITLIST                              
035077,000134: 

Page 779

035079,000136: 30,2465  E6,1423                                  EBANK=   OMEGA                                 
035080,000137: 30,2465           02411 60066                     2CADR    TMTSK                                 
035081,000138:                                                                                                  #  STORE PRESENT CDU(X,Y,Z) AND
035082,000139:                                                                                                  #  COMPUTE DELTA(CDU(X,Y,Z)/SEC =
035083,000140:                                                                                                  #  DCDU(X,Y,Z)
035084,000141: 30,2467           30033                           CA       CDUY                                  #  FOR Y-AXIS
035085,000142: 
035086,000143: 30,2470           57412                           XCH      PCDUY                                 #  STORE PRESENT VALUE AND RECOVER PREVIOUS
035087,000144: 30,2471           00006                           EXTEND                                         
035088,000145: 30,2472           20033                           MSU      CDUY                                  
035089,000146: 30,2473           55417                           TS       DCDUY                                 #  = CDUX(T-1)-CDUX(T)
035090,000147: 30,2474           30034                           CA       CDUZ                                  #  FOR Z-AXIS
035091,000148: 30,2475           57413                           XCH      PCDUZ                                 
035092,000149: 30,2476           00006                           EXTEND                                         
035093,000150: 30,2477           20034                           MSU      CDUZ                                  
035094,000151: 30,2500           55421                           TS       DCDUZ                                 
035095,000152: 30,2501           30032                           CA       CDUX                                  #  FOR X-AXIS
035096,000153: 30,2502           57411                           XCH      PCDUX                                 
035097,000154: 30,2503           00006                           EXTEND                                         
035098,000155: 
035099,000156: 30,2504           20032                           MSU      CDUX                                  
035100,000157: 30,2505           01423                           TC       OMEGA                                 

End of include-file TUMBLE_MONITOR.agc.  Parent file is MAIN.agc