Source Code

This is a reconstructed version of Luminary 130, the initial AGC program released in November 1969 for the Apollo 13 LM. Three more releases followed before the flown revision was finally manufactured in February 1970.

This reconstruction was created from a previous transcription of the original listing of Luminary 131, combined with Luminary memo #129 which describes the small difference between the Luminary 130 and 131. The reconstructed source code was verified by matching memory-bank checksums to those listed for Luminary 130 in drawing 2021152G.

In this source code, program comments from the original (Luminary 131) code are prefixed with '#', while those added later by the Virtual AGC project are prefixed with '##'.

052881,000002:                                                                                                  ## Copyright:   Public domain.
052882,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
052883,000004:                                                                                                  ## Purpose:     A section of the reconstructed source code for Luminary 130.
052884,000005:                                                                                                  ##              This was the original program released for the Apollo 13 LM,
052885,000006:                                                                                                  ##              although several more revisions would follow. It has been
052886,000007:                                                                                                  ##              reconstructed from a listing of Luminary 131, from which it
052887,000008:                                                                                                  ##              differs on only two lines in P70-P71. The difference is
052888,000009:                                                                                                  ##              described in detail in Luminary memo #129, which was used
052889,000010:                                                                                                  ##              to perform the reconstruction. This file is intended to be a
052890,000011:                                                                                                  ##              faithful reconstruction, except that the code format has been
052891,000012:                                                                                                  ##              changed to conform to the requirements of the yaYUL assembler
052892,000013:                                                                                                  ##              rather than the original YUL assembler.
052893,000014:                                                                                                  ## Reference:   pp. 1251-1259
052894,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
052895,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
052896,000017:                                                                                                  ## Mod history: 06/03/03 RSB.   Began transcribing.
052897,000018:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
052898,000019:                                                                                                  ##              2010-10-25 JL   Indentation fixes.
052899,000020:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
052900,000021:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
052901,000022:                                                                                                  ##                              numbers in 1701.pdf.
052902,000023:                                                                                                  ##              2017-02-27 RSB  Proofed comment text using octopus/ProoferComments.
052903,000024:                                                                                                  ##              2017-03-01 RSB  Fixed lingering comment-text typos.
052904,000025:                                                                                                  ##              2017-03-14 RSB  Comment-text fixes noted in proofing Luminary 116.
052905,000026:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
052906,000027:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
052907,000028:                                                                                                  ##              2017-03-17 RSB  Comment-text fixes identified in diff'ing
052908,000029:                                                                                                  ##                              Luminary 99 vs Comanche 55.
052909,000030:                                                                                                  ##              2018-09-04 MAS  Copied from Luminary 131 for Luminary 130.
052910,000031:                                                                                                  ##              2021-05-30 ABS  SINSLOC -> SINESLOC
052911,000032: 

Page 1251

052913,000034: 14,3775                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
052914,000035: 23,2000                                           SETLOC   POWFLITE                              
052915,000036: 23,2000                                           BANK                                           
052916,000037: 
052917,000038: 23,3541     0142                                  EBANK=   DEXDEX                                
052918,000039: 23,3541                                           COUNT*   $$/POWFL                              
052919,000040: 
052920,000041:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
052921,000042:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
052922,000043:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
052923,000044:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
052924,000045:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
052925,000046:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
052926,000047:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
052927,000048: 
052928,000049:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
052929,000050:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
052930,000051:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
052931,000052:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
052932,000053: 
052933,000054:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
052934,000055: 
052935,000056:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
052936,000057:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
052937,000058:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
052938,000059:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
052939,000060:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
052940,000061:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
052941,000062:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
052942,000063:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
052943,000064:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
052944,000065:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
052945,000066: 
052946,000067:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
052947,000068:                                                                                                  #  INTERPRETIVE.
052948,000069: 
052949,000070: 23,3541           77776        CDUTRIG            EXIT                                           
052950,000071: 23,3542           03551                           TC       CDUTRIGS                              
052951,000072: 23,3543           06042                           TC       INTPRET                               
052952,000073: 23,3544           77616                           RVQ                                            
052953,000074: 
052954,000075: 23,3545           77776        CD*TR*G            EXIT                                           
052955,000076: 23,3546           03557                           TC       CD*TR*GS                              
052956,000077: 23,3547           06042                           TC       INTPRET                               
052957,000078: 23,3550           77616                           RVQ                                            
052958,000079: 
052959,000080: 23,3551           30032        CDUTRIGS           CA       CDUX                                  
052960,000081: 23,3552           54771                           TS       CDUSPOT    +4                         
052961,000082: 23,3553           30033                           CA       CDUY                                  
052962,000083: 23,3554           54765                           TS       CDUSPOT                               

