Source Code

This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the third release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 96 and 97. A bug (which had been around since at least Apollo 10, Luminary 69) was discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute revision into Rev 1, which is what actually flew rather than the Rev 0 presented here. A hardcopy of Rev 0 is known to exist — it belonged to AGC developer Allan Klumpp for many years — but unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus the code you see here had been reconstructed (we believe accurately) rather than transcribed. The first step of the reconstruction of the Rev 0 source code was the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection. The process of reverting the active portion of the source code (i.e., other than program comments) from Rev 1 to Rev 0 was very minor, consisting only of moving the position of the STARTSB1 label in FRESH START AND RESTART. Allan had previously given us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read, in part:

	GAP:  ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051

A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here.

054823,000002:                                                                                                  ## Copyright:   Public domain.
054824,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
054825,000004:                                                                                                  ## Purpose:     Part of the reconstructed source code for LMY99 Rev 0,
054826,000005:                                                                                                  ##              otherwise known as Luminary Rev 99, the third release
054827,000006:                                                                                                  ##              of the Apollo Guidance Computer (AGC) software for Apollo 11.
054828,000007:                                                                                                  ##              It differs from LMY99 Rev 1 (the flown version) only in the
054829,000008:                                                                                                  ##              placement of a single label. The corrections shown here have
054830,000009:                                                                                                  ##              been verified to have the same bank checksums as AGC developer
054831,000010:                                                                                                  ##              Allan Klumpp's copy of Luminary Rev 99, and so are believed
054832,000011:                                                                                                  ##              to be accurate. This file is intended to be a faithful 
054833,000012:                                                                                                  ##              recreation, except that the code format has been changed to 
054834,000013:                                                                                                  ##              conform to the requirements of the yaYUL assembler rather than 
054835,000014:                                                                                                  ##              the original YUL assembler.
054836,000015:                                                                                                  ##
054837,000016:                                                                                                  ## Assembler:   yaYUL
054838,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
054839,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo.
054840,000019:                                                                                                  ## Pages:       1259-1267
054841,000020:                                                                                                  ## Mod history: 2009-05-26 RSB  Adapted from the corresponding 
054842,000021:                                                                                                  ##                              Luminary131 file, using page 
054843,000022:                                                                                                  ##                              images from Luminary 1A.
054844,000023:                                                                                                  ##              2011-01-06 JL   Fixed pseudo-label indentation.
054845,000024:                                                                                                  ##              2016-12-17 RSB  Proofed text comments with octopus/ProoferComments
054846,000025:                                                                                                  ##                              and corrected the errors found.
054847,000026:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
054848,000027:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
054849,000028:                                                                                                  ##              2017-03-17 RSB  Comment-text fixes identified in diff'ing
054850,000029:                                                                                                  ##                              Luminary 99 vs Comanche 55.
054851,000030:                                                                                                  ##              2017-08-01 MAS  Created from LMY99 Rev 1.
054852,000031:                                                                                                  ##              2021-05-30 ABS  SINSLOC -> SINESLOC
054853,000032: 
054854,000033:                                                                                                  ## This source code has been transcribed or otherwise adapted from
054855,000034:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
054856,000035:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
054857,000036:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
054858,000037:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
054859,000038:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
054860,000039:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
054861,000040:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
054862,000041:                                                                                                  ## actually created.
054863,000042:                                                                                                  ##
054864,000043:                                                                                                  ## The code has been modified to match LMY99 Revision 0, otherwise
054865,000044:                                                                                                  ## known as Luminary Revision 99, the Apollo 11 software release preceeding
054866,000045:                                                                                                  ## the listing from which it was transcribed. It has been verified to
054867,000046:                                                                                                  ## contain the same bank checksums as AGC developer Allan Klumpp's listing
054868,000047:                                                                                                  ## of Luminary Revision 99 (for which we do not have scans).
054869,000048:                                                                                                  ##
054870,000049:                                                                                                  ## Notations on Allan Klumpp's listing read, in part:
054871,000050:                                                                                                  ##
054872,000051:                                                                                                  ##      ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
054873,000052: 

