Source Code

These source-code files are part of a reconstructed copy of Luminary 96, the original release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 96 listing.

Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

052659,000002:                                                                                                  ## Copyright:   Public domain.
052660,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
052661,000004:                                                                                                  ## Purpose:     A section of Luminary revision 96.
052662,000005:                                                                                                  ##              It is part of the reconstructed source code for the
052663,000006:                                                                                                  ##              original release of the flight software for the Lunar 
052664,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
052665,000008:                                                                                                  ##              The code has been recreated from a previously reconstructed
052666,000009:                                                                                                  ##              copy of Luminary 97 by undoing changes described in anomaly
052667,000010:                                                                                                  ##              report LNY-59. The code has been adapted such that the
052668,000011:                                                                                                  ##              resulting bugger words exactly match those specified for
052669,000012:                                                                                                  ##              Luminary 96 in NASA drawing 2021152D, which gives relatively
052670,000013:                                                                                                  ##              high confidence that the reconstruction is correct.
052671,000014:                                                                                                  ## Reference:   pp. 1259-1267
052672,000015:                                                                                                  ## Assembler:   yaYUL
052673,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
052674,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
052675,000018:                                                                                                  ## Mod history: 2019-08-04 MAS  Created from Luminary 97.
052676,000019: 

Page 1259

052678,000021: 14,3774                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
052679,000022: 23,2000                                           SETLOC   POWFLITE                              
052680,000023: 23,2000                                           BANK                                           
052681,000024: 
052682,000025: 23,3537     0142                                  EBANK=   DEXDEX                                
052683,000026: 23,3537                                           COUNT*   $$/POWFL                              
052684,000027: 
052685,000028:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
052686,000029:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
052687,000030:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
052688,000031:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
052689,000032:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
052690,000033:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
052691,000034:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
052692,000035: 
052693,000036:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
052694,000037:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
052695,000038:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
052696,000039:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
052697,000040: 
052698,000041:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
052699,000042: 
052700,000043:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
052701,000044:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
052702,000045:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
052703,000046:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
052704,000047:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
052705,000048:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
052706,000049:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
052707,000050:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
052708,000051:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
052709,000052:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
052710,000053: 
052711,000054:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
052712,000055:                                                                                                  #  INTERPRETIVE.
052713,000056: 
052714,000057: 23,3537           77776        CDUTRIG            EXIT                                           
052715,000058: 23,3540           03547                           TC       CDUTRIGS                              
052716,000059: 23,3541           06037                           TC       INTPRET                               
052717,000060: 23,3542           77616                           RVQ                                            
052718,000061: 
052719,000062: 23,3543           77776        CD*TR*G            EXIT                                           
052720,000063: 23,3544           03555                           TC       CD*TR*GS                              
052721,000064: 23,3545           06037                           TC       INTPRET                               
052722,000065: 23,3546           77616                           RVQ                                            
052723,000066: 
052724,000067: 23,3547           30032        CDUTRIGS           CA       CDUX                                  
052725,000068: 23,3550           54772                           TS       CDUSPOT    +4                         
052726,000069: 23,3551           30033                           CA       CDUY                                  
052727,000070: 23,3552           54766                           TS       CDUSPOT                               

Page 1260

