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.

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

Page 591

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

Page 592

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

Page 593

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

Page 594

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

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