Page 1259

054875,000054: 14,3774                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
054876,000055: 23,2000                                           SETLOC   POWFLITE                              
054877,000056: 23,2000                                           BANK                                           
054878,000057: 
054879,000058: 23,3537     0142                                  EBANK=   DEXDEX                                
054880,000059: 23,3537                                           COUNT*   $$/POWFL                              
054881,000060: 
054882,000061:                                                                                                  #  CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
054883,000062:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
054884,000063:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.  AN
054885,000064:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.  THESE
054886,000065:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
054887,000066:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
054888,000067:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
054889,000068: 
054890,000069:                                                                                                  #  CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
054891,000070:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
054892,000071:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
054893,000072:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
054894,000073: 
054895,000074:                                                                                                  #  CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
054896,000075: 
054897,000076:                                                                                                  #  CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.  THIS
054898,000077:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
054899,000078:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.  A CALL TO THIS ROUTINE IS
054900,000079:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
054901,000080:                                                                                                  #  MODES (SMNB OR NBSM).  SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
054902,000081:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
054903,000082:                                                                                                  #  IN THIS ORDER.  CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
054904,000083:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.  NOTE THAT SINCE
054905,000084:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
054906,000085:                                                                                                  #  CALLED USING BANKCALL.  SORRY.
054907,000086: 
054908,000087:                                                                                                  #  CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
054909,000088:                                                                                                  #  INTERPRETIVE.
054910,000089: 
054911,000090: 23,3537           77776        CDUTRIG            EXIT                                           
054912,000091: 23,3540           03547                           TC       CDUTRIGS                              
054913,000092: 23,3541           06037                           TC       INTPRET                               
054914,000093: 23,3542           77616                           RVQ                                            
054915,000094: 
054916,000095: 23,3543           77776        CD*TR*G            EXIT                                           
054917,000096: 23,3544           03555                           TC       CD*TR*GS                              
054918,000097: 23,3545           06037                           TC       INTPRET                               
054919,000098: 23,3546           77616                           RVQ                                            
054920,000099: 
054921,000100: 23,3547           30032        CDUTRIGS           CA       CDUX                                  
054922,000101: 23,3550           54772                           TS       CDUSPOT    +4                         
054923,000102: 23,3551           30033                           CA       CDUY                                  
054924,000103: 23,3552           54766                           TS       CDUSPOT                               

Page 1260

054926,000105: 23,3553           30034                           CA       CDUZ                                  
054927,000106: 23,3554           54770                           TS       CDUSPOT    +2                         
054928,000107: 
054929,000108: 23,3555           00006        CD*TR*GS           EXTEND                                         
054930,000109: 23,3556           22142                           QXCH     TEM2                                  
054931,000110: 23,3557           34751                           CAF      FOUR                                  
054932,000111: 23,3560           76242        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
054933,000112: 23,3561           54143                           TS       TEM3                                  
054934,000113: 23,3562           50143                           INDEX    TEM3                                  
054935,000114: 23,3563           30766                           CA       CDUSPOT                               
054936,000115: 23,3564           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
054937,000116: 23,3565           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
054938,000117: 23,3566           04713                           TC       USPRCADR                              
054939,000118: 23,3567           21576                           CADR     CDULOGIC                              
054940,000119: 23,3570           00006                           EXTEND                                         
054941,000120: 23,3571           30155                           DCA      MPAC                                  
054942,000121: 23,3572           50143                           INDEX    TEM3                                  
054943,000122: 23,3573           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
054944,000123: 23,3574           04713                           TC       USPRCADR                              
054945,000124: 23,3575           01517                           CADR     COSINE                                
054946,000125: 23,3576           52155                           DXCH     MPAC                                  
054947,000126: 23,3577           50143                           INDEX    TEM3                                  
054948,000127: 23,3600           52745                           DXCH     COSCDU                                #  STORING COSINE
054949,000128: 23,3601           00006                           EXTEND                                         
054950,000129: 23,3602           50143                           INDEX    TEM3                                  
054951,000130: 23,3603           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
054952,000131: 23,3604           04713                           TC       USPRCADR                              
054953,000132: 23,3605           01531                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
054954,000133: 23,3606           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
054955,000134: 23,3607           52155                           DXCH     MPAC                                  
054956,000135: 23,3610           50143                           INDEX    TEM3                                  
054957,000136: 23,3611           52737                           DXCH     SINCDU                                
054958,000137: 23,3612           10143                           CCS      TEM3                                  
054959,000138: 23,3613           13560                           TCF      TR*GL**P                              
054960,000139: 23,3614           00142                           TC       TEM2                                  

