Source Code

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

The reconstruction began with source code of Zerlina 56, Luminary 210, and Luminary 131, previously transcribed from digitized copies of those programs. The code was created by combining the three, using Zerlina 56 as a base, since it was based off of Luminary 183. The differences between the three were carefully merged using the Luminary memos as a guide, with all changes made after Luminary 178 being backed out. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 178 listing would be different.

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.

053273,000002:                                                                                                  ## Copyright:   Public domain.
053274,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
053275,000004:                                                                                                  ## Purpose:     A section of Luminary revision 178.
053276,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
053277,000006:                                                                                                  ##              release of the flight software for the Lunar Module's
053278,000007:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
053279,000008:                                                                                                  ##              code has been recreated from copies of Zerlina 56, Luminary
053280,000009:                                                                                                  ##              210, and Luminary 131, as well as many Luminary memos.
053281,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
053282,000011:                                                                                                  ##              exactly match those specified for Luminary 178 in NASA
053283,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
053284,000013:                                                                                                  ##              that the reconstruction is correct.
053285,000014:                                                                                                  ## Reference:   pp. 1248-1256
053286,000015:                                                                                                  ## Assembler:   yaYUL
053287,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
053288,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
053289,000018:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Zerlina 56.
053290,000019:                                                                                                  ##              2021-05-30 ABS  SINSLOC -> SINESLOC
053291,000020: 

Page 1248

053293,000022: 14,3775                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
053294,000023: 23,2000                                           SETLOC   POWFLITE                              
053295,000024: 23,2000                                           BANK                                           
053296,000025: 
053297,000026: 23,3505     0142                                  EBANK=   DEXDEX                                
053298,000027: 23,3505                                           COUNT*   $$/POWFL                              
053299,000028: 
053300,000029:                                                                                                  #      CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
053301,000030:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
053302,000031:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.   AN
053303,000032:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.   THESE
053304,000033:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
053305,000034:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.   THEY DIFFER ONLY IN
053306,000035:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
053307,000036: 
053308,000037:                                                                                                  #      CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
053309,000038:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
053310,000039:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
053311,000040:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
053312,000041: 
053313,000042:                                                                                                  #      CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
053314,000043: 
053315,000044:                                                                                                  #      CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.   THIS
053316,000045:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
053317,000046:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.   A CALL TO THIS ROUTINE IS
053318,000047:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
053319,000048:                                                                                                  #  MODES (SMNB OR NBSM).   SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
053320,000049:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
053321,000050:                                                                                                  #  IN THIS ORDER.   CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
053322,000051:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.   NOTE THAT SINCE
053323,000052:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
053324,000053:                                                                                                  #  CALLED USING BANKCALL.   SORRY.
053325,000054: 
053326,000055:                                                                                                  #      CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
053327,000056:                                                                                                  #  INTERPRETIVE.
053328,000057: 
053329,000058: 23,3505           77776        CDUTRIG            EXIT                                           
053330,000059: 23,3506           03515                           TC       CDUTRIGS                              
053331,000060: 23,3507           06042                           TC       INTPRET                               
053332,000061: 23,3510           77616                           RVQ                                            
053333,000062: 
053334,000063: 23,3511           77776        CD*TR*G            EXIT                                           
053335,000064: 23,3512           03523                           TC       CD*TR*GS                              
053336,000065: 23,3513           06042                           TC       INTPRET                               
053337,000066: 23,3514           77616                           RVQ                                            
053338,000067: 
053339,000068: 23,3515           30032        CDUTRIGS           CA       CDUX                                  
053340,000069: 23,3516           54771                           TS       CDUSPOT    +4                         
053341,000070: 23,3517           30033                           CA       CDUY                                  
053342,000071: 23,3520           54765                           TS       CDUSPOT                               

Page 1249

