Source Code

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

They have been adapted from sources files created from a listing of Comanche 55. These source files were updated to match binary dumps of a set of Comanche 67 rope modules. They were then further modified by applying known changes between Comanche 67 and Comanche 72. A binary dump of module B2 of Comanche 72, part number 2010802-021, was also used to validate changes made to banks 05-13. 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 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.

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

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