052729,000072: 23,3553           30034                           CA       CDUZ                                  
052730,000073: 23,3554           54770                           TS       CDUSPOT    +2                         
052731,000074: 
052732,000075: 23,3555           00006        CD*TR*GS           EXTEND                                         
052733,000076: 23,3556           22142                           QXCH     TEM2                                  
052734,000077: 23,3557           34751                           CAF      FOUR                                  
052735,000078: 23,3560           76242        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
052736,000079: 23,3561           54143                           TS       TEM3                                  
052737,000080: 23,3562           50143                           INDEX    TEM3                                  
052738,000081: 23,3563           30766                           CA       CDUSPOT                               
052739,000082: 23,3564           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
052740,000083: 23,3565           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
052741,000084: 23,3566           04713                           TC       USPRCADR                              
052742,000085: 23,3567           21576                           CADR     CDULOGIC                              
052743,000086: 23,3570           00006                           EXTEND                                         
052744,000087: 23,3571           30155                           DCA      MPAC                                  
052745,000088: 23,3572           50143                           INDEX    TEM3                                  
052746,000089: 23,3573           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
052747,000090: 23,3574           04713                           TC       USPRCADR                              
052748,000091: 23,3575           01517                           CADR     COSINE                                
052749,000092: 23,3576           52155                           DXCH     MPAC                                  
052750,000093: 23,3577           50143                           INDEX    TEM3                                  
052751,000094: 23,3600           52745                           DXCH     COSCDU                                #  STORING COSINE
052752,000095: 23,3601           00006                           EXTEND                                         
052753,000096: 23,3602           50143                           INDEX    TEM3                                  
052754,000097: 23,3603           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
052755,000098: 23,3604           04713                           TC       USPRCADR                              
052756,000099: 23,3605           01531                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
052757,000100: 23,3606           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
052758,000101: 23,3607           52155                           DXCH     MPAC                                  
052759,000102: 23,3610           50143                           INDEX    TEM3                                  
052760,000103: 23,3611           52737                           DXCH     SINCDU                                
052761,000104: 23,3612           10143                           CCS      TEM3                                  
052762,000105: 23,3613           13560                           TCF      TR*GL**P                              
052763,000106: 23,3614           00142                           TC       TEM2                                  

Page 1261

052765,000108:                                                                                                  #  ****************************************************************************************************************
052766,000109:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
052767,000110:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
052768,000111:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
052769,000112:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;  THIS IS 10 TIMES AS FAST AS CD*TR*GS.  QUICTRIG MAY BE
052770,000113:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
052771,000114: 
052772,000115: 23,3615           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
052773,000116: 23,3616           00006                           EXTEND                                         
052774,000117: 23,3617           22061                           QXCH     ITEMP1                                
052775,000118: 23,3620           34751                           CAF      FOUR                                  
052776,000119: 23,3621           76242                 +4        MASK     SIX                                   
052777,000120: 23,3622           54062                           TS       ITEMP2                                
052778,000121: 23,3623           50062                           INDEX    ITEMP2                                
052779,000122: 23,3624           30766                           CA       CDUSPOT                               
052780,000123: 23,3625           05033                           TC       SPSIN                                 
052781,000124: 23,3626           00006                           EXTEND                                         
052782,000125: 23,3627           74736                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
052783,000126: 23,3630           50062                           INDEX    ITEMP2                                
052784,000127: 23,3631           52737                           DXCH     SINCDU                                
052785,000128: 23,3632           50062                           INDEX    ITEMP2                                
052786,000129: 23,3633           30766                           CA       CDUSPOT                               
052787,000130: 23,3634           05032                           TC       SPCOS                                 
052788,000131: 23,3635           00006                           EXTEND                                         
052789,000132: 23,3636           74736                           MP       BIT14                                 
052790,000133: 23,3637           50062                           INDEX    ITEMP2                                
052791,000134: 23,3640           52745                           DXCH     COSCDU                                
052792,000135: 23,3641           10062                           CCS      ITEMP2                                
052793,000136: 23,3642           13621                           TCF      QUICTRIG   +4                         
052794,000137: 23,3643           30061                           CA       ITEMP1                                
052795,000138: 23,3644           00003                           RELINT                                         
052796,000139: 23,3645           00000                           TC       A                                     
052797,000140: 

Page 1262

