Source Code

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

The starting point was the source code of Comanche 51 (separately previously reconstructed from an Apollo-era listing of Comanche 55, flown on Apollo 11). Comanche 51 source code was then modified by undoing changes known to have been made between revisions 44 and 51. The now-reconstructed Comanche 44 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 match those on the Comanche 55 printout, although the source code would likely have different page numbers in a contemporary Comanche 44 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 51. Here's a guide to the Apollo documentation referenced in those annotations:
In most cases, only the titles (rather than the full texts) of PCRs are known. In addition to the explanatory annotations, there is also a step-by-step 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.

058480,000002:                                                                                                  ## Copyright:   Public domain.
058481,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
058482,000004:                                                                                                  ## Purpose:     A section of Comanche revision 044.
058483,000005:                                                                                                  ##              It is part of the reconstructed source code for the
058484,000006:                                                                                                  ##              original release of the flight software for the Command
058485,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
058486,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
058487,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
058488,000010:                                                                                                  ##              exactly match those specified for Comanche 44 in NASA drawing
058489,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
058490,000012:                                                                                                  ##              reconstruction is correct.
058491,000013:                                                                                                  ## Assembler:   yaYUL
058492,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
058493,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
058494,000016:                                                                                                  ## Mod history: 2020-12-03 MAS  Created from Comanche 51.
058495,000017: 

Page 1365

058497,000019: 14,3423                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
058498,000020: 23,2000                                           SETLOC   POWFLITE                              
058499,000021: 23,2000                                           BANK                                           
058500,000022: 
058501,000023: 23,3477     0142                                  EBANK=   DEXDEX                                
058502,000024: 23,3477                                           COUNT*   $$/POWFL                              
058503,000025: 
058504,000026:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
058505,000027:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
058506,000028:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
058507,000029:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
058508,000030:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
058509,000031:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
058510,000032:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
058511,000033: 
058512,000034:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
058513,000035:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
058514,000036:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
058515,000037:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
058516,000038: 
058517,000039:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
058518,000040: 
058519,000041:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
058520,000042:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
058521,000043:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
058522,000044:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
058523,000045:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
058524,000046:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
058525,000047:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
058526,000048:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
058527,000049:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
058528,000050:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
058529,000051: 
058530,000052:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
058531,000053:                                                                                                  #  INTERPRETIVE.
058532,000054: 
058533,000055: 23,3477           77776        CDUTRIG            EXIT                                           
058534,000056: 23,3500           03507                           TC       CDUTRIGS                              
058535,000057: 23,3501           06006                           TC       INTPRET                               
058536,000058: 23,3502           77616                           RVQ                                            
058537,000059: 
058538,000060: 23,3503           77776        CD*TR*G            EXIT                                           
058539,000061: 23,3504           03515                           TC       CD*TR*GS                              
058540,000062: 23,3505           06006                           TC       INTPRET                               
058541,000063: 23,3506           77616                           RVQ                                            
058542,000064: 
058543,000065: 23,3507           30032        CDUTRIGS           CA       CDUX                                  
058544,000066: 23,3510           54772                           TS       CDUSPOT    +4                         
058545,000067: 23,3511           30033                           CA       CDUY                                  
058546,000068: 23,3512           54766                           TS       CDUSPOT                               

Page 1366

058548,000070: 23,3513           30034                           CA       CDUZ                                  
058549,000071: 23,3514           54770                           TS       CDUSPOT    +2                         
058550,000072: 
058551,000073: 23,3515           00006        CD*TR*GS           EXTEND                                         
058552,000074: 23,3516           22142                           QXCH     TEM2                                  
058553,000075: 23,3517           35015                           CAF      FOUR                                  
058554,000076: 23,3520           76211        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
058555,000077: 23,3521           54143                           TS       TEM3                                  
058556,000078: 23,3522           50143                           INDEX    TEM3                                  
058557,000079: 23,3523           30766                           CA       CDUSPOT                               
058558,000080: 23,3524           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
058559,000081: 23,3525           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
058560,000082: 23,3526           04757                           TC       USPRCADR                              
058561,000083: 23,3527           45513                           CADR     CDULOGIC                              
058562,000084: 23,3530           00006                           EXTEND                                         
058563,000085: 23,3531           30155                           DCA      MPAC                                  
058564,000086: 23,3532           50143                           INDEX    TEM3                                  
058565,000087: 23,3533           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
058566,000088: 23,3534           04757                           TC       USPRCADR                              
058567,000089: 23,3535           01516                           CADR     COSINE                                
058568,000090: 23,3536           52155                           DXCH     MPAC                                  
058569,000091: 23,3537           50143                           INDEX    TEM3                                  
058570,000092: 23,3540           52745                           DXCH     COSCDU                                #  STORING COSINE
058571,000093: 23,3541           00006                           EXTEND                                         
058572,000094: 23,3542           50143                           INDEX    TEM3                                  
058573,000095: 23,3543           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
058574,000096: 23,3544           04757                           TC       USPRCADR                              
058575,000097: 23,3545           01530                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
058576,000098: 23,3546           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
058577,000099: 23,3547           52155                           DXCH     MPAC                                  
058578,000100: 23,3550           50143                           INDEX    TEM3                                  
058579,000101: 23,3551           52737                           DXCH     SINCDU                                
058580,000102: 23,3552           10143                           CCS      TEM3                                  
058581,000103: 23,3553           13520                           TCF      TR*GL**P                              
058582,000104: 23,3554           00142                           TC       TEM2                                  

