Source Code

These source-code files are part of a reconstructed copy of Comanche 72/3 (AKA Manche72 revision 3), the final, flown mission release of the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 13.

The starting point was the source code of Comanche 72 (itself previously reconstructed). Comanche 72 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 72 and 72/3. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments.

Since no contemporary listings of Comanche 72/3 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.

056892,000002:                                                                                                  ## Copyright:   Public domain.
056893,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
056894,000004:                                                                                                  ## Purpose:     A section of Manche72 revision 3.
056895,000005:                                                                                                  ##              It is part of the reconstructed source code for the final, flown
056896,000006:                                                                                                  ##              release of the software for the Command Module's (CM) Apollo
056897,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 13. No original listings
056898,000008:                                                                                                  ##              of this program are available; instead, this file was recreated
056899,000009:                                                                                                  ##              from a reconstructed copy of Comanche 072. It has been adapted
056900,000010:                                                                                                  ##              such that the resulting bugger words exactly match those
056901,000011:                                                                                                  ##              specified for Manche72 revision 3 in NASA drawing 2021153G,
056902,000012:                                                                                                  ##              which gives relatively high confidence that the reconstruction
056903,000013:                                                                                                  ##              is correct.
056904,000014:                                                                                                  ## Assembler:   yaYUL
056905,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
056906,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
056907,000017:                                                                                                  ## Mod history: 2024-05-19 MAS  Created from Comanche 072.
056908,000018: 
056909,000019: 14,3426                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
056910,000020: 23,2000                                           SETLOC   POWFLITE                              
056911,000021: 23,2000                                           BANK                                           
056912,000022: 
056913,000023: 23,3501     0142                                  EBANK=   DEXDEX                                
056914,000024: 23,3501                                           COUNT*   $$/POWFL                              
056915,000025: 
056916,000026:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
056917,000027:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
056918,000028:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
056919,000029:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
056920,000030:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
056921,000031:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
056922,000032:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
056923,000033: 
056924,000034:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
056925,000035:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
056926,000036:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
056927,000037:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
056928,000038: 
056929,000039:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
056930,000040: 
056931,000041:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
056932,000042:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
056933,000043:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
056934,000044:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
056935,000045:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
056936,000046:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
056937,000047:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
056938,000048:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
056939,000049:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
056940,000050:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
056941,000051: 
056942,000052:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
056943,000053:                                                                                                  #  INTERPRETIVE.
056944,000054: 
056945,000055: 23,3501           77776        CDUTRIG            EXIT                                           
056946,000056: 23,3502           03511                           TC       CDUTRIGS                              
056947,000057: 23,3503           06006                           TC       INTPRET                               
056948,000058: 23,3504           77616                           RVQ                                            
056949,000059: 
056950,000060: 23,3505           77776        CD*TR*G            EXIT                                           
056951,000061: 23,3506           03517                           TC       CD*TR*GS                              
056952,000062: 23,3507           06006                           TC       INTPRET                               
056953,000063: 23,3510           77616                           RVQ                                            
056954,000064: 
056955,000065: 23,3511           30032        CDUTRIGS           CA       CDUX                                  
056956,000066: 23,3512           54772                           TS       CDUSPOT    +4                         
056957,000067: 23,3513           30033                           CA       CDUY                                  
056958,000068: 23,3514           54766                           TS       CDUSPOT                               
056959,000069: 23,3515           30034                           CA       CDUZ                                  
056960,000070: 23,3516           54770                           TS       CDUSPOT    +2                         
056961,000071: 
056962,000072: 23,3517           00006        CD*TR*GS           EXTEND                                         
056963,000073: 23,3520           22142                           QXCH     TEM2                                  
056964,000074: 23,3521           35031                           CAF      FOUR                                  
056965,000075: 23,3522           76211        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
056966,000076: 23,3523           54143                           TS       TEM3                                  
056967,000077: 23,3524           50143                           INDEX    TEM3                                  
056968,000078: 23,3525           30766                           CA       CDUSPOT                               
056969,000079: 23,3526           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
056970,000080: 23,3527           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
056971,000081: 23,3530           04773                           TC       USPRCADR                              
056972,000082: 23,3531           45513                           CADR     CDULOGIC                              
056973,000083: 23,3532           00006                           EXTEND                                         
056974,000084: 23,3533           30155                           DCA      MPAC                                  
056975,000085: 23,3534           50143                           INDEX    TEM3                                  
056976,000086: 23,3535           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
056977,000087: 23,3536           04773                           TC       USPRCADR                              
056978,000088: 23,3537           01516                           CADR     COSINE                                
056979,000089: 23,3540           52155                           DXCH     MPAC                                  
056980,000090: 23,3541           50143                           INDEX    TEM3                                  
056981,000091: 23,3542           52745                           DXCH     COSCDU                                #  STORING COSINE
056982,000092: 23,3543           00006                           EXTEND                                         
056983,000093: 23,3544           50143                           INDEX    TEM3                                  
056984,000094: 23,3545           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
056985,000095: 23,3546           04773                           TC       USPRCADR                              
056986,000096: 23,3547           01530                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
056987,000097: 23,3550           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
056988,000098: 23,3551           52155                           DXCH     MPAC                                  
056989,000099: 23,3552           50143                           INDEX    TEM3                                  
056990,000100: 23,3553           52737                           DXCH     SINCDU                                
056991,000101: 23,3554           10143                           CCS      TEM3                                  
056992,000102: 23,3555           13522                           TCF      TR*GL**P                              
056993,000103: 23,3556           00142                           TC       TEM2                                  
056994,000104:                                                                                                  #  ****************************************************************************************************************
056995,000105:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
056996,000106:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
056997,000107:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
056998,000108:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;    THIS IS 10 TIMES AS FAST AS CD*TR*GS.    QUICTRIG MAY BE
056999,000109:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
057000,000110: 
057001,000111: 23,3557           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
057002,000112: 23,3560           00006                           EXTEND                                         
057003,000113: 23,3561           22061                           QXCH     ITEMP1                                
057004,000114: 23,3562           35031                           CAF      FOUR                                  
057005,000115: 23,3563           76211                 +4        MASK     SIX                                   
057006,000116: 23,3564           54062                           TS       ITEMP2                                
057007,000117: 23,3565           50062                           INDEX    ITEMP2                                
057008,000118: 23,3566           30766                           CA       CDUSPOT                               
057009,000119: 23,3567           05111                           TC       SPSIN                                 
057010,000120: 23,3570           00006                           EXTEND                                         
057011,000121: 23,3571           75016                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
057012,000122: 23,3572           50062                           INDEX    ITEMP2                                
057013,000123: 23,3573           52737                           DXCH     SINCDU                                
057014,000124: 23,3574           50062                           INDEX    ITEMP2                                
057015,000125: 23,3575           30766                           CA       CDUSPOT                               
057016,000126: 23,3576           05110                           TC       SPCOS                                 
057017,000127: 23,3577           00006                           EXTEND                                         
057018,000128: 23,3600           75016                           MP       BIT14                                 
057019,000129: 23,3601           50062                           INDEX    ITEMP2                                
057020,000130: 23,3602           52745                           DXCH     COSCDU                                
057021,000131: 23,3603           10062                           CCS      ITEMP2                                
057022,000132: 23,3604           13563                           TCF      QUICTRIG   +4                         
057023,000133: 23,3605           30061                           CA       ITEMP1                                
057024,000134: 23,3606           00003                           RELINT                                         
057025,000135: 23,3607           00000                           TC       A                                     
057026,000136:                                                                                                  # ****************************************************************************************************************
057027,000137:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
057028,000138:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
057029,000139: 
057030,000140:                                                                                                  #  NBSM WILL BE THE FIRST TO GO.  IT SHOULD NOT BE USED.
057031,000141: 
057032,000142: 23,3610           77620        NBSM               STQ                                            
057033,000143: 23,3611           00047                                    X2                                    
057034,000144: 23,3612           76740                           LXC,1    VLOAD*                                
057035,000145: 23,3613           00050                                    S1                                    #  BASE ADDRESS OF THE CDU ANGLES IS IN S1
057036,000146: 23,3614           00001                                    0,1                                   
057037,000147: 23,3615           24767                           STOVL    CDUSPOT                               
057038,000148: 23,3616           00041                                    32D                                   #  VECTOR TO BE TRANSFORMED IS IN 32D
057039,000149: 23,3617           77624                           CALL                                           
057040,000150: 23,3620           47641                                    TRG*NBSM                              
057041,000151: 23,3621           34041                           STCALL   32D                                   #  SINCE THERE'S NO STGOTO
057042,000152: 23,3622           00047                                    X2                                    
057043,000153: 
057044,000154:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
057045,000155:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
057046,000156:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
057047,000157:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
057048,000158: 
057049,000159:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
057050,000160:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
057051,000161:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
057052,000162:                                                                                                  #  MATION; TRG*SMNB, VICE VERSA.
057053,000163: 
057054,000164:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
057055,000165:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
057056,000166: 
057057,000167:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
057058,000168: 
057059,000169: 23,3623           77776        CDU*SMNB           EXIT                                           
057060,000170: 23,3624           03511                           TC       CDUTRIGS                              
057061,000171: 23,3625           13630                           TCF      C*MM*N1                               
057062,000172: 
057063,000173: 23,3626           77776        TRG*SMNB           EXIT                                           
057064,000174: 23,3627           03517                           TC       CD*TR*GS                              
057065,000175: 23,3630           07501        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
057066,000176: 23,3631           46214                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
057067,000177: 23,3632           03652        C*MM*N2            TC       AX*SR*T                               
057068,000178: 23,3633           06006                           TC       INTPRET                               
057069,000179: 23,3634           43575                           VLOAD    RVQ                                   
057070,000180: 23,3635           00123                                    VBUF                                  
057071,000181: 
057072,000182: 23,3636           77776        CDU*NBSM           EXIT                                           
057073,000183: 23,3637           03511                           TC       CDUTRIGS                              
057074,000184: 
057075,000185: 
057076,000186: 23,3640           13643                           TCF      C*MM*N3                               
057077,000187: 
057078,000188: 23,3641           77776        TRG*NBSM           EXIT                                           
057079,000189: 23,3642           03517                           TC       CD*TR*GS                              
057080,000190: 23,3643           07501        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
057081,000191: 23,3644           36214                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
057082,000192: 23,3645           13632                           TCF      C*MM*N2                               
057083,000193: 
057084,000194:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
057085,000195:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
057086,000196:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
057087,000197: 
057088,000198:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
057089,000199:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM
057090,000200:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
057091,000201:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
057092,000202: 
057093,000203: 23,3646           77776        *SMNB*             EXIT                                           
057094,000204: 23,3647           13630                           TCF      C*MM*N1                               
057095,000205: 
057096,000206: 23,3650           77776        *NBSM*             EXIT                                           
057097,000207: 23,3651           13643                           TCF      C*MM*N3                               
057098,000208: 
057099,000209:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
057100,000210:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
057101,000211:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
057102,000212:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
057103,000213:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
057104,000214:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
057105,000215:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
057106,000216:                                                                                                  #                TC      CDUTRIGS
057107,000217:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
057108,000218:                                                                                                  #                TC      AX*SR*T
057109,000219:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
057110,000220:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
057111,000221: 
057112,000222:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
057113,000223:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
057114,000224:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
057115,000225:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
057116,000226: 
057117,000227: 23,3652           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
057118,000228: 23,3653           00006                           EXTEND                                         
057119,000229: 23,3654           22145                           QXCH     RTNSAVER                              
057120,000230: 
057121,000231: 23,3655           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
057122,000232: 23,3656           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
057123,000233: 23,3657           66214                           AD       THREE                                 #                +1 --> 2        -1 --> 0
057124,000234: 23,3660           00006                           EXTEND                                         
057125,000235: 23,3661           50000                           INDEX    A                                     
057126,000236: 23,3662           33741                           DCA      INDEXI                                
057127,000237: 23,3663           52144                           DXCH     DEXI                                  
057128,000238: 
057129,000239: 23,3664           35033                           CA       ONE                                   
057130,000240: 23,3665           54130                           TS       BUF                                   
057131,000241: 23,3666           00006                           EXTEND                                         
057132,000242: 23,3667           50143                           INDEX    DEX1                                  
057133,000243: 23,3670           40123                           DCS      VBUF                                  
057134,000244: 23,3671           13673                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
057135,000245: 
057136,000246: 23,3672           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX
057137,000247: 
057138,000248: 23,3673           52155        LOOP1              DXCH     MPAC                                  
057139,000249: 23,3674           33737                           CA       SINESLOC                              
057140,000250: 23,3675           60143                           AD       DEX1                                  
057141,000251: 23,3676           54116                           TS       ADDRWD                                
057142,000252: 
057143,000253: 23,3677           07056                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
057144,000254: 23,3700           10142                           CCS      DEXDEX                                
057145,000255: 23,3701           52155                           DXCH     MPAC                                  #  NBSM CASE
057146,000256: 23,3702           13705                           TCF      +3                                    
057147,000257: 23,3703           00006                           EXTEND                                         #  SMNB CASE
057148,000258: 23,3704           40155                           DCS      MPAC                                  
057149,000259: 23,3705           52134                           DXCH     TERM1TMP                              
057150,000260: 
057151,000261: 23,3706           36211                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
057152,000262: 23,3707           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
057153,000263: 
057154,000264: 23,3710           00006                           EXTEND                                         
057155,000265: 23,3711           50130                           INDEX    BUF                                   
057156,000266: 23,3712           50143                           INDEX    DEX1                                  
057157,000267: 23,3713           30123                           DCA      VBUF                                  
057158,000268: 23,3714           52155                           DXCH     MPAC                                  
057159,000269: 23,3715           07056                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
057160,000270: 23,3716           52155                           DXCH     MPAC                                  
057161,000271: 23,3717           20134                           DAS      TERM1TMP                              
057162,000272: 23,3720           52134                           DXCH     TERM1TMP                              
057163,000273: 23,3721           20001                           DDOUBL                                         
057164,000274: 23,3722           50130                           INDEX    BUF                                   
057165,000275: 23,3723           50143                           INDEX    DEX1                                  
057166,000276: 23,3724           52123                           DXCH     VBUF                                  
057167,000277: 23,3725           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
057168,000278: 23,3726           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
057169,000279: 23,3727           13672                           TCF      LOOP2                                 
057170,000280: 
057171,000281: 23,3730           00006                           EXTEND                                         
057172,000282: 23,3731           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
057173,000283: 
057174,000284: 23,3732           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
057175,000285: 23,3733           13655                           TCF      R*TL**P                               
057176,000286: 23,3734           00145                           TC       RTNSAVER                              
057177,000287: 23,3735           13655                           TCF      R*TL**P                               
057178,000288: 23,3736           00145                           TC       RTNSAVER                              
057179,000289: 
057180,000290: 23,3737           00736        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
057181,000291: 
057182,000292: 23,3740           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
057183,000293: 23,3741           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
057184,000294: 23,3742           00000                           DEC      0          B-14                       #  **********   THESE   **********
057185,000295: 23,3743           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
057186,000296: 
057187,000297:                                                                                                  #  ****************************************************************************************************************
057188,000298:                                                                                                  #  THIS SUBROUTINE COMPUTES INCREMENTAL CHANGES IN CDU(GIMBAL) ANGLES FROM INCREMENTAL CHANGES ABOUT SM AXES.  IT
057189,000299:                                                                                                  #  REQUIRES SM INCREMENTS AS A DP VECTOR SCALED AT ONE REVOLUTION(DTHETASM,+2,+4).  SIN,COS(CDUY,Z,X) ARE IN
057190,000300:                                                                                                  #  SINCDU,+2,+4 AND COSCDU,+2,+4 RESPECTIVELY, SCALED TO ONE HALF.  CDU INCREENTS ARE PLACED IN DCDU,+2,+4 SCALED TO
057191,000301:                                                                                                  #  ONE REVOLUTION.
057192,000302: 
057193,000303:                                                                                                  #        *  COS(IGA)SEC(MGA)             0               -SIN(IGA)SEC(MGA) *
057194,000304:                                                                                                  #        *                                                                 *
057195,000305:                                                                                                  #        * -COS(IGA)TAN(MGA)             1                SIN(IGA)TAN(MGA) *
057196,000306:                                                                                                  #        *                                                                 *
057197,000307:                                                                                                  #        *      SIN(IGA)                 0                    COS(IGA)     *
057198,000308: 
057199,000309: 14,3426                                           BANK     14                                    
057200,000310: 23,2000                                           SETLOC   POWFLIT1                              
057201,000311: 23,2000                                           BANK                                           
057202,000312: 
057203,000313: 23,3744           41345        SMCDURES           DLOAD    DMP                                   
057204,000314: 23,3745           03212                                    DTHETASM                              
057205,000315: 23,3746           00745                                    COSCDUY                               
057206,000316: 
057207,000317: 23,3747           41325                           PDDL     DMP                                   
057208,000318: 23,3750           03216                                    DTHETASM   +4                         
057209,000319: 23,3751           00737                                    SINCDUY                               
057210,000320: 
057211,000321: 23,3752           77621                           BDSU                                           
057212,000322: 23,3753           77671                           DDV                                            
057213,000323: 23,3754           00747                                    COSCDUZ                               
057214,000324: 23,3755           03204                           STORE    DCDU                                  
057215,000325: 
057216,000326: 23,3756           72405                           DMP      SL1                                   #  SCALE
057217,000327: 23,3757           00741                                    SINCDUZ                               
057218,000328: 23,3760           77621                           BDSU                                           
057219,000329: 
057220,000330: 23,3761           03214                                    DTHETASM   +2                         
057221,000331: 23,3762           17206                           STODL    DCDU       +2                         
057222,000332: 23,3763           03212                                    DTHETASM                              
057223,000333: 
057224,000334: 23,3764           65205                           DMP      PDDL                                  
057225,000335: 23,3765           00737                                    SINCDUY                               
057226,000336: 23,3766           03216                                    DTHETASM   +4                         
057227,000337: 
057228,000338: 23,3767           43205                           DMP      DAD                                   
057229,000339: 23,3770           00745                                    COSCDUY                               
057230,000340: 23,3771           77752                           SL1                                            
057231,000341: 23,3772           03210                           STORE    DCDU       +4                         
057232,000342: 23,3773           77616                           RVQ                                            
057233,000343: 

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