Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051
	10:28 APR.  1,1969
Note that the date is the date of the printout, not the date of the program revision.

059400,000002:                                                                                                  ## Copyright:   Public domain.
059401,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
059402,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
059403,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
059404,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
059405,000007:                                                                                                  ## Assembler:   yaYUL
059406,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059407,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
059408,000010:                                                                                                  ## Pages:       1365-1372 
059409,000011:                                                                                                  ## Mod history: 2009-05-10 SN   (Sergio Navarro).  Started adapting
059410,000012:                                                                                                  ##                              from the Colossus249/ file of the same
059411,000013:                                                                                                  ##                              name, using Comanche055 page images.
059412,000014:                                                                                                  ##              2010-08-29 JL   Fixed indentation.
059413,000015:                                                                                                  ##              2016-12-22 RSB  Proofed comment text using octopus/ProoferComments
059414,000016:                                                                                                  ##                              and corrected the errors found.
059415,000017:                                                                                                  ##              2017-01-18 RSB  Fixed comment-text errors noted while diff'ing
059416,000018:                                                                                                  ##                              vs Colossus 249.
059417,000019:                                                                                                  ##
059418,000020:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
059419,000021:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
059420,000022:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
059421,000023:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
059422,000024:                                                                                                  ## consequent reduction in image quality as well) are available online at
059423,000025:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
059424,000026:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the
059425,000027:                                                                                                  ## (much) higher-quality images which Paul actually created.
059426,000028:                                                                                                  ##
059427,000029:                                                                                                  ## Notations on the hardcopy document read, in part:
059428,000030:                                                                                                  ##
059429,000031:                                                                                                  ##    Assemble revision 055 of AGC program Comanche by NASA
059430,000032:                                                                                                  ##    2021113-051.  10:28 APR. 1, 1969 
059431,000033:                                                                                                  ##
059432,000034:                                                                                                  ##    This AGC program shall also be referred to as
059433,000035:                                                                                                  ##            Colossus 2A
059434,000036: 
059435,000037: 

Page 1365

059437,000039: 14,3422                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
059438,000040: 23,2000                                           SETLOC   POWFLITE                              
059439,000041: 23,2000                                           BANK                                           
059440,000042: 
059441,000043: 23,3477     0142                                  EBANK=   DEXDEX                                
059442,000044: 23,3477                                           COUNT*   $$/POWFL                              
059443,000045: 
059444,000046:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
059445,000047:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
059446,000048:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
059447,000049:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
059448,000050:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
059449,000051:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
059450,000052:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
059451,000053: 
059452,000054:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
059453,000055:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
059454,000056:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
059455,000057:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
059456,000058: 
059457,000059:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
059458,000060: 
059459,000061:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
059460,000062:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
059461,000063:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
059462,000064:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
059463,000065:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
059464,000066:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
059465,000067:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
059466,000068:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
059467,000069:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
059468,000070:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
059469,000071: 
059470,000072:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
059471,000073:                                                                                                  #  INTERPRETIVE.
059472,000074: 
059473,000075: 23,3477           77776        CDUTRIG            EXIT                                           
059474,000076: 23,3500           03507                           TC       CDUTRIGS                              
059475,000077: 23,3501           06006                           TC       INTPRET                               
059476,000078: 23,3502           77616                           RVQ                                            
059477,000079: 
059478,000080: 23,3503           77776        CD*TR*G            EXIT                                           
059479,000081: 23,3504           03515                           TC       CD*TR*GS                              
059480,000082: 23,3505           06006                           TC       INTPRET                               
059481,000083: 23,3506           77616                           RVQ                                            
059482,000084: 
059483,000085: 23,3507           30032        CDUTRIGS           CA       CDUX                                  
059484,000086: 23,3510           54772                           TS       CDUSPOT    +4                         
059485,000087: 23,3511           30033                           CA       CDUY                                  
059486,000088: 23,3512           54766                           TS       CDUSPOT                               

