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.

028031,000002:                                                                                                  ## Copyright:   Public domain.
028032,000003:                                                                                                  ## Filename:    KALCMANU_STEERING.agc
028033,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
028034,000005:                                                                                                  ##              It is part of an early development version of the software
028035,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
028036,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
028037,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
028038,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
028039,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
028040,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
028041,000012:                                                                                                  ##              that the code format has been changed to conform to the
028042,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
028043,000014:                                                                                                  ##              original YUL assembler.
028044,000015:                                                                                                  ## Reference:   pp. 627-631
028045,000016:                                                                                                  ## Assembler:   yaYUL
028046,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
028047,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
028048,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
028049,000020:                                                                                                  ##              2017-06-13 RSB  Transcribed
028050,000021:                                                                                                  ##              2017-06-22 RSB  Proofed comment text with
028051,000022:                                                                                                  ##                              octopus/ProoferComments.
028052,000023: 

Page 627

028054,000025:                                                                                                  #  GENERATION OF STEERING COMMANDS FOR DIGITAL AUTOPILOT FREE FALL MANEUVERS
028055,000026: 
028056,000027:                                                                                                  #  NEW COMMANDS WILL BE GENERATED EVERY ONE SECOND DURING THE MANEUVER
028057,000028: 
028058,000029: 34,3514  E3,1605                                  EBANK=   TTEMP                                 
028059,000030: 
028060,000031: 34,3514           06103        NEWDELHI           TC       INTPRET                               
028061,000032: 34,3515           75160                           AXC,1    AXC,2                                 
028062,000033: 34,3516           01535                                    MIS                                   #  COMPUTE THE NEW MATRIX FROM S/C TO
028063,000034: 34,3517           01557                                    KEL                                   #  STABLE MEMBER AXES
028064,000035: 34,3520           77624                           CALL                                           
028065,000036: 34,3521           73442                                    MXM3                                  
028066,000037: 34,3522           45575                           VLOAD    STADR                                 
028067,000038: 34,3523           52225                           STOVL    MIS        +12D                       #  CALCULATE NEW DESIRED CDU ANGLES
028068,000039: 34,3524           77626                           STADR                                          
028069,000040: 34,3525           52233                           STOVL    MIS        +6D                        
028070,000041: 34,3526           77626                           STADR                                          
028071,000042: 34,3527           76241                           STORE    MIS                                   
028072,000043: 34,3530           45160                           AXC,1    CALL                                  
028073,000044: 
028074,000045: 34,3531           01535                                    MIS                                   
028075,000046: 34,3532           70727                                    DCMTOCDU                              #  PICK UP THE NEW CDU ANGLES FROM MATRIX
028076,000047: 34,3533           77634                           RTB                                            
028077,000048: 34,3534           33573                                    V1STO2S                               
028078,000049: 34,3535           01602                           STORE    NCDU                                  #  NEW CDU ANGLES
028079,000050: 34,3536           77414                           BONCLR   EXIT                                  
028080,000051: 34,3537           01202                                    32D                                   
028081,000052: 34,3540           71620                                    MANUSTAT                              #  TO START MANEUVER
028082,000053: 34,3541           37754                           CAF      TWO                                   #           +0 OTHERWISE
028083,000054: 34,3542           55653        INCRDCDU           TS       SPNDX                                 
028084,000055: 34,3543           51653                           INDEX    SPNDX                                 
028085,000056: 34,3544           31532                           CA       BCDU                                  #  INITIAL CDU ANGLES
028086,000057: 34,3545           00006                           EXTEND                                         #  OR PREVIOUS DESIRED CDU ANGLES
028087,000058: 34,3546           51653                           INDEX    SPNDX                                 
028088,000059: 34,3547           21601                           MSU      NCDU                                  
028089,000060: 34,3550           00006                           EXTEND                                         
028090,000061: 34,3551           73617                           MP       DT/TAU                                
028091,000062: 34,3552           10000                           CCS      A                                     #  CONVERT TO 2S COMPLEMENT
028092,000063: 34,3553           67755                           AD       ONE                                   
028093,000064: 34,3554           13556                           TCF      +2                                    
028094,000065: 34,3555           40000                           COM                                            
028095,000066: 34,3556           51653                           INDEX    SPNDX                                 
028096,000067: 34,3557           54771                           TS       DELDCDU                               #  ANGLE INCREMENTS TO BE ADDED TO
028097,000068: 
028098,000069: 34,3560           51653                           INDEX    SPNDX                                 #  CDUXD, CDUYD, CDUZD EVERY TENTH SECOND
028099,000070: 34,3561           31601                           CA       NCDU                                  #  BY LEM DAP
028100,000071: 34,3562           51653                           INDEX    SPNDX                                 
028101,000072: 34,3563           57532                           XCH      BCDU                                  
028102,000073: 34,3564           51653                           INDEX    SPNDX                                 
028103,000074: 34,3565           54766                           TS       CDUXD                                 
028104,000075: 34,3566           11653                           CCS      SPNDX                                 
028105,000076: 34,3567           13542                           TCF      INCRDCDU                              #  LOOP FOR THREE AXES
028106,000077: 

