Source Code

This source code is very close to the Apollo Guidance Computer software for the Apollo 13 Lunar module. This revision of the Luminary 131 program is from December of 1969, whereas there was a later revision in January of 1970, and still another revision in February, which is the code that flew on the mission. As far as this transcription is concerned, it was originally from a copy made in 1991 of a printout from the collection of AGC developer Don Eyles for collector David Craig. It was subsequently scanned by Gary Neff, reprocessed for online presentation at the now-discontinued History of Recent Science and Technology (HRST) website of MIT's Dibner Institute (the full-quality scans being discarded in the process), and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a high-quality replacement scan for a completely illegible page was later provided by Gary Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many errors to be introduced into the transcription. Accordingly, a second scan of the same physical printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive, and used to correct the transcription errors. All of the scanned materials mentioned, as well as other Luminary 131 related material, are available online. Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017, so the two scans are not identical in that respect. The page-headings in the printout read, in part:
	GAP:  ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091
	17:53 DEC. 19, 1969
Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together.

052574,000002:                                                                                                  ## Copyright:   Public domain.
052575,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
052576,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
052577,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
052578,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
052579,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
052580,000008:                                                                                                  ##              that the code format has been changed to conform to the
052581,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
052582,000010:                                                                                                  ##              original YUL assembler.
052583,000011:                                                                                                  ## Reference:   pp. 1251-1259
052584,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
052585,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
052586,000014:                                                                                                  ## Mod history: 06/03/03 RSB.   Began transcribing.
052587,000015:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
052588,000016:                                                                                                  ##              2010-10-25 JL   Indentation fixes.
052589,000017:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
052590,000018:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
052591,000019:                                                                                                  ##                              numbers in 1701.pdf.
052592,000020:                                                                                                  ##              2017-02-27 RSB  Proofed comment text using octopus/ProoferComments.
052593,000021:                                                                                                  ##              2017-03-01 RSB  Fixed lingering comment-text typos.
052594,000022:                                                                                                  ##              2017-03-14 RSB  Comment-text fixes noted in proofing Luminary 116.
052595,000023:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
052596,000024:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
052597,000025:                                                                                                  ##              2017-03-17 RSB  Comment-text fixes identified in diff'ing
052598,000026:                                                                                                  ##                              Luminary 99 vs Comanche 55.
052599,000027: 

Page 1251

052601,000029: 14,3775                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
052602,000030: 23,2000                                           SETLOC   POWFLITE                              
052603,000031: 23,2000                                           BANK                                           
052604,000032: 
052605,000033: 23,3541     0142                                  EBANK=   DEXDEX                                
052606,000034: 23,3541                                           COUNT*   $$/POWFL                              
052607,000035: 
052608,000036:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
052609,000037:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
052610,000038:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
052611,000039:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
052612,000040:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
052613,000041:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
052614,000042:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
052615,000043: 
052616,000044:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
052617,000045:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
052618,000046:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
052619,000047:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
052620,000048: 
052621,000049:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
052622,000050: 
052623,000051:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
052624,000052:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
052625,000053:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
052626,000054:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
052627,000055:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
052628,000056:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
052629,000057:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
052630,000058:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
052631,000059:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
052632,000060:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
052633,000061: 
052634,000062:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
052635,000063:                                                                                                  #  INTERPRETIVE.
052636,000064: 
052637,000065: 23,3541           77776        CDUTRIG            EXIT                                           
052638,000066: 23,3542           03551                           TC       CDUTRIGS                              
052639,000067: 23,3543           06042                           TC       INTPRET                               
052640,000068: 23,3544           77616                           RVQ                                            
052641,000069: 
052642,000070: 23,3545           77776        CD*TR*G            EXIT                                           
052643,000071: 23,3546           03557                           TC       CD*TR*GS                              
052644,000072: 23,3547           06042                           TC       INTPRET                               
052645,000073: 23,3550           77616                           RVQ                                            
052646,000074: 
052647,000075: 23,3551           30032        CDUTRIGS           CA       CDUX                                  
052648,000076: 23,3552           54771                           TS       CDUSPOT    +4                         
052649,000077: 23,3553           30033                           CA       CDUY                                  
052650,000078: 23,3554           54765                           TS       CDUSPOT                               

