Source Code

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

The starting point was the source code of Comanche 44 (itself previously accurately reconstructed). Comanche 44 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 44 and 45. The now-reconstructed Comanche 45 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:
There is also a detailed commentary about the reconstruction process.

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.

057968,000002:                                                                                                  ## Copyright:   Public domain.
057969,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
057970,000004:                                                                                                  ## Purpose:     A section of Comanche revision 045.
057971,000005:                                                                                                  ##              It is part of the reconstructed source code for the
057972,000006:                                                                                                  ##              second release of the flight software for the Command
057973,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
057974,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
057975,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
057976,000010:                                                                                                  ##              exactly match those specified for Comanche 45 in NASA drawing
057977,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
057978,000012:                                                                                                  ##              reconstruction is correct.
057979,000013:                                                                                                  ## Assembler:   yaYUL
057980,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
057981,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
057982,000016:                                                                                                  ## Mod history: 2020-12-06 MAS  Created from Comanche 44.
057983,000017: 

Page 1365

057985,000019: 14,3423                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
057986,000020: 23,2000                                           SETLOC   POWFLITE                              
057987,000021: 23,2000                                           BANK                                           
057988,000022: 
057989,000023: 23,3477     0142                                  EBANK=   DEXDEX                                
057990,000024: 23,3477                                           COUNT*   $$/POWFL                              
057991,000025: 
057992,000026:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
057993,000027:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
057994,000028:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
057995,000029:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
057996,000030:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
057997,000031:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
057998,000032:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
057999,000033: 
058000,000034:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
058001,000035:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
058002,000036:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
058003,000037:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
058004,000038: 
058005,000039:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
058006,000040: 
058007,000041:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
058008,000042:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
058009,000043:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
058010,000044:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
058011,000045:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
058012,000046:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
058013,000047:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
058014,000048:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
058015,000049:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
058016,000050:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
058017,000051: 
058018,000052:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
058019,000053:                                                                                                  #  INTERPRETIVE.
058020,000054: 
058021,000055: 23,3477           77776        CDUTRIG            EXIT                                           
058022,000056: 23,3500           03507                           TC       CDUTRIGS                              
058023,000057: 23,3501           06006                           TC       INTPRET                               
058024,000058: 23,3502           77616                           RVQ                                            
058025,000059: 
058026,000060: 23,3503           77776        CD*TR*G            EXIT                                           
058027,000061: 23,3504           03515                           TC       CD*TR*GS                              
058028,000062: 23,3505           06006                           TC       INTPRET                               
058029,000063: 23,3506           77616                           RVQ                                            
058030,000064: 
058031,000065: 23,3507           30032        CDUTRIGS           CA       CDUX                                  
058032,000066: 23,3510           54772                           TS       CDUSPOT    +4                         
058033,000067: 23,3511           30033                           CA       CDUY                                  
058034,000068: 23,3512           54766                           TS       CDUSPOT                               

Page 1366

058036,000070: 23,3513           30034                           CA       CDUZ                                  
058037,000071: 23,3514           54770                           TS       CDUSPOT    +2                         
058038,000072: 
058039,000073: 23,3515           00006        CD*TR*GS           EXTEND                                         
058040,000074: 23,3516           22142                           QXCH     TEM2                                  
058041,000075: 23,3517           35015                           CAF      FOUR                                  
058042,000076: 23,3520           76211        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
058043,000077: 23,3521           54143                           TS       TEM3                                  
058044,000078: 23,3522           50143                           INDEX    TEM3                                  
058045,000079: 23,3523           30766                           CA       CDUSPOT                               
058046,000080: 23,3524           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
058047,000081: 23,3525           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
058048,000082: 23,3526           04757                           TC       USPRCADR                              
058049,000083: 23,3527           45513                           CADR     CDULOGIC                              
058050,000084: 23,3530           00006                           EXTEND                                         
058051,000085: 23,3531           30155                           DCA      MPAC                                  
058052,000086: 23,3532           50143                           INDEX    TEM3                                  
058053,000087: 23,3533           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
058054,000088: 23,3534           04757                           TC       USPRCADR                              
058055,000089: 23,3535           01516                           CADR     COSINE                                
058056,000090: 23,3536           52155                           DXCH     MPAC                                  
058057,000091: 23,3537           50143                           INDEX    TEM3                                  
058058,000092: 23,3540           52745                           DXCH     COSCDU                                #  STORING COSINE
058059,000093: 23,3541           00006                           EXTEND                                         
058060,000094: 23,3542           50143                           INDEX    TEM3                                  
058061,000095: 23,3543           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
058062,000096: 23,3544           04757                           TC       USPRCADR                              
058063,000097: 23,3545           01530                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
058064,000098: 23,3546           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
058065,000099: 23,3547           52155                           DXCH     MPAC                                  
058066,000100: 23,3550           50143                           INDEX    TEM3                                  
058067,000101: 23,3551           52737                           DXCH     SINCDU                                
058068,000102: 23,3552           10143                           CCS      TEM3                                  
058069,000103: 23,3553           13520                           TCF      TR*GL**P                              
058070,000104: 23,3554           00142                           TC       TEM2                                  

