Source Code

These source-code files are part of a reconstructed copy of Comanche 45/2 (AKA Manche45 revision 2), the final, flown mission release of the Apollo 10 Command Module (CM) Apollo Guidance Computer (AGC) software. Comanche 45/2 was preceded by Comanche 44 and Comanche 45. The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 45/2, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 45 (itself previously accurately reconstructed). Comanche 45 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 45 and 45/2. The now-reconstructed Comanche 45/2 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code tend to match those in the Comanche 55, the most-similar revision of Comanche for which we have access to an actual non-reconstructed hardcopy; the source code would likely have different page numbers in a contemporary Comanche 45 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 44. Here's a guide to the Apollo documentation referenced in those annotations:
Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository.

057906,000002:                                                                                                  ## Copyright:   Public domain.
057907,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
057908,000004:                                                                                                  ## Purpose:     A section of Manche45 revision 2.
057909,000005:                                                                                                  ##              It is part of the reconstructed source code for the
057910,000006:                                                                                                  ##              final, flown release of the flight software for the Command
057911,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
057912,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
057913,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
057914,000010:                                                                                                  ##              exactly match those specified for Manche 45/2 in NASA drawing
057915,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
057916,000012:                                                                                                  ##              reconstruction is correct.
057917,000013:                                                                                                  ## Assembler:   yaYUL
057918,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
057919,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
057920,000016:                                                                                                  ## Mod history: 2020-12-24 MAS  Created from Comanche 45.
057921,000017: 

Page 1365

057923,000019: 14,3423                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
057924,000020: 23,2000                                           SETLOC   POWFLITE                              
057925,000021: 23,2000                                           BANK                                           
057926,000022: 
057927,000023: 23,3477     0142                                  EBANK=   DEXDEX                                
057928,000024: 23,3477                                           COUNT*   $$/POWFL                              
057929,000025: 
057930,000026:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
057931,000027:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
057932,000028:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
057933,000029:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
057934,000030:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
057935,000031:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
057936,000032:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
057937,000033: 
057938,000034:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
057939,000035:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
057940,000036:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
057941,000037:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
057942,000038: 
057943,000039:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
057944,000040: 
057945,000041:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
057946,000042:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
057947,000043:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
057948,000044:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
057949,000045:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
057950,000046:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
057951,000047:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
057952,000048:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
057953,000049:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
057954,000050:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
057955,000051: 
057956,000052:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
057957,000053:                                                                                                  #  INTERPRETIVE.
057958,000054: 
057959,000055: 23,3477           77776        CDUTRIG            EXIT                                           
057960,000056: 23,3500           03507                           TC       CDUTRIGS                              
057961,000057: 23,3501           06006                           TC       INTPRET                               
057962,000058: 23,3502           77616                           RVQ                                            
057963,000059: 
057964,000060: 23,3503           77776        CD*TR*G            EXIT                                           
057965,000061: 23,3504           03515                           TC       CD*TR*GS                              
057966,000062: 23,3505           06006                           TC       INTPRET                               
057967,000063: 23,3506           77616                           RVQ                                            
057968,000064: 
057969,000065: 23,3507           30032        CDUTRIGS           CA       CDUX                                  
057970,000066: 23,3510           54772                           TS       CDUSPOT    +4                         
057971,000067: 23,3511           30033                           CA       CDUY                                  
057972,000068: 23,3512           54766                           TS       CDUSPOT                               

Page 1366

057974,000070: 23,3513           30034                           CA       CDUZ                                  
057975,000071: 23,3514           54770                           TS       CDUSPOT    +2                         
057976,000072: 
057977,000073: 23,3515           00006        CD*TR*GS           EXTEND                                         
057978,000074: 23,3516           22142                           QXCH     TEM2                                  
057979,000075: 23,3517           35015                           CAF      FOUR                                  
057980,000076: 23,3520           76211        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
057981,000077: 23,3521           54143                           TS       TEM3                                  
057982,000078: 23,3522           50143                           INDEX    TEM3                                  
057983,000079: 23,3523           30766                           CA       CDUSPOT                               
057984,000080: 23,3524           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
057985,000081: 23,3525           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
057986,000082: 23,3526           04757                           TC       USPRCADR                              
057987,000083: 23,3527           45513                           CADR     CDULOGIC                              
057988,000084: 23,3530           00006                           EXTEND                                         
057989,000085: 23,3531           30155                           DCA      MPAC                                  
057990,000086: 23,3532           50143                           INDEX    TEM3                                  
057991,000087: 23,3533           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
057992,000088: 23,3534           04757                           TC       USPRCADR                              
057993,000089: 23,3535           01516                           CADR     COSINE                                
057994,000090: 23,3536           52155                           DXCH     MPAC                                  
057995,000091: 23,3537           50143                           INDEX    TEM3                                  
057996,000092: 23,3540           52745                           DXCH     COSCDU                                #  STORING COSINE
057997,000093: 23,3541           00006                           EXTEND                                         
057998,000094: 23,3542           50143                           INDEX    TEM3                                  
057999,000095: 23,3543           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
058000,000096: 23,3544           04757                           TC       USPRCADR                              
058001,000097: 23,3545           01530                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
058002,000098: 23,3546           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
058003,000099: 23,3547           52155                           DXCH     MPAC                                  
058004,000100: 23,3550           50143                           INDEX    TEM3                                  
058005,000101: 23,3551           52737                           DXCH     SINCDU                                
058006,000102: 23,3552           10143                           CCS      TEM3                                  
058007,000103: 23,3553           13520                           TCF      TR*GL**P                              
058008,000104: 23,3554           00142                           TC       TEM2                                  