Page 1252

052652,000080: 23,3555           30034                           CA       CDUZ                                  
052653,000081: 23,3556           54767                           TS       CDUSPOT    +2                         
052654,000082: 
052655,000083: 23,3557           00006        CD*TR*GS           EXTEND                                         
052656,000084: 23,3560           22142                           QXCH     TEM2                                  
052657,000085: 23,3561           34751                           CAF      FOUR                                  
052658,000086: 23,3562           76245        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
052659,000087: 23,3563           54143                           TS       TEM3                                  
052660,000088: 23,3564           50143                           INDEX    TEM3                                  
052661,000089: 23,3565           30765                           CA       CDUSPOT                               
052662,000090: 23,3566           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
052663,000091: 23,3567           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
052664,000092: 23,3570           04713                           TC       USPRCADR                              
052665,000093: 23,3571           21577                           CADR     CDULOGIC                              
052666,000094: 23,3572           00006                           EXTEND                                         
052667,000095: 23,3573           30155                           DCA      MPAC                                  
052668,000096: 23,3574           50143                           INDEX    TEM3                                  
052669,000097: 23,3575           52766                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
052670,000098: 23,3576           04713                           TC       USPRCADR                              
052671,000099: 23,3577           01517                           CADR     COSINE                                
052672,000100: 23,3600           52155                           DXCH     MPAC                                  
052673,000101: 23,3601           50143                           INDEX    TEM3                                  
052674,000102: 23,3602           52744                           DXCH     COSCDU                                #  STORING COSINE
052675,000103: 23,3603           00006                           EXTEND                                         
052676,000104: 23,3604           50143                           INDEX    TEM3                                  
052677,000105: 23,3605           30766                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
052678,000106: 23,3606           04713                           TC       USPRCADR                              
052679,000107: 23,3607           01531                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
052680,000108: 23,3610           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
052681,000109: 23,3611           52155                           DXCH     MPAC                                  
052682,000110: 23,3612           50143                           INDEX    TEM3                                  
052683,000111: 23,3613           52736                           DXCH     SINCDU                                
052684,000112: 23,3614           10143                           CCS      TEM3                                  
052685,000113: 23,3615           13562                           TCF      TR*GL**P                              
052686,000114: 23,3616           00142                           TC       TEM2                                  

Page 1253

052688,000116:                                                                                                  #  ****************************************************************************************************************
052689,000117:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
052690,000118:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
052691,000119:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
052692,000120:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;  THIS IS 10 TIMES AS FAST AS CD*TR*GS.  QUICTRIG MAY BE
052693,000121:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
052694,000122: 
052695,000123: 23,3617           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
052696,000124: 23,3620           00006                           EXTEND                                         
052697,000125: 23,3621           22061                           QXCH     ITEMP1                                
052698,000126: 23,3622           34751                           CAF      FOUR                                  
052699,000127: 23,3623           76245                 +4        MASK     SIX                                   
052700,000128: 23,3624           54062                           TS       ITEMP2                                
052701,000129: 23,3625           50062                           INDEX    ITEMP2                                
052702,000130: 23,3626           30765                           CA       CDUSPOT                               
052703,000131: 23,3627           05033                           TC       SPSIN                                 
052704,000132: 23,3630           00006                           EXTEND                                         
052705,000133: 23,3631           74736                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
052706,000134: 23,3632           50062                           INDEX    ITEMP2                                
052707,000135: 23,3633           52736                           DXCH     SINCDU                                
052708,000136: 23,3634           50062                           INDEX    ITEMP2                                
052709,000137: 23,3635           30765                           CA       CDUSPOT                               
052710,000138: 23,3636           05032                           TC       SPCOS                                 
052711,000139: 23,3637           00006                           EXTEND                                         
052712,000140: 23,3640           74736                           MP       BIT14                                 
052713,000141: 23,3641           50062                           INDEX    ITEMP2                                
052714,000142: 23,3642           52744                           DXCH     COSCDU                                
052715,000143: 23,3643           10062                           CCS      ITEMP2                                
052716,000144: 23,3644           13623                           TCF      QUICTRIG   +4                         
052717,000145: 23,3645           30061                           CA       ITEMP1                                
052718,000146: 23,3646           00003                           RELINT                                         
052719,000147: 23,3647           00000                           TC       A                                     
052720,000148: 