Page 1367

058072,000106:                                                                                                  #  ****************************************************************************************************************
058073,000107:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
058074,000108:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
058075,000109:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
058076,000110:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;    THIS IS 10 TIMES AS FAST AS CD*TR*GS.    QUICTRIG MAY BE
058077,000111:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
058078,000112: 
058079,000113: 23,3555           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
058080,000114: 23,3556           00006                           EXTEND                                         
058081,000115: 23,3557           22061                           QXCH     ITEMP1                                
058082,000116: 23,3560           35015                           CAF      FOUR                                  
058083,000117: 23,3561           76211                 +4        MASK     SIX                                   
058084,000118: 23,3562           54062                           TS       ITEMP2                                
058085,000119: 23,3563           50062                           INDEX    ITEMP2                                
058086,000120: 23,3564           30766                           CA       CDUSPOT                               
058087,000121: 23,3565           05075                           TC       SPSIN                                 
058088,000122: 23,3566           00006                           EXTEND                                         
058089,000123: 23,3567           75002                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
058090,000124: 23,3570           50062                           INDEX    ITEMP2                                
058091,000125: 23,3571           52737                           DXCH     SINCDU                                
058092,000126: 23,3572           50062                           INDEX    ITEMP2                                
058093,000127: 23,3573           30766                           CA       CDUSPOT                               
058094,000128: 23,3574           05074                           TC       SPCOS                                 
058095,000129: 23,3575           00006                           EXTEND                                         
058096,000130: 23,3576           75002                           MP       BIT14                                 
058097,000131: 23,3577           50062                           INDEX    ITEMP2                                
058098,000132: 23,3600           52745                           DXCH     COSCDU                                
058099,000133: 23,3601           10062                           CCS      ITEMP2                                
058100,000134: 23,3602           13561                           TCF      QUICTRIG   +4                         
058101,000135: 23,3603           30061                           CA       ITEMP1                                
058102,000136: 23,3604           00003                           RELINT                                         
058103,000137: 23,3605           00000                           TC       A                                     

Page 1368

058105,000139:                                                                                                  # ****************************************************************************************************************
058106,000140:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
058107,000141:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
058108,000142: 
058109,000143:                                                                                                  #  NBSM WILL BE THE FIRST TO GO.  IT SHOULD NOT BE USED.
058110,000144: 
058111,000145: 23,3606           77620        NBSM               STQ                                            
058112,000146: 23,3607           00047                                    X2                                    
058113,000147: 23,3610           76740                           LXC,1    VLOAD*                                
058114,000148: 23,3611           00050                                    S1                                    #  BASE ADDRESS OF THE CDU ANGLES IS IN S1
058115,000149: 23,3612           00001                                    0,1                                   
058116,000150: 23,3613           24767                           STOVL    CDUSPOT                               
058117,000151: 23,3614           00041                                    32D                                   #  VECTOR TO BE TRANSFORMED IS IN 32D
058118,000152: 23,3615           77624                           CALL                                           
058119,000153: 23,3616           47637                                    TRG*NBSM                              
058120,000154: 23,3617           34041                           STCALL   32D                                   #  SINCE THERE'S NO STGOTO
058121,000155: 23,3620           00047                                    X2                                    
058122,000156: 
058123,000157:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
058124,000158:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
058125,000159:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
058126,000160:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
058127,000161: 
058128,000162:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
058129,000163:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
058130,000164:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
058131,000165:                                                                                                  #  MATION; TRG*SMNB, VICE VERSA.
058132,000166: 
058133,000167:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
058134,000168:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
058135,000169: 
058136,000170:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
058137,000171: 
058138,000172: 23,3621           77776        CDU*SMNB           EXIT                                           
058139,000173: 23,3622           03507                           TC       CDUTRIGS                              
058140,000174: 23,3623           13626                           TCF      C*MM*N1                               
058141,000175: 
058142,000176: 23,3624           77776        TRG*SMNB           EXIT                                           
058143,000177: 23,3625           03515                           TC       CD*TR*GS                              
058144,000178: 23,3626           07501        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
058145,000179: 23,3627           46214                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
058146,000180: 23,3630           03650        C*MM*N2            TC       AX*SR*T                               
058147,000181: 23,3631           06006                           TC       INTPRET                               
058148,000182: 23,3632           43575                           VLOAD    RVQ                                   
058149,000183: 23,3633           00123                                    VBUF                                  
058150,000184: 
058151,000185: 23,3634           77776        CDU*NBSM           EXIT                                           
058152,000186: 23,3635           03507                           TC       CDUTRIGS                              
058153,000187: 

