Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

054141,000002:                                                                                                  ## Copyright:   Public domain.
054142,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
054143,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
054144,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
054145,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
054146,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
054147,000008:                                                                                                  ##              that the code format has been changed to conform to the
054148,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
054149,000010:                                                                                                  ##              original YUL assembler.
054150,000011:                                                                                                  ## Reference:   pp. 1256-1264
054151,000012:                                                                                                  ## Assembler:   yaYUL
054152,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
054153,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
054154,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
054155,000016:                                                                                                  ##              2016-12-08 RRB  Updated for Luminary210.
054156,000017:                                                                                                  ##              2016-12-11 HG   Fix operands    CDSPOTX,Y,Z -> CDUSPOTX,Y,Z
054157,000018:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
054158,000019:                                                                                                  ##                              and corrected errors found.
054159,000020:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
054160,000021:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
054161,000022:                                                                                                  ##              2017-03-17 RSB  Comment-text fixes identified in diff'ing
054162,000023:                                                                                                  ##                              Luminary 99 vs Comanche 55.
054163,000024:                                                                                                  ##              2021-05-30 ABS  SINSLOC -> SINESLOC
054164,000025: 

Page 1256

054166,000027: 14,3754                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
054167,000028: 23,2000                                           SETLOC   POWFLITE                              
054168,000029: 23,2000                                           BANK                                           
054169,000030: 
054170,000031: 23,3522     0142                                  EBANK=   DEXDEX                                
054171,000032: 23,3522                                           COUNT*   $$/POWFL                              
054172,000033: 
054173,000034:                                                                                                  #        CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
054174,000035:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
054175,000036:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
054176,000037:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
054177,000038:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
054178,000039:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
054179,000040:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
054180,000041: 
054181,000042:                                                                                                  #        CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
054182,000043:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
054183,000044:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
054184,000045:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
054185,000046: 
054186,000047:                                                                                                  #        CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
054187,000048: 
054188,000049:                                                                                                  #        CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
054189,000050:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
054190,000051:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.   A CALL TO THIS ROUTINE IS
054191,000052:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
054192,000053:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
054193,000054:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
054194,000055:                                                                                                  #  IN THIS ORDER.   CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
054195,000056:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.   NOTE THAT SINCE
054196,000057:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
054197,000058:                                                                                                  #  CALLED USING BANKCALL.   SORRY.
054198,000059: 
054199,000060:                                                                                                  #        CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
054200,000061:                                                                                                  #  INTERPRETIVE.
054201,000062: 
054202,000063: 23,3522           77776        CDUTRIG            EXIT                                           
054203,000064: 23,3523           03532                           TC       CDUTRIGS                              
054204,000065: 23,3524           06060                           TC       INTPRET                               
054205,000066: 23,3525           77616                           RVQ                                            
054206,000067: 
054207,000068: 23,3526           77776        CD*TR*G            EXIT                                           
054208,000069: 23,3527           03540                           TC       CD*TR*GS                              
054209,000070: 23,3530           06060                           TC       INTPRET                               
054210,000071: 23,3531           77616                           RVQ                                            
054211,000072: 
054212,000073: 23,3532           30032        CDUTRIGS           CA       CDUX                                  
054213,000074: 23,3533           54771                           TS       CDUSPOT    +4                         
054214,000075: 23,3534           30033                           CA       CDUY                                  
054215,000076: 23,3535           54765                           TS       CDUSPOT                               

Page 1257