052799,000142:                                                                                                  #  ****************************************************************************************************************
052800,000143:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
052801,000144:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
052802,000145: 
052803,000146:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
052804,000147:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
052805,000148:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
052806,000149:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
052807,000150: 
052808,000151:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
052809,000152:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
052810,000153:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
052811,000154:                                                                                                  #  MATION;  TRG*SMNB, VICE VERSA.
052812,000155: 
052813,000156:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
052814,000157:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
052815,000158: 
052816,000159:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
052817,000160: 
052818,000161: 23,3646           77776        CDU*SMNB           EXIT                                           
052819,000162: 23,3647           03547                           TC       CDUTRIGS                              
052820,000163: 23,3650           13653                           TCF      C*MM*N1                               
052821,000164: 
052822,000165: 23,3651           77776        TRG*SMNB           EXIT                                           
052823,000166: 23,3652           03555                           TC       CD*TR*GS                              
052824,000167: 23,3653           07532        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
052825,000168: 23,3654           46245                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
052826,000169: 23,3655           03675        C*MM*N2            TC       AX*SR*T                               
052827,000170: 23,3656           06037                           TC       INTPRET                               
052828,000171: 23,3657           43575                           VLOAD    RVQ                                   
052829,000172: 23,3660           00123                                    VBUF                                  
052830,000173: 
052831,000174: 23,3661           77776        CDU*NBSM           EXIT                                           
052832,000175: 23,3662           03547                           TC       CDUTRIGS                              
052833,000176: 23,3663           13666                           TCF      C*MM*N3                               
052834,000177: 
052835,000178: 23,3664           77776        TRG*NBSM           EXIT                                           
052836,000179: 23,3665           03555                           TC       CD*TR*GS                              
052837,000180: 23,3666           07532        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
052838,000181: 23,3667           36245                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
052839,000182: 23,3670           13655                           TCF      C*MM*N2                               
052840,000183: 
052841,000184:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
052842,000185:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
052843,000186:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
052844,000187: 
052845,000188:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
052846,000189:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM

Page 1263

052848,000191:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
052849,000192:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
052850,000193: 
052851,000194: 23,3671           77776        *SMNB*             EXIT                                           
052852,000195: 23,3672           13653                           TCF      C*MM*N1                               
052853,000196: 
052854,000197: 23,3673           77776        *NBSM*             EXIT                                           
052855,000198: 23,3674           13666                           TCF      C*MM*N3                               
052856,000199: 
052857,000200:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
052858,000201:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
052859,000202:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
052860,000203:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
052861,000204:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
052862,000205:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
052863,000206:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
052864,000207:                                                                                                  #                TC      CDUTRIGS
052865,000208:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
052866,000209:                                                                                                  #                TC      AX*SR*T
052867,000210:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
052868,000211:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
052869,000212: 
052870,000213:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
052871,000214:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
052872,000215:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
052873,000216:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
052874,000217: 
052875,000218: 23,3675           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
052876,000219: 23,3676           00006                           EXTEND                                         
052877,000220: 23,3677           22145                           QXCH     RTNSAVER                              
052878,000221: 
052879,000222: 23,3700           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
052880,000223: 23,3701           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
052881,000224: 23,3702           66245                           AD       THREE                                 #                +1 --> 2        -1 --> 0
052882,000225: 23,3703           00006                           EXTEND                                         
052883,000226: 23,3704           50000                           INDEX    A                                     
052884,000227: 23,3705           33764                           DCA      INDEXI                                
052885,000228: 23,3706           52144                           DXCH     DEXI                                  
052886,000229: 
052887,000230: 23,3707           34753                           CA       ONE                                   
052888,000231: 23,3710           54130                           TS       BUF                                   
052889,000232: 23,3711           00006                           EXTEND                                         
052890,000233: 23,3712           50143                           INDEX    DEX1                                  
052891,000234: 23,3713           40123                           DCS      VBUF                                  
052892,000235: 23,3714           13716                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
052893,000236: 
052894,000237: 23,3715           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX

Page 1264