Page 1367

058010,000106:                                                                                                  #  ****************************************************************************************************************
058011,000107:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
058012,000108:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
058013,000109:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
058014,000110:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;    THIS IS 10 TIMES AS FAST AS CD*TR*GS.    QUICTRIG MAY BE
058015,000111:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
058016,000112: 
058017,000113: 23,3555           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
058018,000114: 23,3556           00006                           EXTEND                                         
058019,000115: 23,3557           22061                           QXCH     ITEMP1                                
058020,000116: 23,3560           35015                           CAF      FOUR                                  
058021,000117: 23,3561           76211                 +4        MASK     SIX                                   
058022,000118: 23,3562           54062                           TS       ITEMP2                                
058023,000119: 23,3563           50062                           INDEX    ITEMP2                                
058024,000120: 23,3564           30766                           CA       CDUSPOT                               
058025,000121: 23,3565           05075                           TC       SPSIN                                 
058026,000122: 23,3566           00006                           EXTEND                                         
058027,000123: 23,3567           75002                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
058028,000124: 23,3570           50062                           INDEX    ITEMP2                                
058029,000125: 23,3571           52737                           DXCH     SINCDU                                
058030,000126: 23,3572           50062                           INDEX    ITEMP2                                
058031,000127: 23,3573           30766                           CA       CDUSPOT                               
058032,000128: 23,3574           05074                           TC       SPCOS                                 
058033,000129: 23,3575           00006                           EXTEND                                         
058034,000130: 23,3576           75002                           MP       BIT14                                 
058035,000131: 23,3577           50062                           INDEX    ITEMP2                                
058036,000132: 23,3600           52745                           DXCH     COSCDU                                
058037,000133: 23,3601           10062                           CCS      ITEMP2                                
058038,000134: 23,3602           13561                           TCF      QUICTRIG   +4                         
058039,000135: 23,3603           30061                           CA       ITEMP1                                
058040,000136: 23,3604           00003                           RELINT                                         
058041,000137: 23,3605           00000                           TC       A                                     

Page 1368

058043,000139:                                                                                                  # ****************************************************************************************************************
058044,000140:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
058045,000141:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
058046,000142: 
058047,000143:                                                                                                  #  NBSM WILL BE THE FIRST TO GO.  IT SHOULD NOT BE USED.
058048,000144: 
058049,000145: 23,3606           77620        NBSM               STQ                                            
058050,000146: 23,3607           00047                                    X2                                    
058051,000147: 23,3610           76740                           LXC,1    VLOAD*                                
058052,000148: 23,3611           00050                                    S1                                    #  BASE ADDRESS OF THE CDU ANGLES IS IN S1
058053,000149: 23,3612           00001                                    0,1                                   
058054,000150: 23,3613           24767                           STOVL    CDUSPOT                               
058055,000151: 23,3614           00041                                    32D                                   #  VECTOR TO BE TRANSFORMED IS IN 32D
058056,000152: 23,3615           77624                           CALL                                           
058057,000153: 23,3616           47637                                    TRG*NBSM                              
058058,000154: 23,3617           34041                           STCALL   32D                                   #  SINCE THERE'S NO STGOTO
058059,000155: 23,3620           00047                                    X2                                    
058060,000156: 
058061,000157:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
058062,000158:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
058063,000159:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
058064,000160:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
058065,000161: 
058066,000162:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
058067,000163:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
058068,000164:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
058069,000165:                                                                                                  #  MATION; TRG*SMNB, VICE VERSA.
058070,000166: 
058071,000167:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
058072,000168:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
058073,000169: 
058074,000170:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
058075,000171: 
058076,000172: 23,3621           77776        CDU*SMNB           EXIT                                           
058077,000173: 23,3622           03507                           TC       CDUTRIGS                              
058078,000174: 23,3623           13626                           TCF      C*MM*N1                               
058079,000175: 
058080,000176: 23,3624           77776        TRG*SMNB           EXIT                                           
058081,000177: 23,3625           03515                           TC       CD*TR*GS                              
058082,000178: 23,3626           07501        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
058083,000179: 23,3627           46214                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
058084,000180: 23,3630           03650        C*MM*N2            TC       AX*SR*T                               
058085,000181: 23,3631           06006                           TC       INTPRET                               
058086,000182: 23,3632           43575                           VLOAD    RVQ                                   
058087,000183: 23,3633           00123                                    VBUF                                  
058088,000184: 
058089,000185: 23,3634           77776        CDU*NBSM           EXIT                                           
058090,000186: 23,3635           03507                           TC       CDUTRIGS                              
058091,000187: 

