Source Code

These source-code files are part of a reconstructed copy of Luminary 97, the second release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software. It was created to fix two incorrect ephemeris constants in Luminary 96, as described by anomaly report LNY-59.

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memos 83 and 85, using asterisks indicating changed lines in the listing as a guide. 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 97 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.

052939,000002:                                                                                                  ## Copyright:   Public domain.
052940,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
052941,000004:                                                                                                  ## Purpose:     A section of Luminary revision 97.
052942,000005:                                                                                                  ##              It is part of the reconstructed source code for the
052943,000006:                                                                                                  ##              second release of the flight software for the Lunar 
052944,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
052945,000008:                                                                                                  ##              It was created to fix two incorrect ephemeris constants in
052946,000009:                                                                                                  ##              Luminary 96, as described by anomaly report LNY-59.
052947,000010:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
052948,000011:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
052949,000012:                                                                                                  ##              the listing and Luminary Memos #83 and #85, which list 
052950,000013:                                                                                                  ##              changes between Luminary 97 and 98, and 98 and 99. The
052951,000014:                                                                                                  ##              code has been adapted such that the resulting bugger words
052952,000015:                                                                                                  ##              exactly match those specified for Luminary 97 in NASA drawing
052953,000016:                                                                                                  ##              2021152D, which gives relatively high confidence that the
052954,000017:                                                                                                  ##              reconstruction is correct.
052955,000018:                                                                                                  ## Reference:   pp. 1259-1267
052956,000019:                                                                                                  ## Assembler:   yaYUL
052957,000020:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
052958,000021:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
052959,000022:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99.
052960,000023:                                                                                                  ##              2021-05-30 ABS  SINSLOC -> SINESLOC
052961,000024: 

Page 1259

052963,000026: 14,3774                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
052964,000027: 23,2000                                           SETLOC   POWFLITE                              
052965,000028: 23,2000                                           BANK                                           
052966,000029: 
052967,000030: 23,3537     0142                                  EBANK=   DEXDEX                                
052968,000031: 23,3537                                           COUNT*   $$/POWFL                              
052969,000032: 
052970,000033:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
052971,000034:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
052972,000035:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
052973,000036:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
052974,000037:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
052975,000038:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
052976,000039:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
052977,000040: 
052978,000041:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
052979,000042:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
052980,000043:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
052981,000044:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
052982,000045: 
052983,000046:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
052984,000047: 
052985,000048:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
052986,000049:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
052987,000050:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
052988,000051:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
052989,000052:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
052990,000053:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
052991,000054:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
052992,000055:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
052993,000056:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
052994,000057:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
052995,000058: 
052996,000059:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
052997,000060:                                                                                                  #  INTERPRETIVE.
052998,000061: 
052999,000062: 23,3537           77776        CDUTRIG            EXIT                                           
053000,000063: 23,3540           03547                           TC       CDUTRIGS                              
053001,000064: 23,3541           06037                           TC       INTPRET                               
053002,000065: 23,3542           77616                           RVQ                                            
053003,000066: 
053004,000067: 23,3543           77776        CD*TR*G            EXIT                                           
053005,000068: 23,3544           03555                           TC       CD*TR*GS                              
053006,000069: 23,3545           06037                           TC       INTPRET                               
053007,000070: 23,3546           77616                           RVQ                                            
053008,000071: 
053009,000072: 23,3547           30032        CDUTRIGS           CA       CDUX                                  
053010,000073: 23,3550           54772                           TS       CDUSPOT    +4                         
053011,000074: 23,3551           30033                           CA       CDUY                                  
053012,000075: 23,3552           54766                           TS       CDUSPOT                               

Page 1260