Page 1252

052964,000085: 23,3555           30034                           CA       CDUZ                                  
052965,000086: 23,3556           54767                           TS       CDUSPOT    +2                         
052966,000087: 
052967,000088: 23,3557           00006        CD*TR*GS           EXTEND                                         
052968,000089: 23,3560           22142                           QXCH     TEM2                                  
052969,000090: 23,3561           34751                           CAF      FOUR                                  
052970,000091: 23,3562           76245        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
052971,000092: 23,3563           54143                           TS       TEM3                                  
052972,000093: 23,3564           50143                           INDEX    TEM3                                  
052973,000094: 23,3565           30765                           CA       CDUSPOT                               
052974,000095: 23,3566           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
052975,000096: 23,3567           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
052976,000097: 23,3570           04713                           TC       USPRCADR                              
052977,000098: 23,3571           21577                           CADR     CDULOGIC                              
052978,000099: 23,3572           00006                           EXTEND                                         
052979,000100: 23,3573           30155                           DCA      MPAC                                  
052980,000101: 23,3574           50143                           INDEX    TEM3                                  
052981,000102: 23,3575           52766                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
052982,000103: 23,3576           04713                           TC       USPRCADR                              
052983,000104: 23,3577           01517                           CADR     COSINE                                
052984,000105: 23,3600           52155                           DXCH     MPAC                                  
052985,000106: 23,3601           50143                           INDEX    TEM3                                  
052986,000107: 23,3602           52744                           DXCH     COSCDU                                #  STORING COSINE
052987,000108: 23,3603           00006                           EXTEND                                         
052988,000109: 23,3604           50143                           INDEX    TEM3                                  
052989,000110: 23,3605           30766                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
052990,000111: 23,3606           04713                           TC       USPRCADR                              
052991,000112: 23,3607           01531                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
052992,000113: 23,3610           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
052993,000114: 23,3611           52155                           DXCH     MPAC                                  
052994,000115: 23,3612           50143                           INDEX    TEM3                                  
052995,000116: 23,3613           52736                           DXCH     SINCDU                                
052996,000117: 23,3614           10143                           CCS      TEM3                                  
052997,000118: 23,3615           13562                           TCF      TR*GL**P                              
052998,000119: 23,3616           00142                           TC       TEM2                                  

Page 1253

053000,000121:                                                                                                  #  ****************************************************************************************************************
053001,000122:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
053002,000123:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
053003,000124:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
053004,000125:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;  THIS IS 10 TIMES AS FAST AS CD*TR*GS.  QUICTRIG MAY BE
053005,000126:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
053006,000127: 
053007,000128: 23,3617           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
053008,000129: 23,3620           00006                           EXTEND                                         
053009,000130: 23,3621           22061                           QXCH     ITEMP1                                
053010,000131: 23,3622           34751                           CAF      FOUR                                  
053011,000132: 23,3623           76245                 +4        MASK     SIX                                   
053012,000133: 23,3624           54062                           TS       ITEMP2                                
053013,000134: 23,3625           50062                           INDEX    ITEMP2                                
053014,000135: 23,3626           30765                           CA       CDUSPOT                               
053015,000136: 23,3627           05033                           TC       SPSIN                                 
053016,000137: 23,3630           00006                           EXTEND                                         
053017,000138: 23,3631           74736                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
053018,000139: 23,3632           50062                           INDEX    ITEMP2                                
053019,000140: 23,3633           52736                           DXCH     SINCDU                                
053020,000141: 23,3634           50062                           INDEX    ITEMP2                                
053021,000142: 23,3635           30765                           CA       CDUSPOT                               
053022,000143: 23,3636           05032                           TC       SPCOS                                 
053023,000144: 23,3637           00006                           EXTEND                                         
053024,000145: 23,3640           74736                           MP       BIT14                                 
053025,000146: 23,3641           50062                           INDEX    ITEMP2                                
053026,000147: 23,3642           52744                           DXCH     COSCDU                                
053027,000148: 23,3643           10062                           CCS      ITEMP2                                
053028,000149: 23,3644           13623                           TCF      QUICTRIG   +4                         
053029,000150: 23,3645           30061                           CA       ITEMP1                                
053030,000151: 23,3646           00003                           RELINT                                         
053031,000152: 23,3647           00000                           TC       A                                     
053032,000153: 