Page 1369

058155,000189: 
058156,000190: 23,3636           13641                           TCF      C*MM*N3                               
058157,000191: 
058158,000192: 23,3637           77776        TRG*NBSM           EXIT                                           
058159,000193: 23,3640           03515                           TC       CD*TR*GS                              
058160,000194: 23,3641           07501        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
058161,000195: 23,3642           36214                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
058162,000196: 23,3643           13630                           TCF      C*MM*N2                               
058163,000197: 
058164,000198:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
058165,000199:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
058166,000200:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
058167,000201: 
058168,000202:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
058169,000203:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM
058170,000204:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
058171,000205:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
058172,000206: 
058173,000207: 23,3644           77776        *SMNB*             EXIT                                           
058174,000208: 23,3645           13626                           TCF      C*MM*N1                               
058175,000209: 
058176,000210: 23,3646           77776        *NBSM*             EXIT                                           
058177,000211: 23,3647           13641                           TCF      C*MM*N3                               
058178,000212: 
058179,000213:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
058180,000214:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
058181,000215:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
058182,000216:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
058183,000217:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
058184,000218:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
058185,000219:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
058186,000220:                                                                                                  #                TC      CDUTRIGS
058187,000221:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
058188,000222:                                                                                                  #                TC      AX*SR*T
058189,000223:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
058190,000224:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
058191,000225: 
058192,000226:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
058193,000227:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
058194,000228:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
058195,000229:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
058196,000230: 
058197,000231: 23,3650           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
058198,000232: 23,3651           00006                           EXTEND                                         
058199,000233: 23,3652           22145                           QXCH     RTNSAVER                              
058200,000234: 
058201,000235: 23,3653           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
058202,000236: 23,3654           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
058203,000237: 23,3655           66214                           AD       THREE                                 #                +1 --> 2        -1 --> 0

Page 1370

058205,000239: 23,3656           00006                           EXTEND                                         
058206,000240: 23,3657           50000                           INDEX    A                                     
058207,000241: 23,3660           33737                           DCA      INDEXI                                
058208,000242: 23,3661           52144                           DXCH     DEXI                                  
058209,000243: 
058210,000244: 23,3662           35017                           CA       ONE                                   
058211,000245: 23,3663           54130                           TS       BUF                                   
058212,000246: 23,3664           00006                           EXTEND                                         
058213,000247: 23,3665           50143                           INDEX    DEX1                                  
058214,000248: 23,3666           40123                           DCS      VBUF                                  
058215,000249: 23,3667           13671                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
058216,000250: 
058217,000251: 23,3670           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX
058218,000252: 
058219,000253: 23,3671           52155        LOOP1              DXCH     MPAC                                  
058220,000254: 23,3672           33735                           CA       SINESLOC                              
058221,000255: 23,3673           60143                           AD       DEX1                                  
058222,000256: 23,3674           54116                           TS       ADDRWD                                
058223,000257: 
058224,000258: 23,3675           07056                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
058225,000259: 23,3676           10142                           CCS      DEXDEX                                
058226,000260: 23,3677           52155                           DXCH     MPAC                                  #  NBSM CASE
058227,000261: 23,3700           13703                           TCF      +3                                    
058228,000262: 23,3701           00006                           EXTEND                                         #  SMNB CASE
058229,000263: 23,3702           40155                           DCS      MPAC                                  
058230,000264: 23,3703           52134                           DXCH     TERM1TMP                              
058231,000265: 
058232,000266: 23,3704           36211                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
058233,000267: 23,3705           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
058234,000268: 
058235,000269: 23,3706           00006                           EXTEND                                         
058236,000270: 23,3707           50130                           INDEX    BUF                                   
058237,000271: 23,3710           50143                           INDEX    DEX1                                  
058238,000272: 23,3711           30123                           DCA      VBUF                                  
058239,000273: 23,3712           52155                           DXCH     MPAC                                  
058240,000274: 23,3713           07056                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
058241,000275: 23,3714           52155                           DXCH     MPAC                                  
058242,000276: 23,3715           20134                           DAS      TERM1TMP                              
058243,000277: 23,3716           52134                           DXCH     TERM1TMP                              
058244,000278: 23,3717           20001                           DDOUBL                                         
058245,000279: 23,3720           50130                           INDEX    BUF                                   
058246,000280: 23,3721           50143                           INDEX    DEX1                                  
058247,000281: 23,3722           52123                           DXCH     VBUF                                  
058248,000282: 23,3723           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
058249,000283: 23,3724           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
058250,000284: 23,3725           13670                           TCF      LOOP2                                 
058251,000285: 
058252,000286: 23,3726           00006                           EXTEND                                         
058253,000287: 23,3727           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
058254,000288: 