Page 1261

054962,000141:                                                                                                  #  ****************************************************************************************************************
054963,000142:                                                                                                  #  QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
054964,000143:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
054965,000144:                                                                                                  #  AND CDUSPOT +4.  UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
054966,000145:                                                                                                  #  CDUSPOT.  QUICTRIG'S EXECUTION TIME IS 4.1 MS;  THIS IS 10 TIMES AS FAST AS CD*TR*GS.  QUICTRIG MAY BE
054967,000146:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
054968,000147: 
054969,000148: 23,3615           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
054970,000149: 23,3616           00006                           EXTEND                                         
054971,000150: 23,3617           22061                           QXCH     ITEMP1                                
054972,000151: 23,3620           34751                           CAF      FOUR                                  
054973,000152: 23,3621           76242                 +4        MASK     SIX                                   
054974,000153: 23,3622           54062                           TS       ITEMP2                                
054975,000154: 23,3623           50062                           INDEX    ITEMP2                                
054976,000155: 23,3624           30766                           CA       CDUSPOT                               
054977,000156: 23,3625           05033                           TC       SPSIN                                 
054978,000157: 23,3626           00006                           EXTEND                                         
054979,000158: 23,3627           74736                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
054980,000159: 23,3630           50062                           INDEX    ITEMP2                                
054981,000160: 23,3631           52737                           DXCH     SINCDU                                
054982,000161: 23,3632           50062                           INDEX    ITEMP2                                
054983,000162: 23,3633           30766                           CA       CDUSPOT                               
054984,000163: 23,3634           05032                           TC       SPCOS                                 
054985,000164: 23,3635           00006                           EXTEND                                         
054986,000165: 23,3636           74736                           MP       BIT14                                 
054987,000166: 23,3637           50062                           INDEX    ITEMP2                                
054988,000167: 23,3640           52745                           DXCH     COSCDU                                
054989,000168: 23,3641           10062                           CCS      ITEMP2                                
054990,000169: 23,3642           13621                           TCF      QUICTRIG   +4                         
054991,000170: 23,3643           30061                           CA       ITEMP1                                
054992,000171: 23,3644           00003                           RELINT                                         
054993,000172: 23,3645           00000                           TC       A                                     
054994,000173: 

Page 1262