Page 1254

053034,000155:                                                                                                  #  ****************************************************************************************************************
053035,000156:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
053036,000157:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
053037,000158: 
053038,000159:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
053039,000160:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
053040,000161:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
053041,000162:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
053042,000163: 
053043,000164:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
053044,000165:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
053045,000166:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
053046,000167:                                                                                                  #  MATION; TRG*SMNB, VICE VERSA.
053047,000168: 
053048,000169:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
053049,000170:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
053050,000171: 
053051,000172:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
053052,000173: 
053053,000174: 23,3650           77776        CDU*SMNB           EXIT                                           
053054,000175: 23,3651           03551                           TC       CDUTRIGS                              
053055,000176: 23,3652           13655                           TCF      C*MM*N1                               
053056,000177: 
053057,000178: 23,3653           77776        TRG*SMNB           EXIT                                           
053058,000179: 23,3654           03557                           TC       CD*TR*GS                              
053059,000180: 23,3655           07535        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
053060,000181: 23,3656           46250                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
053061,000182: 23,3657           03677        C*MM*N2            TC       AX*SR*T                               
053062,000183: 23,3660           06042                           TC       INTPRET                               
053063,000184: 23,3661           43575                           VLOAD    RVQ                                   
053064,000185: 23,3662           00123                                    VBUF                                  
053065,000186: 
053066,000187: 23,3663           77776        CDU*NBSM           EXIT                                           
053067,000188: 23,3664           03551                           TC       CDUTRIGS                              
053068,000189: 23,3665           13670                           TCF      C*MM*N3                               
053069,000190: 
053070,000191: 23,3666           77776        TRG*NBSM           EXIT                                           
053071,000192: 23,3667           03557                           TC       CD*TR*GS                              
053072,000193: 23,3670           07535        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
053073,000194: 23,3671           36250                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
053074,000195: 23,3672           13657                           TCF      C*MM*N2                               
053075,000196: 
053076,000197:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
053077,000198:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
053078,000199:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
053079,000200: 
053080,000201:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
053081,000202:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM

Page 1255

053083,000204:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
053084,000205:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
053085,000206: 
053086,000207: 23,3673           77776        *SMNB*             EXIT                                           
053087,000208: 23,3674           13655                           TCF      C*MM*N1                               
053088,000209: 
053089,000210: 23,3675           77776        *NBSM*             EXIT                                           
053090,000211: 23,3676           13670                           TCF      C*MM*N3                               
053091,000212: 
053092,000213:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
053093,000214:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
053094,000215:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
053095,000216:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
053096,000217:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
053097,000218:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
053098,000219:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
053099,000220:                                                                                                  #                TC      CDUTRIGS
053100,000221:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
053101,000222:                                                                                                  #                TC      AX*SR*T
053102,000223:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
053103,000224:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
053104,000225: 
053105,000226:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
053106,000227:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
053107,000228:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
053108,000229:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
053109,000230: 
053110,000231: 23,3677           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
053111,000232: 23,3700           00006                           EXTEND                                         
053112,000233: 23,3701           22145                           QXCH     RTNSAVER                              
053113,000234: 
053114,000235: 23,3702           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
053115,000236: 23,3703           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
053116,000237: 23,3704           66250                           AD       THREE                                 #                +1 --> 2        -1 --> 0
053117,000238: 23,3705           00006                           EXTEND                                         
053118,000239: 23,3706           50000                           INDEX    A                                     
053119,000240: 23,3707           33766                           DCA      INDEXI                                
053120,000241: 23,3710           52144                           DXCH     DEXI                                  
053121,000242: 
053122,000243: 23,3711           34753                           CA       ONE                                   
053123,000244: 23,3712           54130                           TS       BUF                                   
053124,000245: 23,3713           00006                           EXTEND                                         
053125,000246: 23,3714           50143                           INDEX    DEX1                                  
053126,000247: 23,3715           40123                           DCS      VBUF                                  
053127,000248: 23,3716           13720                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
053128,000249: 
053129,000250: 23,3717           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX

