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.

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

Page 1365

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

Page 1366

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

Page 1367

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

Page 1368

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

Page 1369

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

Page 1370

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

Page 1371

059691,000310: 23,3730           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
059692,000311: 23,3731           13653                           TCF      R*TL**P                               
059693,000312: 23,3732           00145                           TC       RTNSAVER                              
059694,000313: 23,3733           13653                           TCF      R*TL**P                               
059695,000314: 23,3734           00145                           TC       RTNSAVER                              
059696,000315: 
059697,000316: 23,3735           00736        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
059698,000317: 
059699,000318: 23,3736           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
059700,000319: 23,3737           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
059701,000320: 23,3740           00000                           DEC      0          B-14                       #  **********   THESE   **********
059702,000321: 23,3741           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
059703,000322: 
059704,000323:                                                                                                  #  ****************************************************************************************************************

Page 1372

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

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