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.

026245,000002:                                                                                                  ## Copyright:   Public domain.
026246,000003:                                                                                                  ## Filename:    SPS_BACK-UP_RCS_CONTROL.agc
026247,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
026248,000005:                                                                                                  ##              It is part of an early development version of the software
026249,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
026250,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
026251,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
026252,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
026253,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
026254,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
026255,000012:                                                                                                  ##              that the code format has been changed to conform to the
026256,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
026257,000014:                                                                                                  ##              original YUL assembler.
026258,000015:                                                                                                  ## Reference:   pp. 591-594
026259,000016:                                                                                                  ## Assembler:   yaYUL
026260,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
026261,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
026262,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
026263,000020:                                                                                                  ##              2017-06-03 HG   Transribed
026264,000021:                                                                                                  ##              2017-06-22 RSB  Proofed comment text with
026265,000022:                                                                                                  ##                              octopus/ProoferComments.
026266,000023: 

Page 591

026268,000025: 21,3536                                           BANK     21                                    
026269,000026: 21,3536  E6,1541                                  EBANK=   DT                                    
026270,000027: 
026271,000028: 21,3536           40775        SPSRCS             CS       OMEGAQD                               
026272,000029: 21,3537           61417                           AD       OMEGAQ                                
026273,000030: 21,3540           55424                           TS       EDOTQ                                 #   EDOT = OMEGAQ - OMEGAQD
026274,000031: 
026275,000032: 21,3541           33727                           CAF      SLOPEMQ                               
026276,000033: 21,3542           00006                           EXTEND                                         
026277,000034: 21,3543           71413                           MP       ER                                    
026278,000035: 21,3544           61424                           AD       EDOTQ                                 
026279,000036: 21,3545           00006                           EXTEND                                         #  F = SLOPE M * E + EDOT
026280,000037: 21,3546           63605                           BZMF     PLUSD                                 #  DQ NEGATIVE FOR POSITIVE F
026281,000038: 
026282,000039: 21,3547           33741                           CAF      NEGD                                  #  STORE DIRECTION TO THRUST IN ITEMP3
026283,000040: 
026284,000041: 21,3550           54063        GCOMPUTE           TS       ITEMP3                                
026285,000042: 21,3551           31424                           CAE      EDOTQ                                 
026286,000043: 21,3552           00006                           EXTEND                                         
026287,000044: 
026288,000045: 21,3553           70000                           SQUARE                                         
026289,000046: 21,3554           00006                           EXTEND                                         
026290,000047: 21,3555           73732                           MP       1/2AQ                                 
026291,000048: 21,3556           54062                           TS       ITEMP2                                #  ITEMP2 = (1/2A) EDOT**2
026292,000049: 
026293,000050: 21,3557           61413                           AD       ER                                    
026294,000051: 21,3560           63741                           AD       NEGD                                  #  DB IS SPECIFIED BY NEGD IN SPS MODE
026295,000052: 
026296,000053: 21,3561           00006                           EXTEND                                         
026297,000054: 21,3562           63613                           BZMF     UZERO                                 
026298,000055: 
026299,000056: 21,3563           31424                           CAE      EDOTQ                                 #  G WAS POSITIVE, NOW TEST EDOT
026300,000057: 
026301,000058: 21,3564           00006                           EXTEND                                         
026302,000059: 21,3565           63576                           BZMF     ULOW                                  
026303,000060: 
026304,000061: 21,3566           60062                           AD       ITEMP2                                #  EDOT WAS POSITIVE, CALCULATE HIGH U CASE
026305,000062: 21,3567           00006                           EXTEND                                         
026306,000063: 21,3570           73727                           MP       SLOPEMQ                               
026307,000064: 21,3571           61413                           AD       ER                                    
026308,000065: 21,3572           00006                           EXTEND                                         
026309,000066: 21,3573           73733                           MP       1/AQ                                  
026310,000067: 21,3574           55504                           TS       URGENCYQ                              
026311,000068: 
026312,000069: 21,3575           13615                           TCF      RCALC                                 
026313,000070: 
026314,000071: 21,3576           00006        ULOW               EXTEND                                         
026315,000072: 21,3577           73727                           MP       SLOPEMQ                               
026316,000073: 21,3600           61413                           AD       ER                                    #  EDOT WAS NEGATIVE, CALCULATE LOW U CASE
026317,000074: 21,3601           00006                           EXTEND                                         
026318,000075: 21,3602           73733                           MP       1/AQ                                  
026319,000076: 