Page 1256

053131,000252: 23,3720           52155        LOOP1              DXCH     MPAC                                  
053132,000253: 23,3721           33764                           CA       SINESLOC                              
053133,000254: 23,3722           60143                           AD       DEX1                                  
053134,000255: 23,3723           54116                           TS       ADDRWD                                
053135,000256: 
053136,000257: 23,3724           07112                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
053137,000258: 23,3725           10142                           CCS      DEXDEX                                
053138,000259: 23,3726           52155                           DXCH     MPAC                                  #  NBSM CASE
053139,000260: 23,3727           13732                           TCF      +3                                    
053140,000261: 23,3730           00006                           EXTEND                                         #  SMNB CASE
053141,000262: 23,3731           40155                           DCS      MPAC                                  
053142,000263: 23,3732           52160                           DXCH     TERM1TMP                              
053143,000264: 
053144,000265: 23,3733           36245                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
053145,000266: 23,3734           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
053146,000267: 
053147,000268: 23,3735           00006                           EXTEND                                         
053148,000269: 23,3736           50130                           INDEX    BUF                                   
053149,000270: 23,3737           50143                           INDEX    DEX1                                  
053150,000271: 23,3740           30123                           DCA      VBUF                                  
053151,000272: 23,3741           52155                           DXCH     MPAC                                  
053152,000273: 23,3742           07112                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
053153,000274: 23,3743           52155                           DXCH     MPAC                                  
053154,000275: 23,3744           20160                           DAS      TERM1TMP                              
053155,000276: 23,3745           52160                           DXCH     TERM1TMP                              
053156,000277: 23,3746           20001                           DDOUBL                                         
053157,000278: 23,3747           50130                           INDEX    BUF                                   
053158,000279: 23,3750           50143                           INDEX    DEX1                                  
053159,000280: 23,3751           52123                           DXCH     VBUF                                  
053160,000281: 23,3752           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
053161,000282: 23,3753           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
053162,000283: 23,3754           13717                           TCF      LOOP2                                 
053163,000284: 
053164,000285: 23,3755           00006                           EXTEND                                         
053165,000286: 23,3756           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
053166,000287: 
053167,000288: 23,3757           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
053168,000289: 23,3760           13702                           TCF      R*TL**P                               
053169,000290: 23,3761           00145                           TC       RTNSAVER                              
053170,000291: 23,3762           13702                           TCF      R*TL**P                               
053171,000292: 23,3763           00145                           TC       RTNSAVER                              
053172,000293: 
053173,000294: 23,3764           00735        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
053174,000295: 
053175,000296: 23,3765           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
053176,000297: 23,3766           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
053177,000298: 23,3767           00000                           DEC      0          B-14                       #  **********   THESE   **********

Page 1257