054996,000175:                                                                                                  #  ****************************************************************************************************************
054997,000176:                                                                                                  #  THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
054998,000177:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
054999,000178: 
055000,000179:                                                                                                  #  THESE INTERFACE ROUTINES ARE PERMANENT.  ALL RESTORE USER'S EBANK
055001,000180:                                                                                                  #  SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
055002,000181:                                                                                                  #  RETURNING VIA QPRET.  ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
055003,000182:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
055004,000183: 
055005,000184:                                                                                                  #  TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
055006,000185:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
055007,000186:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).  TRG*NBSM DOES THE NB TO SM TRANSFOR-
055008,000187:                                                                                                  #  MATION;  TRG*SMNB, VICE VERSA.
055009,000188: 
055010,000189:                                                                                                  #  CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
055011,000190:                                                                                                  #  THE CDU COUNTERS.  OTHERWISE IT IS LIKE TRG*NBSM.
055012,000191: 
055013,000192:                                                                                                  #  CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
055014,000193: 
055015,000194: 23,3646           77776        CDU*SMNB           EXIT                                           
055016,000195: 23,3647           03547                           TC       CDUTRIGS                              
055017,000196: 23,3650           13653                           TCF      C*MM*N1                               
055018,000197: 
055019,000198: 23,3651           77776        TRG*SMNB           EXIT                                           
055020,000199: 23,3652           03555                           TC       CD*TR*GS                              
055021,000200: 23,3653           07532        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
055022,000201: 23,3654           46245                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
055023,000202: 23,3655           03675        C*MM*N2            TC       AX*SR*T                               
055024,000203: 23,3656           06037                           TC       INTPRET                               
055025,000204: 23,3657           43575                           VLOAD    RVQ                                   
055026,000205: 23,3660           00123                                    VBUF                                  
055027,000206: 
055028,000207: 23,3661           77776        CDU*NBSM           EXIT                                           
055029,000208: 23,3662           03547                           TC       CDUTRIGS                              
055030,000209: 23,3663           13666                           TCF      C*MM*N3                               
055031,000210: 
055032,000211: 23,3664           77776        TRG*NBSM           EXIT                                           
055033,000212: 23,3665           03555                           TC       CD*TR*GS                              
055034,000213: 23,3666           07532        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
055035,000214: 23,3667           36245                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
055036,000215: 23,3670           13655                           TCF      C*MM*N2                               
055037,000216: 
055038,000217:                                                                                                  #  *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
055039,000218:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.  OTHERWISE THEY ARE
055040,000219:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
055041,000220: 
055042,000221:                                                                                                  #  NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
055043,000222:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM

Page 1263

055045,000224:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.  FOR SUBSEQUENT TRANSFOR-
055046,000225:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
055047,000226: 
055048,000227: 23,3671           77776        *SMNB*             EXIT                                           
055049,000228: 23,3672           13653                           TCF      C*MM*N1                               
055050,000229: 
055051,000230: 23,3673           77776        *NBSM*             EXIT                                           
055052,000231: 23,3674           13666                           TCF      C*MM*N3                               
055053,000232: 
055054,000233:                                                                                                  #  AX*SR*T COMBINES THE OLD SMNB AND NBSM.  FOR THE NB TO SM
055055,000234:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.  FOR SM TO NB, ENTER WITH -3.
055056,000235:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
055057,000236:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
055058,000237:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
055059,000238:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
055060,000239:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
055061,000240:                                                                                                  #                TC      CDUTRIGS
055062,000241:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
055063,000242:                                                                                                  #                TC      AX*SR*T
055064,000243:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
055065,000244:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
055066,000245: 
055067,000246:                                                                                                  #  AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
055068,000247:                                                                                                  #  UNITY.  A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
055069,000248:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
055070,000249:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
055071,000250: 
055072,000251: 23,3675           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
055073,000252: 23,3676           00006                           EXTEND                                         
055074,000253: 23,3677           22145                           QXCH     RTNSAVER                              
055075,000254: 
055076,000255: 23,3700           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
055077,000256: 23,3701           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
055078,000257: 23,3702           66245                           AD       THREE                                 #                +1 --> 2        -1 --> 0
055079,000258: 23,3703           00006                           EXTEND                                         
055080,000259: 23,3704           50000                           INDEX    A                                     
055081,000260: 23,3705           33764                           DCA      INDEXI                                
055082,000261: 23,3706           52144                           DXCH     DEXI                                  
055083,000262: 
055084,000263: 23,3707           34753                           CA       ONE                                   
055085,000264: 23,3710           54130                           TS       BUF                                   
055086,000265: 23,3711           00006                           EXTEND                                         
055087,000266: 23,3712           50143                           INDEX    DEX1                                  
055088,000267: 23,3713           40123                           DCS      VBUF                                  
055089,000268: 23,3714           13716                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
055090,000269: 
055091,000270: 23,3715           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX

Page 1264

