Source Code

These source-code files are part of a reconstructed copy of Comanche 67, the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 12.

They have been adapted from sources files for Comanche 55, and updated via disassembly of binary dumps of original core rope memory modules, part numbers 2003972-1081, 2003972-1091, 2003972-1111, 2003972-1121, 2003972-1131, and 2003972-1141.

Since only binary dumps (rather than listings) of Comanche 67 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

056537,000002:                                                                                                  ## Copyright:   Public domain.
056538,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
056539,000004:                                                                                                  ## Purpose:     A section of Comanche revision 067.
056540,000005:                                                                                                  ##              It is part of the reconstructed source code for the flight
056541,000006:                                                                                                  ##              software for the Command Module's (CM) Apollo Guidance Computer
056542,000007:                                                                                                  ##              (AGC) for Apollo 12. No original listings of this program are
056543,000008:                                                                                                  ##              available; instead, this file was created via dissassembly of
056544,000009:                                                                                                  ##              dumps of Comanche 067 core rope modules and comparison with
056545,000010:                                                                                                  ##              other AGC programs.
056546,000011:                                                                                                  ## Assembler:   yaYUL
056547,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
056548,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
056549,000014:                                                                                                  ## Mod history: 2023-08-16 MAS  Created from Comanche 055.
056550,000015: 
056551,000016: 14,3424                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
056552,000017: 23,2000                                           SETLOC   POWFLITE                              
056553,000018: 23,2000                                           BANK                                           
056554,000019: 
056555,000020: 23,3501     0142                                  EBANK=   DEXDEX                                
056556,000021: 23,3501                                           COUNT*   $$/POWFL                              
056557,000022: 
056558,000023:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
056559,000024:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
056560,000025:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
056561,000026:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
056562,000027:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
056563,000028:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
056564,000029:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
056565,000030: 
056566,000031:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
056567,000032:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
056568,000033:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
056569,000034:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
056570,000035: 
056571,000036:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
056572,000037: 
056573,000038:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
056574,000039:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
056575,000040:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
056576,000041:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
056577,000042:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
056578,000043:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
056579,000044:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
056580,000045:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
056581,000046:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
056582,000047:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
056583,000048: 
056584,000049:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
056585,000050:                                                                                                  #  INTERPRETIVE.
056586,000051: 
056587,000052: 23,3501           77776        CDUTRIG            EXIT                                           
056588,000053: 23,3502           03511                           TC       CDUTRIGS                              
056589,000054: 23,3503           06006                           TC       INTPRET                               
056590,000055: 23,3504           77616                           RVQ                                            
056591,000056: 
056592,000057: 23,3505           77776        CD*TR*G            EXIT                                           
056593,000058: 23,3506           03517                           TC       CD*TR*GS                              
056594,000059: 23,3507           06006                           TC       INTPRET                               
056595,000060: 23,3510           77616                           RVQ                                            
056596,000061: 
056597,000062: 23,3511           30032        CDUTRIGS           CA       CDUX                                  
056598,000063: 23,3512           54772                           TS       CDUSPOT    +4                         
056599,000064: 23,3513           30033                           CA       CDUY                                  
056600,000065: 23,3514           54766                           TS       CDUSPOT                               
056601,000066: 23,3515           30034                           CA       CDUZ                                  
056602,000067: 23,3516           54770                           TS       CDUSPOT    +2                         
056603,000068: 
056604,000069: 23,3517           00006        CD*TR*GS           EXTEND                                         
056605,000070: 23,3520           22142                           QXCH     TEM2                                  
056606,000071: 23,3521           35031                           CAF      FOUR                                  
056607,000072: 23,3522           76211        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
056608,000073: 23,3523           54143                           TS       TEM3                                  
056609,000074: 23,3524           50143                           INDEX    TEM3                                  
056610,000075: 23,3525           30766                           CA       CDUSPOT                               
056611,000076: 23,3526           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
056612,000077: 23,3527           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
056613,000078: 23,3530           04773                           TC       USPRCADR                              
056614,000079: 23,3531           45513                           CADR     CDULOGIC                              
056615,000080: 23,3532           00006                           EXTEND                                         
056616,000081: 23,3533           30155                           DCA      MPAC                                  
056617,000082: 23,3534           50143                           INDEX    TEM3                                  
056618,000083: 23,3535           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
056619,000084: 23,3536           04773                           TC       USPRCADR                              
056620,000085: 23,3537           01516                           CADR     COSINE                                
056621,000086: 23,3540           52155                           DXCH     MPAC                                  
056622,000087: 23,3541           50143                           INDEX    TEM3                                  
056623,000088: 23,3542           52745                           DXCH     COSCDU                                #  STORING COSINE
056624,000089: 23,3543           00006                           EXTEND                                         
056625,000090: 23,3544           50143                           INDEX    TEM3                                  
056626,000091: 23,3545           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
056627,000092: 23,3546           04773                           TC       USPRCADR                              
056628,000093: 23,3547           01530                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
056629,000094: 23,3550           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
056630,000095: 23,3551           52155                           DXCH     MPAC                                  
056631,000096: 23,3552           50143                           INDEX    TEM3                                  
056632,000097: 23,3553           52737                           DXCH     SINCDU                                
056633,000098: 23,3554           10143                           CCS      TEM3                                  
056634,000099: 23,3555           13522                           TCF      TR*GL**P                              
056635,000100: 23,3556           00142                           TC       TEM2                                  
056636,000101:                                                                                                  #  ****************************************************************************************************************
056637,000102:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
056638,000103:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
056639,000104:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
056640,000105:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;    THIS IS 10 TIMES AS FAST AS CD*TR*GS.    QUICTRIG MAY BE
056641,000106:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
056642,000107: 
056643,000108: 23,3557           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
056644,000109: 23,3560           00006                           EXTEND                                         
056645,000110: 23,3561           22061                           QXCH     ITEMP1                                
056646,000111: 23,3562           35031                           CAF      FOUR                                  
056647,000112: 23,3563           76211                 +4        MASK     SIX                                   
056648,000113: 23,3564           54062                           TS       ITEMP2                                
056649,000114: 23,3565           50062                           INDEX    ITEMP2                                
056650,000115: 23,3566           30766                           CA       CDUSPOT                               
056651,000116: 23,3567           05111                           TC       SPSIN                                 
056652,000117: 23,3570           00006                           EXTEND                                         
056653,000118: 23,3571           75016                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
056654,000119: 23,3572           50062                           INDEX    ITEMP2                                
056655,000120: 23,3573           52737                           DXCH     SINCDU                                
056656,000121: 23,3574           50062                           INDEX    ITEMP2                                
056657,000122: 23,3575           30766                           CA       CDUSPOT                               
056658,000123: 23,3576           05110                           TC       SPCOS                                 
056659,000124: 23,3577           00006                           EXTEND                                         
056660,000125: 23,3600           75016                           MP       BIT14                                 
056661,000126: 23,3601           50062                           INDEX    ITEMP2                                
056662,000127: 23,3602           52745                           DXCH     COSCDU                                
056663,000128: 23,3603           10062                           CCS      ITEMP2                                
056664,000129: 23,3604           13563                           TCF      QUICTRIG   +4                         
056665,000130: 23,3605           30061                           CA       ITEMP1                                
056666,000131: 23,3606           00003                           RELINT                                         
056667,000132: 23,3607           00000                           TC       A                                     
056668,000133:                                                                                                  # ****************************************************************************************************************
056669,000134:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
056670,000135:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
056671,000136: 
056672,000137:                                                                                                  #  NBSM WILL BE THE FIRST TO GO.  IT SHOULD NOT BE USED.
056673,000138: 
056674,000139: 23,3610           77620        NBSM               STQ                                            
056675,000140: 23,3611           00047                                    X2                                    
056676,000141: 23,3612           76740                           LXC,1    VLOAD*                                
056677,000142: 23,3613           00050                                    S1                                    #  BASE ADDRESS OF THE CDU ANGLES IS IN S1
056678,000143: 23,3614           00001                                    0,1                                   
056679,000144: 23,3615           24767                           STOVL    CDUSPOT                               
056680,000145: 23,3616           00041                                    32D                                   #  VECTOR TO BE TRANSFORMED IS IN 32D
056681,000146: 23,3617           77624                           CALL                                           
056682,000147: 23,3620           47641                                    TRG*NBSM                              
056683,000148: 23,3621           34041                           STCALL   32D                                   #  SINCE THERE'S NO STGOTO
056684,000149: 23,3622           00047                                    X2                                    
056685,000150: 
056686,000151:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
056687,000152:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
056688,000153:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
056689,000154:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
056690,000155: 
056691,000156:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
056692,000157:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
056693,000158:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
056694,000159:                                                                                                  #  MATION; TRG*SMNB, VICE VERSA.
056695,000160: 
056696,000161:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
056697,000162:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
056698,000163: 
056699,000164:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
056700,000165: 
056701,000166: 23,3623           77776        CDU*SMNB           EXIT                                           
056702,000167: 23,3624           03511                           TC       CDUTRIGS                              
056703,000168: 23,3625           13630                           TCF      C*MM*N1                               
056704,000169: 
056705,000170: 23,3626           77776        TRG*SMNB           EXIT                                           
056706,000171: 23,3627           03517                           TC       CD*TR*GS                              
056707,000172: 23,3630           07501        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
056708,000173: 23,3631           46214                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
056709,000174: 23,3632           03652        C*MM*N2            TC       AX*SR*T                               
056710,000175: 23,3633           06006                           TC       INTPRET                               
056711,000176: 23,3634           43575                           VLOAD    RVQ                                   
056712,000177: 23,3635           00123                                    VBUF                                  
056713,000178: 
056714,000179: 23,3636           77776        CDU*NBSM           EXIT                                           
056715,000180: 23,3637           03511                           TC       CDUTRIGS                              
056716,000181: 
056717,000182: 
056718,000183: 23,3640           13643                           TCF      C*MM*N3                               
056719,000184: 
056720,000185: 23,3641           77776        TRG*NBSM           EXIT                                           
056721,000186: 23,3642           03517                           TC       CD*TR*GS                              
056722,000187: 23,3643           07501        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
056723,000188: 23,3644           36214                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
056724,000189: 23,3645           13632                           TCF      C*MM*N2                               
056725,000190: 
056726,000191:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
056727,000192:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
056728,000193:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
056729,000194: 
056730,000195:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
056731,000196:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM
056732,000197:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
056733,000198:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
056734,000199: 
056735,000200: 23,3646           77776        *SMNB*             EXIT                                           
056736,000201: 23,3647           13630                           TCF      C*MM*N1                               
056737,000202: 
056738,000203: 23,3650           77776        *NBSM*             EXIT                                           
056739,000204: 23,3651           13643                           TCF      C*MM*N3                               
056740,000205: 
056741,000206:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
056742,000207:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
056743,000208:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
056744,000209:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
056745,000210:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
056746,000211:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
056747,000212:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
056748,000213:                                                                                                  #                TC      CDUTRIGS
056749,000214:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
056750,000215:                                                                                                  #                TC      AX*SR*T
056751,000216:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
056752,000217:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
056753,000218: 
056754,000219:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
056755,000220:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
056756,000221:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
056757,000222:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
056758,000223: 
056759,000224: 23,3652           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
056760,000225: 23,3653           00006                           EXTEND                                         
056761,000226: 23,3654           22145                           QXCH     RTNSAVER                              
056762,000227: 
056763,000228: 23,3655           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
056764,000229: 23,3656           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
056765,000230: 23,3657           66214                           AD       THREE                                 #                +1 --> 2        -1 --> 0
056766,000231: 23,3660           00006                           EXTEND                                         
056767,000232: 23,3661           50000                           INDEX    A                                     
056768,000233: 23,3662           33741                           DCA      INDEXI                                
056769,000234: 23,3663           52144                           DXCH     DEXI                                  
056770,000235: 
056771,000236: 23,3664           35033                           CA       ONE                                   
056772,000237: 23,3665           54130                           TS       BUF                                   
056773,000238: 23,3666           00006                           EXTEND                                         
056774,000239: 23,3667           50143                           INDEX    DEX1                                  
056775,000240: 23,3670           40123                           DCS      VBUF                                  
056776,000241: 23,3671           13673                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
056777,000242: 
056778,000243: 23,3672           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX
056779,000244: 
056780,000245: 23,3673           52155        LOOP1              DXCH     MPAC                                  
056781,000246: 23,3674           33737                           CA       SINESLOC                              
056782,000247: 23,3675           60143                           AD       DEX1                                  
056783,000248: 23,3676           54116                           TS       ADDRWD                                
056784,000249: 
056785,000250: 23,3677           07056                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
056786,000251: 23,3700           10142                           CCS      DEXDEX                                
056787,000252: 23,3701           52155                           DXCH     MPAC                                  #  NBSM CASE
056788,000253: 23,3702           13705                           TCF      +3                                    
056789,000254: 23,3703           00006                           EXTEND                                         #  SMNB CASE
056790,000255: 23,3704           40155                           DCS      MPAC                                  
056791,000256: 23,3705           52134                           DXCH     TERM1TMP                              
056792,000257: 
056793,000258: 23,3706           36211                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
056794,000259: 23,3707           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
056795,000260: 
056796,000261: 23,3710           00006                           EXTEND                                         
056797,000262: 23,3711           50130                           INDEX    BUF                                   
056798,000263: 23,3712           50143                           INDEX    DEX1                                  
056799,000264: 23,3713           30123                           DCA      VBUF                                  
056800,000265: 23,3714           52155                           DXCH     MPAC                                  
056801,000266: 23,3715           07056                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
056802,000267: 23,3716           52155                           DXCH     MPAC                                  
056803,000268: 23,3717           20134                           DAS      TERM1TMP                              
056804,000269: 23,3720           52134                           DXCH     TERM1TMP                              
056805,000270: 23,3721           20001                           DDOUBL                                         
056806,000271: 23,3722           50130                           INDEX    BUF                                   
056807,000272: 23,3723           50143                           INDEX    DEX1                                  
056808,000273: 23,3724           52123                           DXCH     VBUF                                  
056809,000274: 23,3725           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
056810,000275: 23,3726           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
056811,000276: 23,3727           13672                           TCF      LOOP2                                 
056812,000277: 
056813,000278: 23,3730           00006                           EXTEND                                         
056814,000279: 23,3731           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
056815,000280: 
056816,000281: 23,3732           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
056817,000282: 23,3733           13655                           TCF      R*TL**P                               
056818,000283: 23,3734           00145                           TC       RTNSAVER                              
056819,000284: 23,3735           13655                           TCF      R*TL**P                               
056820,000285: 23,3736           00145                           TC       RTNSAVER                              
056821,000286: 
056822,000287: 23,3737           00736        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
056823,000288: 
056824,000289: 23,3740           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
056825,000290: 23,3741           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
056826,000291: 23,3742           00000                           DEC      0          B-14                       #  **********   THESE   **********
056827,000292: 23,3743           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
056828,000293: 
056829,000294:                                                                                                  #  ****************************************************************************************************************
056830,000295:                                                                                                  #  THIS SUBROUTINE COMPUTES INCREMENTAL CHANGES IN CDU(GIMBAL) ANGLES FROM INCREMENTAL CHANGES ABOUT SM AXES.  IT
056831,000296:                                                                                                  #  REQUIRES SM INCREMENTS AS A DP VECTOR SCALED AT ONE REVOLUTION(DTHETASM,+2,+4).  SIN,COS(CDUY,Z,X) ARE IN
056832,000297:                                                                                                  #  SINCDU,+2,+4 AND COSCDU,+2,+4 RESPECTIVELY, SCALED TO ONE HALF.  CDU INCREENTS ARE PLACED IN DCDU,+2,+4 SCALED TO
056833,000298:                                                                                                  #  ONE REVOLUTION.
056834,000299: 
056835,000300:                                                                                                  #        *  COS(IGA)SEC(MGA)             0               -SIN(IGA)SEC(MGA) *
056836,000301:                                                                                                  #        *                                                                 *
056837,000302:                                                                                                  #        * -COS(IGA)TAN(MGA)             1                SIN(IGA)TAN(MGA) *
056838,000303:                                                                                                  #        *                                                                 *
056839,000304:                                                                                                  #        *      SIN(IGA)                 0                    COS(IGA)     *
056840,000305: 
056841,000306: 14,3424                                           BANK     14                                    
056842,000307: 23,2000                                           SETLOC   POWFLIT1                              
056843,000308: 23,2000                                           BANK                                           
056844,000309: 
056845,000310: 23,3744           41345        SMCDURES           DLOAD    DMP                                   
056846,000311: 23,3745           03212                                    DTHETASM                              
056847,000312: 23,3746           00745                                    COSCDUY                               
056848,000313: 
056849,000314: 23,3747           41325                           PDDL     DMP                                   
056850,000315: 23,3750           03216                                    DTHETASM   +4                         
056851,000316: 23,3751           00737                                    SINCDUY                               
056852,000317: 
056853,000318: 23,3752           77621                           BDSU                                           
056854,000319: 23,3753           77671                           DDV                                            
056855,000320: 23,3754           00747                                    COSCDUZ                               
056856,000321: 23,3755           03204                           STORE    DCDU                                  
056857,000322: 
056858,000323: 23,3756           72405                           DMP      SL1                                   #  SCALE
056859,000324: 23,3757           00741                                    SINCDUZ                               
056860,000325: 23,3760           77621                           BDSU                                           
056861,000326: 
056862,000327: 23,3761           03214                                    DTHETASM   +2                         
056863,000328: 23,3762           17206                           STODL    DCDU       +2                         
056864,000329: 23,3763           03212                                    DTHETASM                              
056865,000330: 
056866,000331: 23,3764           65205                           DMP      PDDL                                  
056867,000332: 23,3765           00737                                    SINCDUY                               
056868,000333: 23,3766           03216                                    DTHETASM   +4                         
056869,000334: 
056870,000335: 23,3767           43205                           DMP      DAD                                   
056871,000336: 23,3770           00745                                    COSCDUY                               
056872,000337: 23,3771           77752                           SL1                                            
056873,000338: 23,3772           03210                           STORE    DCDU       +4                         
056874,000339: 23,3773           77616                           RVQ                                            
056875,000340: 

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