Source Code

These source-code files were derived from scans of the Colossus 237 (Apollo 8 Command Module) program listing from the private collection of original AGC developer Fred Martin. Scanning was by Ron Burkey. Pre-existing Colossus 249 (Apollo 9 CM) source files were used as a template, and changes between Colossus 249 and Colossus 237 were manually transcribed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional 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 237 OF AGC PROGRAM COLOSSUS 
	BY NASA 2021111-031  1:17 AUG. 24, 1968
Note that the date is the date of the printout, not the date of the program revision.

056473,000002:                                                                                                  ## Copyright:   Public domain.
056474,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
056475,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
056476,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
056477,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
056478,000007:                                                                                                  ## Assembler:   yaYUL
056479,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
056480,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
056481,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
056482,000011:                                                                                                  ## Mod history: 2011-04-17 JL   Adapted from corresponding Colossus 249 file.
056483,000012:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
056484,000013:                                                                                                  ##                              and fixed errors found.
056485,000014:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
056486,000015:                                                                                                  ##                              and fixed errors found.
056487,000016: 

Page 1329

056489,000018: 14,3412                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
056490,000019: 23,2000                                           SETLOC   POWFLITE                              
056491,000020: 23,2000                                           BANK                                           
056492,000021: 
056493,000022: 23,3432     0142                                  EBANK=   DEXDEX                                
056494,000023: 23,3432                                           COUNT*   $$/POWFL                              
056495,000024: 
056496,000025:                                                                                                  #      CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
056497,000026:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
056498,000027:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.   AN
056499,000028:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.   THESE
056500,000029:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
056501,000030:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.   THEY DIFFER ONLY IN
056502,000031:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
056503,000032: 
056504,000033:                                                                                                  #      CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
056505,000034:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
056506,000035:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
056507,000036:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
056508,000037: 
056509,000038:                                                                                                  #      CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
056510,000039: 
056511,000040:                                                                                                  #      CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.   THIS
056512,000041:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
056513,000042:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.   A CALL TO THIS ROUTINE IS
056514,000043:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
056515,000044:                                                                                                  #  MODES (SMNB OR NBSM).   SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
056516,000045:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
056517,000046:                                                                                                  #  IN THIS ORDER.   CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
056518,000047:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.   NOTE THAT SINCE
056519,000048:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
056520,000049:                                                                                                  #  CALLED USING BANKCALL.   SORRY.
056521,000050: 
056522,000051:                                                                                                  #      CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
056523,000052:                                                                                                  #  INTERPRETIVE.
056524,000053: 
056525,000054: 23,3432           77776        CDUTRIG            EXIT                                           
056526,000055: 23,3433           03442                           TC       CDUTRIGS                              
056527,000056: 23,3434           06006                           TC       INTPRET                               
056528,000057: 23,3435           77616                           RVQ                                            
056529,000058: 
056530,000059: 23,3436           77776        CD*TR*G            EXIT                                           
056531,000060: 23,3437           03450                           TC       CD*TR*GS                              
056532,000061: 23,3440           06006                           TC       INTPRET                               
056533,000062: 23,3441           77616                           RVQ                                            
056534,000063: 
056535,000064: 23,3442           30032        CDUTRIGS           CA       CDUX                                  
056536,000065: 23,3443           54772                           TS       CDUSPOT    +4                         
056537,000066: 23,3444           30033                           CA       CDUY                                  
056538,000067: 23,3445           54766                           TS       CDUSPOT                               

Page 1330