Page 1254

052722,000150:                                                                                                  #  ****************************************************************************************************************
052723,000151:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
052724,000152:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
052725,000153: 
052726,000154:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
052727,000155:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
052728,000156:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
052729,000157:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
052730,000158: 
052731,000159:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
052732,000160:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
052733,000161:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
052734,000162:                                                                                                  #  MATION; TRG*SMNB, VICE VERSA.
052735,000163: 
052736,000164:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
052737,000165:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
052738,000166: 
052739,000167:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
052740,000168: 
052741,000169: 23,3650           77776        CDU*SMNB           EXIT                                           
052742,000170: 23,3651           03551                           TC       CDUTRIGS                              
052743,000171: 23,3652           13655                           TCF      C*MM*N1                               
052744,000172: 
052745,000173: 23,3653           77776        TRG*SMNB           EXIT                                           
052746,000174: 23,3654           03557                           TC       CD*TR*GS                              
052747,000175: 23,3655           07535        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
052748,000176: 23,3656           46250                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
052749,000177: 23,3657           03677        C*MM*N2            TC       AX*SR*T                               
052750,000178: 23,3660           06042                           TC       INTPRET                               
052751,000179: 23,3661           43575                           VLOAD    RVQ                                   
052752,000180: 23,3662           00123                                    VBUF                                  
052753,000181: 
052754,000182: 23,3663           77776        CDU*NBSM           EXIT                                           
052755,000183: 23,3664           03551                           TC       CDUTRIGS                              
052756,000184: 23,3665           13670                           TCF      C*MM*N3                               
052757,000185: 
052758,000186: 23,3666           77776        TRG*NBSM           EXIT                                           
052759,000187: 23,3667           03557                           TC       CD*TR*GS                              
052760,000188: 23,3670           07535        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
052761,000189: 23,3671           36250                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
052762,000190: 23,3672           13657                           TCF      C*MM*N2                               
052763,000191: 
052764,000192:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
052765,000193:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
052766,000194:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
052767,000195: 
052768,000196:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
052769,000197:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM

Page 1255

052771,000199:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
052772,000200:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
052773,000201: 
052774,000202: 23,3673           77776        *SMNB*             EXIT                                           
052775,000203: 23,3674           13655                           TCF      C*MM*N1                               
052776,000204: 
052777,000205: 23,3675           77776        *NBSM*             EXIT                                           
052778,000206: 23,3676           13670                           TCF      C*MM*N3                               
052779,000207: 
052780,000208:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
052781,000209:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
052782,000210:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
052783,000211:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
052784,000212:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
052785,000213:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
052786,000214:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
052787,000215:                                                                                                  #                TC      CDUTRIGS
052788,000216:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
052789,000217:                                                                                                  #                TC      AX*SR*T
052790,000218:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
052791,000219:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
052792,000220: 
052793,000221:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
052794,000222:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
052795,000223:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
052796,000224:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
052797,000225: 
052798,000226: 23,3677           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
052799,000227: 23,3700           00006                           EXTEND                                         
052800,000228: 23,3701           22145                           QXCH     RTNSAVER                              
052801,000229: 
052802,000230: 23,3702           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
052803,000231: 23,3703           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
052804,000232: 23,3704           66250                           AD       THREE                                 #                +1 --> 2        -1 --> 0
052805,000233: 23,3705           00006                           EXTEND                                         
052806,000234: 23,3706           50000                           INDEX    A                                     
052807,000235: 23,3707           33766                           DCA      INDEXI                                
052808,000236: 23,3710           52144                           DXCH     DEXI                                  
052809,000237: 
052810,000238: 23,3711           34753                           CA       ONE                                   
052811,000239: 23,3712           54130                           TS       BUF                                   
052812,000240: 23,3713           00006                           EXTEND                                         
052813,000241: 23,3714           50143                           INDEX    DEX1                                  
052814,000242: 23,3715           40123                           DCS      VBUF                                  
052815,000243: 23,3716           13720                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
052816,000244: 
052817,000245: 23,3717           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX

Page 1256

052819,000247: 23,3720           52155        LOOP1              DXCH     MPAC                                  
052820,000248: 23,3721           33764                           CA       SINSLOC                               
052821,000249: 23,3722           60143                           AD       DEX1                                  
052822,000250: 23,3723           54116                           TS       ADDRWD                                
052823,000251: 
052824,000252: 23,3724           07112                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
052825,000253: 23,3725           10142                           CCS      DEXDEX                                
052826,000254: 23,3726           52155                           DXCH     MPAC                                  #  NBSM CASE
052827,000255: 23,3727           13732                           TCF      +3                                    
052828,000256: 23,3730           00006                           EXTEND                                         #  SMNB CASE
052829,000257: 23,3731           40155                           DCS      MPAC                                  
052830,000258: 23,3732           52160                           DXCH     TERM1TMP                              
052831,000259: 
052832,000260: 23,3733           36245                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
052833,000261: 23,3734           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
052834,000262: 
052835,000263: 23,3735           00006                           EXTEND                                         
052836,000264: 23,3736           50130                           INDEX    BUF                                   
052837,000265: 23,3737           50143                           INDEX    DEX1                                  
052838,000266: 23,3740           30123                           DCA      VBUF                                  
052839,000267: 23,3741           52155                           DXCH     MPAC                                  
052840,000268: 23,3742           07112                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
052841,000269: 23,3743           52155                           DXCH     MPAC                                  
052842,000270: 23,3744           20160                           DAS      TERM1TMP                              
052843,000271: 23,3745           52160                           DXCH     TERM1TMP                              
052844,000272: 23,3746           20001                           DDOUBL                                         
052845,000273: 23,3747           50130                           INDEX    BUF                                   
052846,000274: 23,3750           50143                           INDEX    DEX1                                  
052847,000275: 23,3751           52123                           DXCH     VBUF                                  
052848,000276: 23,3752           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
052849,000277: 23,3753           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
052850,000278: 23,3754           13717                           TCF      LOOP2                                 
052851,000279: 
052852,000280: 23,3755           00006                           EXTEND                                         
052853,000281: 23,3756           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
052854,000282: 
052855,000283: 23,3757           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
052856,000284: 23,3760           13702                           TCF      R*TL**P                               
052857,000285: 23,3761           00145                           TC       RTNSAVER                              
052858,000286: 23,3762           13702                           TCF      R*TL**P                               
052859,000287: 23,3763           00145                           TC       RTNSAVER                              
052860,000288: 
052861,000289: 23,3764           00735        SINSLOC            ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
052862,000290: 
052863,000291: 23,3765           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
052864,000292: 23,3766           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
052865,000293: 23,3767           00000                           DEC      0          B-14                       #  **********   THESE   **********

Page 1257