Page 1369

058093,000189: 
058094,000190: 23,3636           13641                           TCF      C*MM*N3                               
058095,000191: 
058096,000192: 23,3637           77776        TRG*NBSM           EXIT                                           
058097,000193: 23,3640           03515                           TC       CD*TR*GS                              
058098,000194: 23,3641           07501        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
058099,000195: 23,3642           36214                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
058100,000196: 23,3643           13630                           TCF      C*MM*N2                               
058101,000197: 
058102,000198:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
058103,000199:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
058104,000200:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
058105,000201: 
058106,000202:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
058107,000203:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM
058108,000204:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
058109,000205:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
058110,000206: 
058111,000207: 23,3644           77776        *SMNB*             EXIT                                           
058112,000208: 23,3645           13626                           TCF      C*MM*N1                               
058113,000209: 
058114,000210: 23,3646           77776        *NBSM*             EXIT                                           
058115,000211: 23,3647           13641                           TCF      C*MM*N3                               
058116,000212: 
058117,000213:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
058118,000214:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
058119,000215:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
058120,000216:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
058121,000217:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
058122,000218:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
058123,000219:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
058124,000220:                                                                                                  #                TC      CDUTRIGS
058125,000221:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
058126,000222:                                                                                                  #                TC      AX*SR*T
058127,000223:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
058128,000224:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
058129,000225: 
058130,000226:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
058131,000227:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
058132,000228:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
058133,000229:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
058134,000230: 
058135,000231: 23,3650           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
058136,000232: 23,3651           00006                           EXTEND                                         
058137,000233: 23,3652           22145                           QXCH     RTNSAVER                              
058138,000234: 
058139,000235: 23,3653           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
058140,000236: 23,3654           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
058141,000237: 23,3655           66214                           AD       THREE                                 #                +1 --> 2        -1 --> 0

Page 1370

058143,000239: 23,3656           00006                           EXTEND                                         
058144,000240: 23,3657           50000                           INDEX    A                                     
058145,000241: 23,3660           33737                           DCA      INDEXI                                
058146,000242: 23,3661           52144                           DXCH     DEXI                                  
058147,000243: 
058148,000244: 23,3662           35017                           CA       ONE                                   
058149,000245: 23,3663           54130                           TS       BUF                                   
058150,000246: 23,3664           00006                           EXTEND                                         
058151,000247: 23,3665           50143                           INDEX    DEX1                                  
058152,000248: 23,3666           40123                           DCS      VBUF                                  
058153,000249: 23,3667           13671                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
058154,000250: 
058155,000251: 23,3670           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX
058156,000252: 
058157,000253: 23,3671           52155        LOOP1              DXCH     MPAC                                  
058158,000254: 23,3672           33735                           CA       SINESLOC                              
058159,000255: 23,3673           60143                           AD       DEX1                                  
058160,000256: 23,3674           54116                           TS       ADDRWD                                
058161,000257: 
058162,000258: 23,3675           07056                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
058163,000259: 23,3676           10142                           CCS      DEXDEX                                
058164,000260: 23,3677           52155                           DXCH     MPAC                                  #  NBSM CASE
058165,000261: 23,3700           13703                           TCF      +3                                    
058166,000262: 23,3701           00006                           EXTEND                                         #  SMNB CASE
058167,000263: 23,3702           40155                           DCS      MPAC                                  
058168,000264: 23,3703           52134                           DXCH     TERM1TMP                              
058169,000265: 
058170,000266: 23,3704           36211                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
058171,000267: 23,3705           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
058172,000268: 
058173,000269: 23,3706           00006                           EXTEND                                         
058174,000270: 23,3707           50130                           INDEX    BUF                                   
058175,000271: 23,3710           50143                           INDEX    DEX1                                  
058176,000272: 23,3711           30123                           DCA      VBUF                                  
058177,000273: 23,3712           52155                           DXCH     MPAC                                  
058178,000274: 23,3713           07056                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
058179,000275: 23,3714           52155                           DXCH     MPAC                                  
058180,000276: 23,3715           20134                           DAS      TERM1TMP                              
058181,000277: 23,3716           52134                           DXCH     TERM1TMP                              
058182,000278: 23,3717           20001                           DDOUBL                                         
058183,000279: 23,3720           50130                           INDEX    BUF                                   
058184,000280: 23,3721           50143                           INDEX    DEX1                                  
058185,000281: 23,3722           52123                           DXCH     VBUF                                  
058186,000282: 23,3723           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
058187,000283: 23,3724           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
058188,000284: 23,3725           13670                           TCF      LOOP2                                 
058189,000285: 
058190,000286: 23,3726           00006                           EXTEND                                         
058191,000287: 23,3727           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
058192,000288: 