Page 592

026321,000078: 21,3603           55504                           TS       URGENCYQ                              
026322,000079: 
026323,000080: 21,3604           13615                           TCF      RCALC                                 
026324,000081: 
026325,000082: 21,3605           41413        PLUSD              CS       ER                                    
026326,000083: 21,3606           57413                           XCH      ER                                    
026327,000084: 21,3607           41424                           CS       EDOTQ                                 
026328,000085: 21,3610           57424                           XCH      EDOTQ                                 
026329,000086: 21,3611           43741                           CS       NEGD                                  
026330,000087: 21,3612           13550                           TCF      GCOMPUTE                              
026331,000088: 
026332,000089: 21,3613           37761        UZERO              CAF      ZERO                                  #  G = 0, NO URGENCY
026333,000090: 21,3614           55504                           TS       URGENCYQ                              
026334,000091: 
026335,000092: 21,3615           40776        RCALC              CS       OMEGARD                               #  REPEAT CALCULATIONS FOR R-AXIS
026336,000093: 21,3616           61421                           AD       OMEGAR                                
026337,000094: 21,3617           55425                           TS       EDOTR                                 
026338,000095: 
026339,000096: 21,3620           33730                           CAF      SLOPEMR                               
026340,000097: 21,3621           00006                           EXTEND                                         
026341,000098: 21,3622           71411                           MP       E                                     
026342,000099: 21,3623           61425                           AD       EDOTR                                 
026343,000100: 21,3624           00006                           EXTEND                                         
026344,000101: 21,3625           63664                           BZMF     PLUSDR                                
026345,000102: 
026346,000103: 21,3626           33741                           CAF      NEGD                                  
026347,000104: 
026348,000105: 21,3627           54064        GCOMPUTR           TS       ITEMP4                                
026349,000106: 21,3630           31425                           CAE      EDOTR                                 
026350,000107: 21,3631           00006                           EXTEND                                         
026351,000108: 21,3632           70000                           SQUARE                                         
026352,000109: 21,3633           00006                           EXTEND                                         
026353,000110: 21,3634           73731                           MP       1/2AR                                 
026354,000111: 21,3635           54062                           TS       ITEMP2                                
026355,000112: 
026356,000113: 21,3636           61411                           AD       E                                     
026357,000114: 21,3637           63741                           AD       NEGD                                  
026358,000115: 
026359,000116: 21,3640           00006                           EXTEND                                         
026360,000117: 21,3641           63672                           BZMF     UZEROR                                
026361,000118: 
026362,000119: 21,3642           31425                           CAE      EDOTR                                 
026363,000120: 
026364,000121: 21,3643           00006                           EXTEND                                         
026365,000122: 21,3644           63655                           BZMF     ULOWR                                 
026366,000123: 
026367,000124: 21,3645           60062                           AD       ITEMP2                                #  EDOT WAS POSITIVE, CALCULATE HIGH U CASE
026368,000125: 21,3646           00006                           EXTEND                                         
026369,000126: 21,3647           73730                           MP       SLOPEMR                               
026370,000127: 21,3650           61411                           AD       E                                     
026371,000128: 

Page 593