Page 628

028108,000079:                                                                                                  #  COMPARE PRESENT TIME WITH TIME TO TERMINATE MANEUVER
028109,000080: 
028110,000081: 34,3570           00006        TMANUCHK           EXTEND                                         
028111,000082: 34,3571           40025                           DCS      TIME2                                 
028112,000083: 34,3572           53606                           DXCH     TTEMP                                 
028113,000084: 34,3573           00006                           EXTEND                                         
028114,000085: 34,3574           31645                           DCA      TM                                    
028115,000086: 34,3575           21606                           DAS      TTEMP                                 #  TM+T0-1-T
028116,000087: 34,3576           11605                           CCS      TTEMP                                 
028117,000088: 34,3577           13647                           TCF      CONTMANU                              #  (TM+T0)-T G 164 SEC
028118,000089: 34,3600           13602                           TCF      +2                                    
028119,000090: 34,3601           13645                           TCF      OVERMANU                              #  (TM+T0)-T L -164 SEC
028120,000091: 34,3602           11606                           CCS      TTEMP      +1                         
028121,000092: 34,3603           13647                           TCF      CONTMANU                              #  (TM+T0)-T G 1 SEC
028122,000093: 34,3604           13606                           TCF      MANUOFF                               #  (TM+T0)-T E 1 SEC
028123,000094: 34,3605           40000                           COM                                            #  (TM+T0)-T L 1 SEC
028124,000095: 34,3606           63644        MANUOFF            AD       ONESEK     +1                         #  (TM+T0)-T E 1 SEC
028125,000096: 34,3607           00006                           EXTEND                                         
028126,000097: 34,3610           63645                           BZMF     OVERMANU                              #  THIS IS A SAFETY PLAY
028127,000098: 34,3611           00004        MANUSTAL           INHINT                                         #  PREPARE TO STOP THE MANEUVER
028128,000099: 34,3612           05701                           TC       WAITLIST                              
028129,000100: 34,3613  E3,1605                                  EBANK=   TTEMP                                 
028130,000101: 34,3613           03673 70063                     2CADR    MANUSTOP                              
028131,000102: 
028132,000103: 34,3615           00003                           RELINT                                         
028133,000104: 34,3616           15605                           TCF      ENDOFJOB                              
028134,000105: 
028135,000106: 34,3617           03146        DT/TAU             DEC      .1                                    
028136,000107: 
028137,000108: 34,3620           77776        MANUSTAT           EXIT                                           #  INITIALIZATION ROUTINE
028138,000109: 34,3621           00006                           EXTEND                                         #  FOR AUTOMATIC MANEUVERS
028139,000110: 34,3622           30025                           DCA      TIME2                                 
028140,000111: 34,3623           21645                           DAS      TM                                    #  TM+T0    MANEUVER COMPLETION TIME
028141,000112: 34,3624           00006                           EXTEND                                         
028142,000113: 34,3625           43644                           DCS      ONESEK                                
028143,000114: 34,3626           21645                           DAS      TM                                    #  (TM+T0)-1
028144,000115: 34,3627           31634                           CA       BRATE                                 #  X-AXIS MANEUVER RATE
028145,000116: 34,3630           54774                           TS       OMEGAPD                               
028146,000117: 34,3631           31636                           CA       BRATE      +2                         #  Y-AXIS MANEUVER RATE
028147,000118: 34,3632           54775                           TS       OMEGAQD                               
028148,000119: 34,3633           31640                           CA       BRATE      +4                         #  Z-AXIS MANEUVER RATE
028149,000120: 34,3634           54776                           TS       OMEGARD                               
028150,000121: 34,3635           30025                           CA       TIME1                                 
028151,000122: 34,3636           63644                           AD       ONESEK     +1                         
028152,000123: 34,3637           57604                           XCH      NEXTIME                               
028153,000124: 34,3640           06027                           TC       FLAG2UP                               #  SET BIT 11 OF FLAGWRD2
028154,000125: 34,3641           02000                           OCT      2000                                  #  TO SIGNAL KALCMANU IN PROCESS
028155,000126: 34,3642           13541                           TCF      INCRDCDU   -1                         
028156,000127: 
028157,000128: 34,3643           00000        ONESEK             DEC      0          B-14                       