Page 1371

058194,000290: 23,3730           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
058195,000291: 23,3731           13653                           TCF      R*TL**P                               
058196,000292: 23,3732           00145                           TC       RTNSAVER                              
058197,000293: 23,3733           13653                           TCF      R*TL**P                               
058198,000294: 23,3734           00145                           TC       RTNSAVER                              
058199,000295: 
058200,000296: 23,3735           00736        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
058201,000297: 
058202,000298: 23,3736           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
058203,000299: 23,3737           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
058204,000300: 23,3740           00000                           DEC      0          B-14                       #  **********   THESE   **********
058205,000301: 23,3741           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
058206,000302: 
058207,000303:                                                                                                  #  ****************************************************************************************************************

Page 1372

058209,000305:                                                                                                  #  THIS SUBROUTINE COMPUTES INCREMENTAL CHANGES IN CDU(GIMBAL) ANGLES FROM INCREMENTAL CHANGES ABOUT SM AXES.  IT
058210,000306:                                                                                                  #  REQUIRES SM INCREMENTS AS A DP VECTOR SCALED AT ONE REVOLUTION(DTHETASM,+2,+4).  SIN,COS(CDUY,Z,X) ARE IN
058211,000307:                                                                                                  #  SINCDU,+2,+4 AND COSCDU,+2,+4 RESPECTIVELY, SCALED TO ONE HALF.  CDU INCREENTS ARE PLACED IN DCDU,+2,+4 SCALED TO
058212,000308:                                                                                                  #  ONE REVOLUTION.
058213,000309: 
058214,000310:                                                                                                  #        *  COS(IGA)SEC(MGA)             0               -SIN(IGA)SEC(MGA) *
058215,000311:                                                                                                  #        *                                                                 *
058216,000312:                                                                                                  #        * -COS(IGA)TAN(MGA)             1                SIN(IGA)TAN(MGA) *
058217,000313:                                                                                                  #        *                                                                 *
058218,000314:                                                                                                  #        *      SIN(IGA)                 0                    COS(IGA)     *
058219,000315: 
058220,000316: 14,3423                                           BANK     14                                    
058221,000317: 23,2000                                           SETLOC   POWFLIT1                              
058222,000318: 23,2000                                           BANK                                           
058223,000319: 
058224,000320: 23,3742           41345        SMCDURES           DLOAD    DMP                                   
058225,000321: 23,3743           03212                                    DTHETASM                              
058226,000322: 23,3744           00745                                    COSCDUY                               
058227,000323: 
058228,000324: 23,3745           41325                           PDDL     DMP                                   
058229,000325: 23,3746           03216                                    DTHETASM   +4                         
058230,000326: 23,3747           00737                                    SINCDUY                               
058231,000327: 
058232,000328: 23,3750           77621                           BDSU                                           
058233,000329: 23,3751           77671                           DDV                                            
058234,000330: 23,3752           00747                                    COSCDUZ                               
058235,000331: 23,3753           03204                           STORE    DCDU                                  
058236,000332: 
058237,000333: 23,3754           72405                           DMP      SL1                                   #  SCALE
058238,000334: 23,3755           00741                                    SINCDUZ                               
058239,000335: 23,3756           77621                           BDSU                                           
058240,000336: 
058241,000337: 23,3757           03214                                    DTHETASM   +2                         
058242,000338: 23,3760           17206                           STODL    DCDU       +2                         
058243,000339: 23,3761           03212                                    DTHETASM                              
058244,000340: 
058245,000341: 23,3762           65205                           DMP      PDDL                                  
058246,000342: 23,3763           00737                                    SINCDUY                               
058247,000343: 23,3764           03216                                    DTHETASM   +4                         
058248,000344: 
058249,000345: 23,3765           43205                           DMP      DAD                                   
058250,000346: 23,3766           00745                                    COSCDUY                               
058251,000347: 23,3767           77752                           SL1                                            
058252,000348: 23,3770           03210                           STORE    DCDU       +4                         
058253,000349: 23,3771           77616                           RVQ                                            
058254,000350: 

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