053344,000073: 23,3521           30034                           CA       CDUZ                                  
053345,000074: 23,3522           54767                           TS       CDUSPOT    +2                         
053346,000075: 
053347,000076: 23,3523           00006        CD*TR*GS           EXTEND                                         
053348,000077: 23,3524           22142                           QXCH     TEM2                                  
053349,000078: 23,3525           34751                           CAF      FOUR                                  
053350,000079: 23,3526           76245        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
053351,000080: 23,3527           54143                           TS       TEM3                                  
053352,000081: 23,3530           50143                           INDEX    TEM3                                  
053353,000082: 23,3531           30765                           CA       CDUSPOT                               
053354,000083: 23,3532           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
053355,000084: 23,3533           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
053356,000085: 23,3534           04713                           TC       USPRCADR                              
053357,000086: 23,3535           21577                           CADR     CDULOGIC                              
053358,000087: 23,3536           00006                           EXTEND                                         
053359,000088: 23,3537           30155                           DCA      MPAC                                  
053360,000089: 23,3540           50143                           INDEX    TEM3                                  
053361,000090: 23,3541           52766                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
053362,000091: 23,3542           04713                           TC       USPRCADR                              
053363,000092: 23,3543           01517                           CADR     COSINE                                
053364,000093: 23,3544           52155                           DXCH     MPAC                                  
053365,000094: 23,3545           50143                           INDEX    TEM3                                  
053366,000095: 23,3546           52744                           DXCH     COSCDU                                #  STORING COSINE
053367,000096: 23,3547           00006                           EXTEND                                         
053368,000097: 23,3550           50143                           INDEX    TEM3                                  
053369,000098: 23,3551           30766                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
053370,000099: 23,3552           04713                           TC       USPRCADR                              
053371,000100: 23,3553           01531                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
053372,000101: 23,3554           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
053373,000102: 23,3555           52155                           DXCH     MPAC                                  
053374,000103: 23,3556           50143                           INDEX    TEM3                                  
053375,000104: 23,3557           52736                           DXCH     SINCDU                                
053376,000105: 23,3560           10143                           CCS      TEM3                                  
053377,000106: 23,3561           13526                           TCF      TR*GL**P                              
053378,000107: 23,3562           00142                           TC       TEM2                                  

Page 1250

053380,000109:                                                                                                  #  ****************************************************************************************************************
053381,000110: 
053382,000111:                                                                                                  #      QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
053383,000112:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
053384,000113:                                                                                                  #  AND CDUSPOT +4.   UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
053385,000114:                                                                                                  #  CDUSPOT.   QUICTRIG'S EXECUTION TIME IS 4.1 MS;   THIS IS 10 TIMES AS FAST AS CD*TR*GS.   QUICTRIG MAY BE
053386,000115:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
053387,000116: 
053388,000117: 23,3563           00004        QTPROLOG           INHINT                                         
053389,000118: 23,3564           30032                           CA       CDUX                                  
053390,000119: 23,3565           54771                           TS       CDUSPOTX                              
053391,000120: 23,3566           30033                           CA       CDUY                                  
053392,000121: 23,3567           54765                           TS       CDUSPOTY                              
053393,000122: 23,3570           30034                           CA       CDUZ                                  
053394,000123: 23,3571           54767                           TS       CDUSPOTZ                              
053395,000124: 
053396,000125: 23,3572           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
053397,000126: 23,3573           00006                           EXTEND                                         
053398,000127: 23,3574           22061                           QXCH     ITEMP1                                
053399,000128: 23,3575           34751                           CAF      FOUR                                  
053400,000129: 23,3576           76245                 +4        MASK     SIX                                   
053401,000130: 23,3577           54062                           TS       ITEMP2                                
053402,000131: 23,3600           50062                           INDEX    ITEMP2                                
053403,000132: 23,3601           30765                           CA       CDUSPOT                               
053404,000133: 23,3602           05033                           TC       SPSIN                                 
053405,000134: 23,3603           00006                           EXTEND                                         
053406,000135: 23,3604           74736                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
053407,000136: 23,3605           50062                           INDEX    ITEMP2                                
053408,000137: 23,3606           52736                           DXCH     SINCDU                                
053409,000138: 23,3607           50062                           INDEX    ITEMP2                                
053410,000139: 23,3610           30765                           CA       CDUSPOT                               
053411,000140: 23,3611           05032                           TC       SPCOS                                 
053412,000141: 23,3612           00006                           EXTEND                                         
053413,000142: 23,3613           74736                           MP       BIT14                                 
053414,000143: 23,3614           50062                           INDEX    ITEMP2                                
053415,000144: 23,3615           52744                           DXCH     COSCDU                                
053416,000145: 23,3616           10062                           CCS      ITEMP2                                
053417,000146: 23,3617           13576                           TCF      QUICTRIG   +4                         
053418,000147: 23,3620           30061                           CA       ITEMP1                                
053419,000148: 23,3621           00003                           RELINT                                         
053420,000149: 23,3622           00000                           TC       A                                     
053421,000150: 

Page 1251