Page 629

028159,000130: 34,3644           00144                           DEC      100        B-14                       
028160,000131: 
028161,000132: 34,3645           37755        OVERMANU           CAF      ONE                                   #  SAFETY PLAY
028162,000133: 34,3646           13611                           TCF      MANUSTAL                              
028163,000134: 
028164,000135: 34,3647           40025        CONTMANU           CS       TIME1                                 #  RESET FOR NEXT DCDU UPDATE
028165,000136: 34,3650           61604                           AD       NEXTIME                               
028166,000137: 34,3651           10000                           CCS      A                                     
028167,000138: 
028168,000139: 34,3652           67755                           AD       ONE                                   
028169,000140: 34,3653           13656                           TCF      MANUCALL                              
028170,000141: 34,3654           67737                           AD       NEGMAX                                
028171,000142: 34,3655           40000                           COM                                            
028172,000143: 34,3656           00004        MANUCALL           INHINT                                         #  CALL FOR NEXT UPDATE VIA WAITLIST
028173,000144: 34,3657           05701                           TC       WAITLIST                              
028174,000145: 34,3660  E3,1605                                  EBANK=   TTEMP                                 
028175,000146: 34,3660           03666 70063                     2CADR    UPDTCALL                              
028176,000147: 
028177,000148: 34,3662           00003                           RELINT                                         
028178,000149: 34,3663           33644                           CAF      ONESEK     +1                         #  INCREMENT TIME FOR NEXT UPDATE
028179,000150: 34,3664           27604                           ADS      NEXTIME                               
028180,000151: 34,3665           15605                           TCF      ENDOFJOB                              
028181,000152: 
028182,000153: 
028183,000154: 
028184,000155: 34,3666           35673        UPDTCALL           CAF      PRIO34                                #  SATELLITE PROGRAM TO CALL FOR UPDATE
028185,000156: 34,3667           05534                           TC       FINDVAC                               #  OF STEERING COMMANDS
028186,000157: 34,3670  E3,1605                                  EBANK=   TTEMP                                 
028187,000158: 34,3670           03514 70063                     2CADR    NEWDELHI                              
028188,000159: 
028189,000160: 34,3672           05745                           TC       TASKOVER                              
028190,000161: 

Page 630