056540,000069: 23,3446           30034                           CA       CDUZ                                  
056541,000070: 23,3447           54770                           TS       CDUSPOT    +2                         
056542,000071: 
056543,000072: 23,3450           00006        CD*TR*GS           EXTEND                                         
056544,000073: 23,3451           22142                           QXCH     TEM2                                  
056545,000074: 23,3452           34710                           CAF      FOUR                                  
056546,000075: 23,3453           76211        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
056547,000076: 23,3454           54143                           TS       TEM3                                  
056548,000077: 23,3455           50143                           INDEX    TEM3                                  
056549,000078: 23,3456           30766                           CA       CDUSPOT                               
056550,000079: 23,3457           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
056551,000080: 23,3460           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
056552,000081: 23,3461           04652                           TC       USPRCADR                              
056553,000082: 23,3462           45510                           CADR     CDULOGIC                              
056554,000083: 23,3463           00006                           EXTEND                                         
056555,000084: 23,3464           30155                           DCA      MPAC                                  
056556,000085: 23,3465           50143                           INDEX    TEM3                                  
056557,000086: 23,3466           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
056558,000087: 23,3467           04652                           TC       USPRCADR                              
056559,000088: 23,3470           01516                           CADR     COSINE                                
056560,000089: 23,3471           52155                           DXCH     MPAC                                  
056561,000090: 23,3472           50143                           INDEX    TEM3                                  
056562,000091: 23,3473           52745                           DXCH     COSCDU                                #  STORING COSINE
056563,000092: 23,3474           00006                           EXTEND                                         
056564,000093: 23,3475           50143                           INDEX    TEM3                                  
056565,000094: 23,3476           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
056566,000095: 23,3477           04652                           TC       USPRCADR                              
056567,000096: 23,3500           01530                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
056568,000097: 23,3501           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
056569,000098: 23,3502           52155                           DXCH     MPAC                                  
056570,000099: 23,3503           50143                           INDEX    TEM3                                  
056571,000100: 23,3504           52737                           DXCH     SINCDU                                
056572,000101: 23,3505           10143                           CCS      TEM3                                  
056573,000102: 23,3506           13453                           TCF      TR*GL**P                              
056574,000103: 23,3507           00142                           TC       TEM2                                  
056575,000104: 

Page 1331

056577,000106:                                                                                                  #  ****************************************************************************************************************
056578,000107: 
056579,000108:                                                                                                  #      QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
056580,000109:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
056581,000110:                                                                                                  #  AND CDUSPOT +4.   UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
056582,000111:                                                                                                  #  CDUSPOT.   QUICTRIG'S EXECUTION TIME IS 4.1 MS;   THIS IS 10 TIMES AS FAST AS CD*TR*GS.   QUICTRIG MAY BE
056583,000112:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
056584,000113: 
056585,000114: 23,3510           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
056586,000115: 23,3511           00006                           EXTEND                                         
056587,000116: 23,3512           22061                           QXCH     ITEMP1                                
056588,000117: 23,3513           34710                           CAF      FOUR                                  
056589,000118: 23,3514           76211                 +4        MASK     SIX                                   
056590,000119: 23,3515           54062                           TS       ITEMP2                                
056591,000120: 23,3516           50062                           INDEX    ITEMP2                                
056592,000121: 23,3517           30766                           CA       CDUSPOT                               
056593,000122: 23,3520           04770                           TC       SPSIN                                 
056594,000123: 23,3521           00006                           EXTEND                                         
056595,000124: 23,3522           74675                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
056596,000125: 23,3523           50062                           INDEX    ITEMP2                                
056597,000126: 23,3524           52737                           DXCH     SINCDU                                
056598,000127: 23,3525           50062                           INDEX    ITEMP2                                
056599,000128: 23,3526           30766                           CA       CDUSPOT                               
056600,000129: 23,3527           04767                           TC       SPCOS                                 
056601,000130: 23,3530           00006                           EXTEND                                         
056602,000131: 23,3531           74675                           MP       BIT14                                 
056603,000132: 23,3532           50062                           INDEX    ITEMP2                                
056604,000133: 23,3533           52745                           DXCH     COSCDU                                
056605,000134: 23,3534           10062                           CCS      ITEMP2                                
056606,000135: 23,3535           13514                           TCF      QUICTRIG   +4                         
056607,000136: 23,3536           30061                           CA       ITEMP1                                
056608,000137: 23,3537           00003                           RELINT                                         
056609,000138: 23,3540           00000                           TC       A                                     
056610,000139: 

Page 1332