Page 1366

059488,000090: 23,3513           30034                           CA       CDUZ                                  
059489,000091: 23,3514           54770                           TS       CDUSPOT    +2                         
059490,000092: 
059491,000093: 23,3515           00006        CD*TR*GS           EXTEND                                         
059492,000094: 23,3516           22142                           QXCH     TEM2                                  
059493,000095: 23,3517           35015                           CAF      FOUR                                  
059494,000096: 23,3520           76211        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
059495,000097: 23,3521           54143                           TS       TEM3                                  
059496,000098: 23,3522           50143                           INDEX    TEM3                                  
059497,000099: 23,3523           30766                           CA       CDUSPOT                               
059498,000100: 23,3524           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
059499,000101: 23,3525           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
059500,000102: 23,3526           04757                           TC       USPRCADR                              
059501,000103: 23,3527           45513                           CADR     CDULOGIC                              
059502,000104: 23,3530           00006                           EXTEND                                         
059503,000105: 23,3531           30155                           DCA      MPAC                                  
059504,000106: 23,3532           50143                           INDEX    TEM3                                  
059505,000107: 23,3533           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
059506,000108: 23,3534           04757                           TC       USPRCADR                              
059507,000109: 23,3535           01516                           CADR     COSINE                                
059508,000110: 23,3536           52155                           DXCH     MPAC                                  
059509,000111: 23,3537           50143                           INDEX    TEM3                                  
059510,000112: 23,3540           52745                           DXCH     COSCDU                                #  STORING COSINE
059511,000113: 23,3541           00006                           EXTEND                                         
059512,000114: 23,3542           50143                           INDEX    TEM3                                  
059513,000115: 23,3543           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
059514,000116: 23,3544           04757                           TC       USPRCADR                              
059515,000117: 23,3545           01530                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
059516,000118: 23,3546           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
059517,000119: 23,3547           52155                           DXCH     MPAC                                  
059518,000120: 23,3550           50143                           INDEX    TEM3                                  
059519,000121: 23,3551           52737                           DXCH     SINCDU                                
059520,000122: 23,3552           10143                           CCS      TEM3                                  
059521,000123: 23,3553           13520                           TCF      TR*GL**P                              
059522,000124: 23,3554           00142                           TC       TEM2                                  

Page 1367

059524,000126:                                                                                                  #  ****************************************************************************************************************
059525,000127:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
059526,000128:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
059527,000129:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
059528,000130:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;    THIS IS 10 TIMES AS FAST AS CD*TR*GS.    QUICTRIG MAY BE
059529,000131:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
059530,000132: 
059531,000133: 23,3555           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
059532,000134: 23,3556           00006                           EXTEND                                         
059533,000135: 23,3557           22061                           QXCH     ITEMP1                                
059534,000136: 23,3560           35015                           CAF      FOUR                                  
059535,000137: 23,3561           76211                 +4        MASK     SIX                                   
059536,000138: 23,3562           54062                           TS       ITEMP2                                
059537,000139: 23,3563           50062                           INDEX    ITEMP2                                
059538,000140: 23,3564           30766                           CA       CDUSPOT                               
059539,000141: 23,3565           05075                           TC       SPSIN                                 
059540,000142: 23,3566           00006                           EXTEND                                         
059541,000143: 23,3567           75002                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
059542,000144: 23,3570           50062                           INDEX    ITEMP2                                
059543,000145: 23,3571           52737                           DXCH     SINCDU                                
059544,000146: 23,3572           50062                           INDEX    ITEMP2                                
059545,000147: 23,3573           30766                           CA       CDUSPOT                               
059546,000148: 23,3574           05074                           TC       SPCOS                                 
059547,000149: 23,3575           00006                           EXTEND                                         
059548,000150: 23,3576           75002                           MP       BIT14                                 
059549,000151: 23,3577           50062                           INDEX    ITEMP2                                
059550,000152: 23,3600           52745                           DXCH     COSCDU                                
059551,000153: 23,3601           10062                           CCS      ITEMP2                                
059552,000154: 23,3602           13561                           TCF      QUICTRIG   +4                         
059553,000155: 23,3603           30061                           CA       ITEMP1                                
059554,000156: 23,3604           00003                           RELINT                                         
059555,000157: 23,3605           00000                           TC       A                                     