054217,000078: 23,3536           30034                           CA       CDUZ                                  
054218,000079: 23,3537           54767                           TS       CDUSPOT    +2                         
054219,000080: 
054220,000081: 23,3540           00006        CD*TR*GS           EXTEND                                         
054221,000082: 23,3541           22142                           QXCH     TEM2                                  
054222,000083: 23,3542           34742                           CAF      FOUR                                  
054223,000084: 23,3543           76263        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
054224,000085: 23,3544           54143                           TS       TEM3                                  
054225,000086: 23,3545           50143                           INDEX    TEM3                                  
054226,000087: 23,3546           30765                           CA       CDUSPOT                               
054227,000088: 23,3547           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
054228,000089: 23,3550           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
054229,000090: 23,3551           04704                           TC       USPRCADR                              
054230,000091: 23,3552           21606                           CADR     CDULOGIC                              
054231,000092: 23,3553           00006                           EXTEND                                         
054232,000093: 23,3554           30155                           DCA      MPAC                                  
054233,000094: 23,3555           50143                           INDEX    TEM3                                  
054234,000095: 23,3556           52766                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
054235,000096: 23,3557           04704                           TC       USPRCADR                              
054236,000097: 23,3560           01517                           CADR     COSINE                                
054237,000098: 23,3561           52155                           DXCH     MPAC                                  
054238,000099: 23,3562           50143                           INDEX    TEM3                                  
054239,000100: 23,3563           52744                           DXCH     COSCDU                                #  STORING COSINE
054240,000101: 23,3564           00006                           EXTEND                                         
054241,000102: 23,3565           50143                           INDEX    TEM3                                  
054242,000103: 23,3566           30766                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
054243,000104: 23,3567           04704                           TC       USPRCADR                              
054244,000105: 23,3570           01531                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
054245,000106: 23,3571           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
054246,000107: 23,3572           52155                           DXCH     MPAC                                  
054247,000108: 23,3573           50143                           INDEX    TEM3                                  
054248,000109: 23,3574           52736                           DXCH     SINCDU                                
054249,000110: 23,3575           10143                           CCS      TEM3                                  
054250,000111: 23,3576           13543                           TCF      TR*GL**P                              
054251,000112: 23,3577           00142                           TC       TEM2                                  

Page 1258

054253,000114:                                                                                                  #  ****************************************************************************************************************
054254,000115:                                                                                                  #        QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
054255,000116:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
054256,000117:                                                                                                  #  AND CDUSPOT +4.   UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
054257,000118:                                                                                                  #  CDUSPOT.   QUICTRIG'S EXECUTION TIME IS 4.1 MS;  THIS IS 10 TIMES AS FAST AS CD*TR*GS.  QUICTRIG MAY BE
054258,000119:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
054259,000120: 
054260,000121: 23,3600           00004        QTPROLOG           INHINT                                         
054261,000122: 23,3601           30032                           CA       CDUX                                  
054262,000123: 23,3602           54771                           TS       CDUSPOTX                              
054263,000124: 23,3603           30033                           CA       CDUY                                  
054264,000125: 23,3604           54765                           TS       CDUSPOTY                              
054265,000126: 23,3605           30034                           CA       CDUZ                                  
054266,000127: 23,3606           54767                           TS       CDUSPOTZ                              
054267,000128: 
054268,000129: 23,3607           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
054269,000130: 23,3610           00006                           EXTEND                                         
054270,000131: 23,3611           22061                           QXCH     ITEMP1                                
054271,000132: 23,3612           34742                           CAF      FOUR                                  
054272,000133: 23,3613           76263                 +4        MASK     SIX                                   
054273,000134: 23,3614           54062                           TS       ITEMP2                                
054274,000135: 23,3615           50062                           INDEX    ITEMP2                                
054275,000136: 23,3616           30765                           CA       CDUSPOT                               
054276,000137: 23,3617           05024                           TC       SPSIN                                 
054277,000138: 23,3620           00006                           EXTEND                                         
054278,000139: 23,3621           74727                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
054279,000140: 23,3622           50062                           INDEX    ITEMP2                                
054280,000141: 23,3623           52736                           DXCH     SINCDU                                
054281,000142: 23,3624           50062                           INDEX    ITEMP2                                
054282,000143: 23,3625           30765                           CA       CDUSPOT                               
054283,000144: 23,3626           05023                           TC       SPCOS                                 
054284,000145: 23,3627           00006                           EXTEND                                         
054285,000146: 23,3630           74727                           MP       BIT14                                 
054286,000147: 23,3631           50062                           INDEX    ITEMP2                                
054287,000148: 23,3632           52744                           DXCH     COSCDU                                
054288,000149: 23,3633           10062                           CCS      ITEMP2                                
054289,000150: 23,3634           13613                           TCF      QUICTRIG   +4                         
054290,000151: 23,3635           30061                           CA       ITEMP1                                
054291,000152: 23,3636           00003                           RELINT                                         
054292,000153: 23,3637           00000                           TC       A                                     
054293,000154: 

Page 1259