056612,000141:                                                                                                  #  ****************************************************************************************************************
056613,000142: 
056614,000143: 
056615,000144:                                                                                                  #      THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
056616,000145:                                                                                                  #  INTERPRETIVE.   LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
056617,000146: 
056618,000147:                                                                                                  #      NBSM WILL BE THE FIRST TO GO.   IT SHOULD NOT BE USED.
056619,000148: 
056620,000149: 23,3541           77620        NBSM               STQ                                            
056621,000150: 23,3542           00047                                    X2                                    
056622,000151: 23,3543           76740                           LXC,1    VLOAD*                                
056623,000152: 23,3544           00050                                    S1                                    #  BASE ADDRESS OF THE CDU ANGLES IS IN S1
056624,000153: 23,3545           00001                                    0,1                                   
056625,000154: 23,3546           24767                           STOVL    CDUSPOT                               
056626,000155: 23,3547           00041                                    32D                                   #  VECTOR TO BE TRANSFORMED IS IN 32D
056627,000156: 23,3550           77624                           CALL                                           
056628,000157: 23,3551           47572                                    TRG*NBSM                              
056629,000158: 23,3552           34041                           STCALL   32D                                   #  SINCE THERE'S NO STGOTO
056630,000159: 23,3553           00047                                    X2                                    
056631,000160: 
056632,000161:                                                                                                  #      THESE INTERFACE ROUTINES ARE PERMANENT.   ALL RESTORE USER'S EBANK
056633,000162:                                                                                                  #  SETTING.   ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
056634,000163:                                                                                                  #  RETURNING VIA QPRET.   ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
056635,000164:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
056636,000165: 
056637,000166:                                                                                                  #      TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
056638,000167:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
056639,000168:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).   TRG*NBSM DOES THE NB TO SM TRANSFOR- 
056640,000169:                                                                                                  #  MATION;  TRG*SMNB, VICE VERSA.
056641,000170: 
056642,000171:                                                                                                  #      CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
056643,000172:                                                                                                  #  THE CDU COUNTERS.   OTHERWISE IT IS LIKE TRG*NBSM.
056644,000173: 
056645,000174:                                                                                                  #      CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
056646,000175: 
056647,000176: 23,3554           77776        CDU*SMNB           EXIT                                           
056648,000177: 23,3555           03442                           TC       CDUTRIGS                              
056649,000178: 23,3556           13561                           TCF      C*MM*N1                               
056650,000179: 
056651,000180: 23,3557           77776        TRG*SMNB           EXIT                                           
056652,000181: 23,3560           03450                           TC       CD*TR*GS                              
056653,000182: 23,3561           07501        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
056654,000183: 23,3562           46214                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
056655,000184: 23,3563           03603        C*MM*N2            TC       AX*SR*T                               
056656,000185: 23,3564           06006                           TC       INTPRET                               
056657,000186: 23,3565           43575                           VLOAD    RVQ                                   
056658,000187: 23,3566           00123                                    VBUF                                  
056659,000188: 
056660,000189: 23,3567           77776        CDU*NBSM           EXIT                                           
056661,000190: 23,3570           03442                           TC       CDUTRIGS                              

Page 1333

056663,000192: 23,3571           13574                           TCF      C*MM*N3                               
056664,000193: 
056665,000194: 23,3572           77776        TRG*NBSM           EXIT                                           
056666,000195: 23,3573           03450                           TC       CD*TR*GS                              
056667,000196: 23,3574           07501        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
056668,000197: 23,3575           36214                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
056669,000198: 23,3576           13563                           TCF      C*MM*N2                               
056670,000199: 
056671,000200:                                                                                                  #      *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
056672,000201:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.   OTHERWISE THEY ARE
056673,000202:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
056674,000203: 
056675,000204:                                                                                                  #      NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
056676,000205:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM
056677,000206:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.   FOR SUBSEQUENT TRANSFOR-
056678,000207:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
056679,000208: 
056680,000209: 23,3577           77776        *SMNB*             EXIT                                           
056681,000210: 23,3600           13561                           TCF      C*MM*N1                               
056682,000211: 
056683,000212: 23,3601           77776        *NBSM*             EXIT                                           
056684,000213: 23,3602           13574                           TCF      C*MM*N3                               
056685,000214: 
056686,000215:                                                                                                  #        AX*SR*T COMBINES THE OLD SMNB AND NBSM.   FOR THE NB TO SM
056687,000216:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.   FOR SM TO NB, ENTER WITH -3.
056688,000217:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
056689,000218:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
056690,000219:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.   A CALL TO CD*TR*GS, WITH
056691,000220:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
056692,000221:                                                                                                  #  THIS.   HERE IS A SAMPLE CALLING SEQUENCE:-
056693,000222: 
056694,000223:                                                                                                  #                             TC     CDUTRIGS
056695,000224:                                                                                                  #                             CS     THREE       ("CA  THREE" FOR NBSM)
056696,000225:                                                                                                  #                             TC     AX*SR*T
056697,000226: 
056698,000227:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
056699,000228:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
056700,000229: 
056701,000230:                                                                                                  #      AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
056702,000231:                                                                                                  #  UNITY.   A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
056703,000232:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
056704,000233:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
056705,000234: 
056706,000235: 23,3603           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
056707,000236: 23,3604           00006                           EXTEND                                         
056708,000237: 23,3605           22145                           QXCH     RTNSAVER                              
056709,000238: 
056710,000239: 23,3606           10142        R*TL**P            CCS      DEXDEX                                #          +3 --> 0     -3 --> 2
056711,000240: 23,3607           40142                           CS       DEXDEX                                #  THUS:   +2 --> 1     -2 --> 1
056712,000241: 23,3610           66214                           AD       THREE                                 #          +1 --> 2     -1 --> 0