Page 1368

059557,000159:                                                                                                  # ****************************************************************************************************************
059558,000160:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
059559,000161:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
059560,000162: 
059561,000163:                                                                                                  #  NBSM WILL BE THE FIRST TO GO.  IT SHOULD NOT BE USED.
059562,000164: 
059563,000165: 23,3606           77620        NBSM               STQ                                            
059564,000166: 23,3607           00047                                    X2                                    
059565,000167: 23,3610           76740                           LXC,1    VLOAD*                                
059566,000168: 23,3611           00050                                    S1                                    #  BASE ADDRESS OF THE CDU ANGLES IS IN S1
059567,000169: 23,3612           00001                                    0,1                                   
059568,000170: 23,3613           24767                           STOVL    CDUSPOT                               
059569,000171: 23,3614           00041                                    32D                                   #  VECTOR TO BE TRANSFORMED IS IN 32D
059570,000172: 23,3615           77624                           CALL                                           
059571,000173: 23,3616           47637                                    TRG*NBSM                              
059572,000174: 23,3617           34041                           STCALL   32D                                   #  SINCE THERE'S NO STGOTO
059573,000175: 23,3620           00047                                    X2                                    
059574,000176: 
059575,000177:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
059576,000178:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
059577,000179:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
059578,000180:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
059579,000181: 
059580,000182:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
059581,000183:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
059582,000184:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
059583,000185:                                                                                                  #  MATION; TRG*SMNB, VICE VERSA.
059584,000186: 
059585,000187:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
059586,000188:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
059587,000189: 
059588,000190:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
059589,000191: 
059590,000192: 23,3621           77776        CDU*SMNB           EXIT                                           
059591,000193: 23,3622           03507                           TC       CDUTRIGS                              
059592,000194: 23,3623           13626                           TCF      C*MM*N1                               
059593,000195: 
059594,000196: 23,3624           77776        TRG*SMNB           EXIT                                           
059595,000197: 23,3625           03515                           TC       CD*TR*GS                              
059596,000198: 23,3626           07501        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
059597,000199: 23,3627           46214                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
059598,000200: 23,3630           03650        C*MM*N2            TC       AX*SR*T                               
059599,000201: 23,3631           06006                           TC       INTPRET                               
059600,000202: 23,3632           43575                           VLOAD    RVQ                                   
059601,000203: 23,3633           00123                                    VBUF                                  
059602,000204: 
059603,000205: 23,3634           77776        CDU*NBSM           EXIT                                           
059604,000206: 23,3635           03507                           TC       CDUTRIGS                              
059605,000207: 

Page 1369

059607,000209: 
059608,000210: 23,3636           13641                           TCF      C*MM*N3                               
059609,000211: 
059610,000212: 23,3637           77776        TRG*NBSM           EXIT                                           
059611,000213: 23,3640           03515                           TC       CD*TR*GS                              
059612,000214: 23,3641           07501        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
059613,000215: 23,3642           36214                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
059614,000216: 23,3643           13630                           TCF      C*MM*N2                               
059615,000217: 
059616,000218:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
059617,000219:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
059618,000220:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
059619,000221: 
059620,000222:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
059621,000223:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM
059622,000224:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
059623,000225:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
059624,000226: 
059625,000227: 23,3644           77776        *SMNB*             EXIT                                           
059626,000228: 23,3645           13626                           TCF      C*MM*N1                               
059627,000229: 
059628,000230: 23,3646           77776        *NBSM*             EXIT                                           
059629,000231: 23,3647           13641                           TCF      C*MM*N3                               
059630,000232: 
059631,000233:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
059632,000234:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
059633,000235:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
059634,000236:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
059635,000237:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
059636,000238:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
059637,000239:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
059638,000240:                                                                                                  #                TC      CDUTRIGS
059639,000241:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
059640,000242:                                                                                                  #                TC      AX*SR*T
059641,000243:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
059642,000244:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
059643,000245: 
059644,000246:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
059645,000247:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
059646,000248:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
059647,000249:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
059648,000250: 
059649,000251: 23,3650           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
059650,000252: 23,3651           00006                           EXTEND                                         
059651,000253: 23,3652           22145                           QXCH     RTNSAVER                              
059652,000254: 
059653,000255: 23,3653           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
059654,000256: 23,3654           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
059655,000257: 23,3655           66214                           AD       THREE                                 #                +1 --> 2        -1 --> 0