054295,000156:                                                                                                  #  ****************************************************************************************************************
054296,000157:                                                                                                  #        THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
054297,000158:                                                                                                  #  INTERPRETIVE.   LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
054298,000159: 
054299,000160:                                                                                                  #        THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
054300,000161:                                                                                                  #  SETTING.  ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
054301,000162:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
054302,000163:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
054303,000164: 
054304,000165:                                                                                                  #        TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
054305,000166:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
054306,000167:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).   TRG*NBSM DOES THE NB TO SM TRANSFOR-
054307,000168:                                                                                                  #  MATION;  TRG*SMNB, VICE VERSA.
054308,000169: 
054309,000170:                                                                                                  #        CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
054310,000171:                                                                                                  #  THE CDU COUNTERS.   OTHERWISE IT IS LIKE TRG*NBSM.
054311,000172: 
054312,000173:                                                                                                  #        CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
054313,000174: 
054314,000175: 23,3640           77776        CDU*SMNB           EXIT                                           
054315,000176: 23,3641           03532                           TC       CDUTRIGS                              
054316,000177: 23,3642           13645                           TCF      C*MM*N1                               
054317,000178: 
054318,000179: 23,3643           77776        TRG*SMNB           EXIT                                           
054319,000180: 23,3644           03540                           TC       CD*TR*GS                              
054320,000181: 23,3645           07553        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
054321,000182: 23,3646           46266                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
054322,000183: 23,3647           03667        C*MM*N2            TC       AX*SR*T                               
054323,000184: 23,3650           06060                           TC       INTPRET                               
054324,000185: 23,3651           43575                           VLOAD    RVQ                                   
054325,000186: 23,3652           00123                                    VBUF                                  
054326,000187: 
054327,000188: 23,3653           77776        CDU*NBSM           EXIT                                           
054328,000189: 23,3654           03532                           TC       CDUTRIGS                              
054329,000190: 23,3655           13660                           TCF      C*MM*N3                               
054330,000191: 
054331,000192: 23,3656           77776        TRG*NBSM           EXIT                                           
054332,000193: 23,3657           03540                           TC       CD*TR*GS                              
054333,000194: 23,3660           07553        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
054334,000195: 23,3661           36266                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
054335,000196: 23,3662           13647                           TCF      C*MM*N2                               
054336,000197: 
054337,000198:                                                                                                  #        *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
054338,000199:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.   OTHERWISE THEY ARE
054339,000200:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
054340,000201: 
054341,000202:                                                                                                  #        NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
054342,000203:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM

Page 1260

054344,000205:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
054345,000206:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
054346,000207: 
054347,000208: 23,3663           77776        *SMNB*             EXIT                                           
054348,000209: 23,3664           13645                           TCF      C*MM*N1                               
054349,000210: 
054350,000211: 23,3665           77776        *NBSM*             EXIT                                           
054351,000212: 23,3666           13660                           TCF      C*MM*N3                               
054352,000213: 
054353,000214:                                                                                                  #        AX*SR*T COMBINES THE OLD SMNB AND NBSM.   FOR THE NB TO SM
054354,000215:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.   FOR SM TO NB, ENTER WITH -3.
054355,000216:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
054356,000217:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
054357,000218:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.   A CALL TO CD*TR*GS, WITH
054358,000219:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
054359,000220:                                                                                                  #  THIS.   HERE IS A SAMPLE CALLING SEQUENCE:-
054360,000221:                                                                                                  #                TC      CDUTRIGS
054361,000222:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
054362,000223:                                                                                                  #                TC      AX*SR*T
054363,000224:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
054364,000225:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
054365,000226: 
054366,000227:                                                                                                  #        AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
054367,000228:                                                                                                  #  UNITY.   A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
054368,000229:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
054369,000230:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
054370,000231: 
054371,000232: 23,3667           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
054372,000233: 23,3670           00006                           EXTEND                                         
054373,000234: 23,3671           22145                           QXCH     RTNSAVER                              
054374,000235: 
054375,000236: 23,3672           10142        R*TL**P            CCS      DEXDEX                                #         +3 --> 0       -3 --> 2
054376,000237: 23,3673           40142                           CS       DEXDEX                                #  THUS:  +2 --> 1       -2 --> 1
054377,000238: 23,3674           66266                           AD       THREE                                 #         +1 --> 2       -1 --> 0
054378,000239: 23,3675           00006                           EXTEND                                         
054379,000240: 23,3676           50000                           INDEX    A                                     
054380,000241: 23,3677           33756                           DCA      INDEXI                                
054381,000242: 23,3700           52144                           DXCH     DEXI                                  
054382,000243: 
054383,000244: 23,3701           34744                           CA       ONE                                   
054384,000245: 23,3702           54130                           TS       BUF                                   
054385,000246: 23,3703           00006                           EXTEND                                         
054386,000247: 23,3704           50143                           INDEX    DEX1                                  
054387,000248: 23,3705           40123                           DCS      VBUF                                  
054388,000249: 23,3706           13710                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
054389,000250: 
054390,000251: 23,3707           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX

Page 1261

054392,000253: 23,3710           52155        LOOP1              DXCH     MPAC                                  
054393,000254: 23,3711           33754                           CA       SINESLOC                              
054394,000255: 23,3712           60143                           AD       DEX1                                  
054395,000256: 23,3713           54116                           TS       ADDRWD                                
054396,000257: 
054397,000258: 23,3714           07130                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
054398,000259: 23,3715           10142                           CCS      DEXDEX                                
054399,000260: 23,3716           52155                           DXCH     MPAC                                  #  NBSM CASE
054400,000261: 23,3717           13722                           TCF      +3                                    
054401,000262: 23,3720           00006                           EXTEND                                         #  SMNB CASE
054402,000263: 23,3721           40155                           DCS      MPAC                                  
054403,000264: 23,3722           52160                           DXCH     TERM1TMP                              
054404,000265: 
054405,000266: 23,3723           36263                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
054406,000267: 23,3724           26116                           ADS      ADDRWD                                #    BE CONSECUTIVE AND IN THAT ORDER
054407,000268: 
054408,000269: 23,3725           00006                           EXTEND                                         
054409,000270: 23,3726           50130                           INDEX    BUF                                   
054410,000271: 23,3727           50143                           INDEX    DEX1                                  
054411,000272: 23,3730           30123                           DCA      VBUF                                  
054412,000273: 23,3731           52155                           DXCH     MPAC                                  
054413,000274: 23,3732           07130                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
054414,000275: 23,3733           52155                           DXCH     MPAC                                  
054415,000276: 23,3734           20160                           DAS      TERM1TMP                              
054416,000277: 23,3735           52160                           DXCH     TERM1TMP                              
054417,000278: 23,3736           20001                           DDOUBL                                         
054418,000279: 23,3737           50130                           INDEX    BUF                                   
054419,000280: 23,3740           50143                           INDEX    DEX1                                  
054420,000281: 23,3741           52123                           DXCH     VBUF                                  
054421,000282: 23,3742           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
054422,000283: 
054423,000284: 23,3743           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
054424,000285: 23,3744           13707                           TCF      LOOP2                                 
054425,000286: 
054426,000287: 23,3745           00006                           EXTEND                                         
054427,000288: 23,3746           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
054428,000289: 
054429,000290: 23,3747           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
054430,000291: 23,3750           13672                           TCF      R*TL**P                               
054431,000292: 23,3751           00145                           TC       RTNSAVER                              
054432,000293: 23,3752           13672                           TCF      R*TL**P                               
054433,000294: 23,3753           00145                           TC       RTNSAVER                              
054434,000295: 
054435,000296: 23,3754           00735        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
054436,000297: 
054437,000298: 23,3755           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
054438,000299: 23,3756           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
054439,000300: 23,3757           00000                           DEC      0          B-14                       #  **********   THESE   **********

Page 1262