052867,000295: 23,3770           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
052868,000296: 
052869,000297:                                                                                                  #  ****************************************************************************************************************
052870,000298: 
052871,000299: 10,2030                                           BANK     10                                    
052872,000300: 10,2000                                           SETLOC   FLESHLOC                              
052873,000301: 10,2000                                           BANK                                           
052874,000302: 10,2030                                           COUNT*   $$/POWFL                              
052875,000303: 
052876,000304:                                                                                                  #  ROUTINE FLESHPOT COMPUTES THE BODY-STABLE MEMBER TRANSFORMATION MATRIX (COMMONLY CALLED XNB) AND STORES
052877,000305:                                                                                                  #  IT IN THE LOCATIONS SPECIFIED BY THE ECADR ENTERING IN A.
052878,000306: 
052879,000307: 10,2030           77776        CALCSMSC           EXIT                                           
052880,000308: 10,2031           04616                           TC       BANKCALL                              
052881,000309: 10,2032           20036                           CADR     FLESHPOT   -1                         
052882,000310: 10,2033           06042                           TC       INTPRET                               
052883,000311: 10,2034           77616                           RVQ                                            
052884,000312: 
052885,000313: 10,2035           02664        XNBECADR           ECADR    XNB                                   
052886,000314: 
052887,000315: 10,2036           32035                 -1        CAF      XNBECADR                              
052888,000316: 
052889,000317: 10,2037           54142        FLESHPOT           TS       TEM2                                  
052890,000318: 10,2040           56003                           XCH      EBANK                                 
052891,000319: 10,2041           56142                           XCH      TEM2                                  
052892,000320: 10,2042           74357                           MASK     LOW8                                  
052893,000321: 10,2043           65007                           AD       OCT1400                               
052894,000322: 10,2044           54141                           TS       TEM1                                  
052895,000323: 
052896,000324: 10,2045           00006                           EXTEND                                         
052897,000325: 10,2046           30744                           DCA      COSCDUY                               
052898,000326: 10,2047           52155                           DXCH     MPAC                                  
052899,000327: 10,2050           07106                           TC       DMP                                   
052900,000328: 10,2051           00745                           ADRES    COSCDUZ                               
052901,000329: 10,2052           52155                           DXCH     MPAC                                  
052902,000330: 10,2053           20001                           DDOUBL                                         
052903,000331: 10,2054           50141                           INDEX    TEM1                                  
052904,000332: 10,2055           52001                           DXCH     0                                     #  = COSY COSZ
052905,000333: 
052906,000334: 10,2056           00006                           EXTEND                                         
052907,000335: 10,2057           30740                           DCA      SINCDUZ                               
052908,000336: 10,2060           50141                           INDEX    TEM1                                  
052909,000337: 10,2061           52003                           DXCH     2                                     #  = SINZ
052910,000338: 
052911,000339: 10,2062           00006                           EXTEND                                         
052912,000340: 10,2063           40736                           DCS      SINCDUY                               
052913,000341: 10,2064           52155                           DXCH     MPAC                                  
052914,000342: 10,2065           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ

Page 1258

052916,000344: 10,2066           52155                           DXCH     MPAC                                  
052917,000345: 10,2067           20001                           DDOUBL                                         
052918,000346: 10,2070           50141                           INDEX    TEM1                                  
052919,000347: 10,2071           52005                           DXCH     4                                     #  = - SINY COSZ
052920,000348: 
052921,000349: 10,2072           00006                           EXTEND                                         
052922,000350: 10,2073           40742                           DCS      SINCDUX                               
052923,000351: 10,2074           52155                           DXCH     MPAC                                  
052924,000352: 10,2075           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ STILL
052925,000353: 10,2076           52155                           DXCH     MPAC                                  
052926,000354: 10,2077           20001                           DDOUBL                                         
052927,000355: 10,2100           52160                           DXCH     MPAC       +3                         
052928,000356: 
052929,000357: 10,2101           00006                           EXTEND                                         
052930,000358: 10,2102           40742                           DCS      SINCDUX                               
052931,000359: 10,2103           52155                           DXCH     MPAC                                  
052932,000360: 10,2104           07106                           TC       DMP                                   
052933,000361: 10,2105           00737                           ADRES    SINCDUZ                               
052934,000362: 10,2106           00006                           EXTEND                                         
052935,000363: 10,2107           40155                           DCS      MPAC                                  
052936,000364: 10,2110           52162                           DXCH     MPAC       +5                         
052937,000365: 10,2111           07106                           TC       DMP                                   
052938,000366: 10,2112           00735                           ADRES    SINCDUY                               
052939,000367: 10,2113           52155                           DXCH     MPAC                                  
052940,000368: 10,2114           20001                           DDOUBL                                         
052941,000369: 10,2115           20001                           DDOUBL                                         
052942,000370: 10,2116           52162                           DXCH     MPAC       +5                         
052943,000371: 
052944,000372: 10,2117           52155                           DXCH     MPAC                                  
052945,000373: 10,2120           07106                           TC       DMP                                   
052946,000374: 10,2121           00743                           ADRES    COSCDUY                               
052947,000375: 10,2122           52155                           DXCH     MPAC                                  
052948,000376: 10,2123           20001                           DDOUBL                                         
052949,000377: 10,2124           20001                           DDOUBL                                         
052950,000378: 10,2125           52131                           DXCH     BUF                                   
052951,000379: 
052952,000380: 10,2126           00006                           EXTEND                                         
052953,000381: 10,2127           30744                           DCA      COSCDUY                               
052954,000382: 10,2130           52155                           DXCH     MPAC                                  
052955,000383: 10,2131           07106                           TC       DMP                                   
052956,000384: 10,2132           00747                           ADRES    COSCDUX                               
052957,000385: 10,2133           52155                           DXCH     MPAC                                  
052958,000386: 10,2134           20001                           DDOUBL                                         
052959,000387: 10,2135           20162                           DAS      MPAC       +5                         
052960,000388: 
052961,000389: 10,2136           00006                           EXTEND                                         
052962,000390: 10,2137           30736                           DCA      SINCDUY                               
052963,000391: 10,2140           52155                           DXCH     MPAC                                  
052964,000392: 10,2141           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUX
052965,000393: 10,2142           52155                           DXCH     MPAC                                  
052966,000394: 