Page 1370

059657,000259: 23,3656           00006                           EXTEND                                         
059658,000260: 23,3657           50000                           INDEX    A                                     
059659,000261: 23,3660           33737                           DCA      INDEXI                                
059660,000262: 23,3661           52144                           DXCH     DEXI                                  
059661,000263: 
059662,000264: 23,3662           35017                           CA       ONE                                   
059663,000265: 23,3663           54130                           TS       BUF                                   
059664,000266: 23,3664           00006                           EXTEND                                         
059665,000267: 23,3665           50143                           INDEX    DEX1                                  
059666,000268: 23,3666           40123                           DCS      VBUF                                  
059667,000269: 23,3667           13671                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
059668,000270: 
059669,000271: 23,3670           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX
059670,000272: 
059671,000273: 23,3671           52155        LOOP1              DXCH     MPAC                                  
059672,000274: 23,3672           33735                           CA       SINESLOC                              
059673,000275: 23,3673           60143                           AD       DEX1                                  
059674,000276: 23,3674           54116                           TS       ADDRWD                                
059675,000277: 
059676,000278: 23,3675           07056                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
059677,000279: 23,3676           10142                           CCS      DEXDEX                                
059678,000280: 23,3677           52155                           DXCH     MPAC                                  #  NBSM CASE
059679,000281: 23,3700           13703                           TCF      +3                                    
059680,000282: 23,3701           00006                           EXTEND                                         #  SMNB CASE
059681,000283: 23,3702           40155                           DCS      MPAC                                  
059682,000284: 23,3703           52134                           DXCH     TERM1TMP                              
059683,000285: 
059684,000286: 23,3704           36211                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
059685,000287: 23,3705           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
059686,000288: 
059687,000289: 23,3706           00006                           EXTEND                                         
059688,000290: 23,3707           50130                           INDEX    BUF                                   
059689,000291: 23,3710           50143                           INDEX    DEX1                                  
059690,000292: 23,3711           30123                           DCA      VBUF                                  
059691,000293: 23,3712           52155                           DXCH     MPAC                                  
059692,000294: 23,3713           07056                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
059693,000295: 23,3714           52155                           DXCH     MPAC                                  
059694,000296: 23,3715           20134                           DAS      TERM1TMP                              
059695,000297: 23,3716           52134                           DXCH     TERM1TMP                              
059696,000298: 23,3717           20001                           DDOUBL                                         
059697,000299: 23,3720           50130                           INDEX    BUF                                   
059698,000300: 23,3721           50143                           INDEX    DEX1                                  
059699,000301: 23,3722           52123                           DXCH     VBUF                                  
059700,000302: 23,3723           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
059701,000303: 23,3724           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
059702,000304: 23,3725           13670                           TCF      LOOP2                                 
059703,000305: 
059704,000306: 23,3726           00006                           EXTEND                                         
059705,000307: 23,3727           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
059706,000308: 

Page 1371