052896,000239: 23,3716           52155        LOOP1              DXCH     MPAC                                  
052897,000240: 23,3717           33762                           CA       SINSLOC                               
052898,000241: 23,3720           60143                           AD       DEX1                                  
052899,000242: 23,3721           54116                           TS       ADDRWD                                
052900,000243: 
052901,000244: 23,3722           07107                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
052902,000245: 23,3723           10142                           CCS      DEXDEX                                
052903,000246: 23,3724           52155                           DXCH     MPAC                                  #  NBSM CASE
052904,000247: 23,3725           13730                           TCF      +3                                    
052905,000248: 23,3726           00006                           EXTEND                                         #  SMNB CASE
052906,000249: 23,3727           40155                           DCS      MPAC                                  
052907,000250: 23,3730           52160                           DXCH     TERM1TMP                              
052908,000251: 
052909,000252: 23,3731           36242                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
052910,000253: 23,3732           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
052911,000254: 
052912,000255: 23,3733           00006                           EXTEND                                         
052913,000256: 23,3734           50130                           INDEX    BUF                                   
052914,000257: 23,3735           50143                           INDEX    DEX1                                  
052915,000258: 23,3736           30123                           DCA      VBUF                                  
052916,000259: 23,3737           52155                           DXCH     MPAC                                  
052917,000260: 23,3740           07107                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
052918,000261: 23,3741           52155                           DXCH     MPAC                                  
052919,000262: 23,3742           20160                           DAS      TERM1TMP                              
052920,000263: 23,3743           52160                           DXCH     TERM1TMP                              
052921,000264: 23,3744           20001                           DDOUBL                                         
052922,000265: 23,3745           50130                           INDEX    BUF                                   
052923,000266: 23,3746           50143                           INDEX    DEX1                                  
052924,000267: 23,3747           52123                           DXCH     VBUF                                  
052925,000268: 23,3750           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
052926,000269: 
052927,000270: 23,3751           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
052928,000271: 23,3752           13715                           TCF      LOOP2                                 
052929,000272: 
052930,000273: 23,3753           00006                           EXTEND                                         
052931,000274: 23,3754           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
052932,000275: 
052933,000276: 23,3755           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
052934,000277: 23,3756           13700                           TCF      R*TL**P                               
052935,000278: 23,3757           00145                           TC       RTNSAVER                              
052936,000279: 23,3760           13700                           TCF      R*TL**P                               
052937,000280: 23,3761           00145                           TC       RTNSAVER                              
052938,000281: 
052939,000282: 23,3762           00736        SINSLOC            ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
052940,000283: 
052941,000284: 23,3763           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
052942,000285: 23,3764           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
052943,000286: 23,3765           00000                           DEC      0          B-14                       #  **********   THESE   **********

Page 1265

052945,000288: 23,3766           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
052946,000289: 
052947,000290:                                                                                                  #  ****************************************************************************************************************
052948,000291: 
052949,000292: 10,2030                                           BANK     10                                    
052950,000293: 10,2000                                           SETLOC   FLESHLOC                              
052951,000294: 10,2000                                           BANK                                           
052952,000295: 10,2030                                           COUNT*   $$/POWFL                              
052953,000296: 
052954,000297:                                                                                                  #  ROUTINE FLESHPOT COMPUTES THE BODY-STABLE MEMBER TRANSFORMATION MATRIX (COMMONLY CALLED XNB) AND STORES
052955,000298:                                                                                                  #  IT IN THE LOCATIONS SPECIFIED BY THE ECADR ENTERING IN A.
052956,000299: 
052957,000300: 10,2030           77776        CALCSMSC           EXIT                                           
052958,000301: 10,2031           04616                           TC       BANKCALL                              
052959,000302: 10,2032           20036                           CADR     FLESHPOT   -1                         
052960,000303: 10,2033           06037                           TC       INTPRET                               
052961,000304: 10,2034           77616                           RVQ                                            
052962,000305: 
052963,000306: 10,2035           02664        XNBECADR           ECADR    XNB                                   
052964,000307: 
052965,000308: 10,2036           32035                 -1        CAF      XNBECADR                              
052966,000309: 
052967,000310: 10,2037           54142        FLESHPOT           TS       TEM2                                  
052968,000311: 10,2040           56003                           XCH      EBANK                                 
052969,000312: 10,2041           56142                           XCH      TEM2                                  
052970,000313: 10,2042           74357                           MASK     LOW8                                  
052971,000314: 10,2043           65007                           AD       OCT1400                               
052972,000315: 10,2044           54141                           TS       TEM1                                  
052973,000316: 
052974,000317: 10,2045           00006                           EXTEND                                         
052975,000318: 10,2046           30745                           DCA      COSCDUY                               
052976,000319: 10,2047           52155                           DXCH     MPAC                                  
052977,000320: 10,2050           07103                           TC       DMP                                   
052978,000321: 10,2051           00746                           ADRES    COSCDUZ                               
052979,000322: 10,2052           52155                           DXCH     MPAC                                  
052980,000323: 10,2053           20001                           DDOUBL                                         
052981,000324: 10,2054           50141                           INDEX    TEM1                                  
052982,000325: 10,2055           52001                           DXCH     0                                     #  = COSY COSZ
052983,000326: 
052984,000327: 10,2056           00006                           EXTEND                                         
052985,000328: 10,2057           30741                           DCA      SINCDUZ                               
052986,000329: 10,2060           50141                           INDEX    TEM1                                  
052987,000330: 10,2061           52003                           DXCH     2                                     #  = SINZ
052988,000331: 
052989,000332: 10,2062           00006                           EXTEND                                         
052990,000333: 10,2063           40737                           DCS      SINCDUY                               
052991,000334: 10,2064           52155                           DXCH     MPAC                                  
052992,000335: 10,2065           07107                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ

Page 1266

052994,000337: 10,2066           52155                           DXCH     MPAC                                  
052995,000338: 10,2067           20001                           DDOUBL                                         
052996,000339: 10,2070           50141                           INDEX    TEM1                                  
052997,000340: 10,2071           52005                           DXCH     4                                     #  = - SINY COSZ
052998,000341: 
052999,000342: 10,2072           00006                           EXTEND                                         
053000,000343: 10,2073           40743                           DCS      SINCDUX                               
053001,000344: 10,2074           52155                           DXCH     MPAC                                  
053002,000345: 10,2075           07107                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ STILL
053003,000346: 10,2076           52155                           DXCH     MPAC                                  
053004,000347: 10,2077           20001                           DDOUBL                                         
053005,000348: 10,2100           52160                           DXCH     MPAC       +3                         
053006,000349: 
053007,000350: 10,2101           00006                           EXTEND                                         
053008,000351: 10,2102           40743                           DCS      SINCDUX                               
053009,000352: 10,2103           52155                           DXCH     MPAC                                  
053010,000353: 10,2104           07103                           TC       DMP                                   
053011,000354: 10,2105           00740                           ADRES    SINCDUZ                               
053012,000355: 10,2106           00006                           EXTEND                                         
053013,000356: 10,2107           40155                           DCS      MPAC                                  
053014,000357: 10,2110           52162                           DXCH     MPAC       +5                         
053015,000358: 10,2111           07103                           TC       DMP                                   
053016,000359: 10,2112           00736                           ADRES    SINCDUY                               
053017,000360: 10,2113           52155                           DXCH     MPAC                                  
053018,000361: 10,2114           20001                           DDOUBL                                         
053019,000362: 10,2115           20001                           DDOUBL                                         
053020,000363: 10,2116           52162                           DXCH     MPAC       +5                         
053021,000364: 
053022,000365: 10,2117           52155                           DXCH     MPAC                                  
053023,000366: 10,2120           07103                           TC       DMP                                   
053024,000367: 10,2121           00744                           ADRES    COSCDUY                               
053025,000368: 10,2122           52155                           DXCH     MPAC                                  
053026,000369: 10,2123           20001                           DDOUBL                                         
053027,000370: 10,2124           20001                           DDOUBL                                         
053028,000371: 10,2125           52131                           DXCH     BUF                                   
053029,000372: 
053030,000373: 10,2126           00006                           EXTEND                                         
053031,000374: 10,2127           30745                           DCA      COSCDUY                               
053032,000375: 10,2130           52155                           DXCH     MPAC                                  
053033,000376: 10,2131           07103                           TC       DMP                                   
053034,000377: 10,2132           00750                           ADRES    COSCDUX                               
053035,000378: 10,2133           52155                           DXCH     MPAC                                  
053036,000379: 10,2134           20001                           DDOUBL                                         
053037,000380: 10,2135           20162                           DAS      MPAC       +5                         
053038,000381: 
053039,000382: 10,2136           00006                           EXTEND                                         
053040,000383: 10,2137           30737                           DCA      SINCDUY                               
053041,000384: 10,2140           52155                           DXCH     MPAC                                  
053042,000385: 10,2141           07107                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUX
053043,000386: 10,2142           52155                           DXCH     MPAC                                  
053044,000387: 