054441,000302: 23,3760           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
054442,000303: 
054443,000304:                                                                                                  #  ****************************************************************************************************************
054444,000305: 
054445,000306: 10,2030                                           BANK     10                                    
054446,000307: 10,2000                                           SETLOC   FLESHLOC                              
054447,000308: 10,2000                                           BANK                                           
054448,000309: 10,2030                                           COUNT*   $$/POWFL                              
054449,000310: 
054450,000311:                                                                                                  #        ROUTINE FLESHPOT COMPUTES THE BODY-STABLE MEMBER TRANSFORMATION MATRIX (COMMONLY CALLED XNB) AND STORES
054451,000312:                                                                                                  #  IT IN THE LOCATIONS SPECIFIED BY THE ECADR ENTERING IN A.
054452,000313: 
054453,000314: 10,2030           77776        CALCSMSC           EXIT                                           
054454,000315: 10,2031           04607                           TC       BANKCALL                              
054455,000316: 10,2032           20036                           CADR     FLESHPOT   -1                         
054456,000317: 10,2033           06060                           TC       INTPRET                               
054457,000318: 10,2034           77616                           RVQ                                            
054458,000319: 
054459,000320: 10,2035           02664        XNBECADR           ECADR    XNB                                   
054460,000321: 
054461,000322: 10,2036           32035                 -1        CAF      XNBECADR                              
054462,000323: 
054463,000324: 10,2037           54142        FLESHPOT           TS       TEM2                                  
054464,000325: 10,2040           56003                           XCH      EBANK                                 
054465,000326: 10,2041           56142                           XCH      TEM2                                  
054466,000327: 10,2042           74350                           MASK     LOW8                                  
054467,000328: 10,2043           65000                           AD       OCT1400                               
054468,000329: 10,2044           54141                           TS       TEM1                                  
054469,000330: 
054470,000331: 10,2045           00006                           EXTEND                                         
054471,000332: 10,2046           30744                           DCA      COSCDUY                               
054472,000333: 10,2047           52155                           DXCH     MPAC                                  
054473,000334: 10,2050           07124                           TC       DMP                                   
054474,000335: 10,2051           00745                           ADRES    COSCDUZ                               
054475,000336: 10,2052           52155                           DXCH     MPAC                                  
054476,000337: 10,2053           20001                           DDOUBL                                         
054477,000338: 10,2054           50141                           INDEX    TEM1                                  
054478,000339: 10,2055           52001                           DXCH     0                                     #  = COSY COSZ
054479,000340: 
054480,000341: 10,2056           00006                           EXTEND                                         
054481,000342: 10,2057           30740                           DCA      SINCDUZ                               
054482,000343: 10,2060           50141                           INDEX    TEM1                                  
054483,000344: 10,2061           52003                           DXCH     2                                     #  = SINZ
054484,000345: 
054485,000346: 10,2062           00006                           EXTEND                                         
054486,000347: 10,2063           40736                           DCS      SINCDUY                               
054487,000348: 10,2064           52155                           DXCH     MPAC                                  
054488,000349: 10,2065           07130                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ

Page 1263

054490,000351: 10,2066           52155                           DXCH     MPAC                                  
054491,000352: 10,2067           20001                           DDOUBL                                         
054492,000353: 10,2070           50141                           INDEX    TEM1                                  
054493,000354: 10,2071           52005                           DXCH     4                                     #  = - SINY COSZ
054494,000355: 
054495,000356: 10,2072           00006                           EXTEND                                         
054496,000357: 10,2073           40742                           DCS      SINCDUX                               
054497,000358: 10,2074           52155                           DXCH     MPAC                                  
054498,000359: 10,2075           07130                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ STILL
054499,000360: 10,2076           52155                           DXCH     MPAC                                  
054500,000361: 10,2077           20001                           DDOUBL                                         
054501,000362: 10,2100           52160                           DXCH     MPAC       +3                         
054502,000363: 
054503,000364: 10,2101           00006                           EXTEND                                         
054504,000365: 10,2102           40742                           DCS      SINCDUX                               
054505,000366: 10,2103           52155                           DXCH     MPAC                                  
054506,000367: 10,2104           07124                           TC       DMP                                   
054507,000368: 10,2105           00737                           ADRES    SINCDUZ                               
054508,000369: 10,2106           00006                           EXTEND                                         
054509,000370: 10,2107           40155                           DCS      MPAC                                  
054510,000371: 10,2110           52162                           DXCH     MPAC       +5                         
054511,000372: 10,2111           07124                           TC       DMP                                   
054512,000373: 10,2112           00735                           ADRES    SINCDUY                               
054513,000374: 10,2113           52155                           DXCH     MPAC                                  
054514,000375: 10,2114           20001                           DDOUBL                                         
054515,000376: 10,2115           20001                           DDOUBL                                         
054516,000377: 10,2116           52162                           DXCH     MPAC       +5                         
054517,000378: 
054518,000379: 10,2117           52155                           DXCH     MPAC                                  
054519,000380: 10,2120           07124                           TC       DMP                                   
054520,000381: 10,2121           00743                           ADRES    COSCDUY                               
054521,000382: 10,2122           52155                           DXCH     MPAC                                  
054522,000383: 10,2123           20001                           DDOUBL                                         
054523,000384: 10,2124           20001                           DDOUBL                                         
054524,000385: 10,2125           52131                           DXCH     BUF                                   
054525,000386: 
054526,000387: 10,2126           00006                           EXTEND                                         
054527,000388: 10,2127           30744                           DCA      COSCDUY                               
054528,000389: 10,2130           52155                           DXCH     MPAC                                  
054529,000390: 10,2131           07124                           TC       DMP                                   
054530,000391: 10,2132           00747                           ADRES    COSCDUX                               
054531,000392: 10,2133           52155                           DXCH     MPAC                                  
054532,000393: 10,2134           20001                           DDOUBL                                         
054533,000394: 10,2135           20162                           DAS      MPAC       +5                         
054534,000395: 
054535,000396: 10,2136           00006                           EXTEND                                         
054536,000397: 10,2137           30736                           DCA      SINCDUY                               
054537,000398: 10,2140           52155                           DXCH     MPAC                                  
054538,000399: 10,2141           07130                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUX
054539,000400: 10,2142           52155                           DXCH     MPAC                                  
054540,000401: 