Page 1367

058584,000106:                                                                                                  #  ****************************************************************************************************************
058585,000107:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
058586,000108:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
058587,000109:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
058588,000110:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;    THIS IS 10 TIMES AS FAST AS CD*TR*GS.    QUICTRIG MAY BE
058589,000111:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
058590,000112: 
058591,000113: 23,3555           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
058592,000114: 23,3556           00006                           EXTEND                                         
058593,000115: 23,3557           22061                           QXCH     ITEMP1                                
058594,000116: 23,3560           35015                           CAF      FOUR                                  
058595,000117: 23,3561           76211                 +4        MASK     SIX                                   
058596,000118: 23,3562           54062                           TS       ITEMP2                                
058597,000119: 23,3563           50062                           INDEX    ITEMP2                                
058598,000120: 23,3564           30766                           CA       CDUSPOT                               
058599,000121: 23,3565           05075                           TC       SPSIN                                 
058600,000122: 23,3566           00006                           EXTEND                                         
058601,000123: 23,3567           75002                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
058602,000124: 23,3570           50062                           INDEX    ITEMP2                                
058603,000125: 23,3571           52737                           DXCH     SINCDU                                
058604,000126: 23,3572           50062                           INDEX    ITEMP2                                
058605,000127: 23,3573           30766                           CA       CDUSPOT                               
058606,000128: 23,3574           05074                           TC       SPCOS                                 
058607,000129: 23,3575           00006                           EXTEND                                         
058608,000130: 23,3576           75002                           MP       BIT14                                 
058609,000131: 23,3577           50062                           INDEX    ITEMP2                                
058610,000132: 23,3600           52745                           DXCH     COSCDU                                
058611,000133: 23,3601           10062                           CCS      ITEMP2                                
058612,000134: 23,3602           13561                           TCF      QUICTRIG   +4                         
058613,000135: 23,3603           30061                           CA       ITEMP1                                
058614,000136: 23,3604           00003                           RELINT                                         
058615,000137: 23,3605           00000                           TC       A                                     

Page 1368

058617,000139:                                                                                                  # ****************************************************************************************************************
058618,000140:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
058619,000141:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
058620,000142: 
058621,000143:                                                                                                  #  NBSM WILL BE THE FIRST TO GO.  IT SHOULD NOT BE USED.
058622,000144: 
058623,000145: 23,3606           77620        NBSM               STQ                                            
058624,000146: 23,3607           00047                                    X2                                    
058625,000147: 23,3610           76740                           LXC,1    VLOAD*                                
058626,000148: 23,3611           00050                                    S1                                    #  BASE ADDRESS OF THE CDU ANGLES IS IN S1
058627,000149: 23,3612           00001                                    0,1                                   
058628,000150: 23,3613           24767                           STOVL    CDUSPOT                               
058629,000151: 23,3614           00041                                    32D                                   #  VECTOR TO BE TRANSFORMED IS IN 32D
058630,000152: 23,3615           77624                           CALL                                           
058631,000153: 23,3616           47637                                    TRG*NBSM                              
058632,000154: 23,3617           34041                           STCALL   32D                                   #  SINCE THERE'S NO STGOTO
058633,000155: 23,3620           00047                                    X2                                    
058634,000156: 
058635,000157:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
058636,000158:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
058637,000159:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
058638,000160:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
058639,000161: 
058640,000162:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
058641,000163:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
058642,000164:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
058643,000165:                                                                                                  #  MATION; TRG*SMNB, VICE VERSA.
058644,000166: 
058645,000167:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
058646,000168:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
058647,000169: 
058648,000170:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
058649,000171: 
058650,000172: 23,3621           77776        CDU*SMNB           EXIT                                           
058651,000173: 23,3622           03507                           TC       CDUTRIGS                              
058652,000174: 23,3623           13626                           TCF      C*MM*N1                               
058653,000175: 
058654,000176: 23,3624           77776        TRG*SMNB           EXIT                                           
058655,000177: 23,3625           03515                           TC       CD*TR*GS                              
058656,000178: 23,3626           07501        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
058657,000179: 23,3627           46214                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
058658,000180: 23,3630           03650        C*MM*N2            TC       AX*SR*T                               
058659,000181: 23,3631           06006                           TC       INTPRET                               
058660,000182: 23,3632           43575                           VLOAD    RVQ                                   
058661,000183: 23,3633           00123                                    VBUF                                  
058662,000184: 
058663,000185: 23,3634           77776        CDU*NBSM           EXIT                                           
058664,000186: 23,3635           03507                           TC       CDUTRIGS                              
058665,000187: 