028192,000163:                                                                                                  #  ROUTINE FOR TERMINATING AUTOMATIC MANEUVERS
028193,000164: 
028194,000165: 34,3673           37761        MANUSTOP           CAF      ZERO                                  #  ZERO MANEUVER RATES
028195,000166: 34,3674           54773                           TS       DELDCDU2                              
028196,000167: 34,3675           54776                           TS       OMEGARD                               
028197,000168: 34,3676           54772                           TS       DELDCDU1                              
028198,000169: 34,3677           54775                           TS       OMEGAQD                               
028199,000170: 34,3700           31633                           CA       CPSI                                  #  SET DESIRED GIMBAL ANGLES TO
028200,000171: 34,3701           54770                           TS       CDUZD                                 #  DESIRED FINAL GIMBAL ANGLES
028201,000172: 34,3702           31632                           CA       CTHETA                                
028202,000173: 34,3703           54767                           TS       CDUYD                                 
028203,000174: 34,3704           30076                           CA       STATE      +2                         #  CHECK TO SEE IF A FINAL YAW NECESSARY
028204,000175: 34,3705           77740                           MASK     BIT14                                 
028205,000176: 34,3706           00006                           EXTEND                                         
028206,000177: 
028207,000178: 34,3707           13722                           BZF      KALCROLL                              
028208,000179: 34,3710           31631        ENDROLL            CA       CPHI                                  #  NO FINAL YAW
028209,000180: 34,3711           54766                           TS       CDUXD                                 
028210,000181: 34,3712           37761                           CAF      ZERO                                  
028211,000182: 34,3713           54774                           TS       OMEGAPD                               #  I.E. MANEUVER DID NOT GO THRU
028212,000183: 34,3714           54771                           TS       DELDCDU                               #  GIMBAL LOCK ORIGINALLY
028213,000184: 34,3715           06045        GOODMANU           TC       FLAG2DWN                              #  RESET BIT 11 OF FLAGWRD2 TO SIGNAL END
028214,000185: 34,3716           02000                           OCT      2000                                  #  OF KALCMANU
028215,000186: 34,3717           36301                           CAF      THREE                                 
028216,000187: 34,3720           05243                           TC       POSTJUMP                              #  RETURN UNDER WAITLIST VIA GOODEND
028217,000188: 34,3721           26731                           CADR     GOODEND                               #  AND WAKE UP USER
028218,000189: 
028219,000190: 34,3722           30076        KALCROLL           CA       STATE      +2                         #  STATE SWITCH NO. 33
028220,000191: 34,3723           77742                           MASK     BIT12                                 #  0(OFF) = PERFORM A FINAL YAW
028221,000192: 34,3724           00006                           EXTEND                                         #           IF NECESSARY
028222,000193: 34,3725           13727                           BZF      DOROLL                                #  1(ON) = IGNORE ANY FINAL YAW
028223,000194: 34,3726           13712                           TCF      ENDROLL    +2                         
028224,000195: 34,3727           31631        DOROLL             CA       CPHI                                  
028225,000196: 34,3730           00006                           EXTEND                                         #  PERFORM A FINAL ROLL  TO
028226,000197: 34,3731           20766                           MSU      CDUXD                                 #  COMPLETE AUTOMATIC MANEUVER
028227,000198: 34,3732           00006                           EXTEND                                         
028228,000199: 34,3733           63743                           BZMF     FROLLNEG                              
028229,000200: 34,3734           54001        FROLLPOS           TS       L                                     
028230,000201: 
028231,000202: 34,3735           33762                           CA       ROLLRATE                              
028232,000203: 34,3736           54774                           TS       OMEGAPD                               
028233,000204: 34,3737           43763                           CS       DELFROLL                              
028234,000205: 34,3740           67755                           AD       ONE                                   
028235,000206: 34,3741           54771                           TS       DELDCDU                               
028236,000207: 34,3742           13751                           TCF      ROLLSTAL                              
028237,000208: 34,3743           40000        FROLLNEG           COM                                            
028238,000209: 34,3744           54001                           TS       L                                     
028239,000210: 34,3745           43762                           CS       ROLLRATE                              
028240,000211: 34,3746           54774                           TS       OMEGAPD                               
028241,000212: 34,3747           33763                           CA       DELFROLL                              
028242,000213: 34,3750           54771                           TS       DELDCDU                               
028243,000214: 34,3751           30001        ROLLSTAL           CA       L                                     #  ABS(CPHI-CDUXD)

Page 631

028245,000216: 34,3752           00006                           EXTEND                                         
028246,000217: 34,3753           73764                           MP       INVRATE                               
028247,000218: 34,3754           00006                           EXTEND                                         
028248,000219: 34,3755           63710                           BZMF     ENDROLL                               
028249,000220: 34,3756           05701                           TC       WAITLIST                              
028250,000221: 34,3757  E3,1605                                  EBANK=   TTEMP                                 
028251,000222: 34,3757           03710 70063                     2CADR    ENDROLL                               
028252,000223: 
028253,000224: 34,3761           05745                           TC       TASKOVER                              
028254,000225: 
028255,000226: 34,3762           01320        ROLLRATE           DEC      720        B-14                       #  = 1.98 DEGREES/SEC
028256,000227: 34,3763           00022        DELFROLL           DEC      18         B-14                       #  MUST BE A WHOLE NUMBER
028257,000228: 34,3764           21616        INVRATE            DEC      .555555                               

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