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.

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

Page 1256

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

Page 1257

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

Page 1258

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

Page 1259

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

Page 1260

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

Page 1261

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

Page 1262

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

Page 1263

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

Page 1264

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

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