Source Code

These source-code files are part of a reconstructed copy of Luminary 173, the second (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 178. Changes between revision 173 and 178 were backed out, as described by Luminary memo 167 (revision 1). The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 173 listing would be different.

Comments from 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.

053179,000002:                                                                                                  ## Copyright:   Public domain.
053180,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
053181,000004:                                                                                                  ## Purpose:     A section of Luminary revision 173.
053182,000005:                                                                                                  ##              It is part of the reconstructed source code for the second
053183,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
053184,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
053185,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
053186,000009:                                                                                                  ##              Luminary 178, as well as Luminary memo 167 (revision 1).
053187,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
053188,000011:                                                                                                  ##              exactly match those specified for Luminary 173 in NASA
053189,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
053190,000013:                                                                                                  ##              that the reconstruction is correct.
053191,000014:                                                                                                  ## Reference:   pp. 1248-1256
053192,000015:                                                                                                  ## Assembler:   yaYUL
053193,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
053194,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
053195,000018:                                                                                                  ## Mod history: 2019-09-18 MAS  Created from Luminary 178.
053196,000019:                                                                                                  ##              2021-05-30 ABS  SINSLOC -> SINESLOC
053197,000020: 

Page 1248

053199,000022: 14,3775                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
053200,000023: 23,2000                                           SETLOC   POWFLITE                              
053201,000024: 23,2000                                           BANK                                           
053202,000025: 
053203,000026: 23,3535     0142                                  EBANK=   DEXDEX                                
053204,000027: 23,3535                                           COUNT*   $$/POWFL                              
053205,000028: 
053206,000029:                                                                                                  #      CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
053207,000030:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
053208,000031:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.   AN
053209,000032:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.   THESE
053210,000033:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
053211,000034:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.   THEY DIFFER ONLY IN
053212,000035:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
053213,000036: 
053214,000037:                                                                                                  #      CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
053215,000038:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
053216,000039:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
053217,000040:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
053218,000041: 
053219,000042:                                                                                                  #      CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
053220,000043: 
053221,000044:                                                                                                  #      CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.   THIS
053222,000045:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
053223,000046:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.   A CALL TO THIS ROUTINE IS
053224,000047:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
053225,000048:                                                                                                  #  MODES (SMNB OR NBSM).   SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
053226,000049:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
053227,000050:                                                                                                  #  IN THIS ORDER.   CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
053228,000051:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.   NOTE THAT SINCE
053229,000052:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
053230,000053:                                                                                                  #  CALLED USING BANKCALL.   SORRY.
053231,000054: 
053232,000055:                                                                                                  #      CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
053233,000056:                                                                                                  #  INTERPRETIVE.
053234,000057: 
053235,000058: 23,3535           77776        CDUTRIG            EXIT                                           
053236,000059: 23,3536           03545                           TC       CDUTRIGS                              
053237,000060: 23,3537           06042                           TC       INTPRET                               
053238,000061: 23,3540           77616                           RVQ                                            
053239,000062: 
053240,000063: 23,3541           77776        CD*TR*G            EXIT                                           
053241,000064: 23,3542           03553                           TC       CD*TR*GS                              
053242,000065: 23,3543           06042                           TC       INTPRET                               
053243,000066: 23,3544           77616                           RVQ                                            
053244,000067: 
053245,000068: 23,3545           30032        CDUTRIGS           CA       CDUX                                  
053246,000069: 23,3546           54771                           TS       CDUSPOT    +4                         
053247,000070: 23,3547           30033                           CA       CDUY                                  
053248,000071: 23,3550           54765                           TS       CDUSPOT                               

Page 1249

053250,000073: 23,3551           30034                           CA       CDUZ                                  
053251,000074: 23,3552           54767                           TS       CDUSPOT    +2                         
053252,000075: 
053253,000076: 23,3553           00006        CD*TR*GS           EXTEND                                         
053254,000077: 23,3554           22142                           QXCH     TEM2                                  
053255,000078: 23,3555           34751                           CAF      FOUR                                  
053256,000079: 23,3556           76245        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
053257,000080: 23,3557           54143                           TS       TEM3                                  
053258,000081: 23,3560           50143                           INDEX    TEM3                                  
053259,000082: 23,3561           30765                           CA       CDUSPOT                               
053260,000083: 23,3562           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
053261,000084: 23,3563           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
053262,000085: 23,3564           04713                           TC       USPRCADR                              
053263,000086: 23,3565           21577                           CADR     CDULOGIC                              
053264,000087: 23,3566           00006                           EXTEND                                         
053265,000088: 23,3567           30155                           DCA      MPAC                                  
053266,000089: 23,3570           50143                           INDEX    TEM3                                  
053267,000090: 23,3571           52766                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
053268,000091: 23,3572           04713                           TC       USPRCADR                              
053269,000092: 23,3573           01517                           CADR     COSINE                                
053270,000093: 23,3574           52155                           DXCH     MPAC                                  
053271,000094: 23,3575           50143                           INDEX    TEM3                                  
053272,000095: 23,3576           52744                           DXCH     COSCDU                                #  STORING COSINE
053273,000096: 23,3577           00006                           EXTEND                                         
053274,000097: 23,3600           50143                           INDEX    TEM3                                  
053275,000098: 23,3601           30766                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
053276,000099: 23,3602           04713                           TC       USPRCADR                              
053277,000100: 23,3603           01531                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
053278,000101: 23,3604           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
053279,000102: 23,3605           52155                           DXCH     MPAC                                  
053280,000103: 23,3606           50143                           INDEX    TEM3                                  
053281,000104: 23,3607           52736                           DXCH     SINCDU                                
053282,000105: 23,3610           10143                           CCS      TEM3                                  
053283,000106: 23,3611           13556                           TCF      TR*GL**P                              
053284,000107: 23,3612           00142                           TC       TEM2                                  

Page 1250

053286,000109:                                                                                                  #  ****************************************************************************************************************
053287,000110: 
053288,000111:                                                                                                  #      QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
053289,000112:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
053290,000113:                                                                                                  #  AND CDUSPOT +4.   UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
053291,000114:                                                                                                  #  CDUSPOT.   QUICTRIG'S EXECUTION TIME IS 4.1 MS;   THIS IS 10 TIMES AS FAST AS CD*TR*GS.   QUICTRIG MAY BE
053292,000115:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
053293,000116: 
053294,000117: 23,3613           00004        QTPROLOG           INHINT                                         
053295,000118: 23,3614           30032                           CA       CDUX                                  
053296,000119: 23,3615           54771                           TS       CDUSPOTX                              
053297,000120: 23,3616           30033                           CA       CDUY                                  
053298,000121: 23,3617           54765                           TS       CDUSPOTY                              
053299,000122: 23,3620           30034                           CA       CDUZ                                  
053300,000123: 23,3621           54767                           TS       CDUSPOTZ                              
053301,000124: 
053302,000125: 23,3622           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
053303,000126: 23,3623           00006                           EXTEND                                         
053304,000127: 23,3624           22061                           QXCH     ITEMP1                                
053305,000128: 23,3625           34751                           CAF      FOUR                                  
053306,000129: 23,3626           76245                 +4        MASK     SIX                                   
053307,000130: 23,3627           54062                           TS       ITEMP2                                
053308,000131: 23,3630           50062                           INDEX    ITEMP2                                
053309,000132: 23,3631           30765                           CA       CDUSPOT                               
053310,000133: 23,3632           05033                           TC       SPSIN                                 
053311,000134: 23,3633           00006                           EXTEND                                         
053312,000135: 23,3634           74736                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
053313,000136: 23,3635           50062                           INDEX    ITEMP2                                
053314,000137: 23,3636           52736                           DXCH     SINCDU                                
053315,000138: 23,3637           50062                           INDEX    ITEMP2                                
053316,000139: 23,3640           30765                           CA       CDUSPOT                               
053317,000140: 23,3641           05032                           TC       SPCOS                                 
053318,000141: 23,3642           00006                           EXTEND                                         
053319,000142: 23,3643           74736                           MP       BIT14                                 
053320,000143: 23,3644           50062                           INDEX    ITEMP2                                
053321,000144: 23,3645           52744                           DXCH     COSCDU                                
053322,000145: 23,3646           10062                           CCS      ITEMP2                                
053323,000146: 23,3647           13626                           TCF      QUICTRIG   +4                         
053324,000147: 23,3650           30061                           CA       ITEMP1                                
053325,000148: 23,3651           00003                           RELINT                                         
053326,000149: 23,3652           00000                           TC       A                                     
053327,000150: 

Page 1251

053329,000152:                                                                                                  #  ****************************************************************************************************************
053330,000153:                                                                                                  #      THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
053331,000154:                                                                                                  #  INTERPRETIVE.   LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
053332,000155: 
053333,000156:                                                                                                  #      THESE INTERFACE ROUTINES ARE PERMANENT.   ALL RESTORE USER'S EBANK
053334,000157:                                                                                                  #  SETTING.   ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
053335,000158:                                                                                                  #  RETURNING VIA QPRET.   ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
053336,000159:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
053337,000160: 
053338,000161:                                                                                                  #      TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
053339,000162:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
053340,000163:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).   TRG*NBSM DOES THE NB TO SM TRANSFOR-
053341,000164:                                                                                                  #  MATION;  TRG*SMNB, VICE VERSA.
053342,000165: 
053343,000166:                                                                                                  #      CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
053344,000167:                                                                                                  #  THE CDU COUNTERS.   OTHERWISE IT IS LIKE TRG*NBSM.
053345,000168: 
053346,000169:                                                                                                  #      CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
053347,000170: 
053348,000171: 23,3653           77776        CDU*SMNB           EXIT                                           
053349,000172: 23,3654           03545                           TC       CDUTRIGS                              
053350,000173: 23,3655           13660                           TCF      C*MM*N1                               
053351,000174: 
053352,000175: 23,3656           77776        TRG*SMNB           EXIT                                           
053353,000176: 23,3657           03553                           TC       CD*TR*GS                              
053354,000177: 23,3660           07535        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
053355,000178: 23,3661           46250                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
053356,000179: 23,3662           03702        C*MM*N2            TC       AX*SR*T                               
053357,000180: 23,3663           06042                           TC       INTPRET                               
053358,000181: 23,3664           43575                           VLOAD    RVQ                                   
053359,000182: 23,3665           00123                                    VBUF                                  
053360,000183: 
053361,000184: 23,3666           77776        CDU*NBSM           EXIT                                           
053362,000185: 23,3667           03545                           TC       CDUTRIGS                              
053363,000186: 23,3670           13673                           TCF      C*MM*N3                               
053364,000187: 
053365,000188: 23,3671           77776        TRG*NBSM           EXIT                                           
053366,000189: 23,3672           03553                           TC       CD*TR*GS                              
053367,000190: 23,3673           07535        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
053368,000191: 23,3674           36250                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
053369,000192: 23,3675           13662                           TCF      C*MM*N2                               
053370,000193: 
053371,000194:                                                                                                  #      *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
053372,000195:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.   OTHERWISE THEY ARE
053373,000196:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
053374,000197: 
053375,000198:                                                                                                  #      NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
053376,000199:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM

Page 1252

053378,000201:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.   FOR SUBSEQUENT TRANSFOR-
053379,000202:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
053380,000203: 
053381,000204: 23,3676           77776        *SMNB*             EXIT                                           
053382,000205: 23,3677           13660                           TCF      C*MM*N1                               
053383,000206: 
053384,000207: 23,3700           77776        *NBSM*             EXIT                                           
053385,000208: 23,3701           13673                           TCF      C*MM*N3                               
053386,000209: 
053387,000210:                                                                                                  #        AX*SR*T COMBINES THE OLD SMNB AND NBSM.   FOR THE NB TO SM
053388,000211:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.   FOR SM TO NB, ENTER WITH -3.
053389,000212:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
053390,000213:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
053391,000214:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.   A CALL TO CD*TR*GS, WITH
053392,000215:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
053393,000216:                                                                                                  #  THIS.   HERE IS A SAMPLE CALLING SEQUENCE:-
053394,000217: 
053395,000218:                                                                                                  #                             TC     CDUTRIGS
053396,000219:                                                                                                  #                             CS     THREE       ("CA  THREE" FOR NBSM)
053397,000220:                                                                                                  #                             TC     AX*SR*T
053398,000221: 
053399,000222:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
053400,000223:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
053401,000224: 
053402,000225:                                                                                                  #      AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
053403,000226:                                                                                                  #  UNITY.   A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
053404,000227:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
053405,000228:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
053406,000229: 
053407,000230: 23,3702           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
053408,000231: 23,3703           00006                           EXTEND                                         
053409,000232: 23,3704           22145                           QXCH     RTNSAVER                              
053410,000233: 
053411,000234: 23,3705           10142        R*TL**P            CCS      DEXDEX                                #          +3 --> 0     -3 --> 2
053412,000235: 23,3706           40142                           CS       DEXDEX                                #  THUS:   +2 --> 1     -2 --> 1
053413,000236: 23,3707           66250                           AD       THREE                                 #          +1 --> 2     -1 --> 0
053414,000237: 23,3710           00006                           EXTEND                                         
053415,000238: 23,3711           50000                           INDEX    A                                     
053416,000239: 23,3712           33771                           DCA      INDEXI                                
053417,000240: 23,3713           52144                           DXCH     DEXI                                  
053418,000241: 
053419,000242: 23,3714           34753                           CA       ONE                                   
053420,000243: 23,3715           54130                           TS       BUF                                   
053421,000244: 23,3716           00006                           EXTEND                                         
053422,000245: 23,3717           50143                           INDEX    DEX1                                  
053423,000246: 23,3720           40123                           DCS      VBUF                                  
053424,000247: 23,3721           13723                           TCF      LOOP1                                 #    REALLY BE A SUBTRACT, AND VICE VERSA
053425,000248: 
053426,000249: 23,3722           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX

Page 1253

053428,000251: 23,3723           52155        LOOP1              DXCH     MPAC                                  
053429,000252: 23,3724           33767                           CA       SINESLOC                              
053430,000253: 23,3725           60143                           AD       DEX1                                  
053431,000254: 23,3726           54116                           TS       ADDRWD                                
053432,000255: 
053433,000256: 23,3727           07112                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
053434,000257: 23,3730           10142                           CCS      DEXDEX                                
053435,000258: 23,3731           52155                           DXCH     MPAC                                  #  NBSM CASE
053436,000259: 23,3732           13735                           TCF      +3                                    
053437,000260: 23,3733           00006                           EXTEND                                         #  SMNB CASE
053438,000261: 23,3734           40155                           DCS      MPAC                                  
053439,000262: 23,3735           52160                           DXCH     TERM1TMP                              
053440,000263: 
053441,000264: 23,3736           36245                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
053442,000265: 23,3737           26116                           ADS      ADDRWD                                #    BE CONSECUTIVE AND IN THAT ORDER
053443,000266: 
053444,000267: 23,3740           00006                           EXTEND                                         
053445,000268: 23,3741           50130                           INDEX    BUF                                   
053446,000269: 23,3742           50143                           INDEX    DEX1                                  
053447,000270: 23,3743           30123                           DCA      VBUF                                  
053448,000271: 23,3744           52155                           DXCH     MPAC                                  
053449,000272: 23,3745           07112                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
053450,000273: 23,3746           52155                           DXCH     MPAC                                  
053451,000274: 23,3747           20160                           DAS      TERM1TMP                              
053452,000275: 23,3750           52160                           DXCH     TERM1TMP                              
053453,000276: 23,3751           20001                           DDOUBL                                         
053454,000277: 23,3752           50130                           INDEX    BUF                                   
053455,000278: 23,3753           50143                           INDEX    DEX1                                  
053456,000279: 23,3754           52123                           DXCH     VBUF                                  
053457,000280: 23,3755           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
053458,000281: 
053459,000282: 23,3756           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
053460,000283: 23,3757           13722                           TCF      LOOP2                                 
053461,000284: 
053462,000285: 23,3760           00006                           EXTEND                                         
053463,000286: 23,3761           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
053464,000287: 
053465,000288: 23,3762           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
053466,000289: 23,3763           13705                           TCF      R*TL**P                               
053467,000290: 23,3764           00145                           TC       RTNSAVER                              
053468,000291: 23,3765           13705                           TCF      R*TL**P                               
053469,000292: 23,3766           00145                           TC       RTNSAVER                              
053470,000293: 
053471,000294: 23,3767           00735        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
053472,000295: 
053473,000296: 23,3770           00004        INDEXI             DEC      4          B-14                       #  **********    DON'T    **********
053474,000297: 23,3771           00002                           DEC      2          B-14                       #  **********    TOUCH    **********
053475,000298: 23,3772           00000                           DEC      0          B-14                       #  **********    THESE    **********