053179,000300: 23,3770           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
053180,000301: 
053181,000302:                                                                                                  #  ****************************************************************************************************************
053182,000303: 
053183,000304: 10,2030                                           BANK     10                                    
053184,000305: 10,2000                                           SETLOC   FLESHLOC                              
053185,000306: 10,2000                                           BANK                                           
053186,000307: 10,2030                                           COUNT*   $$/POWFL                              
053187,000308: 
053188,000309:                                                                                                  #  ROUTINE FLESHPOT COMPUTES THE BODY-STABLE MEMBER TRANSFORMATION MATRIX (COMMONLY CALLED XNB) AND STORES
053189,000310:                                                                                                  #  IT IN THE LOCATIONS SPECIFIED BY THE ECADR ENTERING IN A.
053190,000311: 
053191,000312: 10,2030           77776        CALCSMSC           EXIT                                           
053192,000313: 10,2031           04616                           TC       BANKCALL                              
053193,000314: 10,2032           20036                           CADR     FLESHPOT   -1                         
053194,000315: 10,2033           06042                           TC       INTPRET                               
053195,000316: 10,2034           77616                           RVQ                                            
053196,000317: 
053197,000318: 10,2035           02664        XNBECADR           ECADR    XNB                                   
053198,000319: 
053199,000320: 10,2036           32035                 -1        CAF      XNBECADR                              
053200,000321: 
053201,000322: 10,2037           54142        FLESHPOT           TS       TEM2                                  
053202,000323: 10,2040           56003                           XCH      EBANK                                 
053203,000324: 10,2041           56142                           XCH      TEM2                                  
053204,000325: 10,2042           74357                           MASK     LOW8                                  
053205,000326: 10,2043           65007                           AD       OCT1400                               
053206,000327: 10,2044           54141                           TS       TEM1                                  
053207,000328: 
053208,000329: 10,2045           00006                           EXTEND                                         
053209,000330: 10,2046           30744                           DCA      COSCDUY                               
053210,000331: 10,2047           52155                           DXCH     MPAC                                  
053211,000332: 10,2050           07106                           TC       DMP                                   
053212,000333: 10,2051           00745                           ADRES    COSCDUZ                               
053213,000334: 10,2052           52155                           DXCH     MPAC                                  
053214,000335: 10,2053           20001                           DDOUBL                                         
053215,000336: 10,2054           50141                           INDEX    TEM1                                  
053216,000337: 10,2055           52001                           DXCH     0                                     #  = COSY COSZ
053217,000338: 
053218,000339: 10,2056           00006                           EXTEND                                         
053219,000340: 10,2057           30740                           DCA      SINCDUZ                               
053220,000341: 10,2060           50141                           INDEX    TEM1                                  
053221,000342: 10,2061           52003                           DXCH     2                                     #  = SINZ
053222,000343: 
053223,000344: 10,2062           00006                           EXTEND                                         
053224,000345: 10,2063           40736                           DCS      SINCDUY                               
053225,000346: 10,2064           52155                           DXCH     MPAC                                  
053226,000347: 10,2065           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ

Page 1258

053228,000349: 10,2066           52155                           DXCH     MPAC                                  
053229,000350: 10,2067           20001                           DDOUBL                                         
053230,000351: 10,2070           50141                           INDEX    TEM1                                  
053231,000352: 10,2071           52005                           DXCH     4                                     #  = - SINY COSZ
053232,000353: 
053233,000354: 10,2072           00006                           EXTEND                                         
053234,000355: 10,2073           40742                           DCS      SINCDUX                               
053235,000356: 10,2074           52155                           DXCH     MPAC                                  
053236,000357: 10,2075           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ STILL
053237,000358: 10,2076           52155                           DXCH     MPAC                                  
053238,000359: 10,2077           20001                           DDOUBL                                         
053239,000360: 10,2100           52160                           DXCH     MPAC       +3                         
053240,000361: 
053241,000362: 10,2101           00006                           EXTEND                                         
053242,000363: 10,2102           40742                           DCS      SINCDUX                               
053243,000364: 10,2103           52155                           DXCH     MPAC                                  
053244,000365: 10,2104           07106                           TC       DMP                                   
053245,000366: 10,2105           00737                           ADRES    SINCDUZ                               
053246,000367: 10,2106           00006                           EXTEND                                         
053247,000368: 10,2107           40155                           DCS      MPAC                                  
053248,000369: 10,2110           52162                           DXCH     MPAC       +5                         
053249,000370: 10,2111           07106                           TC       DMP                                   
053250,000371: 10,2112           00735                           ADRES    SINCDUY                               
053251,000372: 10,2113           52155                           DXCH     MPAC                                  
053252,000373: 10,2114           20001                           DDOUBL                                         
053253,000374: 10,2115           20001                           DDOUBL                                         
053254,000375: 10,2116           52162                           DXCH     MPAC       +5                         
053255,000376: 
053256,000377: 10,2117           52155                           DXCH     MPAC                                  
053257,000378: 10,2120           07106                           TC       DMP                                   
053258,000379: 10,2121           00743                           ADRES    COSCDUY                               
053259,000380: 10,2122           52155                           DXCH     MPAC                                  
053260,000381: 10,2123           20001                           DDOUBL                                         
053261,000382: 10,2124           20001                           DDOUBL                                         
053262,000383: 10,2125           52131                           DXCH     BUF                                   
053263,000384: 
053264,000385: 10,2126           00006                           EXTEND                                         
053265,000386: 10,2127           30744                           DCA      COSCDUY                               
053266,000387: 10,2130           52155                           DXCH     MPAC                                  
053267,000388: 10,2131           07106                           TC       DMP                                   
053268,000389: 10,2132           00747                           ADRES    COSCDUX                               
053269,000390: 10,2133           52155                           DXCH     MPAC                                  
053270,000391: 10,2134           20001                           DDOUBL                                         
053271,000392: 10,2135           20162                           DAS      MPAC       +5                         
053272,000393: 
053273,000394: 10,2136           00006                           EXTEND                                         
053274,000395: 10,2137           30736                           DCA      SINCDUY                               
053275,000396: 10,2140           52155                           DXCH     MPAC                                  
053276,000397: 10,2141           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUX
053277,000398: 10,2142           52155                           DXCH     MPAC                                  
053278,000399: 