Page 1264

054542,000403: 10,2143           20001                           DDOUBL                                         
054543,000404: 10,2144           20131                           DAS      BUF                                   
054544,000405: 
054545,000406: 10,2145           52131                           DXCH     BUF                                   
054546,000407: 10,2146           52155                           DXCH     MPAC                                  
054547,000408: 
054548,000409: 10,2147           00006                           EXTEND                                         
054549,000410: 10,2150           30155                           DCA      MPAC                                  
054550,000411: 10,2151           50141                           INDEX    TEM1                                  
054551,000412: 10,2152           52015                           DXCH     14                                    #  = SINY COSX + SINX SINZ COSY
054552,000413: 
054553,000414: 10,2153           00006                           EXTEND                                         
054554,000415: 10,2154           30160                           DCA      MPAC       +3                         
054555,000416: 10,2155           50141                           INDEX    TEM1                                  
054556,000417: 10,2156           52017                           DXCH     16                                    #  = - SINX COSZ
054557,000418: 
054558,000419: 10,2157           00006                           EXTEND                                         
054559,000420: 10,2160           30162                           DCA      MPAC       +5                         
054560,000421: 10,2161           50141                           INDEX    TEM1                                  
054561,000422: 10,2162           52021                           DXCH     20                                    #  = COSX COSY - SINX SINY SINZ
054562,000423: 
054563,000424: 10,2163           30141                           CA       TEM1                                  
054564,000425: 10,2164           54116                           TS       ADDRWD                                
054565,000426: 10,2165           00006                           EXTEND                                         
054566,000427: 10,2166           30006                           DCA      Z                                     
054567,000428: 10,2167           64742                           AD       FOUR                                  
054568,000429: 10,2170           52165                           DXCH     LOC                                   
054569,000430: 10,2171           34735                           CAF      BIT8                                  
054570,000431: 10,2172           54023                           TS       EDOP                                  
054571,000432: 10,2173           17501                           TCF      VXV                                   
054572,000433: 10,2174           52155                           DXCH     MPAC                                  
054573,000434: 10,2175           20001                           DDOUBL                                         
054574,000435: 10,2176           50141                           INDEX    TEM1                                  
054575,000436: 10,2177           52007                           DXCH     6                                     
054576,000437: 
054577,000438: 10,2200           52160                           DXCH     MPAC       +3                         
054578,000439: 10,2201           20001                           DDOUBL                                         
054579,000440: 10,2202           50141                           INDEX    TEM1                                  
054580,000441: 10,2203           52011                           DXCH     10                                    
054581,000442: 
054582,000443: 10,2204           52162                           DXCH     MPAC       +5                         
054583,000444: 10,2205           20001                           DDOUBL                                         
054584,000445: 10,2206           50141                           INDEX    TEM1                                  
054585,000446: 10,2207           52013                           DXCH     12                                    
054586,000447: 
054587,000448: 10,2210           30142                           CA       TEM2                                  
054588,000449: 10,2211           54003                           TS       EBANK                                 
054589,000450: 10,2212           14622                           TCF      SWRETURN                              
054590,000451: 

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