059708,000310: 23,3730           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
059709,000311: 23,3731           13653                           TCF      R*TL**P                               
059710,000312: 23,3732           00145                           TC       RTNSAVER                              
059711,000313: 23,3733           13653                           TCF      R*TL**P                               
059712,000314: 23,3734           00145                           TC       RTNSAVER                              
059713,000315: 
059714,000316: 23,3735           00736        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
059715,000317: 
059716,000318: 23,3736           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
059717,000319: 23,3737           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
059718,000320: 23,3740           00000                           DEC      0          B-14                       #  **********   THESE   **********
059719,000321: 23,3741           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
059720,000322: 
059721,000323:                                                                                                  #  ****************************************************************************************************************

Page 1372

059723,000325:                                                                                                  #  THIS SUBROUTINE COMPUTES INCREMENTAL CHANGES IN CDU(GIMBAL) ANGLES FROM INCREMENTAL CHANGES ABOUT SM AXES.  IT
059724,000326:                                                                                                  #  REQUIRES SM INCREMENTS AS A DP VECTOR SCALED AT ONE REVOLUTION(DTHETASM,+2,+4).  SIN,COS(CDUY,Z,X) ARE IN
059725,000327:                                                                                                  #  SINCDU,+2,+4 AND COSCDU,+2,+4 RESPECTIVELY, SCALED TO ONE HALF.  CDU INCREENTS ARE PLACED IN DCDU,+2,+4 SCALED TO
059726,000328:                                                                                                  #  ONE REVOLUTION.
059727,000329: 
059728,000330:                                                                                                  #        *  COS(IGA)SEC(MGA)             0               -SIN(IGA)SEC(MGA) *
059729,000331:                                                                                                  #        *                                                                 *
059730,000332:                                                                                                  #        * -COS(IGA)TAN(MGA)             1                SIN(IGA)TAN(MGA) *
059731,000333:                                                                                                  #        *                                                                 *
059732,000334:                                                                                                  #        *      SIN(IGA)                 0                    COS(IGA)     *
059733,000335: 
059734,000336: 14,3422                                           BANK     14                                    
059735,000337: 23,2000                                           SETLOC   POWFLIT1                              
059736,000338: 23,2000                                           BANK                                           
059737,000339: 
059738,000340: 23,3742           41345        SMCDURES           DLOAD    DMP                                   
059739,000341: 23,3743           03212                                    DTHETASM                              
059740,000342: 23,3744           00745                                    COSCDUY                               
059741,000343: 
059742,000344: 23,3745           41325                           PDDL     DMP                                   
059743,000345: 23,3746           03216                                    DTHETASM   +4                         
059744,000346: 23,3747           00737                                    SINCDUY                               
059745,000347: 
059746,000348: 23,3750           77621                           BDSU                                           
059747,000349: 23,3751           77671                           DDV                                            
059748,000350: 23,3752           00747                                    COSCDUZ                               
059749,000351: 23,3753           03204                           STORE    DCDU                                  
059750,000352: 
059751,000353: 23,3754           72405                           DMP      SL1                                   #  SCALE
059752,000354: 23,3755           00741                                    SINCDUZ                               
059753,000355: 23,3756           77621                           BDSU                                           
059754,000356: 
059755,000357: 23,3757           03214                                    DTHETASM   +2                         
059756,000358: 23,3760           17206                           STODL    DCDU       +2                         
059757,000359: 23,3761           03212                                    DTHETASM                              
059758,000360: 
059759,000361: 23,3762           65205                           DMP      PDDL                                  
059760,000362: 23,3763           00737                                    SINCDUY                               
059761,000363: 23,3764           03216                                    DTHETASM   +4                         
059762,000364: 
059763,000365: 23,3765           43205                           DMP      DAD                                   
059764,000366: 23,3766           00745                                    COSCDUY                               
059765,000367: 23,3767           77752                           SL1                                            
059766,000368: 23,3770           03210                           STORE    DCDU       +4                         
059767,000369: 23,3771           77616                           RVQ                                            
059768,000370: 

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