055093,000272: 23,3716           52155        LOOP1              DXCH     MPAC                                  
055094,000273: 23,3717           33762                           CA       SINESLOC                              
055095,000274: 23,3720           60143                           AD       DEX1                                  
055096,000275: 23,3721           54116                           TS       ADDRWD                                
055097,000276: 
055098,000277: 23,3722           07107                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
055099,000278: 23,3723           10142                           CCS      DEXDEX                                
055100,000279: 23,3724           52155                           DXCH     MPAC                                  #  NBSM CASE
055101,000280: 23,3725           13730                           TCF      +3                                    
055102,000281: 23,3726           00006                           EXTEND                                         #  SMNB CASE
055103,000282: 23,3727           40155                           DCS      MPAC                                  
055104,000283: 23,3730           52160                           DXCH     TERM1TMP                              
055105,000284: 
055106,000285: 23,3731           36242                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
055107,000286: 23,3732           26116                           ADS      ADDRWD                                #        BE CONSECUTIVE AND IN THAT ORDER
055108,000287: 
055109,000288: 23,3733           00006                           EXTEND                                         
055110,000289: 23,3734           50130                           INDEX    BUF                                   
055111,000290: 23,3735           50143                           INDEX    DEX1                                  
055112,000291: 23,3736           30123                           DCA      VBUF                                  
055113,000292: 23,3737           52155                           DXCH     MPAC                                  
055114,000293: 23,3740           07107                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
055115,000294: 23,3741           52155                           DXCH     MPAC                                  
055116,000295: 23,3742           20160                           DAS      TERM1TMP                              
055117,000296: 23,3743           52160                           DXCH     TERM1TMP                              
055118,000297: 23,3744           20001                           DDOUBL                                         
055119,000298: 23,3745           50130                           INDEX    BUF                                   
055120,000299: 23,3746           50143                           INDEX    DEX1                                  
055121,000300: 23,3747           52123                           DXCH     VBUF                                  
055122,000301: 23,3750           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
055123,000302: 
055124,000303: 23,3751           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
055125,000304: 23,3752           13715                           TCF      LOOP2                                 
055126,000305: 
055127,000306: 23,3753           00006                           EXTEND                                         
055128,000307: 23,3754           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
055129,000308: 
055130,000309: 23,3755           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
055131,000310: 23,3756           13700                           TCF      R*TL**P                               
055132,000311: 23,3757           00145                           TC       RTNSAVER                              
055133,000312: 23,3760           13700                           TCF      R*TL**P                               
055134,000313: 23,3761           00145                           TC       RTNSAVER                              
055135,000314: 
055136,000315: 23,3762           00736        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
055137,000316: 
055138,000317: 23,3763           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
055139,000318: 23,3764           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
055140,000319: 23,3765           00000                           DEC      0          B-14                       #  **********   THESE   **********

Page 1265

