Source Code

These source-code files are part of a reconstructed copy of Comanche 72, the first release of the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 13.

They have been adapted from sources files created from a listing of Comanche 55. These source files were updated to match binary dumps of a set of Comanche 67 rope modules. They were then further modified by applying known changes between Comanche 67 and Comanche 72. A binary dump of module B2 of Comanche 72, part number 2010802-021, was also used to validate changes made to banks 05-13. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments.

Since no contemporary listings of Comanche 72 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

016463,000002:                                                                                                  ## Copyright:   Public domain.
016464,000003:                                                                                                  ## Filename:    R60,R62.agc
016465,000004:                                                                                                  ## Purpose:     A section of Comanche revision 072.
016466,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
016467,000006:                                                                                                  ##              release of the software for the Command Module's (CM) Apollo
016468,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 13. No original listings
016469,000008:                                                                                                  ##              of this program are available; instead, this file was recreated
016470,000009:                                                                                                  ##              from a printout of Comanche 055, binary dumps of a set of
016471,000010:                                                                                                  ##              Comanche 067 rope modules, and changelogs between Comanche 067
016472,000011:                                                                                                  ##              and 072. It has been adapted such that the resulting bugger words
016473,000012:                                                                                                  ##              exactly match those specified for Comanche 072 in NASA drawing
016474,000013:                                                                                                  ##              2021153G, which gives relatively high confidence that the
016475,000014:                                                                                                  ##              reconstruction is correct.
016476,000015:                                                                                                  ## Assembler:   yaYUL
016477,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
016478,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
016479,000018:                                                                                                  ## Mod history: 2024-05-13 MAS  Created from Comanche 067.
016480,000019: 
016481,000020: 34,2002                                           BANK     34                                    
016482,000021: 27,2000                                           SETLOC   MANUVER                               
016483,000022: 27,2000                                           BANK                                           
016484,000023: 
016485,000024: 27,2000     1146                                  EBANK=   TEMPR60                               
016486,000025: 
016487,000026: 27,2000                                           COUNT    27/R60                                
016488,000027: 
016489,000028:                                                                                                  #  R60CSM
016490,000029:                                                                                                  #  REV 13        CONFORMS TO GSOP CHAPTER FOUR REVISION LOGIC 09 JAN 18, 1968
016491,000030: 
016492,000031: 27,2000           04725        R60CSM             TC       MAKECADR                              
016493,000032: 27,2001           55146                           TS       TEMPR60                               
016494,000033: 
016495,000034:                                                                                                  #  INSERT PRIODSP CHECK WITH R22 (V06N49) WITH JENNINGS BRODEUR          
016496,000035: 
016497,000036: 27,2002           35026        REDOMANN           CAF      BIT6                                  
016498,000037: 27,2003           70101                           MASK     FLAGWRD5                              #  IS 3-AXIS FLAG SET
016499,000038: 27,2004           10000                           CCS      A                                     
016500,000039: 27,2005           12013                           TCF      TOBALL                                #  YES
016501,000040: 27,2006           06006                           TC       INTPRET                               
016502,000041: 27,2007           77624                           CALL                                           
016503,000042: 27,2010           56126                                    VECPOINT                              #  TO COMPUTE FINAL ANGLES
016504,000043: 27,2011           01156                           STORE    CPHI                                  #  STORE FINAL ANGLES - CPHI, CTHETA, CPSI
016505,000044: 27,2012           77776                           EXIT                                           
016506,000045: 
016507,000046: 27,2013           32125        TOBALL             CAF      V06N18                                
016508,000047: 27,2014           04676                           TC       BANKCALL                              
016509,000048: 27,2015           21132                           CADR     GOPERF2R                              #  DISPLAY PLEASE PERFORM AUTO MANEUVER
016510,000049: 27,2016           02114                           TC       R61TEST                               
016511,000050: 27,2017           02023                           TC       REDOMANC                              #  PROCEED
016512,000051: 27,2020           12052                           TCF      ENDMANU1                              #  ENTER I.E. FINISHED WITH R60
016513,000052: 
016514,000053: 27,2021           02056                           TC       CHKLINUS                              #  TO CHECK FOR PRIORITY DISPLAYS
016515,000054: 27,2022           05233                           TC       ENDOFJOB                              
016516,000055: 
016517,000056: 27,2023           35026        REDOMANC           CAF      BIT6                                  
016518,000057: 27,2024           70101                           MASK     FLAGWRD5                              #  IS 3-AXIS FLAG SET
016519,000058: 27,2025           10000                           CCS      A                                     
016520,000059: 27,2026           12034                           TCF      TOBALLC                               #  YES
016521,000060: 27,2027           06006                           TC       INTPRET                               
016522,000061: 27,2030           77624                           CALL                                           
016523,000062: 27,2031           56126                                    VECPOINT                              #  TO COMPUTE FINAL ANGLES
016524,000063: 27,2032           01156                           STORE    CPHI                                  #  STORE ANGLES
016525,000064: 27,2033           77776                           EXIT                                           
016526,000065: 
016527,000066: 27,2034           34371        TOBALLC            CAF      PRIO30                                #  IS MODE AUTO AND CTL GNC
016528,000067: 27,2035           00006                           EXTEND                                         
016529,000068: 27,2036           06031                           RXOR     CHAN31                                
016530,000069: 27,2037           77707                           MASK     13,14,15                              
016531,000070: 27,2040           00006                           EXTEND                                         
016532,000071: 27,2041           12043                           BZF      +2                                    #  AUTO, NON-FLASH N18
016533,000072: 27,2042           12013                           TCF      TOBALL                                #  NOT AUTO
016534,000073: 
016535,000074: 27,2043           32125                           CAF      V06N18                                #  SET UP NON-FLASHING V06 N18
016536,000075: 27,2044           04676                           TC       BANKCALL                              
016537,000076: 27,2045           20676                           CADR     GODSPR                                
016538,000077: 27,2046           02056                           TC       CHKLINUS                              
016539,000078: 
016540,000079: 27,2047           04676        STARTMNV           TC       BANKCALL                              
016541,000080: 27,2050           17627                           CADR     GOMANUR                               
016542,000081: 27,2051           12013        ENDMANUV           TCF      TOBALL                                #  FINISHED MANEUVER
016543,000082: 
016544,000083: 27,2052           05574        ENDMANU1           TC       DOWNFLAG                              #  RESET 3-AXIS FLAG
016545,000084: 27,2053           00124                           ADRES    3AXISFLG                              #  BIT 6 FLAG 5
016546,000085: 27,2054           31146                           CAE      TEMPR60                               #                                        -
016547,000086: 27,2055           04720                           TC       BANKJUMP                              #                                        -
016548,000087: 
016549,000088: 27,2056           40100        CHKLINUS           CS       FLAGWRD4                              
016550,000089: 27,2057           75020                           MASK     BIT12                                 #  IS PRIORITY DISPLAY FLAG SET          -
016551,000090: 27,2060           10000                           CCS      A                                     #                                        -
016552,000091: 27,2061           00002                           TC       Q                                     #  NO - EXIT
016553,000092: 27,2062           30002                           CA       Q                                     
016554,000093: 27,2063           54156                           TS       MPAC       +2                         #  SAVE RETURN
016555,000094: 27,2064           46214                           CS       THREE                                 #  OBTAIN LOCATION FOR RESTART.
016556,000095: 27,2065           60133                           AD       BUF2                                  #  HOLDS Q OF LAST DISPALY
016557,000096: 27,2066           55053                           TS       TBASE1                                
016558,000097: 
016559,000098: 27,2067           05426                           TC       PHASCHNG                              
016560,000099: 27,2070           00071                           OCT      71                                    #  1.7SPOT FOR RELINUS
016561,000100: 
016562,000101: 27,2071           35025                           CAF      BIT7                                  
016563,000102: 27,2072           05542                           TC       LINUS                                 #  GO SET BITS FOR PRIORITY DISPLAY      -
016564,000103: 27,2073           00156                           TC       MPAC       +2                         
016565,000104: 
016566,000105: 27,2074           35027        RELINUS            CAF      BIT5                                  #  IS TRACK FLAG ON
016567,000106: 27,2075           70075                           MASK     FLAGWRD1                              
016568,000107: 27,2076           00006                           EXTEND                                         
016569,000108: 27,2077           12111                           BZF      GOREDO20                              #  NO
016570,000109: 
016571,000110: 27,2100           05562                           TC       UPFLAG                                
016572,000111: 27,2101           00077                           ADRES    PDSPFLAG                              #  R60 PRIODSP FLAG
016573,000112: 
016574,000113: 27,2102           05562                           TC       UPFLAG                                
016575,000114: 27,2103           00024                           ADRES    TARG1FLG                              #  FOR R52
016576,000115: 
016577,000116: 27,2104           35035                           CAF      ZERO                                  #  RESET TO ZERO, SINCE
016578,000117: 27,2105           55303                           TS       OPTIND                                #  OPTIND WAS SET TO -1 BY V379
016579,000118: 
016580,000119: 27,2106           35102                           CAF      PRIO14                                #  RESTORE ORIGINAL PRIORITY
016581,000120: 27,2107           05224                           TC       PRIOCHNG                              
016582,000121: 
016583,000122: 27,2110           01053                           TC       TBASE1                                
016584,000123: 
016585,000124: 27,2111           05426        GOREDO20           TC       PHASCHNG                              
016586,000125: 27,2112           00111                           OCT      111                                   #  1.11 FOR PIKUP20
016587,000126: 
016588,000127: 27,2113           05233                           TC       ENDOFJOB                              
016589,000128: 
016590,000129: 27,2114           31011        R61TEST            CA       MODREG                                #  ARE WE IN P00.  IF YES THIS MUST BE
016591,000130: 27,2115           00006                           EXTEND                                         #        VERB49 OR VERB89 SO DO ENDEXT.
016592,000131: 27,2116           12052                           BZF      ENDMANU1                              #  RESET 3-AXIS & RUTURN.  USER DOES ENDEXT
016593,000132: 27,2117           30100                           CA       FLAGWRD4                              #  ARE WE IN R61 (P20)
016594,000133: 27,2120           75020                           MASK     BIT12                                 
016595,000134: 27,2121           00006                           EXTEND                                         
016596,000135: 27,2122           14106                           BZF      GOTOPOOH                              #  NO
016597,000136: 27,2123           04622                           TC       GOTOV56                               #  YES
016598,000137: 
016599,000138: 27,2124           20100        BIT14+7            OCT      20100                                 #                                        -
016600,000139: 27,2125           01422        V06N18             VN       0618                                  
016601,000140: 
016602,000141:                                                                                                  #  PROGRAM DESCRIPTION - VECPOINT
016603,000142: 
016604,000143:                                                                                                  #  THIS INTERPRETIVE SUBROUTINE MAY BE USED TO POINT A SPACECRAFT AXIS IN A DESIRED DIRECTION.  THE AXIS
016605,000144:                                                                                                  #  TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN SUCCESSIVE LOCATIONS OF ERASABLE MEMORY
016606,000145:                                                                                                  #  BEGINNING WITH THE LOCATION CALLED SCAXIS.  THE COMPONENTS OF THIS VECTOR ARE GIVEN IN SPACECRAFT COORDINATES.
016607,000146:                                                                                                  #  THE DIRECTION IN WHICH THIS AXIS IS TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN
016608,000147:                                                                                                  #  SUCCESSIVE LOCATIONS OF ERASABLE MEMORY BEGINNING WITH THE ADDRESS CALLED POINTVSM.  THE COMPONENTS OF THIS
016609,000148:                                                                                                  #  VECTOR ARE GIVEN IN STABLE MEMBER COORDINATES.  WITH THIS INFORMATION VECPOINT COMPUTES A SET OF THREE GIMBAL
016610,000149:                                                                                                  #  ANGLES (2S COMPLEMENT) CORRESPONDING TO THE CROSS-PRODUCT ROTATION BETWEEN SCAXIS AND POINTVSM AND STORES THEM
016611,000150:                                                                                                  #  IN T(MPAC) BEFORE RETURNING TO THE CALLER.
016612,000151: 
016613,000152:                                                                                                  #  THIS ROTATION, HOWEVER, MAY BRING THE S/C INTO GIMBAL LOCK.  WHEN POINTING A VECTOR IN THE Y-Z PLANE,
016614,000153:                                                                                                  #  THE TRANSPONDER AXIS, OR THE AOT FOR THE LEM, THE PROGRAM WILL CORRECT THIS PROBLEM BY ROTATING THE CROSS-
016615,000154:                                                                                                  #  PRODUCT ATTITUDE ABOUT POINTVSM BY A FIXED AMOUNT SUFFICIENT TO ROTATE THE DESIRED S/C ATTITUDE OUT OF GIMBAL
016616,000155:                                                                                                  #  LOCK.  IF THE AXIS TO BE POINTED IS MORE THAN 40.6 DEGREES BUT LESS THAN 60.5 DEG FROM THE +X (OR -X) AXIS,
016617,000156:                                                                                                  #  THE ADDITIONAL ROTATION TO AVOID GIMAL LOCK IS 35 DEGREES.  IF THE AXIS IS MORE THAN 60.5 DEGEES FROM +X (OR -X)
016618,000157:                                                                                                  #  THE ADDITIONAL ROTATION IS 35 DEGREES.  THE GIMBAL ANGLES CORRESPONDING TO THIS ATTITUDE ARE THEN COMPUTED AND
016619,000158:                                                                                                  #  STORED AS 2S COMPLIMENT ANGLES IN T(MPAC) BEFORE RETURNING TO THE CALLER.
016620,000159: 
016621,000160:                                                                                                  #  WHEN POINTING THE X-AXIS, OR THE THRUST VECTOR, OR ANY VECTOR WITHIN 40.6 DEG OF THE X-AXIS, VECPOINT
016622,000161:                                                                                                  #  CANNOT CORRECT FOR A CROSS-PRODUCT ROTATION INTO GIMBAL LOCK.  IN THIS CASE A PLATFORM REALIGNMENT WOULD BE
016623,000162:                                                                                                  #  REQUIRED TO POINT THE VECTOR IN THE DESIRED DIRECTION.  AT PRESENT NO INDICATION IS GIVEN FOR THIS SITUATION
016624,000163:                                                                                                  #  EXCEPT THAT THE FINAL MIDDLE GIMBAL ANGLE IN MPAC +2 IS GREATER THAN 59 DEGREES.
016625,000164: 
016626,000165:                                                                                                  #  CALLING SEQUENCE -
016627,000166: 
016628,000167:                                                                                                  #        1)      LOAD SCAXIS, POINTVSM
016629,000168:                                                                                                  #        2)      CALL
016630,000169:                                                                                                  #                        VECPOINT
016631,000170: 
016632,000171:                                                                                                  #  RETURNS WITH
016633,000172: 
016634,000173:                                                                                                  #        1)      DESIRED OUTER GIMBAL ANGLE IN MPAC
016635,000174:                                                                                                  #        2)      DESIRED INNER GIMBAL ANGLE IN MPAC +1
016636,000175:                                                                                                  #        3)      DESIRED MIDDLE GIMBAL ANGLE IN MPAC +2
016637,000176: 
016638,000177:                                                                                                  #  ERASABLES USED -
016639,000178: 
016640,000179:                                                                                                  #        1)      SCAXIS          6
016641,000180:                                                                                                  #        2)      POINTVSM        6
016642,000181:                                                                                                  #        3)      MIS             18
016643,000182:                                                                                                  #        4)      DEL             18
016644,000183:                                                                                                  #        5)      COF             6
016645,000184:                                                                                                  #        6)      VECQTEMP        1
016646,000185:                                                                                                  #        7)      ALL OF VAC AREA 43
016647,000186: 
016648,000187:                                                                                                  #                        TOTAL   99
016649,000188: 
016650,000189: 27,2000                                           SETLOC   VECPT                                 
016651,000190: 27,2000                                           BANK                                           
016652,000191: 27,2126  E6,1661                                  EBANK=   BCDU                                  
016653,000192: 
016654,000193: 27,2126                                           COUNT    27/VECPT                              
016655,000194: 
016656,000195: 27,2126           40020        VECPOINT           STQ      BOV                                   #  SAVE RETURN ADDRESS
016657,000196: 27,2127           03310                                    VECQTEMP                              
016658,000197: 27,2130           56131                                    VECLEAR                               #  AND CLEAR OVFIND
016659,000198: 27,2131           47164        VECLEAR            AXC,2    RTB                                   
016660,000199: 27,2132           03320                                    MIS                                   #  READ THE PRESENT CDU ANGLES AND
016661,000200: 27,2133           44376                                    READCDUK                              #  STORE THEM IN PD25, 26, 27
016662,000201: 27,2134           34032                           STCALL   25D                                   
016663,000202: 27,2135           44405                                    CDUTODCM                              #  S/C AXES TO STABLE MEMBER AXES (MIS)
016664,000203: 27,2136           61375                           VLOAD    VXM                                   
016665,000204: 27,2137           03357                                    POINTVSM                              #  RESOLVE THE POINTING DIRECTION VF INTO
016666,000205: 27,2140           03321                                    MIS                                   #  INITIAL S/C AXES (VF = POINTVSM)
016667,000206: 27,2141           77656                           UNIT                                           
016668,000207: 27,2142           00035                           STORE    28D                                   
016669,000208:                                                                                                  #  PD 28 29 30 31 32 33
016670,000209: 27,2143           53435                           VXV      UNIT                                  #  TAKE THE CROSS PRODUCT VF X VI
016671,000210: 27,2144           03351                                    SCAXIS                                #  WHERE VI = SCAXIS
016672,000211: 27,2145           57400                           BOV      VCOMP                                 
016673,000212: 27,2146           56256                                    PICKAXIS                              
016674,000213: 27,2147           17343                           STODL    COF                                   #  CHECK MAGNITUDE
016675,000214: 27,2150           00045                                    36D                                   #  OF CROSS PRODUCT
016676,000215: 27,2151           50025                           DSU      BMN                                   #  VECTOR, IF LESS
016677,000216: 27,2152           16327                                    DPB-14                                #  THAN B-14 ASSUME
016678,000217: 27,2153           56256                                    PICKAXIS                              #  UNIT OPERATION
016679,000218: 27,2154           50375                           VLOAD    DOT                                   #  INVALID.
016680,000219: 27,2155           03351                                    SCAXIS                                
016681,000220: 27,2156           00035                                    28D                                   
016682,000221: 27,2157           65552                           SL1      ARCCOS                                
016683,000222: 27,2160           77624        COMPMATX           CALL                                           #  NOW COMPUTE THE TRANSFORMATION FROM
016684,000223: 27,2161           44530                                    DELCOMP                               #  FINAL S/C AXES TO INITIAL S/C AXES MFI
016685,000224: 27,2162           75160                           AXC,1    AXC,2                                 
016686,000225: 27,2163           03320                                    MIS                                   #  COMPUTE THE TRANSFORMATION FROM FINAL
016687,000226: 27,2164           03425                                    DEL                                   #  S/C AXES TO STABLE MEMBER AXES
016688,000227: 27,2165           77624                           CALL                                           #  MFS = MIS MFI
016689,000228: 27,2166           44304                                    MXM3                                  #  (IN PD LIST)
016690,000229: 
016691,000230: 27,2167           51545                           DLOAD    ABS                                   
016692,000231: 27,2170           00007                                    6                                     #  MFS6 = SIN(CPSI)                      $2
016693,000232: 27,2171           50025                           DSU      BMN                                   
016694,000233: 27,2172           16314                                    SINGIMLC                              #  = SIN(59 DEGS)                        $2
016695,000234: 27,2173           56246                                    FINDGIMB                              #  /CPSI/ LESS THAN 59 DEGS
016696,000235:                                                                                                  #  I.E. DESIRED ATTITUDE NOT IN GIMBAL LOCK
016697,000236: 
016698,000237: 27,2174           51545                           DLOAD    ABS                                   #  CHECK TO SEE IF WE ARE POINTING
016699,000238: 27,2175           03351                                    SCAXIS                                #  THE THRUST AXIS
016700,000239: 27,2176           51025                           DSU      BPL                                   
016701,000240: 27,2177           16316                                    SINVEC1                               #  SIN 49.4 DEGS                         $2
016702,000241: 27,2200           56246                                    FINDGIMB                              #  IF SO, WE ARE TRYING TO POINT IT INTO
016703,000242: 27,2201           77775                           VLOAD                                          #  GIMBAL LOCK, ABORT COULD GO HERE
016704,000243: 27,2202           77626                           STADR                                          
016705,000244: 27,2203           50442                           STOVL    MIS        +12D                       
016706,000245: 27,2204           77626                           STADR                                          #  STORE MFS (IN PD LIST) IN MIS
016707,000246: 27,2205           50450                           STOVL    MIS        +6                         
016708,000247: 27,2206           77626                           STADR                                          
016709,000248: 27,2207           50456                           STOVL    MIS                                   
016710,000249: 27,2210           03327                                    MIS        +6                         #  INNER GIMBAL AXIS IN FINAL S/C AXES
016711,000250: 27,2211           57444                           BPL      VCOMP                                 #  LOCATE THE IG AXIS DIRECTION CLOSEST TO
016712,000251: 27,2212           56213                                    IGSAMEX                               #  FINAL X S/C AXIS
016713,000252: 
016714,000253: 27,2213           50035        IGSAMEX            VXV      BMN                                   #  FIND THE SHORTEST WAY OF ROTATING THE 
016715,000254: 27,2214           03351                                    SCAXIS                                #  S/C OUT OF GIMBAL LOCK BY A ROTATION 
016716,000255: 27,2215           56222                                    U=SCAXIS                              #  ABOUT +- SCAXIS, I.E. IF  (IG (SGN MFS3)
016717,000256:                                                                                                  #  X SCAXIS . XF) LESS THAN 0, U = SCAXIS
016718,000257:                                                                                                  #  OTHERWISE U = -SCAXIS
016719,000258: 
016720,000259: 27,2216           57575                           VLOAD    VCOMP                                 
016721,000260: 27,2217           03351                                    SCAXIS                                
016722,000261: 27,2220           37343                           STCALL   COF                                   #  ROTATE ABOUT -SCAXIS
016723,000262: 27,2221           56225                                    CHEKAXIS                              
016724,000263: 27,2222           77775        U=SCAXIS           VLOAD                                          
016725,000264: 27,2223           03351                                    SCAXIS                                
016726,000265: 27,2224           03343                           STORE    COF                                   #  ROTATE ABOUT + SCAXIS
016727,000266: 27,2225           51545        CHEKAXIS           DLOAD    ABS                                   
016728,000267: 27,2226           03351                                    SCAXIS                                #  SEE IF WE ARE POINTING THE AOT
016729,000268: 27,2227           51025                           DSU      BPL                                   
016730,000269: 27,2230           16320                                    SINVEC2                               #  SIN 29.5 DEGS                         $2
016731,000270: 27,2231           56235                                    PICKANG1                              #  IF SO, ROTATE 50 DEGS ABOUT +- SCAXIS
016732,000271: 27,2232           52145                           DLOAD    GOTO                                  #  IF NOT, MUST BE POINTING THE TRANSPONDER
016733,000272: 27,2233           16324                                    VECANG2                               #  OR SOME VECTOR IN THE Y, OR Z PLANE
016734,000273: 27,2234           56237                                    COMPMFSN                              #  IN THIS CASE ROTATE 35 DEGS TO GET OUT
016735,000274:                                                                                                  #  OF GIMBAL LOCK (VECANG2 $360)
016736,000275: 27,2235           77745        PICKANG1           DLOAD                                          
016737,000276: 27,2236           16322                                    VECANG1                               #  = 50 DEGS                          $ 360
016738,000277: 27,2237           77624        COMPMFSN           CALL                                           
016739,000278: 27,2240           44530                                    DELCOMP                               #  COMPUTE THE ROTATION ABOUT SCAXIS TO
016740,000279: 27,2241           75160                           AXC,1    AXC,2                                 #  BRING MFS OUT OF GIMBAL LOCK
016741,000280: 27,2242           03320                                    MIS                                   
016742,000281: 27,2243           03425                                    DEL                                   
016743,000282: 27,2244           77624                           CALL                                           #  COMPUTE THE NEW TRANSFORMATION FROM
016744,000283: 27,2245           44304                                    MXM3                                  #  DESIRED S/C AXES TO STABLE MEMBER AXES
016745,000284:                                                                                                  #  WHICH WILL ALIGN VI WITH VF AND AVOID
016746,000285:                                                                                                  #  GIMBAL LOCK
016747,000286: 27,2246           45160        FINDGIMB           AXC,1    CALL                                  
016748,000287: 27,2247           00000                                    0                                     #  EXTRACT THE COMMANDED CDU ANGLES FROM
016749,000288: 27,2250           44655                                    DCMTOCDU                              #  THIS MATRIX
016750,000289: 27,2251           40234                           RTB      SETPD                                 
016751,000290: 27,2252           45552                                    V1STO2S                               #  CONVERT TO 2:S COMPLEMENT
016752,000291: 27,2253           00001                                    0                                     
016753,000292: 27,2254           77650                           GOTO                                           
016754,000293: 27,2255           03310                                    VECQTEMP                              #  RETURN TO CALLER
016755,000294: 
016756,000295: 27,2256           50375        PICKAXIS           VLOAD    DOT                                   #  IF VF X VI = 0, FIND VF . VI
016757,000296: 27,2257           00035                                    28D                                   
016758,000297: 27,2260           03351                                    SCAXIS                                
016759,000298: 27,2261           72240                           BMN      TLOAD                                 
016760,000299: 27,2262           56266                                    ROT180                                
016761,000300: 27,2263           00032                                    25D                                   
016762,000301: 27,2264           77650                           GOTO                                           #  IF VF = VI, CDU DESIRED = PRESENT CDU
016763,000302: 27,2265           03310                                    VECQTEMP                              #  PRESENT CDU ANGLES
016764,000303: 
016765,000304: 27,2266           47375        ROT180             VLOAD    VXV                                   #  IF VF, VI ANTIPARALLEL, 180 DEG ROTATION
016766,000305: 27,2267           03327                                    MIS        +6                         #  IS REQUIRED.  Y STABLE MEMBER AXIS IN
016767,000306: 27,2270           15332                                    HIUNITX                               #  INITIAL S/C AXIS.
016768,000307: 27,2271           47256                           UNIT     VXV                                   #  FIND Y(SM) X X(I)
016769,000308: 27,2272           03351                                    SCAXIS                                #  FIND UNIT(VI X UNIT(Y(SM) X X(I)))
016770,000309: 27,2273           40056                           UNIT     BOV                                   #  I.E. PICK A VECTOR IN THE PLANE OF X(I),
016771,000310: 27,2274           56310                                    PICKX                                 #  Y(SM) PERPENDICULAR TO VI
016772,000311: 27,2275           17343                           STODL    COF                                   
016773,000312: 27,2276           00045                                    36D                                   #  CHECK MAGNITUDE
016774,000313: 27,2277           50025                           DSU      BMN                                   #  OF THIS VECTOR.
016775,000314: 27,2300           16327                                    DPB-14                                #  IF LESS THAN B-14,
016776,000315: 27,2301           56310                                    PICKX                                 #  PICK X-AXIS.
016777,000316: 27,2302           77775                           VLOAD                                          
016778,000317: 27,2303           03343                                    COF                                   
016779,000318: 27,2304           17343        XROT               STODL    COF                                   
016780,000319: 27,2305           15332                                    HIDPHALF                              
016781,000320: 27,2306           77650                           GOTO                                           
016782,000321: 27,2307           56160                                    COMPMATX                              
016783,000322: 27,2310           52175        PICKX              VLOAD    GOTO                                  #  PICK THE XAXIS IN THIS CASE
016784,000323: 27,2311           15332                                    HIUNITX                               
016785,000324: 27,2312           56304                                    XROT                                  
016786,000325: 35,2000                                           BANK     35                                    
016787,000326: 27,2000                                           SETLOC   MANUVER1                              
016788,000327: 27,2000                                           BANK                                           
016789,000328: 
016790,000329: 27,2313           15555 35172  SINGIMLC           2DEC     .4285836003                            #  = SIN(59)                             $2
016791,000330: 
016792,000331: 27,2315           14113 36326  SINVEC1            2DEC     .3796356537                            #  = SIN(49.4)                           $2
016793,000332: 
016794,000333: 27,2317           07701 35703  SINVEC2            2DEC     .2462117800                            #  = SIN(29.5)                           $2
016795,000334: 
016796,000335: 27,2321           04343 21616  VECANG1            2DEC     .1388888889                            #  = 50 DEGREES                        $360
016797,000336: 
016798,000337: 27,2323           03070 34344  VECANG2            2DEC     .09722222222                            #  = 35 DEGREES                        $360
016799,000338: 
016800,000339: 
016801,000340: 27,2325           00000        1BITDP             OCT      0                                     #  KEEP THIS BEFORE DPB(-14)      *********
016802,000341: 27,2326           00001        DPB-14             OCT      00001                                 
016803,000342: 27,2327           00000                           OCT      00000                                 
016804,000343: 34,2002                                           BANK     34                                    
016805,000344: 27,2000                                           SETLOC   MANUVER                               
016806,000345: 27,2000                                           BANK                                           
016807,000346: 
016808,000347:                                                                                                  #  ROUTINE FOR INITIATING AUTOMATIC MANEUVER VIA KEYBOARD (V49)
016809,000348: 
016810,000349: 27,2330     1155                                  EBANK=   CPHI                                  
016811,000350: 
016812,000351: 27,2330                                           COUNT    27/R62                                
016813,000352: 
016814,000353: 27,2330           35066        R62DISP            CAF      V06N22                                #  DISPLAY COMMAND ICDUS CPHI, CTHETA, CPHI
016815,000354: 27,2331           04676                           TC       BANKCALL                              
016816,000355: 27,2332           20720                           CADR     GOFLASH                               
016817,000356: 27,2333           15550                           TCF      ENDEXT                                
016818,000357: 27,2334           12336                           TCF      GOMOVE                                #  PROCEED
016819,000358: 27,2335           12330                           TCF      R62DISP                               #  ENTER
016820,000359: 
016821,000360:                                                                                                  #  ASTRONAUT MAY LOAD NEW ICDUS AT THIS
016822,000361:                                                                                                  #  POINT
016823,000362: 27,2336           05562        GOMOVE             TC       UPFLAG                                #  SET 3-AXIS FLAG
016824,000363: 27,2337           00124                           ADRES    3AXISFLG                              #  BIT 6  FLAG 5
016825,000364: 
016826,000365: 27,2340           04676                           TC       BANKCALL                              
016827,000366: 27,2341           56000                           CADR     R60CSM                                
016828,000367: 27,2342           15550                           TCF      ENDEXT                                
016829,000368: 

End of include-file R60,R62.agc.  Parent file is MAIN.agc