Page 1334

056714,000243: 23,3611           00006                           EXTEND                                         
056715,000244: 23,3612           50000                           INDEX    A                                     
056716,000245: 23,3613           33672                           DCA      INDEXI                                
056717,000246: 23,3614           52144                           DXCH     DEXI                                  
056718,000247: 
056719,000248: 23,3615           34712                           CA       ONE                                   
056720,000249: 23,3616           54130                           TS       BUF                                   
056721,000250: 23,3617           00006                           EXTEND                                         
056722,000251: 23,3620           50143                           INDEX    DEX1                                  
056723,000252: 23,3621           40123                           DCS      VBUF                                  
056724,000253: 23,3622           13624                           TCF      LOOP1                                 #    REALLY BE A SUBTRACT, AND VICE VERSA
056725,000254: 
056726,000255: 23,3623           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX
056727,000256: 
056728,000257: 23,3624           52155        LOOP1              DXCH     MPAC                                  
056729,000258: 23,3625           33670                           CA       SINSLOC                               
056730,000259: 23,3626           60143                           AD       DEX1                                  
056731,000260: 23,3627           54116                           TS       ADDRWD                                
056732,000261: 
056733,000262: 23,3630           07056                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
056734,000263: 23,3631           10142                           CCS      DEXDEX                                
056735,000264: 23,3632           52155                           DXCH     MPAC                                  #  NBSM CASE
056736,000265: 23,3633           13636                           TCF      +3                                    
056737,000266: 23,3634           00006                           EXTEND                                         #  SMNB CASE
056738,000267: 23,3635           40155                           DCS      MPAC                                  
056739,000268: 23,3636           52134                           DXCH     TERM1TMP                              
056740,000269: 
056741,000270: 23,3637           36211                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
056742,000271: 23,3640           26116                           ADS      ADDRWD                                #    BE CONSECUTIVE AND IN THAT ORDER
056743,000272: 
056744,000273: 23,3641           00006                           EXTEND                                         
056745,000274: 23,3642           50130                           INDEX    BUF                                   
056746,000275: 23,3643           50143                           INDEX    DEX1                                  
056747,000276: 23,3644           30123                           DCA      VBUF                                  
056748,000277: 23,3645           52155                           DXCH     MPAC                                  
056749,000278: 23,3646           07056                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
056750,000279: 23,3647           52155                           DXCH     MPAC                                  
056751,000280: 23,3650           20134                           DAS      TERM1TMP                              
056752,000281: 23,3651           52134                           DXCH     TERM1TMP                              
056753,000282: 23,3652           20001                           DDOUBL                                         
056754,000283: 23,3653           50130                           INDEX    BUF                                   
056755,000284: 23,3654           50143                           INDEX    DEX1                                  
056756,000285: 23,3655           52123                           DXCH     VBUF                                  
056757,000286: 23,3656           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
056758,000287: 
056759,000288: 23,3657           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
056760,000289: 23,3660           13623                           TCF      LOOP2                                 
056761,000290: 
056762,000291: 23,3661           00006                           EXTEND                                         
056763,000292: 23,3662           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN

Page 1335