Page 1259

053280,000401: 10,2143           20001                           DDOUBL                                         
053281,000402: 10,2144           20131                           DAS      BUF                                   
053282,000403: 
053283,000404: 10,2145           52131                           DXCH     BUF                                   
053284,000405: 10,2146           52155                           DXCH     MPAC                                  
053285,000406: 
053286,000407: 10,2147           00006                           EXTEND                                         
053287,000408: 10,2150           30155                           DCA      MPAC                                  
053288,000409: 10,2151           50141                           INDEX    TEM1                                  
053289,000410: 10,2152           52015                           DXCH     14                                    #  = SINY COSX + SINX SINZ COSY
053290,000411: 
053291,000412: 10,2153           00006                           EXTEND                                         
053292,000413: 10,2154           30160                           DCA      MPAC       +3                         
053293,000414: 10,2155           50141                           INDEX    TEM1                                  
053294,000415: 10,2156           52017                           DXCH     16                                    #  = - SINX COSZ
053295,000416: 
053296,000417: 10,2157           00006                           EXTEND                                         
053297,000418: 10,2160           30162                           DCA      MPAC       +5                         
053298,000419: 10,2161           50141                           INDEX    TEM1                                  
053299,000420: 10,2162           52021                           DXCH     20                                    #  = COSX COSY - SINX SINY SINZ
053300,000421: 
053301,000422: 10,2163           30141                           CA       TEM1                                  
053302,000423: 10,2164           54116                           TS       ADDRWD                                
053303,000424: 10,2165           00006                           EXTEND                                         
053304,000425: 10,2166           30006                           DCA      Z                                     
053305,000426: 10,2167           64751                           AD       FOUR                                  
053306,000427: 10,2170           52165                           DXCH     LOC                                   
053307,000428: 10,2171           34744                           CAF      BIT8                                  
053308,000429: 10,2172           54023                           TS       EDOP                                  
053309,000430: 10,2173           17463                           TCF      VXV                                   
053310,000431: 10,2174           52155                           DXCH     MPAC                                  
053311,000432: 10,2175           20001                           DDOUBL                                         
053312,000433: 10,2176           50141                           INDEX    TEM1                                  
053313,000434: 10,2177           52007                           DXCH     6                                     
053314,000435: 
053315,000436: 10,2200           52160                           DXCH     MPAC       +3                         
053316,000437: 10,2201           20001                           DDOUBL                                         
053317,000438: 10,2202           50141                           INDEX    TEM1                                  
053318,000439: 10,2203           52011                           DXCH     10                                    
053319,000440: 
053320,000441: 10,2204           52162                           DXCH     MPAC       +5                         
053321,000442: 10,2205           20001                           DDOUBL                                         
053322,000443: 10,2206           50141                           INDEX    TEM1                                  
053323,000444: 10,2207           52013                           DXCH     12                                    
053324,000445: 
053325,000446: 10,2210           30142                           CA       TEM2                                  
053326,000447: 10,2211           54003                           TS       EBANK                                 
053327,000448: 10,2212           14631                           TCF      SWRETURN                              
053328,000449: 

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