Page 1254

053477,000300: 23,3773           00004                           DEC      4          B-14                       #  **********  CONSTANTS  **********
053478,000301: 
053479,000302:                                                                                                  #  ****************************************************************************************************************
053480,000303: 
053481,000304: 10,2030                                           BANK     10                                    
053482,000305: 10,2000                                           SETLOC   FLESHLOC                              
053483,000306: 10,2000                                           BANK                                           
053484,000307: 10,2030                                           COUNT*   $$/POWFL                              
053485,000308: 
053486,000309:                                                                                                  #      ROUTINE FLESHPOT COMPUTES THE BODY-STABLE MEMBER TRANSFORMATION MATRIX (COMMONLY CALLED XNB) AND STORES
053487,000310:                                                                                                  #  IT IN THE LOCATIONS SPECIFIED BY THE ECADR ENTERING IN A.
053488,000311: 
053489,000312: 10,2030           77776        CALCSMSC           EXIT                                           
053490,000313: 10,2031           04616                           TC       BANKCALL                              
053491,000314: 10,2032           20036                           CADR     FLESHPOT   -1                         
053492,000315: 10,2033           06042                           TC       INTPRET                               
053493,000316: 10,2034           77616                           RVQ                                            
053494,000317: 
053495,000318: 10,2035           02664        XNBECADR           ECADR    XNB                                   
053496,000319: 
053497,000320: 10,2036           32035                 -1        CAF      XNBECADR                              
053498,000321: 
053499,000322: 10,2037           54142        FLESHPOT           TS       TEM2                                  
053500,000323: 10,2040           56003                           XCH      EBANK                                 
053501,000324: 10,2041           56142                           XCH      TEM2                                  
053502,000325: 10,2042           74357                           MASK     LOW8                                  
053503,000326: 10,2043           65007                           AD       OCT1400                               
053504,000327: 10,2044           54141                           TS       TEM1                                  
053505,000328: 
053506,000329: 10,2045           00006                           EXTEND                                         
053507,000330: 10,2046           30744                           DCA      COSCDUY                               
053508,000331: 10,2047           52155                           DXCH     MPAC                                  
053509,000332: 10,2050           07106                           TC       DMP                                   
053510,000333: 10,2051           00745                           ADRES    COSCDUZ                               
053511,000334: 10,2052           52155                           DXCH     MPAC                                  
053512,000335: 10,2053           20001                           DDOUBL                                         
053513,000336: 10,2054           50141                           INDEX    TEM1                                  
053514,000337: 10,2055           52001                           DXCH     0                                     #  = COSY COSZ
053515,000338: 
053516,000339: 10,2056           00006                           EXTEND                                         
053517,000340: 10,2057           30740                           DCA      SINCDUZ                               
053518,000341: 10,2060           50141                           INDEX    TEM1                                  
053519,000342: 10,2061           52003                           DXCH     2                                     #  = SINZ
053520,000343: 
053521,000344: 10,2062           00006                           EXTEND                                         
053522,000345: 10,2063           40736                           DCS      SINCDUY                               
053523,000346: 10,2064           52155                           DXCH     MPAC                                  
053524,000347: 10,2065           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ

Page 1255

053526,000349: 10,2066           52155                           DXCH     MPAC                                  
053527,000350: 10,2067           20001                           DDOUBL                                         
053528,000351: 10,2070           50141                           INDEX    TEM1                                  
053529,000352: 10,2071           52005                           DXCH     4                                     #  = - SINY COSZ
053530,000353: 
053531,000354: 10,2072           00006                           EXTEND                                         
053532,000355: 10,2073           40742                           DCS      SINCDUX                               
053533,000356: 10,2074           52155                           DXCH     MPAC                                  
053534,000357: 10,2075           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ STILL
053535,000358: 10,2076           52155                           DXCH     MPAC                                  
053536,000359: 10,2077           20001                           DDOUBL                                         
053537,000360: 10,2100           52160                           DXCH     MPAC       +3                         
053538,000361: 
053539,000362: 10,2101           00006                           EXTEND                                         
053540,000363: 10,2102           40742                           DCS      SINCDUX                               
053541,000364: 10,2103           52155                           DXCH     MPAC                                  
053542,000365: 10,2104           07106                           TC       DMP                                   
053543,000366: 10,2105           00737                           ADRES    SINCDUZ                               
053544,000367: 10,2106           00006                           EXTEND                                         
053545,000368: 10,2107           40155                           DCS      MPAC                                  
053546,000369: 10,2110           52162                           DXCH     MPAC       +5                         
053547,000370: 10,2111           07106                           TC       DMP                                   
053548,000371: 10,2112           00735                           ADRES    SINCDUY                               
053549,000372: 10,2113           52155                           DXCH     MPAC                                  
053550,000373: 10,2114           20001                           DDOUBL                                         
053551,000374: 10,2115           20001                           DDOUBL                                         
053552,000375: 10,2116           52162                           DXCH     MPAC       +5                         
053553,000376: 
053554,000377: 10,2117           52155                           DXCH     MPAC                                  
053555,000378: 10,2120           07106                           TC       DMP                                   
053556,000379: 10,2121           00743                           ADRES    COSCDUY                               
053557,000380: 10,2122           52155                           DXCH     MPAC                                  
053558,000381: 10,2123           20001                           DDOUBL                                         
053559,000382: 10,2124           20001                           DDOUBL                                         
053560,000383: 10,2125           52131                           DXCH     BUF                                   
053561,000384: 
053562,000385: 10,2126           00006                           EXTEND                                         
053563,000386: 10,2127           30744                           DCA      COSCDUY                               
053564,000387: 10,2130           52155                           DXCH     MPAC                                  
053565,000388: 10,2131           07106                           TC       DMP                                   
053566,000389: 10,2132           00747                           ADRES    COSCDUX                               
053567,000390: 10,2133           52155                           DXCH     MPAC                                  
053568,000391: 10,2134           20001                           DDOUBL                                         
053569,000392: 10,2135           20162                           DAS      MPAC       +5                         
053570,000393: 
053571,000394: 10,2136           00006                           EXTEND                                         
053572,000395: 10,2137           30736                           DCA      SINCDUY                               
053573,000396: 10,2140           52155                           DXCH     MPAC                                  
053574,000397: 10,2141           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUX
053575,000398: 10,2142           52155                           DXCH     MPAC                                  
053576,000399: 