056765,000294: 23,3663           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
056766,000295: 23,3664           13606                           TCF      R*TL**P                               
056767,000296: 23,3665           00145                           TC       RTNSAVER                              
056768,000297: 23,3666           13606                           TCF      R*TL**P                               
056769,000298: 23,3667           00145                           TC       RTNSAVER                              
056770,000299: 
056771,000300: 
056772,000301: 23,3670           00736        SINSLOC            ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
056773,000302: 
056774,000303: 
056775,000304: 23,3671           00004        INDEXI             DEC      4          B-14                       #  **********    DON'T    **********
056776,000305: 23,3672           00002                           DEC      2          B-14                       #  **********    TOUCH    **********
056777,000306: 23,3673           00000                           DEC      0          B-14                       #  **********    THESE    **********
056778,000307: 23,3674           00004                           DEC      4          B-14                       #  **********  CONSTANTS  **********
056779,000308: 
056780,000309: 
056781,000310:                                                                                                  #  ****************************************************************************************************************
056782,000311: 

Page 1336

056784,000313:                                                                                                  #  THIS SUBROUTINE COMPUTES INCREMENTAL CHANGES IN CDU(GIMBAL) ANGLES FROM INCREMENTAL CHANGES ABOUT SM AXES. IT
056785,000314:                                                                                                  #  REQUIRES SM INCREMENTS AS A DP VECTOR SCALED AT ONE REVOLUTION(DTHETASM,+2,+4).  SIN,COS(CDUY,Z,X) ARE IN
056786,000315:                                                                                                  #  SINCDU,+2,+4 AND COSCDU,+2,+4 RESPECTIVELY,SCALED TO ONE HALF. CDU INCREENTS ARE PLACED IN DCDU,+2,+4 SCALED TO
056787,000316:                                                                                                  #  ONE REVOLUTION.
056788,000317: 
056789,000318:                                                                                                  #         *  COS(IGA)SEC(MGA)          0          -SIN(IGA)SEC(MGA) *
056790,000319:                                                                                                  #         *                                                         *
056791,000320:                                                                                                  #         * -COS(IGA)TAN(MGA)          1           SIN(IGA)TAN(MGA) *
056792,000321:                                                                                                  #         *                                                         *
056793,000322:                                                                                                  #         *      SIN(IGA)              0               COS(IGA)     *
056794,000323: 
056795,000324: 14,3412                                           BANK     14                                    
056796,000325: 23,2000                                           SETLOC   POWFLIT1                              
056797,000326: 23,2000                                           BANK                                           
056798,000327: 23,3675           41345        SMCDURES           DLOAD    DMP                                   
056799,000328: 23,3676           03212                                    DTHETASM                              
056800,000329: 23,3677           00745                                    COSCDUY                               
056801,000330: 
056802,000331: 23,3700           41325                           PDDL     DMP                                   
056803,000332: 23,3701           03216                                    DTHETASM   +4                         
056804,000333: 23,3702           00737                                    SINCDUY                               
056805,000334: 
056806,000335: 23,3703           77621                           BDSU                                           
056807,000336: 23,3704           77671                           DDV                                            
056808,000337: 23,3705           00747                                    COSCDUZ                               
056809,000338: 23,3706           03204                           STORE    DCDU                                  
056810,000339: 
056811,000340: 23,3707           72405                           DMP      SL1                                   #  SCALE
056812,000341: 23,3710           00741                                    SINCDUZ                               
056813,000342: 23,3711           77621                           BDSU                                           
056814,000343: 
056815,000344: 23,3712           03214                                    DTHETASM   +2                         
056816,000345: 23,3713           17206                           STODL    DCDU       +2                         
056817,000346: 23,3714           03212                                    DTHETASM                              
056818,000347: 
056819,000348: 23,3715           65205                           DMP      PDDL                                  
056820,000349: 23,3716           00737                                    SINCDUY                               
056821,000350: 23,3717           03216                                    DTHETASM   +4                         
056822,000351: 
056823,000352: 23,3720           43205                           DMP      DAD                                   
056824,000353: 23,3721           00745                                    COSCDUY                               
056825,000354: 23,3722           77752                           SL1                                            
056826,000355: 23,3723           03210                           STORE    DCDU       +4                         
056827,000356: 23,3724           77616                           RVQ                                            

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