053423,000152:                                                                                                  #  ****************************************************************************************************************
053424,000153:                                                                                                  #      THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
053425,000154:                                                                                                  #  INTERPRETIVE.   LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
053426,000155: 
053427,000156:                                                                                                  #      THESE INTERFACE ROUTINES ARE PERMANENT.   ALL RESTORE USER'S EBANK
053428,000157:                                                                                                  #  SETTING.   ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
053429,000158:                                                                                                  #  RETURNING VIA QPRET.   ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
053430,000159:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
053431,000160: 
053432,000161:                                                                                                  #      TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
053433,000162:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
053434,000163:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).   TRG*NBSM DOES THE NB TO SM TRANSFOR-
053435,000164:                                                                                                  #  MATION;  TRG*SMNB, VICE VERSA.
053436,000165: 
053437,000166:                                                                                                  #      CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
053438,000167:                                                                                                  #  THE CDU COUNTERS.   OTHERWISE IT IS LIKE TRG*NBSM.
053439,000168: 
053440,000169:                                                                                                  #      CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
053441,000170: 
053442,000171: 23,3623           77776        CDU*SMNB           EXIT                                           
053443,000172: 23,3624           03515                           TC       CDUTRIGS                              
053444,000173: 23,3625           13630                           TCF      C*MM*N1                               
053445,000174: 
053446,000175: 23,3626           77776        TRG*SMNB           EXIT                                           
053447,000176: 23,3627           03523                           TC       CD*TR*GS                              
053448,000177: 23,3630           07535        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
053449,000178: 23,3631           46250                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
053450,000179: 23,3632           03652        C*MM*N2            TC       AX*SR*T                               
053451,000180: 23,3633           06042                           TC       INTPRET                               
053452,000181: 23,3634           43575                           VLOAD    RVQ                                   
053453,000182: 23,3635           00123                                    VBUF                                  
053454,000183: 
053455,000184: 23,3636           77776        CDU*NBSM           EXIT                                           
053456,000185: 23,3637           03515                           TC       CDUTRIGS                              
053457,000186: 23,3640           13643                           TCF      C*MM*N3                               
053458,000187: 
053459,000188: 23,3641           77776        TRG*NBSM           EXIT                                           
053460,000189: 23,3642           03523                           TC       CD*TR*GS                              
053461,000190: 23,3643           07535        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
053462,000191: 23,3644           36250                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
053463,000192: 23,3645           13632                           TCF      C*MM*N2                               
053464,000193: 
053465,000194:                                                                                                  #      *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
053466,000195:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.   OTHERWISE THEY ARE
053467,000196:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
053468,000197: 
053469,000198:                                                                                                  #      NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
053470,000199:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM

Page 1252

053472,000201:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.   FOR SUBSEQUENT TRANSFOR-
053473,000202:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
053474,000203: 
053475,000204: 23,3646           77776        *SMNB*             EXIT                                           
053476,000205: 23,3647           13630                           TCF      C*MM*N1                               
053477,000206: 
053478,000207: 23,3650           77776        *NBSM*             EXIT                                           
053479,000208: 23,3651           13643                           TCF      C*MM*N3                               
053480,000209: 
053481,000210:                                                                                                  #        AX*SR*T COMBINES THE OLD SMNB AND NBSM.   FOR THE NB TO SM
053482,000211:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.   FOR SM TO NB, ENTER WITH -3.
053483,000212:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
053484,000213:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
053485,000214:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.   A CALL TO CD*TR*GS, WITH
053486,000215:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
053487,000216:                                                                                                  #  THIS.   HERE IS A SAMPLE CALLING SEQUENCE:-
053488,000217: 
053489,000218:                                                                                                  #                             TC     CDUTRIGS
053490,000219:                                                                                                  #                             CS     THREE       ("CA  THREE" FOR NBSM)
053491,000220:                                                                                                  #                             TC     AX*SR*T
053492,000221: 
053493,000222:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
053494,000223:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
053495,000224: 
053496,000225:                                                                                                  #      AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
053497,000226:                                                                                                  #  UNITY.   A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
053498,000227:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
053499,000228:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
053500,000229: 
053501,000230: 23,3652           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
053502,000231: 23,3653           00006                           EXTEND                                         
053503,000232: 23,3654           22145                           QXCH     RTNSAVER                              
053504,000233: 
053505,000234: 23,3655           10142        R*TL**P            CCS      DEXDEX                                #          +3 --> 0     -3 --> 2
053506,000235: 23,3656           40142                           CS       DEXDEX                                #  THUS:   +2 --> 1     -2 --> 1
053507,000236: 23,3657           66250                           AD       THREE                                 #          +1 --> 2     -1 --> 0
053508,000237: 23,3660           00006                           EXTEND                                         
053509,000238: 23,3661           50000                           INDEX    A                                     
053510,000239: 23,3662           33741                           DCA      INDEXI                                
053511,000240: 23,3663           52144                           DXCH     DEXI                                  
053512,000241: 
053513,000242: 23,3664           34753                           CA       ONE                                   
053514,000243: 23,3665           54130                           TS       BUF                                   
053515,000244: 23,3666           00006                           EXTEND                                         
053516,000245: 23,3667           50143                           INDEX    DEX1                                  
053517,000246: 23,3670           40123                           DCS      VBUF                                  
053518,000247: 23,3671           13673                           TCF      LOOP1                                 #    REALLY BE A SUBTRACT, AND VICE VERSA
053519,000248: 
053520,000249: 23,3672           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX

Page 1253

053522,000251: 23,3673           52155        LOOP1              DXCH     MPAC                                  
053523,000252: 23,3674           33737                           CA       SINESLOC                              
053524,000253: 23,3675           60143                           AD       DEX1                                  
053525,000254: 23,3676           54116                           TS       ADDRWD                                
053526,000255: 
053527,000256: 23,3677           07112                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
053528,000257: 23,3700           10142                           CCS      DEXDEX                                
053529,000258: 23,3701           52155                           DXCH     MPAC                                  #  NBSM CASE
053530,000259: 23,3702           13705                           TCF      +3                                    
053531,000260: 23,3703           00006                           EXTEND                                         #  SMNB CASE
053532,000261: 23,3704           40155                           DCS      MPAC                                  
053533,000262: 23,3705           52160                           DXCH     TERM1TMP                              
053534,000263: 
053535,000264: 23,3706           36245                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
053536,000265: 23,3707           26116                           ADS      ADDRWD                                #    BE CONSECUTIVE AND IN THAT ORDER
053537,000266: 
053538,000267: 23,3710           00006                           EXTEND                                         
053539,000268: 23,3711           50130                           INDEX    BUF                                   
053540,000269: 23,3712           50143                           INDEX    DEX1                                  
053541,000270: 23,3713           30123                           DCA      VBUF                                  
053542,000271: 23,3714           52155                           DXCH     MPAC                                  
053543,000272: 23,3715           07112                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
053544,000273: 23,3716           52155                           DXCH     MPAC                                  
053545,000274: 23,3717           20160                           DAS      TERM1TMP                              
053546,000275: 23,3720           52160                           DXCH     TERM1TMP                              
053547,000276: 23,3721           20001                           DDOUBL                                         
053548,000277: 23,3722           50130                           INDEX    BUF                                   
053549,000278: 23,3723           50143                           INDEX    DEX1                                  
053550,000279: 23,3724           52123                           DXCH     VBUF                                  
053551,000280: 23,3725           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
053552,000281: 
053553,000282: 23,3726           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
053554,000283: 23,3727           13672                           TCF      LOOP2                                 
053555,000284: 
053556,000285: 23,3730           00006                           EXTEND                                         
053557,000286: 23,3731           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
053558,000287: 
053559,000288: 23,3732           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
053560,000289: 23,3733           13655                           TCF      R*TL**P                               
053561,000290: 23,3734           00145                           TC       RTNSAVER                              
053562,000291: 23,3735           13655                           TCF      R*TL**P                               
053563,000292: 23,3736           00145                           TC       RTNSAVER                              
053564,000293: 
053565,000294: 23,3737           00735        SINESLOC           ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
053566,000295: 
053567,000296: 23,3740           00004        INDEXI             DEC      4          B-14                       #  **********    DON'T    **********
053568,000297: 23,3741           00002                           DEC      2          B-14                       #  **********    TOUCH    **********
053569,000298: 23,3742           00000                           DEC      0          B-14                       #  **********    THESE    **********

Page 1254