026373,000130: 21,3651           00006                           EXTEND                                         
026374,000131: 21,3652           73734                           MP       1/AR                                  
026375,000132: 21,3653           55506                           TS       URGENCYR                              
026376,000133: 
026377,000134: 21,3654           13673                           TCF      CHNLTEST                              
026378,000135: 
026379,000136: 21,3655           00006        ULOWR              EXTEND                                         #  EODT WAS NEGATIVE, CALCULATE LOW U CASE
026380,000137: 21,3656           73730                           MP       SLOPEMR                               
026381,000138: 
026382,000139: 21,3657           61411                           AD       E                                     
026383,000140: 21,3660           00006                           EXTEND                                         
026384,000141: 21,3661           73734                           MP       1/AR                                  
026385,000142: 21,3662           55506                           TS       URGENCYR                              
026386,000143: 
026387,000144: 21,3663           13673                           TCF      CHNLTEST                              
026388,000145: 
026389,000146: 21,3664           41411        PLUSDR             CS       E                                     
026390,000147: 21,3665           57411                           XCH      E                                     
026391,000148: 21,3666           41425                           CS       EDOTR                                 
026392,000149: 21,3667           57425                           XCH      EDOTR                                 
026393,000150: 21,3670           43741                           CS       NEGD                                  
026394,000151: 21,3671           13627                           TCF      GCOMPUTR                              
026395,000152: 
026396,000153: 21,3672           37761        UZEROR             CAF      ZERO                                  
026397,000154: 21,3673           00006        CHNLTEST           EXTEND                                         
026398,000155: 21,3674           61504                           SU       URGENCYQ                              #  TEST = URGENCYR - URGENCYQ
026399,000156: 21,3675           10000                           CCS      A                                     
026400,000157: 21,3676           13714                           TCF      DRTEST                                
026401,000158: 21,3677           13701                           TCF      URTEST                                
026402,000159: 21,3700           13705                           TCF      DQTEST                                
026403,000160: 21,3701           31504        URTEST             CAE      URGENCYQ                              
026404,000161: 21,3702           00006                           EXTEND                                         
026405,000162: 
026406,000163: 21,3703           13723                           BZF      NOJET                                 
026407,000164: 21,3704           13714                           TCF      DRTEST                                
026408,000165: 
026409,000166: 21,3705           30063        DQTEST             CAE      ITEMP3                                
026410,000167: 21,3706           00006                           EXTEND                                         
026411,000168: 21,3707           63712                           BZMF     NEGQ                                  
026412,000169: 21,3710           33736                           CAF      POSQ                                  
026413,000170: 21,3711           13724                           TCF      JETCMD                                
026414,000171: 
026415,000172: 21,3712           33735        NEGQ               CAF      NEGQT                                 
026416,000173: 21,3713           13724                           TCF      JETCMD                                
026417,000174: 
026418,000175: 21,3714           30064        DRTEST             CAE      ITEMP4                                
026419,000176: 21,3715           00006                           EXTEND                                         
026420,000177: 21,3716           63721                           BZMF     NEGR                                  
026421,000178: 21,3717           33737                           CAF      POSR                                  
026422,000179: 21,3720           13724                           TCF      JETCMD                                
026423,000180: 
026424,000181: 21,3721           33740        NEGR               CAF      NEGRT                                 
026425,000182: 

Page 594

026427,000184: 21,3722           13724                           TCF      JETCMD                                
026428,000185: 
026429,000186: 21,3723           37761        NOJET              CAF      ZERO                                  
026430,000187: 21,3724           00006        JETCMD             EXTEND                                         
026431,000188: 21,3725           01005                           WRITE    5                                     
026432,000189: 21,3726           15751                           TCF      RESUME                                
026433,000190: 
026434,000191: 
026435,000192: 21,3727           37777        SLOPEMQ            OCT      37777                                 
026436,000193: 21,3730           37777        SLOPEMR            OCT      37777                                 
026437,000194: 21,3731           06743        1/2AR              DEC      0.2170                                
026438,000195: 21,3732           06743        1/2AQ              DEC      0.217                                 
026439,000196: 21,3733           15707        1/AQ               DEC      0.434                                 
026440,000197: 
026441,000198: 21,3734           15707        1/AR               DEC      0.434                                 #  DESCENT STAGE ACC CONST SCALED AT 16/PI
026442,000199: 21,3735           00011        NEGQT              OCT      00011                                 
026443,000200: 21,3736           00006        POSQ               OCT      00006                                 
026444,000201: 21,3737           00201        POSR               OCT      00201                                 
026445,000202: 21,3740           00102        NEGRT              OCT      00102                                 
026446,000203: 21,3741           77644        NEGD               DEC      -0.00555                              

End of include-file SPS_BACK-UP_RCS_CONTROL.agc.  Parent file is MAIN.agc