055142,000321: 23,3766           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
055143,000322: 
055144,000323:                                                                                                  #  ****************************************************************************************************************
055145,000324: 
055146,000325: 10,2030                                           BANK     10                                    
055147,000326: 10,2000                                           SETLOC   FLESHLOC                              
055148,000327: 10,2000                                           BANK                                           
055149,000328: 10,2030                                           COUNT*   $$/POWFL                              
055150,000329: 
055151,000330:                                                                                                  #  ROUTINE FLESHPOT COMPUTES THE BODY-STABLE MEMBER TRANSFORMATION MATRIX (COMMONLY CALLED XNB) AND STORES
055152,000331:                                                                                                  #  IT IN THE LOCATIONS SPECIFIED BY THE ECADR ENTERING IN A.
055153,000332: 
055154,000333: 10,2030           77776        CALCSMSC           EXIT                                           
055155,000334: 10,2031           04616                           TC       BANKCALL                              
055156,000335: 10,2032           20036                           CADR     FLESHPOT   -1                         
055157,000336: 10,2033           06037                           TC       INTPRET                               
055158,000337: 10,2034           77616                           RVQ                                            
055159,000338: 
055160,000339: 10,2035           02664        XNBECADR           ECADR    XNB                                   
055161,000340: 
055162,000341: 10,2036           32035                 -1        CAF      XNBECADR                              
055163,000342: 
055164,000343: 10,2037           54142        FLESHPOT           TS       TEM2                                  
055165,000344: 10,2040           56003                           XCH      EBANK                                 
055166,000345: 10,2041           56142                           XCH      TEM2                                  
055167,000346: 10,2042           74357                           MASK     LOW8                                  
055168,000347: 10,2043           65007                           AD       OCT1400                               
055169,000348: 10,2044           54141                           TS       TEM1                                  
055170,000349: 
055171,000350: 10,2045           00006                           EXTEND                                         
055172,000351: 10,2046           30745                           DCA      COSCDUY                               
055173,000352: 10,2047           52155                           DXCH     MPAC                                  
055174,000353: 10,2050           07103                           TC       DMP                                   
055175,000354: 10,2051           00746                           ADRES    COSCDUZ                               
055176,000355: 10,2052           52155                           DXCH     MPAC                                  
055177,000356: 10,2053           20001                           DDOUBL                                         
055178,000357: 10,2054           50141                           INDEX    TEM1                                  
055179,000358: 10,2055           52001                           DXCH     0                                     #  = COSY COSZ
055180,000359: 
055181,000360: 10,2056           00006                           EXTEND                                         
055182,000361: 10,2057           30741                           DCA      SINCDUZ                               
055183,000362: 10,2060           50141                           INDEX    TEM1                                  
055184,000363: 10,2061           52003                           DXCH     2                                     #  = SINZ
055185,000364: 
055186,000365: 10,2062           00006                           EXTEND                                         
055187,000366: 10,2063           40737                           DCS      SINCDUY                               
055188,000367: 10,2064           52155                           DXCH     MPAC                                  
055189,000368: 10,2065           07107                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ

Page 1266

055191,000370: 10,2066           52155                           DXCH     MPAC                                  
055192,000371: 10,2067           20001                           DDOUBL                                         
055193,000372: 10,2070           50141                           INDEX    TEM1                                  
055194,000373: 10,2071           52005                           DXCH     4                                     #  = - SINY COSZ
055195,000374: 
055196,000375: 10,2072           00006                           EXTEND                                         
055197,000376: 10,2073           40743                           DCS      SINCDUX                               
055198,000377: 10,2074           52155                           DXCH     MPAC                                  
055199,000378: 10,2075           07107                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ STILL
055200,000379: 10,2076           52155                           DXCH     MPAC                                  
055201,000380: 10,2077           20001                           DDOUBL                                         
055202,000381: 10,2100           52160                           DXCH     MPAC       +3                         
055203,000382: 
055204,000383: 10,2101           00006                           EXTEND                                         
055205,000384: 10,2102           40743                           DCS      SINCDUX                               
055206,000385: 10,2103           52155                           DXCH     MPAC                                  
055207,000386: 10,2104           07103                           TC       DMP                                   
055208,000387: 10,2105           00740                           ADRES    SINCDUZ                               
055209,000388: 10,2106           00006                           EXTEND                                         
055210,000389: 10,2107           40155                           DCS      MPAC                                  
055211,000390: 10,2110           52162                           DXCH     MPAC       +5                         
055212,000391: 10,2111           07103                           TC       DMP                                   
055213,000392: 10,2112           00736                           ADRES    SINCDUY                               
055214,000393: 10,2113           52155                           DXCH     MPAC                                  
055215,000394: 10,2114           20001                           DDOUBL                                         
055216,000395: 10,2115           20001                           DDOUBL                                         
055217,000396: 10,2116           52162                           DXCH     MPAC       +5                         
055218,000397: 
055219,000398: 10,2117           52155                           DXCH     MPAC                                  
055220,000399: 10,2120           07103                           TC       DMP                                   
055221,000400: 10,2121           00744                           ADRES    COSCDUY                               
055222,000401: 10,2122           52155                           DXCH     MPAC                                  
055223,000402: 10,2123           20001                           DDOUBL                                         
055224,000403: 10,2124           20001                           DDOUBL                                         
055225,000404: 10,2125           52131                           DXCH     BUF                                   
055226,000405: 
055227,000406: 10,2126           00006                           EXTEND                                         
055228,000407: 10,2127           30745                           DCA      COSCDUY                               
055229,000408: 10,2130           52155                           DXCH     MPAC                                  
055230,000409: 10,2131           07103                           TC       DMP                                   
055231,000410: 10,2132           00750                           ADRES    COSCDUX                               
055232,000411: 10,2133           52155                           DXCH     MPAC                                  
055233,000412: 10,2134           20001                           DDOUBL                                         
055234,000413: 10,2135           20162                           DAS      MPAC       +5                         
055235,000414: 
055236,000415: 10,2136           00006                           EXTEND                                         
055237,000416: 10,2137           30737                           DCA      SINCDUY                               
055238,000417: 10,2140           52155                           DXCH     MPAC                                  
055239,000418: 10,2141           07107                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUX
055240,000419: 10,2142           52155                           DXCH     MPAC                                  
055241,000420: 