053014,000077: 23,3553           30034                           CA       CDUZ                                  
053015,000078: 23,3554           54770                           TS       CDUSPOT    +2                         
053016,000079: 
053017,000080: 23,3555           00006        CD*TR*GS           EXTEND                                         
053018,000081: 23,3556           22142                           QXCH     TEM2                                  
053019,000082: 23,3557           34751                           CAF      FOUR                                  
053020,000083: 23,3560           76242        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
053021,000084: 23,3561           54143                           TS       TEM3                                  
053022,000085: 23,3562           50143                           INDEX    TEM3                                  
053023,000086: 23,3563           30766                           CA       CDUSPOT                               
053024,000087: 23,3564           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
053025,000088: 23,3565           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
053026,000089: 23,3566           04713                           TC       USPRCADR                              
053027,000090: 23,3567           21576                           CADR     CDULOGIC                              
053028,000091: 23,3570           00006                           EXTEND                                         
053029,000092: 23,3571           30155                           DCA      MPAC                                  
053030,000093: 23,3572           50143                           INDEX    TEM3                                  
053031,000094: 23,3573           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
053032,000095: 23,3574           04713                           TC       USPRCADR                              
053033,000096: 23,3575           01517                           CADR     COSINE                                
053034,000097: 23,3576           52155                           DXCH     MPAC                                  
053035,000098: 23,3577           50143                           INDEX    TEM3                                  
053036,000099: 23,3600           52745                           DXCH     COSCDU                                #  STORING COSINE
053037,000100: 23,3601           00006                           EXTEND                                         
053038,000101: 23,3602           50143                           INDEX    TEM3                                  
053039,000102: 23,3603           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
053040,000103: 23,3604           04713                           TC       USPRCADR                              
053041,000104: 23,3605           01531                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
053042,000105: 23,3606           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
053043,000106: 23,3607           52155                           DXCH     MPAC                                  
053044,000107: 23,3610           50143                           INDEX    TEM3                                  
053045,000108: 23,3611           52737                           DXCH     SINCDU                                
053046,000109: 23,3612           10143                           CCS      TEM3                                  
053047,000110: 23,3613           13560                           TCF      TR*GL**P                              
053048,000111: 23,3614           00142                           TC       TEM2                                  

Page 1261

053050,000113:                                                                                                  #  ****************************************************************************************************************
053051,000114:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
053052,000115:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
053053,000116:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
053054,000117:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;  THIS IS 10 TIMES AS FAST AS CD*TR*GS.  QUICTRIG MAY BE
053055,000118:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
053056,000119: 
053057,000120: 23,3615           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
053058,000121: 23,3616           00006                           EXTEND                                         
053059,000122: 23,3617           22061                           QXCH     ITEMP1                                
053060,000123: 23,3620           34751                           CAF      FOUR                                  
053061,000124: 23,3621           76242                 +4        MASK     SIX                                   
053062,000125: 23,3622           54062                           TS       ITEMP2                                
053063,000126: 23,3623           50062                           INDEX    ITEMP2                                
053064,000127: 23,3624           30766                           CA       CDUSPOT                               
053065,000128: 23,3625           05033                           TC       SPSIN                                 
053066,000129: 23,3626           00006                           EXTEND                                         
053067,000130: 23,3627           74736                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
053068,000131: 23,3630           50062                           INDEX    ITEMP2                                
053069,000132: 23,3631           52737                           DXCH     SINCDU                                
053070,000133: 23,3632           50062                           INDEX    ITEMP2                                
053071,000134: 23,3633           30766                           CA       CDUSPOT                               
053072,000135: 23,3634           05032                           TC       SPCOS                                 
053073,000136: 23,3635           00006                           EXTEND                                         
053074,000137: 23,3636           74736                           MP       BIT14                                 
053075,000138: 23,3637           50062                           INDEX    ITEMP2                                
053076,000139: 23,3640           52745                           DXCH     COSCDU                                
053077,000140: 23,3641           10062                           CCS      ITEMP2                                
053078,000141: 23,3642           13621                           TCF      QUICTRIG   +4                         
053079,000142: 23,3643           30061                           CA       ITEMP1                                
053080,000143: 23,3644           00003                           RELINT                                         
053081,000144: 23,3645           00000                           TC       A                                     
053082,000145: 

Page 1262