Page 1259

052968,000396: 10,2143           20001                           DDOUBL                                         
052969,000397: 10,2144           20131                           DAS      BUF                                   
052970,000398: 
052971,000399: 10,2145           52131                           DXCH     BUF                                   
052972,000400: 10,2146           52155                           DXCH     MPAC                                  
052973,000401: 
052974,000402: 10,2147           00006                           EXTEND                                         
052975,000403: 10,2150           30155                           DCA      MPAC                                  
052976,000404: 10,2151           50141                           INDEX    TEM1                                  
052977,000405: 10,2152           52015                           DXCH     14                                    #  = SINY COSX + SINX SINZ COSY
052978,000406: 
052979,000407: 10,2153           00006                           EXTEND                                         
052980,000408: 10,2154           30160                           DCA      MPAC       +3                         
052981,000409: 10,2155           50141                           INDEX    TEM1                                  
052982,000410: 10,2156           52017                           DXCH     16                                    #  = - SINX COSZ
052983,000411: 
052984,000412: 10,2157           00006                           EXTEND                                         
052985,000413: 10,2160           30162                           DCA      MPAC       +5                         
052986,000414: 10,2161           50141                           INDEX    TEM1                                  
052987,000415: 10,2162           52021                           DXCH     20                                    #  = COSX COSY - SINX SINY SINZ
052988,000416: 
052989,000417: 10,2163           30141                           CA       TEM1                                  
052990,000418: 10,2164           54116                           TS       ADDRWD                                
052991,000419: 10,2165           00006                           EXTEND                                         
052992,000420: 10,2166           30006                           DCA      Z                                     
052993,000421: 10,2167           64751                           AD       FOUR                                  
052994,000422: 10,2170           52165                           DXCH     LOC                                   
052995,000423: 10,2171           34744                           CAF      BIT8                                  
052996,000424: 10,2172           54023                           TS       EDOP                                  
052997,000425: 10,2173           17463                           TCF      VXV                                   
052998,000426: 10,2174           52155                           DXCH     MPAC                                  
052999,000427: 10,2175           20001                           DDOUBL                                         
053000,000428: 10,2176           50141                           INDEX    TEM1                                  
053001,000429: 10,2177           52007                           DXCH     6                                     
053002,000430: 
053003,000431: 10,2200           52160                           DXCH     MPAC       +3                         
053004,000432: 10,2201           20001                           DDOUBL                                         
053005,000433: 10,2202           50141                           INDEX    TEM1                                  
053006,000434: 10,2203           52011                           DXCH     10                                    
053007,000435: 
053008,000436: 10,2204           52162                           DXCH     MPAC       +5                         
053009,000437: 10,2205           20001                           DDOUBL                                         
053010,000438: 10,2206           50141                           INDEX    TEM1                                  
053011,000439: 10,2207           52013                           DXCH     12                                    
053012,000440: 
053013,000441: 10,2210           30142                           CA       TEM2                                  
053014,000442: 10,2211           54003                           TS       EBANK                                 
053015,000443: 10,2212           14631                           TCF      SWRETURN                              
053016,000444: 

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