Page 1267

055243,000422: 10,2143           20001                           DDOUBL                                         
055244,000423: 10,2144           20131                           DAS      BUF                                   
055245,000424: 
055246,000425: 10,2145           52131                           DXCH     BUF                                   
055247,000426: 10,2146           52155                           DXCH     MPAC                                  
055248,000427: 
055249,000428: 10,2147           00006                           EXTEND                                         
055250,000429: 10,2150           30155                           DCA      MPAC                                  
055251,000430: 10,2151           50141                           INDEX    TEM1                                  
055252,000431: 10,2152           52015                           DXCH     14                                    #  = SINY COSX + SINX SINZ COSY
055253,000432: 
055254,000433: 10,2153           00006                           EXTEND                                         
055255,000434: 10,2154           30160                           DCA      MPAC       +3                         
055256,000435: 10,2155           50141                           INDEX    TEM1                                  
055257,000436: 10,2156           52017                           DXCH     16                                    #  = - SINX COSZ
055258,000437: 
055259,000438: 10,2157           00006                           EXTEND                                         
055260,000439: 10,2160           30162                           DCA      MPAC       +5                         
055261,000440: 10,2161           50141                           INDEX    TEM1                                  
055262,000441: 10,2162           52021                           DXCH     20                                    #  = COSX COSY - SINX SINY SINZ
055263,000442: 
055264,000443: 10,2163           30141                           CA       TEM1                                  
055265,000444: 10,2164           54116                           TS       ADDRWD                                
055266,000445: 10,2165           00006                           EXTEND                                         
055267,000446: 10,2166           30006                           DCA      Z                                     
055268,000447: 10,2167           64751                           AD       FOUR                                  
055269,000448: 10,2170           52165                           DXCH     LOC                                   
055270,000449: 10,2171           34744                           CAF      BIT8                                  
055271,000450: 10,2172           54023                           TS       EDOP                                  
055272,000451: 10,2173           17460                           TCF      VXV                                   
055273,000452: 10,2174           52155                           DXCH     MPAC                                  
055274,000453: 10,2175           20001                           DDOUBL                                         
055275,000454: 10,2176           50141                           INDEX    TEM1                                  
055276,000455: 10,2177           52007                           DXCH     6                                     
055277,000456: 
055278,000457: 10,2200           52160                           DXCH     MPAC       +3                         
055279,000458: 10,2201           20001                           DDOUBL                                         
055280,000459: 10,2202           50141                           INDEX    TEM1                                  
055281,000460: 10,2203           52011                           DXCH     10                                    
055282,000461: 
055283,000462: 10,2204           52162                           DXCH     MPAC       +5                         
055284,000463: 10,2205           20001                           DDOUBL                                         
055285,000464: 10,2206           50141                           INDEX    TEM1                                  
055286,000465: 10,2207           52013                           DXCH     12                                    
055287,000466: 
055288,000467: 10,2210           30142                           CA       TEM2                                  
055289,000468: 10,2211           54003                           TS       EBANK                                 
055290,000469: 10,2212           14631                           TCF      SWRETURN                              
055291,000470: 

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