053084,000147:                                                                                                  #  ****************************************************************************************************************
053085,000148:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
053086,000149:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
053087,000150: 
053088,000151:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
053089,000152:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
053090,000153:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
053091,000154:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
053092,000155: 
053093,000156:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
053094,000157:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
053095,000158:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
053096,000159:                                                                                                  #  MATION;  TRG*SMNB, VICE VERSA.
053097,000160: 
053098,000161:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
053099,000162:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
053100,000163: 
053101,000164:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
053102,000165: 
053103,000166: 23,3646           77776        CDU*SMNB           EXIT                                           
053104,000167: 23,3647           03547                           TC       CDUTRIGS                              
053105,000168: 23,3650           13653                           TCF      C*MM*N1                               
053106,000169: 
053107,000170: 23,3651           77776        TRG*SMNB           EXIT                                           
053108,000171: 23,3652           03555                           TC       CD*TR*GS                              
053109,000172: 23,3653           07532        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
053110,000173: 23,3654           46245                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
053111,000174: 23,3655           03675        C*MM*N2            TC       AX*SR*T                               
053112,000175: 23,3656           06037                           TC       INTPRET                               
053113,000176: 23,3657           43575                           VLOAD    RVQ                                   
053114,000177: 23,3660           00123                                    VBUF                                  
053115,000178: 
053116,000179: 23,3661           77776        CDU*NBSM           EXIT                                           
053117,000180: 23,3662           03547                           TC       CDUTRIGS                              
053118,000181: 23,3663           13666                           TCF      C*MM*N3                               
053119,000182: 
053120,000183: 23,3664           77776        TRG*NBSM           EXIT                                           
053121,000184: 23,3665           03555                           TC       CD*TR*GS                              
053122,000185: 23,3666           07532        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
053123,000186: 23,3667           36245                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
053124,000187: 23,3670           13655                           TCF      C*MM*N2                               
053125,000188: 
053126,000189:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
053127,000190:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
053128,000191:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
053129,000192: 
053130,000193:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
053131,000194:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM

Page 1263

053133,000196:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
053134,000197:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
053135,000198: 
053136,000199: 23,3671           77776        *SMNB*             EXIT                                           
053137,000200: 23,3672           13653                           TCF      C*MM*N1                               
053138,000201: 
053139,000202: 23,3673           77776        *NBSM*             EXIT                                           
053140,000203: 23,3674           13666                           TCF      C*MM*N3                               
053141,000204: 
053142,000205:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
053143,000206:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
053144,000207:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
053145,000208:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
053146,000209:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
053147,000210:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
053148,000211:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
053149,000212:                                                                                                  #                TC      CDUTRIGS
053150,000213:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
053151,000214:                                                                                                  #                TC      AX*SR*T
053152,000215:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
053153,000216:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
053154,000217: 
053155,000218:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
053156,000219:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
053157,000220:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
053158,000221:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
053159,000222: 
053160,000223: 23,3675           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
053161,000224: 23,3676           00006                           EXTEND                                         
053162,000225: 23,3677           22145                           QXCH     RTNSAVER                              
053163,000226: 
053164,000227: 23,3700           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
053165,000228: 23,3701           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
053166,000229: 23,3702           66245                           AD       THREE                                 #                +1 --> 2        -1 --> 0
053167,000230: 23,3703           00006                           EXTEND                                         
053168,000231: 23,3704           50000                           INDEX    A                                     
053169,000232: 23,3705           33764                           DCA      INDEXI                                
053170,000233: 23,3706           52144                           DXCH     DEXI                                  
053171,000234: 
053172,000235: 23,3707           34753                           CA       ONE                                   
053173,000236: 23,3710           54130                           TS       BUF                                   
053174,000237: 23,3711           00006                           EXTEND                                         
053175,000238: 23,3712           50143                           INDEX    DEX1                                  
053176,000239: 23,3713           40123                           DCS      VBUF                                  
053177,000240: 23,3714           13716                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
053178,000241: 
053179,000242: 23,3715           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX

Page 1264