053571,000300: 23,3743           00004                           DEC      4          B-14                       #  **********  CONSTANTS  **********
053572,000301: 
053573,000302:                                                                                                  #  ****************************************************************************************************************
053574,000303: 
053575,000304: 10,2030                                           BANK     10                                    
053576,000305: 10,2000                                           SETLOC   FLESHLOC                              
053577,000306: 10,2000                                           BANK                                           
053578,000307: 10,2030                                           COUNT*   $$/POWFL                              
053579,000308: 
053580,000309:                                                                                                  #      ROUTINE FLESHPOT COMPUTES THE BODY-STABLE MEMBER TRANSFORMATION MATRIX (COMMONLY CALLED XNB) AND STORES
053581,000310:                                                                                                  #  IT IN THE LOCATIONS SPECIFIED BY THE ECADR ENTERING IN A.
053582,000311: 
053583,000312: 10,2030           77776        CALCSMSC           EXIT                                           
053584,000313: 10,2031           04616                           TC       BANKCALL                              
053585,000314: 10,2032           20036                           CADR     FLESHPOT   -1                         
053586,000315: 10,2033           06042                           TC       INTPRET                               
053587,000316: 10,2034           77616                           RVQ                                            
053588,000317: 
053589,000318: 10,2035           02664        XNBECADR           ECADR    XNB                                   
053590,000319: 
053591,000320: 10,2036           32035                 -1        CAF      XNBECADR                              
053592,000321: 
053593,000322: 10,2037           54142        FLESHPOT           TS       TEM2                                  
053594,000323: 10,2040           56003                           XCH      EBANK                                 
053595,000324: 10,2041           56142                           XCH      TEM2                                  
053596,000325: 10,2042           74357                           MASK     LOW8                                  
053597,000326: 10,2043           65007                           AD       OCT1400                               
053598,000327: 10,2044           54141                           TS       TEM1                                  
053599,000328: 
053600,000329: 10,2045           00006                           EXTEND                                         
053601,000330: 10,2046           30744                           DCA      COSCDUY                               
053602,000331: 10,2047           52155                           DXCH     MPAC                                  
053603,000332: 10,2050           07106                           TC       DMP                                   
053604,000333: 10,2051           00745                           ADRES    COSCDUZ                               
053605,000334: 10,2052           52155                           DXCH     MPAC                                  
053606,000335: 10,2053           20001                           DDOUBL                                         
053607,000336: 10,2054           50141                           INDEX    TEM1                                  
053608,000337: 10,2055           52001                           DXCH     0                                     #  = COSY COSZ
053609,000338: 
053610,000339: 10,2056           00006                           EXTEND                                         
053611,000340: 10,2057           30740                           DCA      SINCDUZ                               
053612,000341: 10,2060           50141                           INDEX    TEM1                                  
053613,000342: 10,2061           52003                           DXCH     2                                     #  = SINZ
053614,000343: 
053615,000344: 10,2062           00006                           EXTEND                                         
053616,000345: 10,2063           40736                           DCS      SINCDUY                               
053617,000346: 10,2064           52155                           DXCH     MPAC                                  
053618,000347: 10,2065           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ

Page 1255

053620,000349: 10,2066           52155                           DXCH     MPAC                                  
053621,000350: 10,2067           20001                           DDOUBL                                         
053622,000351: 10,2070           50141                           INDEX    TEM1                                  
053623,000352: 10,2071           52005                           DXCH     4                                     #  = - SINY COSZ
053624,000353: 
053625,000354: 10,2072           00006                           EXTEND                                         
053626,000355: 10,2073           40742                           DCS      SINCDUX                               
053627,000356: 10,2074           52155                           DXCH     MPAC                                  
053628,000357: 10,2075           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUZ STILL
053629,000358: 10,2076           52155                           DXCH     MPAC                                  
053630,000359: 10,2077           20001                           DDOUBL                                         
053631,000360: 10,2100           52160                           DXCH     MPAC       +3                         
053632,000361: 
053633,000362: 10,2101           00006                           EXTEND                                         
053634,000363: 10,2102           40742                           DCS      SINCDUX                               
053635,000364: 10,2103           52155                           DXCH     MPAC                                  
053636,000365: 10,2104           07106                           TC       DMP                                   
053637,000366: 10,2105           00737                           ADRES    SINCDUZ                               
053638,000367: 10,2106           00006                           EXTEND                                         
053639,000368: 10,2107           40155                           DCS      MPAC                                  
053640,000369: 10,2110           52162                           DXCH     MPAC       +5                         
053641,000370: 10,2111           07106                           TC       DMP                                   
053642,000371: 10,2112           00735                           ADRES    SINCDUY                               
053643,000372: 10,2113           52155                           DXCH     MPAC                                  
053644,000373: 10,2114           20001                           DDOUBL                                         
053645,000374: 10,2115           20001                           DDOUBL                                         
053646,000375: 10,2116           52162                           DXCH     MPAC       +5                         
053647,000376: 
053648,000377: 10,2117           52155                           DXCH     MPAC                                  
053649,000378: 10,2120           07106                           TC       DMP                                   
053650,000379: 10,2121           00743                           ADRES    COSCDUY                               
053651,000380: 10,2122           52155                           DXCH     MPAC                                  
053652,000381: 10,2123           20001                           DDOUBL                                         
053653,000382: 10,2124           20001                           DDOUBL                                         
053654,000383: 10,2125           52131                           DXCH     BUF                                   
053655,000384: 
053656,000385: 10,2126           00006                           EXTEND                                         
053657,000386: 10,2127           30744                           DCA      COSCDUY                               
053658,000387: 10,2130           52155                           DXCH     MPAC                                  
053659,000388: 10,2131           07106                           TC       DMP                                   
053660,000389: 10,2132           00747                           ADRES    COSCDUX                               
053661,000390: 10,2133           52155                           DXCH     MPAC                                  
053662,000391: 10,2134           20001                           DDOUBL                                         
053663,000392: 10,2135           20162                           DAS      MPAC       +5                         
053664,000393: 
053665,000394: 10,2136           00006                           EXTEND                                         
053666,000395: 10,2137           30736                           DCA      SINCDUY                               
053667,000396: 10,2140           52155                           DXCH     MPAC                                  
053668,000397: 10,2141           07112                           TC       DMPSUB                                #  ADDRWD SET TO COSCDUX
053669,000398: 10,2142           52155                           DXCH     MPAC                                  
053670,000399: 