Page 1267

053046,000389: 10,2143           20001                           DDOUBL                                         
053047,000390: 10,2144           20131                           DAS      BUF                                   
053048,000391: 
053049,000392: 10,2145           52131                           DXCH     BUF                                   
053050,000393: 10,2146           52155                           DXCH     MPAC                                  
053051,000394: 
053052,000395: 10,2147           00006                           EXTEND                                         
053053,000396: 10,2150           30155                           DCA      MPAC                                  
053054,000397: 10,2151           50141                           INDEX    TEM1                                  
053055,000398: 10,2152           52015                           DXCH     14                                    #  = SINY COSX + SINX SINZ COSY
053056,000399: 
053057,000400: 10,2153           00006                           EXTEND                                         
053058,000401: 10,2154           30160                           DCA      MPAC       +3                         
053059,000402: 10,2155           50141                           INDEX    TEM1                                  
053060,000403: 10,2156           52017                           DXCH     16                                    #  = - SINX COSZ
053061,000404: 
053062,000405: 10,2157           00006                           EXTEND                                         
053063,000406: 10,2160           30162                           DCA      MPAC       +5                         
053064,000407: 10,2161           50141                           INDEX    TEM1                                  
053065,000408: 10,2162           52021                           DXCH     20                                    #  = COSX COSY - SINX SINY SINZ
053066,000409: 
053067,000410: 10,2163           30141                           CA       TEM1                                  
053068,000411: 10,2164           54116                           TS       ADDRWD                                
053069,000412: 10,2165           00006                           EXTEND                                         
053070,000413: 10,2166           30006                           DCA      Z                                     
053071,000414: 10,2167           64751                           AD       FOUR                                  
053072,000415: 10,2170           52165                           DXCH     LOC                                   
053073,000416: 10,2171           34744                           CAF      BIT8                                  
053074,000417: 10,2172           54023                           TS       EDOP                                  
053075,000418: 10,2173           17460                           TCF      VXV                                   
053076,000419: 10,2174           52155                           DXCH     MPAC                                  
053077,000420: 10,2175           20001                           DDOUBL                                         
053078,000421: 10,2176           50141                           INDEX    TEM1                                  
053079,000422: 10,2177           52007                           DXCH     6                                     
053080,000423: 
053081,000424: 10,2200           52160                           DXCH     MPAC       +3                         
053082,000425: 10,2201           20001                           DDOUBL                                         
053083,000426: 10,2202           50141                           INDEX    TEM1                                  
053084,000427: 10,2203           52011                           DXCH     10                                    
053085,000428: 
053086,000429: 10,2204           52162                           DXCH     MPAC       +5                         
053087,000430: 10,2205           20001                           DDOUBL                                         
053088,000431: 10,2206           50141                           INDEX    TEM1                                  
053089,000432: 10,2207           52013                           DXCH     12                                    
053090,000433: 
053091,000434: 10,2210           30142                           CA       TEM2                                  
053092,000435: 10,2211           54003                           TS       EBANK                                 
053093,000436: 10,2212           14631                           TCF      SWRETURN                              
053094,000437: 

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