053181,000244: 23,3716           52155        LOOP1              DXCH     MPAC                                  
053182,000245: 23,3717           33762                           CA       SINESLOC                              
053183,000246: 23,3720           60143                           AD       DEX1                                  
053184,000247: 23,3721           54116                           TS       ADDRWD                                
053185,000248: 
053186,000249: 23,3722           07107                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
053187,000250: 23,3723           10142                           CCS      DEXDEX                                
053188,000251: 23,3724           52155                           DXCH     MPAC                                  #  NBSM CASE
053189,000252: 23,3725           13730                           TCF      +3                                    
053190,000253: 23,3726           00006                           EXTEND                                         #  SMNB CASE
053191,000254: 23,3727           40155                           DCS      MPAC                                  
053192,000255: 23,3730           52160                           DXCH     TERM1TMP                              
053193,000256: 
053194,000257: 23,3731           36242                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
053195,000258: 23,3732           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
053196,000259: 
053197,000260: 23,3733           00006                           EXTEND                                         
053198,000261: 23,3734           50130                           INDEX    BUF                                   
053199,000262: 23,3735           50143                           INDEX    DEX1                                  
053200,000263: 23,3736           30123                           DCA      VBUF                                  
053201,000264: 23,3737           52155                           DXCH     MPAC                                  
053202,000265: 23,3740           07107                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
053203,000266: 23,3741           52155                           DXCH     MPAC                                  
053204,000267: 23,3742           20160                           DAS      TERM1TMP                              
053205,000268: 23,3743           52160                           DXCH     TERM1TMP                              
053206,000269: 23,3744           20001                           DDOUBL                                         
053207,000270: 23,3745           50130                           INDEX    BUF                                   
053208,000271: 23,3746           50143                           INDEX    DEX1                                  
053209,000272: 23,3747           52123                           DXCH     VBUF                                  
053210,000273: 23,3750           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
053211,000274: 
053212,000275: 23,3751           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
053213,000276: 23,3752           13715                           TCF      LOOP2                                 
053214,000277: 
053215,000278: 23,3753           00006                           EXTEND                                         
053216,000279: 23,3754           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
053217,000280: 
053218,000281: 23,3755           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
053219,000282: 23,3756           13700                           TCF      R*TL**P                               
053220,000283: 23,3757           00145                           TC       RTNSAVER                              
053221,000284: 23,3760           13700                           TCF      R*TL**P                               
053222,000285: 23,3761           00145                           TC       RTNSAVER                              
053223,000286: 
053224,000287: 23,3762           00736        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
053225,000288: 
053226,000289: 23,3763           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
053227,000290: 23,3764           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
053228,000291: 23,3765           00000                           DEC      0          B-14                       #  **********   THESE   **********

Page 1265