Page 1369

058667,000189: 
058668,000190: 23,3636           13641                           TCF      C*MM*N3                               
058669,000191: 
058670,000192: 23,3637           77776        TRG*NBSM           EXIT                                           
058671,000193: 23,3640           03515                           TC       CD*TR*GS                              
058672,000194: 23,3641           07501        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
058673,000195: 23,3642           36214                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
058674,000196: 23,3643           13630                           TCF      C*MM*N2                               
058675,000197: 
058676,000198:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
058677,000199:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
058678,000200:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
058679,000201: 
058680,000202:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
058681,000203:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM
058682,000204:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
058683,000205:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
058684,000206: 
058685,000207: 23,3644           77776        *SMNB*             EXIT                                           
058686,000208: 23,3645           13626                           TCF      C*MM*N1                               
058687,000209: 
058688,000210: 23,3646           77776        *NBSM*             EXIT                                           
058689,000211: 23,3647           13641                           TCF      C*MM*N3                               
058690,000212: 
058691,000213:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
058692,000214:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
058693,000215:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
058694,000216:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
058695,000217:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
058696,000218:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
058697,000219:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
058698,000220:                                                                                                  #                TC      CDUTRIGS
058699,000221:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
058700,000222:                                                                                                  #                TC      AX*SR*T
058701,000223:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
058702,000224:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
058703,000225: 
058704,000226:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
058705,000227:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
058706,000228:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
058707,000229:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
058708,000230: 
058709,000231: 23,3650           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
058710,000232: 23,3651           00006                           EXTEND                                         
058711,000233: 23,3652           22145                           QXCH     RTNSAVER                              
058712,000234: 
058713,000235: 23,3653           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
058714,000236: 23,3654           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
058715,000237: 23,3655           66214                           AD       THREE                                 #                +1 --> 2        -1 --> 0

Page 1370

058717,000239: 23,3656           00006                           EXTEND                                         
058718,000240: 23,3657           50000                           INDEX    A                                     
058719,000241: 23,3660           33737                           DCA      INDEXI                                
058720,000242: 23,3661           52144                           DXCH     DEXI                                  
058721,000243: 
058722,000244: 23,3662           35017                           CA       ONE                                   
058723,000245: 23,3663           54130                           TS       BUF                                   
058724,000246: 23,3664           00006                           EXTEND                                         
058725,000247: 23,3665           50143                           INDEX    DEX1                                  
058726,000248: 23,3666           40123                           DCS      VBUF                                  
058727,000249: 23,3667           13671                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
058728,000250: 
058729,000251: 23,3670           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX
058730,000252: 
058731,000253: 23,3671           52155        LOOP1              DXCH     MPAC                                  
058732,000254: 23,3672           33735                           CA       SINESLOC                              
058733,000255: 23,3673           60143                           AD       DEX1                                  
058734,000256: 23,3674           54116                           TS       ADDRWD                                
058735,000257: 
058736,000258: 23,3675           07056                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
058737,000259: 23,3676           10142                           CCS      DEXDEX                                
058738,000260: 23,3677           52155                           DXCH     MPAC                                  #  NBSM CASE
058739,000261: 23,3700           13703                           TCF      +3                                    
058740,000262: 23,3701           00006                           EXTEND                                         #  SMNB CASE
058741,000263: 23,3702           40155                           DCS      MPAC                                  
058742,000264: 23,3703           52134                           DXCH     TERM1TMP                              
058743,000265: 
058744,000266: 23,3704           36211                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
058745,000267: 23,3705           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
058746,000268: 
058747,000269: 23,3706           00006                           EXTEND                                         
058748,000270: 23,3707           50130                           INDEX    BUF                                   
058749,000271: 23,3710           50143                           INDEX    DEX1                                  
058750,000272: 23,3711           30123                           DCA      VBUF                                  
058751,000273: 23,3712           52155                           DXCH     MPAC                                  
058752,000274: 23,3713           07056                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
058753,000275: 23,3714           52155                           DXCH     MPAC                                  
058754,000276: 23,3715           20134                           DAS      TERM1TMP                              
058755,000277: 23,3716           52134                           DXCH     TERM1TMP                              
058756,000278: 23,3717           20001                           DDOUBL                                         
058757,000279: 23,3720           50130                           INDEX    BUF                                   
058758,000280: 23,3721           50143                           INDEX    DEX1                                  
058759,000281: 23,3722           52123                           DXCH     VBUF                                  
058760,000282: 23,3723           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
058761,000283: 23,3724           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
058762,000284: 23,3725           13670                           TCF      LOOP2                                 
058763,000285: 
058764,000286: 23,3726           00006                           EXTEND                                         
058765,000287: 23,3727           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
058766,000288: 