Page 1256

053578,000401: 10,2143           20001                           DDOUBL                                         
053579,000402: 10,2144           20131                           DAS      BUF                                   
053580,000403: 
053581,000404: 10,2145           52131                           DXCH     BUF                                   
053582,000405: 10,2146           52155                           DXCH     MPAC                                  
053583,000406: 
053584,000407: 10,2147           00006                           EXTEND                                         
053585,000408: 10,2150           30155                           DCA      MPAC                                  
053586,000409: 10,2151           50141                           INDEX    TEM1                                  
053587,000410: 10,2152           52015                           DXCH     14                                    #  = SINY COSX + SINX SINZ COSY
053588,000411: 
053589,000412: 10,2153           00006                           EXTEND                                         
053590,000413: 10,2154           30160                           DCA      MPAC       +3                         
053591,000414: 10,2155           50141                           INDEX    TEM1                                  
053592,000415: 10,2156           52017                           DXCH     16                                    #  = - SINX COSZ
053593,000416: 
053594,000417: 10,2157           00006                           EXTEND                                         
053595,000418: 10,2160           30162                           DCA      MPAC       +5                         
053596,000419: 10,2161           50141                           INDEX    TEM1                                  
053597,000420: 10,2162           52021                           DXCH     20                                    #  = COSX COSY - SINX SINY SINZ
053598,000421: 
053599,000422: 10,2163           30141                           CA       TEM1                                  
053600,000423: 10,2164           54116                           TS       ADDRWD                                
053601,000424: 10,2165           00006                           EXTEND                                         
053602,000425: 10,2166           30006                           DCA      Z                                     
053603,000426: 10,2167           64751                           AD       FOUR                                  
053604,000427: 10,2170           52165                           DXCH     LOC                                   
053605,000428: 10,2171           34744                           CAF      BIT8                                  
053606,000429: 10,2172           54023                           TS       EDOP                                  
053607,000430: 10,2173           17463                           TCF      VXV                                   
053608,000431: 10,2174           52155                           DXCH     MPAC                                  
053609,000432: 10,2175           20001                           DDOUBL                                         
053610,000433: 10,2176           50141                           INDEX    TEM1                                  
053611,000434: 10,2177           52007                           DXCH     6                                     
053612,000435: 
053613,000436: 10,2200           52160                           DXCH     MPAC       +3                         
053614,000437: 10,2201           20001                           DDOUBL                                         
053615,000438: 10,2202           50141                           INDEX    TEM1                                  
053616,000439: 10,2203           52011                           DXCH     10                                    
053617,000440: 
053618,000441: 10,2204           52162                           DXCH     MPAC       +5                         
053619,000442: 10,2205           20001                           DDOUBL                                         
053620,000443: 10,2206           50141                           INDEX    TEM1                                  
053621,000444: 10,2207           52013                           DXCH     12                                    
053622,000445: 
053623,000446: 10,2210           30142                           CA       TEM2                                  
053624,000447: 10,2211           54003                           TS       EBANK                                 
053625,000448: 10,2212           14631                           TCF      SWRETURN                              
053626,000449: 

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