Page 1256

053672,000401: 10,2143           20001                           DDOUBL                                         
053673,000402: 10,2144           20131                           DAS      BUF                                   
053674,000403: 
053675,000404: 10,2145           52131                           DXCH     BUF                                   
053676,000405: 10,2146           52155                           DXCH     MPAC                                  
053677,000406: 
053678,000407: 10,2147           00006                           EXTEND                                         
053679,000408: 10,2150           30155                           DCA      MPAC                                  
053680,000409: 10,2151           50141                           INDEX    TEM1                                  
053681,000410: 10,2152           52015                           DXCH     14                                    #  = SINY COSX + SINX SINZ COSY
053682,000411: 
053683,000412: 10,2153           00006                           EXTEND                                         
053684,000413: 10,2154           30160                           DCA      MPAC       +3                         
053685,000414: 10,2155           50141                           INDEX    TEM1                                  
053686,000415: 10,2156           52017                           DXCH     16                                    #  = - SINX COSZ
053687,000416: 
053688,000417: 10,2157           00006                           EXTEND                                         
053689,000418: 10,2160           30162                           DCA      MPAC       +5                         
053690,000419: 10,2161           50141                           INDEX    TEM1                                  
053691,000420: 10,2162           52021                           DXCH     20                                    #  = COSX COSY - SINX SINY SINZ
053692,000421: 
053693,000422: 10,2163           30141                           CA       TEM1                                  
053694,000423: 10,2164           54116                           TS       ADDRWD                                
053695,000424: 10,2165           00006                           EXTEND                                         
053696,000425: 10,2166           30006                           DCA      Z                                     
053697,000426: 10,2167           64751                           AD       FOUR                                  
053698,000427: 10,2170           52165                           DXCH     LOC                                   
053699,000428: 10,2171           34744                           CAF      BIT8                                  
053700,000429: 10,2172           54023                           TS       EDOP                                  
053701,000430: 10,2173           17463                           TCF      VXV                                   
053702,000431: 10,2174           52155                           DXCH     MPAC                                  
053703,000432: 10,2175           20001                           DDOUBL                                         
053704,000433: 10,2176           50141                           INDEX    TEM1                                  
053705,000434: 10,2177           52007                           DXCH     6                                     
053706,000435: 
053707,000436: 10,2200           52160                           DXCH     MPAC       +3                         
053708,000437: 10,2201           20001                           DDOUBL                                         
053709,000438: 10,2202           50141                           INDEX    TEM1                                  
053710,000439: 10,2203           52011                           DXCH     10                                    
053711,000440: 
053712,000441: 10,2204           52162                           DXCH     MPAC       +5                         
053713,000442: 10,2205           20001                           DDOUBL                                         
053714,000443: 10,2206           50141                           INDEX    TEM1                                  
053715,000444: 10,2207           52013                           DXCH     12                                    
053716,000445: 
053717,000446: 10,2210           30142                           CA       TEM2                                  
053718,000447: 10,2211           54003                           TS       EBANK                                 
053719,000448: 10,2212           14631                           TCF      SWRETURN                              
053720,000449: 

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