Page 1371

058256,000290: 23,3730           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
058257,000291: 23,3731           13653                           TCF      R*TL**P                               
058258,000292: 23,3732           00145                           TC       RTNSAVER                              
058259,000293: 23,3733           13653                           TCF      R*TL**P                               
058260,000294: 23,3734           00145                           TC       RTNSAVER                              
058261,000295: 
058262,000296: 23,3735           00736        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
058263,000297: 
058264,000298: 23,3736           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
058265,000299: 23,3737           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
058266,000300: 23,3740           00000                           DEC      0          B-14                       #  **********   THESE   **********
058267,000301: 23,3741           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
058268,000302: 
058269,000303:                                                                                                  #  ****************************************************************************************************************

Page 1372

058271,000305:                                                                                                  #  THIS SUBROUTINE COMPUTES INCREMENTAL CHANGES IN CDU(GIMBAL) ANGLES FROM INCREMENTAL CHANGES ABOUT SM AXES.  IT
058272,000306:                                                                                                  #  REQUIRES SM INCREMENTS AS A DP VECTOR SCALED AT ONE REVOLUTION(DTHETASM,+2,+4).  SIN,COS(CDUY,Z,X) ARE IN
058273,000307:                                                                                                  #  SINCDU,+2,+4 AND COSCDU,+2,+4 RESPECTIVELY, SCALED TO ONE HALF.  CDU INCREENTS ARE PLACED IN DCDU,+2,+4 SCALED TO
058274,000308:                                                                                                  #  ONE REVOLUTION.
058275,000309: 
058276,000310:                                                                                                  #        *  COS(IGA)SEC(MGA)             0               -SIN(IGA)SEC(MGA) *
058277,000311:                                                                                                  #        *                                                                 *
058278,000312:                                                                                                  #        * -COS(IGA)TAN(MGA)             1                SIN(IGA)TAN(MGA) *
058279,000313:                                                                                                  #        *                                                                 *
058280,000314:                                                                                                  #        *      SIN(IGA)                 0                    COS(IGA)     *
058281,000315: 
058282,000316: 14,3423                                           BANK     14                                    
058283,000317: 23,2000                                           SETLOC   POWFLIT1                              
058284,000318: 23,2000                                           BANK                                           
058285,000319: 
058286,000320: 23,3742           41345        SMCDURES           DLOAD    DMP                                   
058287,000321: 23,3743           03212                                    DTHETASM                              
058288,000322: 23,3744           00745                                    COSCDUY                               
058289,000323: 
058290,000324: 23,3745           41325                           PDDL     DMP                                   
058291,000325: 23,3746           03216                                    DTHETASM   +4                         
058292,000326: 23,3747           00737                                    SINCDUY                               
058293,000327: 
058294,000328: 23,3750           77621                           BDSU                                           
058295,000329: 23,3751           77671                           DDV                                            
058296,000330: 23,3752           00747                                    COSCDUZ                               
058297,000331: 23,3753           03204                           STORE    DCDU                                  
058298,000332: 
058299,000333: 23,3754           72405                           DMP      SL1                                   #  SCALE
058300,000334: 23,3755           00741                                    SINCDUZ                               
058301,000335: 23,3756           77621                           BDSU                                           
058302,000336: 
058303,000337: 23,3757           03214                                    DTHETASM   +2                         
058304,000338: 23,3760           17206                           STODL    DCDU       +2                         
058305,000339: 23,3761           03212                                    DTHETASM                              
058306,000340: 
058307,000341: 23,3762           65205                           DMP      PDDL                                  
058308,000342: 23,3763           00737                                    SINCDUY                               
058309,000343: 23,3764           03216                                    DTHETASM   +4                         
058310,000344: 
058311,000345: 23,3765           43205                           DMP      DAD                                   
058312,000346: 23,3766           00745                                    COSCDUY                               
058313,000347: 23,3767           77752                           SL1                                            
058314,000348: 23,3770           03210                           STORE    DCDU       +4                         
058315,000349: 23,3771           77616                           RVQ                                            
058316,000350: 

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