053230,000293: 23,3766           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
053231,000294: 
053232,000295:                                                                                                  #  ****************************************************************************************************************
053233,000296: 
053234,000297: 10,2030                                           BANK     10                                    
053235,000298: 10,2000                                           SETLOC   FLESHLOC                              
053236,000299: 10,2000                                           BANK                                           
053237,000300: 10,2030                                           COUNT*   $$/POWFL                              
053238,000301: 
053239,000302:                                                                                                  #  ROUTINE FLESHPOT COMPUTES THE BODY-STABLE MEMBER TRANSFORMATION MATRIX (COMMONLY CALLED XNB) AND STORES
053240,000303:                                                                                                  #  IT IN THE LOCATIONS SPECIFIED BY THE ECADR ENTERING IN A.
053241,000304: 
053242,000305: 10,2030           77776        CALCSMSC           EXIT                                           
053243,000306: 10,2031           04616                           TC       BANKCALL                              
053244,000307: 10,2032           20036                           CADR     FLESHPOT   -1                         
053245,000308: 10,2033           06037                           TC       INTPRET                               
053246,000309: 10,2034           77616                           RVQ                                            
053247,000310: 
053248,000311: 10,2035           02664        XNBECADR           ECADR    XNB                                   
053249,000312: 
053250,000313: 10,2036           32035                 -1        CAF      XNBECADR                              
053251,000314: 
053252,000315: 10,2037           54142        FLESHPOT           TS       TEM2                                  
053253,000316: 10,2040           56003                           XCH      EBANK                                 
053254,000317: 10,2041           56142                           XCH      TEM2                                  
053255,000318: 10,2042           74357                           MASK     LOW8                                  
053256,000319: 10,2043           65007                           AD       OCT1400                               
053257,000320: 10,2044           54141                           TS       TEM1                                  
053258,000321: 
053259,000322: 10,2045           00006                           EXTEND                                         
053260,000323: 10,2046           30745                           DCA      COSCDUY                               
053261,000324: 10,2047           52155                           DXCH     MPAC                                  
053262,000325: 10,2050           07103                           TC       DMP                                   
053263,000326: 10,2051           00746                           ADRES    COSCDUZ                               
053264,000327: 10,2052           52155                           DXCH     MPAC                                  
053265,000328: 10,2053           20001                           DDOUBL                                         
053266,000329: 10,2054           50141                           INDEX    TEM1                                  
053267,000330: 10,2055           52001                           DXCH     0                                     #  = COSY COSZ
053268,000331: 
053269,000332: 10,2056           00006                           EXTEND                                         
053270,000333: 10,2057           30741                           DCA      SINCDUZ                               
053271,000334: 10,2060           50141                           INDEX    TEM1                                  
053272,000335: 10,2061           52003                           DXCH     2                                     #  = SINZ
053273,000336: 
053274,000337: 10,2062           00006                           EXTEND                                         
053275,000338: 10,2063           40737                           DCS      SINCDUY                               
053276,000339: 10,2064           52155                           DXCH     MPAC                                  
053277,000340: 10,2065           07107                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ

Page 1266

053279,000342: 10,2066           52155                           DXCH     MPAC                                  
053280,000343: 10,2067           20001                           DDOUBL                                         
053281,000344: 10,2070           50141                           INDEX    TEM1                                  
053282,000345: 10,2071           52005                           DXCH     4                                     #  = - SINY COSZ
053283,000346: 
053284,000347: 10,2072           00006                           EXTEND                                         
053285,000348: 10,2073           40743                           DCS      SINCDUX                               
053286,000349: 10,2074           52155                           DXCH     MPAC                                  
053287,000350: 10,2075           07107                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ STILL
053288,000351: 10,2076           52155                           DXCH     MPAC                                  
053289,000352: 10,2077           20001                           DDOUBL                                         
053290,000353: 10,2100           52160                           DXCH     MPAC       +3                         
053291,000354: 
053292,000355: 10,2101           00006                           EXTEND                                         
053293,000356: 10,2102           40743                           DCS      SINCDUX                               
053294,000357: 10,2103           52155                           DXCH     MPAC                                  
053295,000358: 10,2104           07103                           TC       DMP                                   
053296,000359: 10,2105           00740                           ADRES    SINCDUZ                               
053297,000360: 10,2106           00006                           EXTEND                                         
053298,000361: 10,2107           40155                           DCS      MPAC                                  
053299,000362: 10,2110           52162                           DXCH     MPAC       +5                         
053300,000363: 10,2111           07103                           TC       DMP                                   
053301,000364: 10,2112           00736                           ADRES    SINCDUY                               
053302,000365: 10,2113           52155                           DXCH     MPAC                                  
053303,000366: 10,2114           20001                           DDOUBL                                         
053304,000367: 10,2115           20001                           DDOUBL                                         
053305,000368: 10,2116           52162                           DXCH     MPAC       +5                         
053306,000369: 
053307,000370: 10,2117           52155                           DXCH     MPAC                                  
053308,000371: 10,2120           07103                           TC       DMP                                   
053309,000372: 10,2121           00744                           ADRES    COSCDUY                               
053310,000373: 10,2122           52155                           DXCH     MPAC                                  
053311,000374: 10,2123           20001                           DDOUBL                                         
053312,000375: 10,2124           20001                           DDOUBL                                         
053313,000376: 10,2125           52131                           DXCH     BUF                                   
053314,000377: 
053315,000378: 10,2126           00006                           EXTEND                                         
053316,000379: 10,2127           30745                           DCA      COSCDUY                               
053317,000380: 10,2130           52155                           DXCH     MPAC                                  
053318,000381: 10,2131           07103                           TC       DMP                                   
053319,000382: 10,2132           00750                           ADRES    COSCDUX                               
053320,000383: 10,2133           52155                           DXCH     MPAC                                  
053321,000384: 10,2134           20001                           DDOUBL                                         
053322,000385: 10,2135           20162                           DAS      MPAC       +5                         
053323,000386: 
053324,000387: 10,2136           00006                           EXTEND                                         
053325,000388: 10,2137           30737                           DCA      SINCDUY                               
053326,000389: 10,2140           52155                           DXCH     MPAC                                  
053327,000390: 10,2141           07107                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUX
053328,000391: 10,2142           52155                           DXCH     MPAC                                  
053329,000392: 