Page 1371

058768,000290: 23,3730           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
058769,000291: 23,3731           13653                           TCF      R*TL**P                               
058770,000292: 23,3732           00145                           TC       RTNSAVER                              
058771,000293: 23,3733           13653                           TCF      R*TL**P                               
058772,000294: 23,3734           00145                           TC       RTNSAVER                              
058773,000295: 
058774,000296: 23,3735           00736        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
058775,000297: 
058776,000298: 23,3736           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
058777,000299: 23,3737           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
058778,000300: 23,3740           00000                           DEC      0          B-14                       #  **********   THESE   **********
058779,000301: 23,3741           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
058780,000302: 
058781,000303:                                                                                                  #  ****************************************************************************************************************

Page 1372

058783,000305:                                                                                                  #  THIS SUBROUTINE COMPUTES INCREMENTAL CHANGES IN CDU(GIMBAL) ANGLES FROM INCREMENTAL CHANGES ABOUT SM AXES.  IT
058784,000306:                                                                                                  #  REQUIRES SM INCREMENTS AS A DP VECTOR SCALED AT ONE REVOLUTION(DTHETASM,+2,+4).  SIN,COS(CDUY,Z,X) ARE IN
058785,000307:                                                                                                  #  SINCDU,+2,+4 AND COSCDU,+2,+4 RESPECTIVELY, SCALED TO ONE HALF.  CDU INCREENTS ARE PLACED IN DCDU,+2,+4 SCALED TO
058786,000308:                                                                                                  #  ONE REVOLUTION.
058787,000309: 
058788,000310:                                                                                                  #        *  COS(IGA)SEC(MGA)             0               -SIN(IGA)SEC(MGA) *
058789,000311:                                                                                                  #        *                                                                 *
058790,000312:                                                                                                  #        * -COS(IGA)TAN(MGA)             1                SIN(IGA)TAN(MGA) *
058791,000313:                                                                                                  #        *                                                                 *
058792,000314:                                                                                                  #        *      SIN(IGA)                 0                    COS(IGA)     *
058793,000315: 
058794,000316: 14,3423                                           BANK     14                                    
058795,000317: 23,2000                                           SETLOC   POWFLIT1                              
058796,000318: 23,2000                                           BANK                                           
058797,000319: 
058798,000320: 23,3742           41345        SMCDURES           DLOAD    DMP                                   
058799,000321: 23,3743           03212                                    DTHETASM                              
058800,000322: 23,3744           00745                                    COSCDUY                               
058801,000323: 
058802,000324: 23,3745           41325                           PDDL     DMP                                   
058803,000325: 23,3746           03216                                    DTHETASM   +4                         
058804,000326: 23,3747           00737                                    SINCDUY                               
058805,000327: 
058806,000328: 23,3750           77621                           BDSU                                           
058807,000329: 23,3751           77671                           DDV                                            
058808,000330: 23,3752           00747                                    COSCDUZ                               
058809,000331: 23,3753           03204                           STORE    DCDU                                  
058810,000332: 
058811,000333: 23,3754           72405                           DMP      SL1                                   #  SCALE
058812,000334: 23,3755           00741                                    SINCDUZ                               
058813,000335: 23,3756           77621                           BDSU                                           
058814,000336: 
058815,000337: 23,3757           03214                                    DTHETASM   +2                         
058816,000338: 23,3760           17206                           STODL    DCDU       +2                         
058817,000339: 23,3761           03212                                    DTHETASM                              
058818,000340: 
058819,000341: 23,3762           65205                           DMP      PDDL                                  
058820,000342: 23,3763           00737                                    SINCDUY                               
058821,000343: 23,3764           03216                                    DTHETASM   +4                         
058822,000344: 
058823,000345: 23,3765           43205                           DMP      DAD                                   
058824,000346: 23,3766           00745                                    COSCDUY                               
058825,000347: 23,3767           77752                           SL1                                            
058826,000348: 23,3770           03210                           STORE    DCDU       +4                         
058827,000349: 23,3771           77616                           RVQ                                            
058828,000350: 

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