Page 1267

053331,000394: 10,2143           20001                           DDOUBL                                         
053332,000395: 10,2144           20131                           DAS      BUF                                   
053333,000396: 
053334,000397: 10,2145           52131                           DXCH     BUF                                   
053335,000398: 10,2146           52155                           DXCH     MPAC                                  
053336,000399: 
053337,000400: 10,2147           00006                           EXTEND                                         
053338,000401: 10,2150           30155                           DCA      MPAC                                  
053339,000402: 10,2151           50141                           INDEX    TEM1                                  
053340,000403: 10,2152           52015                           DXCH     14                                    #  = SINY COSX + SINX SINZ COSY
053341,000404: 
053342,000405: 10,2153           00006                           EXTEND                                         
053343,000406: 10,2154           30160                           DCA      MPAC       +3                         
053344,000407: 10,2155           50141                           INDEX    TEM1                                  
053345,000408: 10,2156           52017                           DXCH     16                                    #  = - SINX COSZ
053346,000409: 
053347,000410: 10,2157           00006                           EXTEND                                         
053348,000411: 10,2160           30162                           DCA      MPAC       +5                         
053349,000412: 10,2161           50141                           INDEX    TEM1                                  
053350,000413: 10,2162           52021                           DXCH     20                                    #  = COSX COSY - SINX SINY SINZ
053351,000414: 
053352,000415: 10,2163           30141                           CA       TEM1                                  
053353,000416: 10,2164           54116                           TS       ADDRWD                                
053354,000417: 10,2165           00006                           EXTEND                                         
053355,000418: 10,2166           30006                           DCA      Z                                     
053356,000419: 10,2167           64751                           AD       FOUR                                  
053357,000420: 10,2170           52165                           DXCH     LOC                                   
053358,000421: 10,2171           34744                           CAF      BIT8                                  
053359,000422: 10,2172           54023                           TS       EDOP                                  
053360,000423: 10,2173           17460                           TCF      VXV                                   
053361,000424: 10,2174           52155                           DXCH     MPAC                                  
053362,000425: 10,2175           20001                           DDOUBL                                         
053363,000426: 10,2176           50141                           INDEX    TEM1                                  
053364,000427: 10,2177           52007                           DXCH     6                                     
053365,000428: 
053366,000429: 10,2200           52160                           DXCH     MPAC       +3                         
053367,000430: 10,2201           20001                           DDOUBL                                         
053368,000431: 10,2202           50141                           INDEX    TEM1                                  
053369,000432: 10,2203           52011                           DXCH     10                                    
053370,000433: 
053371,000434: 10,2204           52162                           DXCH     MPAC       +5                         
053372,000435: 10,2205           20001                           DDOUBL                                         
053373,000436: 10,2206           50141                           INDEX    TEM1                                  
053374,000437: 10,2207           52013                           DXCH     12                                    
053375,000438: 
053376,000439: 10,2210           30142                           CA       TEM2                                  
053377,000440: 10,2211           54003                           TS       EBANK                                 
053378,000441: 10,2212           14631                           TCF      SWRETURN                              
053379,000442: 

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