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.

022496,000002:                                                                                                  ## Copyright:   Public domain.
022497,000003:                                                                                                  ## Filename:    P11.agc
022498,000004:                                                                                                  ## Purpose:     A section of Comanche revision 072.
022499,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
022500,000006:                                                                                                  ##              release of the software for the Command Module's (CM) Apollo
022501,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 13. No original listings
022502,000008:                                                                                                  ##              of this program are available; instead, this file was recreated
022503,000009:                                                                                                  ##              from a printout of Comanche 055, binary dumps of a set of
022504,000010:                                                                                                  ##              Comanche 067 rope modules, and changelogs between Comanche 067
022505,000011:                                                                                                  ##              and 072. It has been adapted such that the resulting bugger words
022506,000012:                                                                                                  ##              exactly match those specified for Comanche 072 in NASA drawing
022507,000013:                                                                                                  ##              2021153G, which gives relatively high confidence that the
022508,000014:                                                                                                  ##              reconstruction is correct.
022509,000015:                                                                                                  ## Assembler:   yaYUL
022510,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
022511,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
022512,000018:                                                                                                  ## Mod history: 2024-05-13 MAS  Created from Comanche 067.
022513,000019: 
022514,000020: 
022515,000021:                                                                                                  #  EARTH ORBIT INSERTION MONITOR PROGRAM
022516,000022:                                                                                                  #  *************************************
022517,000023: 
022518,000024:                                                                                                  #  PROGRAM DESCRIPTION -P11-
022519,000025: 
022520,000026:                                                                                                  #        MOD NO. 1
022521,000027:                                                                                                  #        MOD BY ELIASSEN
022522,000028: 
022523,000029:                                                                                                  #  FUNCTIONAL DESCRIPTION
022524,000030: 
022525,000031:                                                                                                  #        P11 IS INITIATED BY
022526,000032: 
022527,000033:                                                                                                  #                A) GYROCOMPASS PRG P02 WHEN LIFTOFF DISCRETE IS RECEIVED OR
022528,000034:                                                                                                  #                B) BACKUP THRU VERB 75 ENTER
022529,000035: 
022530,000036:                                                                                                  #        PROGRAM WILL
022531,000037:                                                                                                  #                1. ZERO CMC CLOCK AT LIFTOFF (OR UPON RECEIPT OF BACKUP)
022532,000038:                                                                                                  #                2. UPDATE TEPHEM TO TIME CMC CLOCK WAS ZEROED
022533,000039:                                                                                                  #                3. INITIATE SERVICER AT PREREAD1
022534,000040:                                                                                                  #                4. CHANGE MAJOR MODE TO 11
022535,000041:                                                                                                  #                5. CLEAR DSKY IN CASE OF V 75
022536,000042:                                                                                                  #                6. STORE LIFTOFF IMU-CDU ANGLES FOR ATT. ERROR DISPLAY
022537,000043:                                                                                                  #                7. TERMINATE GYROCOMPASSING     -   -
022538,000044:                                                                                                  #                8. COMPUTE INITIAL VECTORS      RN, VN            -  -  -
022539,000045:                                                                                                  #                9. COMPUTE REFSMMAT FOR PRELAUNCH ALIGNMENT WHERE U ,U ,U  ARE
022540,000046:                                                                                                  #                        -        -                                 X  Y  Z
022541,000047:                                                                                                  #                        U =UNIT(-R)     LOCAL VERTICAL AT TIME OF LIFTOFF
022542,000048:                                                                                                  #                         Z     
022543,000049:                                                                                                  #                        -       -       -
022544,000050:                                                                                                  #                        U =UNIT(A),     A=HOR VECTOR AT LAUNCH AZIMUTH
022545,000051:                                                                                                  #                         X
022546,000052:                                                                                                  #                        -  -   -
022547,000053:                                                                                                  #                        U =U * U
022548,000054:                                                                                                  #                         U  Z   X
022549,000055:                                                                                                  #                10. SET REFSMMAT KNOWN FLAG
022550,000056:                                                                                                  #                11. SET AVGEXIT IN SERVICER TO VHHDOT TO
022551,000057:                                                                                                  #                    COMPUTE AND DISPLAY NOUN 62 EVERY 2 SECONDS
022552,000058: 
022553,000059:                                                                                                  #                        R1      V1   - INTERTIAL VELOCITY MAGNITUDE IN FPS
022554,000060:                                                                                                  #                        R2      HDOT - RATE OF CHANGE OF VEHICLE VEL IN FPS
022555,000061:                                                                                                  #                        R3      H    - VEHICLE ALTITUDE ABOVE PAD IN NM
022556,000062:                                                                                                  #                
022557,000063:                                                                                                  #                12. DISPLAY BODY AXES ATT. ERRORS ON FDAI NEEDLES
022558,000064: 
022559,000065:                                                                                                  #                        A) FROM L.O. TO RPSTART (APPROX. 0 TO +10SECS AFTER L.O.)
022560,000066:                                                                                                  #                           DESIRED ATTITUDE IS AS STORED AT L.O.
022561,000067:                                                                                                  #                        B) FROM RPSTART TO POLYSTOP (APPROX. +10 TO +133SECS AFTER LO)
022562,000068:                                                                                                  #                           DESIRED ATTITUDE IS SPECIFIED BY CMC PITCH AND ROLL
022563,000069:                                                                                                  #                           POLYNOMIALS DURING SATURN ROLLOUT AND PITCHOVER
022564,000070:                                                                                                  #                           THE DISPLAY IS RUN AS LOW PRIORITY JOB APPROX.
022565,000071:                                                                                                  #                           EVERY 1/2 SEC OR LESS AND IS DISABLED UPON OVFLO OF TIME1
022566,000072: 
022567,000073:                                                                                                  #  SUBROUTINES CALLED
022568,000074: 
022569,000075:                                                                                                  #        2PHSCHNG        BANKCALL        CALCGRA         CDUTRIG         CLEANDSP        DANZIG
022570,000076:                                                                                                  #        DELAYJOB        EARTHR          ENDOFJOB        FINDVAC         IBNKCALL
022571,000077:                                                                                                  #        INTPRET         LALOTORV        NEEDLER         NEWMODEX        PHASCHNG
022572,000078:                                                                                                  #        POSTJUMP        POWRSERS        PREREAD1        REGODSPR        S11.1
022573,000079:                                                                                                  #        SERVEXIT        TASKOVER        TCDANZIG        V1ST02S         WAITLIST
022574,000080: 
022575,000081:                                                                                                  #  ASTRONAUT REQUESTS (IF ALTITUDE ABOVE 300,000 FT)
022576,000082: 
022577,000083:                                                                                                  #        DSKY -
022578,000084:                                                                                                  #                MONITOR DISPLAY OF TIME TO PERIGEE R1 HOURS
022579,000085:                                                                                                  #                                                   R2 MINUTES
022580,000086: 
022581,000087:                                                                                                  #        DSKY -
022582,000088:                                                                                                  #                MONITOR DISPLAY OF R1 APOGEE ALTITUDE IN NAUTICAL MILES
022583,000089:                                                                                                  #                                   R2 PERIGEE ALTITUDE IN NAUTICAL MILES
022584,000090:                                                                                                  #                                   R3 TFF IN MINUTES/SECS
022585,000091: 
022586,000092:                                                                                                  #        IF ASTRONAUT HAS REQUESTED ANY OF THESE DISPLAYS HE MUST
022587,000093:                                                                                                  #  HIT PROCEED TO RETURN TO NORMAL NOUN 62 DISPLAY
022588,000094:                                                                                                  #  NORMAL EXIT MODE
022589,000095: 
022590,000096:                                                                                                  #        ASTRONAUT       VERB 37 ENTER 00 ENTER
022591,000097: 
022592,000098:                                                                                                  #  ALARM MODES - NONE
022593,000099: 
022594,000100:                                                                                                  #  ABORT EXIT MODES -
022595,000101: 
022596,000102:                                                                                                  #  OUTPUT
022597,000103: 
022598,000104:                                                                                                  #        TLIFTOFF (DP)   TEPHEM (TP)
022599,000105:                                                                                                  #        REFSMMAT
022600,000106:                                                                                                  #        DSKY DISPLAY
022601,000107:                                                                                                  #        FDAI DISPLAY
022602,000108: 
022603,000109:                                                                                                  #  ERASABLE INITIALIZATION
022604,000110: 
022605,000111:                                                                                                  #        AZO, AXO, -AYO
022606,000112:                                                                                                  #        LATITUDE
022607,000113:                                                                                                  #        PADLONG
022608,000114:                                                                                                  #        TEPHEM
022609,000115:                                                                                                  #        PGNCSALT
022610,000116:                                                                                                  #        POLYNUM THRU POLYNUM +14D)
022611,000117:                                                                                                  #        RPSTART
022612,000118:                                                                                                  #        POLYSTOP
022613,000119:                                                                                                  #  FLAGS SET OR RESET
022614,000120:                                                                                                  #        SET REFSMFLG
022615,000121:                                                                                                  #        SET DVMON IDLE FLAG
022616,000122:                                                                                                  #        CLEAR ERADFLAG
022617,000123: 
022618,000124:                                                                                                  #  DEBRIS
022619,000125: 
022620,000126:                                                                                                  #        LIFTTEMP
022621,000127:                                                                                                  #        POLYNUM THRU POLYNUM +7
022622,000128:                                                                                                  #        SPOLYARG
022623,000129:                                                                                                  #        BODY1, BODY2, BODY3
022624,000130:                                                                                                  #        VMAG2, ALTI, HDOT
022625,000131:                                                                                                  #        CENTRALS, CORE SET AND VAC AREAS
022626,000132: 
022627,000133: 04,3303                                           COUNT    34/P11                                
022628,000134: 
022629,000135: 04,3303     5051               BITS5-6            =        SUPER011                              
022630,000136: 42,3605                                           BANK     42                                    
022631,000137: 34,2000                                           SETLOC   P11ONE                                
022632,000138: 34,2000                                           BANK                                           
022633,000139: 
022634,000140: 34,2002  E3,1706                                  EBANK=   TEPHEM                                
022635,000141: 34,2002           35065        P11                CA       EBANK3                                
022636,000142: 34,2003           54003                           TS       EBANK                                 
022637,000143: 
022638,000144: 34,2004           00006                           EXTEND                                         
022639,000145: 34,2005           32277                           DCA      REP11S                                #  DIRECT RESTARTS TO REP11
022640,000146: 34,2006           52757                           DXCH     -PHASE3                               
022641,000147: 34,2007           45035                           CS       ZERO                                  
022642,000148: 34,2010           22007                           ZL                                             
022643,000149: 34,2011           55265                           TS       LIFTTEMP                              
022644,000150: 34,2012           52763                           DXCH     -PHASE5                               #  INACTIVE GROUP 5, PRELAUNCH PROTECTION
022645,000151: 34,2013           00006        P11+7              EXTEND                                         
022646,000152: 34,2014           32301                           DCA      REP11SA                               
022647,000153: 34,2015           53337                           DXCH     TLIFTOFF                              
022648,000154: 
022649,000155: 34,2016           00006                           EXTEND                                         
022650,000156: 34,2017           30025                           DCA      TIME2                                 
022651,000157: 34,2020           53266                           DXCH     LIFTTEMP                              #  FOR RESTARTS
022652,000158: 
022653,000159: 34,2021           35035                           CA       ZERO                                  
022654,000160: 34,2022           22007                           ZL                                             
022655,000161: 34,2023           52025                           DXCH     TIME2                                 
022656,000162: 34,2024           53337        REP11A-2           DXCH     TLIFTOFF                              
022657,000163: 34,2025           52757        REP11A-1           DXCH     -PHASE3                               #  RESET PHASE
022658,000164: 
022659,000165: 34,2026           00004        REP11A             INHINT                                         
022660,000166: 34,2027           00006                           EXTEND                                         
022661,000167: 34,2030           31710                           DCA      TEPHEM     +1                         
022662,000168: 34,2031           53271                           DXCH     TEPHEM1    +1                         
022663,000169: 34,2032           31706                           CA       TEPHEM                                
022664,000170: 34,2033           57267                           XCH      TEPHEM1                               
022665,000171: 
022666,000172: 34,2034           00006                           EXTEND                                         
022667,000173: 34,2035           31337                           DCA      TLIFTOFF                              
022668,000174: 34,2036           21271                           DAS      TEPHEM1    +1                         
022669,000175: 34,2037           27267                           ADS      TEPHEM1                               #  CORRECTOFOR OVERFLOW
022670,000176: 
022671,000177: 34,2040           05426                           TC       PHASCHNG                              
022672,000178: 34,2041           05023                           OCT      05023                                 
022673,000179: 34,2042           22000                           OCT      22000                                 
022674,000180: 
022675,000181: 34,2043           00004                           INHINT                                         
022676,000182: 34,2044           00006                           EXTEND                                         
022677,000183: 34,2045           31270                           DCA      TEPHEM1                               
022678,000184: 34,2046           53707                           DXCH     TEPHEM                                
022679,000185: 34,2047           31271                           CA       TEPHEM1    +2                         
022680,000186: 34,2050           57710                           XCH      TEPHEM     +2                         
022681,000187: 
022682,000188: 34,2051           32000                           CAF      EBDVCNT                               
022683,000189: 34,2052           54003                           TS       EBANK                                 
022684,000190: 34,2053  E7,1431                                  EBANK=   DVCNTR                                
022685,000191: 34,2053           04754                           TC       IBNKCALL                              
022686,000192: 34,2054           76735                           CADR     PREREAD1                              #  ZERO PIPS AND INITIALIZE AVERAGEG
022687,000193: 
022688,000194: 34,2055           05426                           TC       PHASCHNG                              
022689,000195: 34,2056           05023                           OCT      05023                                 #  CONTINUE HERE ON RESTART
022690,000196: 34,2057           22000                           OCT      22000                                 
022691,000197: 
022692,000198: 34,2060           35052                           CAF      .5SEC                                 #  START ATT ERROR DISPLAY
022693,000199: 34,2061           05261                           TC       WAITLIST                              #  IN .5 SEC
022694,000200: 34,2062  E6,1704                                  EBANK=   BODY3                                 
022695,000201: 34,2062           02320 70066                     2CADR    ATERTASK                              
022696,000202: 
022697,000203: 34,2064           05370                           TC       NEWMODEX                              #  DISPLAY MM 11
022698,000204: 34,2065           00013                           MM       11         B-14                       
022699,000205: 
022700,000206: 34,2066           05562                           TC       UPFLAG                                
022701,000207: 34,2067           00022                           ADRES    NODOP01                               
022702,000208: 
022703,000209: 34,2070           36214                           CA       POWDNCOD                              #  SWITCH TO POWERED FLIGHT DOWNLIST
022704,000210: 34,2071           54332                           TS       DNLSTCOD                              
022705,000211: 
022706,000212: 34,2072           04676                           TC       BANKCALL                              
022707,000213: 34,2073           20703                           CADR     CLEANDSP                              #  CLEAR DSKY IN CASE OF V75
022708,000214: 
022709,000215: 34,2074           05406                           TC       2PHSCHNG                              
022710,000216: 34,2075           40514                           OCT      40514                                 #  PROTECT ATERTASK
022711,000217: 34,2076           00073                           OCT      00073                                 
022712,000218: 34,2077           32001                           CAF      EBQPLACE                              
022713,000219: 34,2100           54003                           TS       EBANK                                 
022714,000220: 
022715,000221: 34,2101  E5,1426                                  EBANK=   QPLACES                               
022716,000222: 34,2101           32302                           CA       P11XIT                                #  SET EXIT FROM PROUT IN EARTHR
022717,000223: 34,2102           55426                           TS       QPLACES                               
022718,000224: 34,2103           06006                           TC       INTPRET                               
022719,000225: 34,2104           64375                           VLOAD    MXV                                   
022720,000226: 34,2105           02467                                    THETAN                                
022721,000227: 34,2106           02672                                    XSM                                   
022722,000228: 34,2107           53372                           VSL1     VAD                                   
022723,000229: 34,2110           02650                                    ERCOMP                                
022724,000230: 34,2111           16650                           STODL    ERCOMP                                
022725,000231: 34,2112           01337                                    TLIFTOFF                              
022726,000232: 34,2113           52131                           SSP      GOTO                                  
022727,000233: 34,2114           00052                                    S2                                    
022728,000234: 34,2115           66424                           CADR     PROUT                                 #  RETURN FROM EARTHR
022729,000235: 34,2116           66373                                    EARTHR     +3                         
022730,000236: 34,2117           22007        MATRXJOB           ZL                                             #  STORE DP GIMBAL ANGLES FOR ATTITUDE
022731,000237: 34,2120           30032                           CA       CDUX                                  #        ERROR DISPLAY AFTER LIFTOFF
022732,000238: 34,2121           53760                           DXCH     OGC                                   
022733,000239: 34,2122           22007                           ZL                                             
022734,000240: 34,2123           30033                           CA       CDUY                                  
022735,000241: 34,2124           53762                           DXCH     IGC                                   
022736,000242: 34,2125           22007                           ZL                                             
022737,000243: 34,2126           30034                           CA       CDUZ                                  
022738,000244: 34,2127           53764                           DXCH     MGC                                   
022739,000245: 34,2130           06006                           TC       INTPRET                               #        -
022740,000246: 34,2131           74575                           VLOAD    VSR1                                  #  SCALE OGC B-1
022741,000247: 34,2132           02760                                    OGC                                   
022742,000248: 34,2133           02760                           STORE    OGC                                   
022743,000249: 34,2134           77731                           SSP                                            #  ZERO RTX2
022744,000250: 34,2135           03747                                    RTX2                                  #  FOR
022745,000251: 34,2136           00000                                    0                                     #  EARTH
022746,000252: 34,2137           65345                           DLOAD    PDDL                                  
022747,000253: 34,2140           01273                                    PGNCSALT                              #  ALTITUDE OF PGNCS
022748,000254: 34,2141           01264                                    PADLONG                               #  LONGITUDE
022749,000255: 34,2142           55525                           PDDL     VDEF                                  
022750,000256: 34,2143           02403                                    LATITUDE                              #  GEODETIC LATITUDE
022751,000257: 34,2144           15104                           STODL    LAT                                   #  LAT,LONG,ALT ARE CONSECUTIVE
022752,000258: 34,2145           15334                                    HI6ZEROS                              #  TIME = 0
022753,000259: 34,2146           45014                           CLEAR    CALL                                  
022754,000260: 34,2147           00662                                    ERADFLAG                              
022755,000261: 34,2150           26447                                    LALOTORV                              #  CONVERT TO POSITION VECTOR IN REF.COORDS
022756,000262: 
022757,000263: 34,2151           35232                           STCALL   RN1                                   #               -   
022758,000264: 34,2152           70334                                    GETDOWN                               #  RETURN WITH VECTOR FOR DOWN DIRECTION
022759,000265: 34,2153           53476                           VCOMP    UNIT                                  
022760,000266: 34,2154           25752                           STOVL    REFSMMAT   +12D                       #  UNITZ = UNIT(GRAV)
022761,000267: 34,2155           01232                                    RN1                                   
022762,000268: 34,2156           74235                           VXV      VXSC                                  
022763,000269: 34,2157           01714                                    UNITW                                 #  SCALED AT 1
022764,000270: 34,2160           30304                                    -ERTHRAT                              #  V = EARTHRATE X R
022765,000271: 34,2161           77712                           VSL4                                           #  SCALE TO 2(7) M/CS
022766,000272: 34,2162           25240                           STOVL    VN1                                   
022767,000273: 34,2163           01752                                    REFSMMAT   +12D                       
022768,000274: 34,2164           53435                           VXV      UNIT                                  
022769,000275: 34,2165           01714                                    UNITW                                 #  (REF3 X UNITW) = EAST
022770,000276: 34,2166           47206                           PUSH     VXV                                   
022771,000277: 34,2167           01752                                    REFSMMAT   +12D                       #  (EAST X REF3) = -SOUTH
022772,000278: 34,2170           65256                           UNIT     PDDL                                  
022773,000279: 34,2171           02634                                    LAUNCHAZ                              #  COS(AZ)*SOUTH
022774,000280: 34,2172           74346                           COS      VXSC                                  
022775,000281: 34,2173           77626                           STADR                                          
022776,000282: 34,2174           62041                           STODL    REFSMMAT                              #  TEMPORARY STORAGE
022777,000283: 34,2175           02634                                    LAUNCHAZ                              
022778,000284: 34,2176           74356                           SIN      VXSC                                  #  SIN(AZ)*EAST
022779,000285: 34,2177           53455                           VAD      UNIT                                  #  SIN(AZ)*EAST - COS(AZ)*SOUTH = REF1
022780,000286: 34,2200           01736                                    REFSMMAT                              
022781,000287: 34,2201           01736                           STORE    REFSMMAT                              
022782,000288: 
022783,000289: 34,2202           53435                           VXV      UNIT                                  #  (REF1 X REF3) = -REF3
022784,000290: 34,2203           01752                                    REFSMMAT   +12D                       
022785,000291: 34,2204           77676                           VCOMP                                          
022786,000292: 34,2205           01744                           STORE    REFSMMAT   +6                         
022787,000293: 34,2206           45345                           DLOAD    DSU                                   
022788,000294: 34,2207           15332                                    DPHALF                                #  1/2 REV
022789,000295: 34,2210           02634                                    LAUNCHAZ                              
022790,000296: 34,2211           65215                           DAD      PDDL                                  
022791,000297: 
022792,000298: 34,2212           02401                                    AZIMUTH                               
022793,000299: 34,2213           03301                                    SATRLRT                               #  SET SATRLRT = -SATRLRT IF
022794,000300: 34,2214           45565                           SIGN     STADR                                 #  (1/2REV -LAVNCHAZ +AZIMUTH) IS NEGATIVE
022795,000301: 34,2215           74476                           STORE    SATRLRT                               #  FOR ROLL CALC IN FDAI ATT. ERROR DISPLAY
022796,000302: 34,2216           77414                           SET      EXIT                                  
022797,000303: 34,2217           01462                                    REFSMFLG                              #  SET REFSMMAT KNOWN FLAG
022798,000304: 
022799,000305: 34,2220           05426                           TC       PHASCHNG                              
022800,000306: 34,2221           04023                           OCT      04023                                 
022801,000307: 
022802,000308: 34,2222           00006                           EXTEND                                         
022803,000309: 34,2223           32306                           DCA      P11SCADR                              
022804,000310: 34,2224           53223                           DXCH     AVGEXIT                               #  SET AVGEXIT
022805,000311: 
022806,000312: 34,2225           37665                           CA       PRIO31                                #  2 SECONDS AT 2(+8)
022807,000313: 34,2226           55074                           TS       1/PIPADT                              
022808,000314: 
022809,000315: 34,2227  E6,1501                                  EBANK=   RCSFLAGS                              
022810,000316: 34,2227           35073                           CA       EBANK6                                
022811,000317: 34,2230           54003                           TS       EBANK                                 
022812,000318: 
022813,000319: 34,2231           00004                           INHINT                                         
022814,000320: 34,2232           45035                           CS       ZERO                                  
022815,000321: 34,2233           55063                           TS       TBASE5                                #  RESTART READACCS 2 SECONDS AFTER LIFTOFF
022816,000322: 
022817,000323: 34,2234           40025                           CS       TIME1                                 
022818,000324: 34,2235           65056                           AD       2SECS                                 #  DO READACCS 2 SECONDS AFTER LIFTOFF
022819,000325: 
022820,000326: 34,2236           10000                           CCS      A                                     #  CHECK TO INSURE DT IS POSITIVE
022821,000327: 34,2237           12242                           TCF      +3                                    #  TIME POSITIVE
022822,000328: 34,2240           12242                           TCF      +2                                    #  CANNOT GET HERE
022823,000329: 34,2241           35035                           CA       ZERO                                  #  TIME NEGATIVE - SET TO 1
022824,000330: 34,2242           65033                           AD       ONE                                   #  RESTORE TIME  -  OR MAKE POSITIVE
022825,000331: 
022826,000332: 34,2243           05261                           TC       WAITLIST                              
022827,000333: 34,2244  E6,1661                                  EBANK=   AOG                                   
022828,000334: 34,2244           02757 76066                     2CADR    READACCS                              
022829,000335: 
022830,000336: 34,2246           05406                           TC       2PHSCHNG                              
022831,000337: 34,2247           00003                           OCT      00003                                 #  TURN OFF GROUP 3
022832,000338: 34,2250           00025                           OCT      00025                                 #  PROTECT NORMLIZE AND READACCS
022833,000339: 
022834,000340: 34,2251           04715                           TC       POSTJUMP                              
022835,000341: 34,2252           77240                           CADR     NORMLIZE                              #  DO NORMLIZE AND ENDOFJOB
022836,000342: 
022837,000343: 
022838,000344: 34,2253  E3,1706                                  EBANK=   TEPHEM                                
022839,000345: 34,2253           00004        REP11              INHINT                                         
022840,000346: 34,2254           10763                           CCS      PHASE5                                
022841,000347: 34,2255           05233                           TC       ENDOFJOB                              
022842,000348: 
022843,000349: 34,2256           11265                           CCS      LIFTTEMP                              
022844,000350: 34,2257           12263                           TCF      +4                                    
022845,000351: 34,2260           12263                           TCF      +3                                    
022846,000352: 34,2261           12263                           TCF      +2                                    
022847,000353: 34,2262           12013                           TCF      P11+7                                 
022848,000354: 
022849,000355: 34,2263           41336                           CS       TLIFTOFF                              
022850,000356: 34,2264           00006                           EXTEND                                         
022851,000357: 34,2265           62273                           BZMF     ENDREP11                              
022852,000358: 
022853,000359: 34,2266           10024                           CCS      TIME2                                 #  ** TIME2 MUST BE NON-ZERO AT LIFTOFF **
022854,000360: 34,2267           12021                           TCF      REP11A     -5                         #  T2,T1 NOT YET ZEROED, GO AND DO IT
022855,000361: 
022856,000362: 34,2270           00006                           EXTEND                                         #  T2,T1 ZEROED, SET TLIFTOFF
022857,000363: 34,2271           31266                           DCA      LIFTTEMP                              
022858,000364: 34,2272           12024                           TCF      REP11A-2                              
022859,000365: 
022860,000366: 34,2273           00006        ENDREP11           EXTEND                                         
022861,000367: 34,2274           32301                           DCA      REP11SA                               
022862,000368: 34,2275           12025                           TCF      REP11A-1                              
022863,000369: 34,2276           77766 00011  REP11S             2OCT     7776600011                            
022864,000370: 
022865,000371: 34,2300           77764 00013  REP11SA            2OCT     7776400013                            
022866,000372: 
022867,000373: 34,2302           02451        P11XIT             GENADR   P11OUT                                
022868,000374: 34,2303           71704 41735  -ERTHRAT           2DEC*    -7.292115138 E-7        B18*            #  - EARTH RATE AT 2(18)
022869,000375: 
022870,000376: 34,2305  E6,1704                                  EBANK=   BODY3                                 
022871,000377: 34,2305           02307 70066  P11SCADR           2CADR    VHHDOT                                
022872,000378: 
022873,000379: 34,2307     6214               POWDNCOD           EQUALS   THREE                                 
022874,000380: 
022875,000381: 34,2307  E6,1704                                  EBANK=   BODY3                                 
022876,000382:                                                                                                  #  VHHDOT IS EXECUTED EVERY 2 SECONDS TO DISPLAY ON DSKY
022877,000383:                                                                                                  #        VI      INERTIAL VELOCITY MAGNITUDE
022878,000384:                                                                                                  #        HDOT    RATE OF CHANGE OF ALT ABOVE L PAD RADIUS
022879,000385:                                                                                                  #        H       ALTITUDE ABOVE L PAD RADIUS
022880,000386: 
022881,000387: 34,2307           06006        VHHDOT             TC       INTPRET                               
022882,000388: 34,2310           77624                           CALL                                           #  LOAD VMAGI, ALTI,
022883,000389: 34,2311           70542                                    S11.1                                 #  HDOT FOR DISPLAY
022884,000390: 34,2312           77776                           EXIT                                           
022885,000391: 34,2313           05426                           TC       PHASCHNG                              
022886,000392: 34,2314           00035                           OCT      00035                                 
022887,000393: 
022888,000394: 34,2315           32622                           CAF      V06N62                                #  DISPLAY IN R1 R2   R3
022889,000395: 34,2316           04676                           TC       BANKCALL                              #             VI HDOT H
022890,000396: 34,2317           20707                           CADR     REGODSP                               
022891,000397: 
022892,000398: 34,2320           35022        ATERTASK           CAF      PRIO1                                 #  ESTABLISH JOB TO DISPLAY ATT ERRORS
022893,000399: 34,2321           05163                           TC       FINDVAC                               #  COMES HERE AT L.O. + .33 SEC
022894,000400: 34,2322  E6,1704                                  EBANK=   BODY3                                 
022895,000401: 34,2322           02345 70066                     2CADR    ATERJOB                               
022896,000402: 
022897,000403: 34,2324           41501                           CS       RCSFLAGS                              #  SET BIT3 FOR
022898,000404: 34,2325           75031                           MASK     BIT3                                  #  NEEDLER
022899,000405: 34,2326           27501                           ADS      RCSFLAGS                              #  INITIALIZATION PASS
022900,000406: 34,2327           04754                           TC       IBNKCALL                              #  AND GO
022901,000407: 34,2330           42432                           CADR     NEEDLER                               #  DO IT
022902,000408: 34,2331           35033                           CA       BIT1                                  #  SET SW
022903,000409: 34,2332           55725                           TS       SATSW                                 #  FOR DISPLAY
022904,000410: 34,2333           05340                           TC       TASKOVER                              
022905,000411: 34,2334           40220        GETDOWN            STQ      SETPD                                 
022906,000412: 34,2335           02242                                    INCORPEX                              
022907,000413: 34,2336           00001                                    0D                                    
022908,000414: 34,2337           77745                           DLOAD                                          
022909,000415: 34,2340           15334                                    HI6ZEROS                              
022910,000416: 34,2341           14007                           STODL    6D                                    
022911,000417: 34,2342           15332                                    DPHALF                                
022912,000418: 34,2343           34011                           STCALL   8D                                    
022913,000419: 34,2344           26454                                    LALOTORV   +5                         
022914,000420:                                                                                                  #  THIS SECTION PROVIDES ATTITUDE ERROR DISPLAYS TO THE FDAI DURING SONE BOOST
022915,000421: 
022916,000422:                                                                                                  #        COMPUTE DESIRED PITCH W.R.T. PAD LOCAL VERTICAL AT LIFTOFF
022917,000423:                                                                                                  #                          2    3    4    5    6
022918,000424:                                                                                                  #        PITCH = A0+A1T+A2T +A3T +A4T +A5T +A6T
022919,000425:                                                                                                  #                SCALED TO 32 REVS.                                   -14
022920,000426:                                                                                                  #        IF TL = TIME IN SECS FROM L.O., THEN    T = 100(TL-RPSTART)2
022921,000427:                                                                                                  #        WHERE   TL GE RPSTART
022922,000428:                                                                                                  #                TL LE (-POLYSTOP + RPSTART)
022923,000429:                                                                                                  #        COMPUTE DESIRED ROLL WHERE ROLL EQUALS ANGLE FROM
022924,000430:                                                                                                  #        LAUNCHAZ TO -Z(S/C) AS SEEN FROM X(S/C).
022925,000431:                                                                                                  #        ROLL = LAUNCHAZ-AZIMUTH-.5+SATRLRT*T    IN REV
022926,000432:                                                                                                  #        SATRLRT = RATE OF ROLL IN REV/CENTI-SEC
022927,000433:                                                                                                  #        T, IN CENTI-SEC, IS DEFINED AS ABOVE, INCLUSIVE OF TIME RESTRICTIONS
022928,000434: 
022929,000435:                                                                                                  #        FOR SIMPLICITY, LET     P = 2*PI*PITCH
022930,000436:                                                                                                  #                                R = 2*PI*ROLL
022931,000437: 
022932,000438:                                                                                                  #        CONSTRUCT THE TRANSFORMATION MATRIX, TSMV, GIVING DESIRED S/C AXES IN
022933,000439:                                                                                                  #        TERMS OF SM COORDINATES.  LET THE RESULTING ROWS EQUAL THE VECTORS XDC,
022934,000440:                                                                                                  #        YDC, AND ZDC.
022935,000441: 
022936,000442:                                                                                                  #         *     (    SIN(P)                 0               -COS(P)    )   (XDC)
022937,000443:                                                                                                  #        TSMV = (-SIN(R)*COS(P)          -COS(R)         -SIN(R)*SIN(P)) = (YDC)
022938,000444:                                                                                                  #               (-COS(R)*COS(P)           SIN(R)         -COS(R)*SIN(P))   (ZDC)
022939,000445: 
022940,000446:                                                                                                  #        XDC,YDC,ZDC ARE USED AS INPUT TO CALCGTA FOR THE EXTRACTION OF THE 
022941,000447:                                                                                                  #        EULER SET OF ANGLES WHICH WILL BRING THE SM INTO THE DESIRED
022942,000448:                                                                                                  #        ORIENTATION.  THIS EULER SET, OGC, IGC, AND MGC, MAY BE IDENTIFIED
022943,000449:                                                                                                  #        AS THE DESIRED CDU ANGLES.
022944,000450: 
022945,000451:                                                                                                  #        (XDC)                   (OGC)
022946,000452:                                                                                                  #        (YDC) ---) CALCGTA ---) (IGC)
022947,000453:                                                                                                  #        (ZDC)                   (MGC)
022948,000454:                                                                                                  #                           -
022949,000455:                                                                                                  #        DEFINE THE VECTOR DELTACDU.
022950,000456: 
022951,000457:                                                                                                  #         -         (OGC)   (CDUX)
022952,000458:                                                                                                  #        DELTACDU = (IGC) - (CDUY)
022953,000459:                                                                                                  #                   (MGC)   (CDUZ)
022954,000460:                                                                                                  #                                 -              -    *    -
022955,000461:                                                                                                  #        COMPUTE ATTITUDE ERRORS, A, WHERE       A = TGSC*DELTACDU
022956,000462: 
022957,000463:                                                                                                  #         *     (1             SIN(CDUZ)             0    )   THE GIMBAL ANGLES
022958,000464:                                                                                                  #        TGSC = (0       COS(CDUX)*COS(CDUZ)     SIN(CDUX)) = TO SPACECRAFT AXES
022959,000465:                                                                                                  #               (0      -SIN(CDUX)*COS(CDUZ)     COS(CDUX))   CONVERSION MATRIX
022960,000466:                                                                                                  #                             -
022961,000467:                                                                                                  #        THE ATTITUDE ERRORS, A, ARE STORED ONE HALF SINGLE PRECISION IN
022962,000468:                                                                                                  #        THE REGISTERS AK, AK1, AK2 AS INPUT TO NEEDLER, THE FDAI ATTITUDE
022963,000469:                                                                                                  #        ERROR DISPLAY ROUTINE.
022964,000470: 
022965,000471: 34,2345           30102        ATERJOB            CAE      FLAGWRD6                              #  CHECK FLAGWRD6
022966,000472: 34,2346           74105                           MASK     OCT60000                              #  BITS 14, 15
022967,000473: 34,2347           00006                           EXTEND                                         
022968,000474: 34,2350           12352                           BZF      +2                                    #  OK - CONTINUE
022969,000475: 34,2351           05233                           TC       ENDOFJOB                              #  SATURN STICK ON - KILL JOB
022970,000476: 34,2352           35022                           CAF      BIT10                                 #  CHECK IF S/C CONTROL
022971,000477: 34,2353           00006                           EXTEND                                         #  OF SATURN PANEL
022972,000478: 34,2354           02030                           RAND     CHAN30                                #  SWITCH IS ON
022973,000479: 34,2355           00006                           EXTEND                                         
022974,000480: 34,2356           12510                           BZF      STRSAT                                #  IT IS - GO STEER
022975,000481: 34,2357           11725                           CCS      SATSW                                 #  IT IS NOT - WAS IT ON LAST CYCLE
022976,000482: 34,2360           02363                           TC       ATTDISP                               #  NO - CONTINUE
022977,000483: 34,2361           02513                           TC       ATRESET                               #  YES - REINITIALIZE NEEDLER
022978,000484: 34,2362           02513                           TC       ATRESET                               #  YES - REINITIALIZE NEEDLER
022979,000485: 34,2363           41702        ATTDISP            CS       RPSTART                               #  PITCH/ROLL START TIME
022980,000486: 34,2364           60025                           AD       TIME1                                 
022981,000487: 34,2365           00006                           EXTEND                                         
022982,000488: 34,2366           62615                           BZMF     NOPOLY                                #  IF MINUS THEN ATTITUDE HOLD
022983,000489: 34,2367           54154                           TS       MPAC                                  #  MPAC = TIME1 - RPSTART
022984,000490: 34,2370           55707                           TS       SPOLYARG                              #  SAVE FOR USE IN ROLL CALUCLATION
022985,000491: 34,2371           61703                           AD       POLYSTOP                              #  NEG PITCHOVER TIME IN CSECS
022986,000492: 34,2372           00006                           EXTEND                                         
022987,000493: 34,2373           62375                           BZMF     +2                                    
022988,000494: 34,2374           02615                           TC       NOPOLY                                #  GO TO ATTITUDE HOLD
022989,000495: 34,2375           30024                           CA       TIME2                                 
022990,000496: 34,2376           00006                           EXTEND                                         
022991,000497: 34,2377           62401                           BZMF     +2                                    
022992,000498: 34,2400           02615                           TC       NOPOLY                                #  GO TO ATTITUDE HOLD      
022993,000499: 34,2401           31661                           CAE      POLYNUM                               
022994,000500: 34,2402           54001                           TS       L                                     
022995,000501: 34,2403           32621                           CAF      COEFPOLY                              #  EVALUATE PITCH POLYNOMIAL
022996,000502: 34,2404           07164                           TC       POWRSERS                              #  SCALED TO 32 REVOLUTIONS
022997,000503: 34,2405           35035                           CA       ZERO                                  #  RETURN WITH PITCH(32REV)
022998,000504: 34,2406           54163                           TS       MODE                                  #  STORED IN MPAC, MPAC +1
022999,000505: 34,2407           06006                           TC       INTPRET                               
023000,000506: 34,2410           54201                           SETPD    SL                                    #  32(PITCH(32REV)) = PITCH(REV)
023001,000507: 34,2411           00001                                    0                                     
023002,000508: 34,2412           20206                                    5                                     
023003,000509: 34,2413           77606                           PUSH                                           #  LET P(RAD) = 2.PI.PITCH(REV)
023004,000510: 34,2414           77650                           GOTO                                           
023005,000511: 34,2415           76164                                    ATTDISP1                              #  AROUND SETLOC
023006,000512:                                                                                                  #                                     *
023007,000513:                                                                                                  #        CONSTRUCT SM TO S/C MATRIX, TSMV
023008,000514: 
023009,000515: 37,2000                                           SETLOC   P11TWO                                
023010,000516: 37,2000                                           BANK                                           #  36 IN COL., 34 IN DISK
023011,000517: 
023012,000518: 37,2164                                           COUNT    36/P11                                
023013,000519: 
023014,000520: 37,2164           57546        ATTDISP1           COS      DCOMP                                 
023015,000521: 37,2165           14017                           STODL    14D                                   #  -.5*COS(P)
023016,000522: 37,2166           77756                           SIN                                            
023017,000523: 37,2167           14013                           STODL    10D                                   #  .5*SIN(P)
023018,000524: 37,2170           15334                                    ZEROVECS                              
023019,000525: 37,2171           00015                           STORE    12D                                   #  0
023020,000526: 
023021,000527:                                                                                                  #        EVALUATE ROLL = LAUNCHAZ-AZIMUTH-.5+SATRLRT*T
023022,000528: 37,2172           41335                           SLOAD    DMP                                   
023023,000529: 37,2173           03310                                    SPOLYARG                              #  TIME1 - RPSTART, CSECS B-14.
023024,000530: 37,2174           03301                                    SATRLRT                               
023025,000531: 37,2175           45261                           SL       DSU                                   
023026,000532: 37,2176           20217                                    14D                                   
023027,000533: 37,2177           15332                                    DPHALF                                
023028,000534: 37,2200           45215                           DAD      DSU                                   #  ASSUMING X(SM) ALONG LAUNCH AZIMUTH,
023029,000535: 37,2201           02634                                    LAUNCHAZ                              #  LAUNCHAZ = ANGLE FROM NORTH TO X(SM).
023030,000536: 37,2202           02401                                    AZIMUTH                               #  AZIMUTH = -ANGLE FROM NORTH TO Z(S/C)
023031,000537: 37,2203           77634                           RTB                                            #  DETERMINE IF ROLLOUT
023032,000538: 37,2204           70604                                    RLTST                                 #  IS COMPLETED
023033,000539: 37,2205           71406        ATTDISPR           PUSH     COS                                   #  CONTINUE COMPUTING TSMV
023034,000540: 37,2206           77606                           PUSH                                           #  LET R(RAD) = 2*PI*ROLL(REV)
023035,000541: 37,2207           72405                           DMP      SL1                                   
023036,000542: 37,2210           00017                                    14D                                   
023037,000543: 37,2211           14027                           STODL    22D                                   #  -.5*COS(R)*COS(P)
023038,000544: 37,2212           77676                           DCOMP                                          
023039,000545: 37,2213           00023                           STORE    18D                                   #  -.5*COS(R)
023040,000546: 37,2214           72405                           DMP      SL1                                   
023041,000547: 37,2215           00013                                    10D                                   
023042,000548: 37,2216           14033                           STODL    26D                                   #  -.5*COS(R)*SIN(P)
023043,000549: 37,2217           41556                           SIN      PUSH                                  
023044,000550: 37,2220           00031                           STORE    24D                                   #  .5*SIN(R)
023045,000551: 37,2221           72405                           DMP      SL1                                   
023046,000552: 37,2222           00017                                    14D                                   
023047,000553: 37,2223           14021                           STODL    16D                                   #  -.5*SIN(R)*COS(P)
023048,000554: 37,2224           77676                           DCOMP                                          
023049,000555: 37,2225           72405                           DMP      SL1                                   
023050,000556: 37,2226           00013                                    10D                                   
023051,000557: 37,2227           24025                           STOVL    20D                                   #  -.5*SIN(R)*SIN(P)
023052,000558: 37,2230           00013                                    10D                                   
023053,000559: 
023054,000560:                                                                                                  #        FROM TSMV FIND THE HALF UNIT VECTORS XDC,YDC,ZDC = INPUT TO CALCGTA
023055,000561: 37,2231           77656                           UNIT                                           
023056,000562: 37,2232           26714                           STOVL    XDC                                   #  XDC = .5*UNIT(SIN(P),0,-COS(P))
023057,000563: 37,2233           00021                                    16D                                   
023058,000564: 37,2234           77656                           UNIT                                           
023059,000565: 37,2235           26722                           STOVL    YDC                                   #  YDC = .5*UNIT(-SIN(R)*COS(P),-COS(R),
023060,000566: 37,2236           00027                                    22D                                   #                        -SIN(R)*SIN(P))
023061,000567: 37,2237           77656                           UNIT                                           
023062,000568: 37,2240           36730                           STCALL   ZDC                                   #  ZDC = .5*UNIT(-COS(R)*COS(P),SIN(R),
023063,000569: 37,2241           47207                                    CALCGTA                               #                        -COS(R)*SIN(P))
023064,000570: 
023065,000571:                                                                                                  #        CALL CALCGTA TO COMPUTE DESIRED SM ORIENTATION  OGC,IGC, AND MGC
023066,000572:                                                                                                  #                                 -          -   -
023067,000573:                                                                                                  #        FIND DIFFERENCE VECTOR  DELTACDU = OGC-CDUX
023068,000574:                                                                                                  #   
023069,000575:                                                                                                  #        ENTER HERE IF ATTITUDE HOLD
023070,000576: 
023071,000577: 37,2242           41575        NOPOLYM            VLOAD    PUSH                                  #         OGC      IGC
023072,000578: 37,2243           02760                                    OGC                                   #  CHANGE IGC  TO  MGC FOR COMPATIBILITY
023073,000579: 37,2244           45006                           PUSH     CALL                                  #         MGC      OGC
023074,000580: 37,2245           47501                                    CDUTRIG                               #  WITH Y,Z,X ORDER OF CDUSPOT
023075,000581: 37,2246           47175                           VLOAD    RTB                                   #   -         DPHI     OGC-CDUX , PD4
023076,000582: 37,2247           00003                                    2                                     #  DELTACDU = DTHETA = IGC-CDUY , 0
023077,000583: 37,2250           45552                                    V1STO2S                               #             DPSI     MGC-CDUZ , 2
023078,000584: 37,2251           27317                           STOVL    BOOSTEMP                              
023079,000585: 37,2252           15334                                    ZEROVECS                              
023080,000586: 37,2253           24001                           STOVL    0                                     
023081,000587: 37,2254           00767                                    CDUSPOT                               
023082,000588: 37,2255           47034                           RTB      RTB                                   
023083,000589: 37,2256           45552                                    V1STO2S                               
023084,000590: 37,2257           70564                                    DELSTOR                               
023085,000591: 37,2260           14013                           STODL    10D                                   
023086,000592: 37,2261           00741                                    SINCDUZ                               
023087,000593: 37,2262           72405                           DMP      SL1                                   
023088,000594: 37,2263           00001                                    0                                     
023089,000595: 37,2264           60415                           DAD      SR2                                   #  CHANGE SCALE OF AK TO 2REVS
023090,000596: 37,2265           00005                                    4                                     
023091,000597: 37,2266           77650                           GOTO                                           
023092,000598: 37,2267           70416                                    ATTDISP2                              
023093,000599: 
023094,000600: 34,2000                                           SETLOC   P11ONE                                
023095,000601: 34,2000                                           BANK                                           
023096,000602: 34,2416                                           COUNT    34/P11                                
023097,000603: 
023098,000604: 34,2416           14021        ATTDISP2           STODL    16D                                   #  16D, .5(DPHI + DTHETA*SIN(CDUZ))
023099,000605: 34,2417           00747                                    COSCDUZ                               
023100,000606: 34,2420           41405                           DMP      PUSH                                  
023101,000607: 34,2421           00001                                    0                                     
023102,000608: 34,2422           72405                           DMP      SL1                                   
023103,000609: 34,2423           00751                                    COSCDUX                               
023104,000610: 34,2424           41325                           PDDL     DMP                                   
023105,000611: 34,2425           00743                                    SINCDUX                               
023106,000612: 34,2426           00003                                    2                                     
023107,000613: 34,2427           72415                           DAD      SL1                                   
023108,000614: 34,2430           77626                           STADR                                          
023109,000615: 34,2431           63755                           STODL    17D                                   #  17D,  .5(DTHETA*COS(CDUX)*COS(CDUZ)
023110,000616: 34,2432           72405                           DMP      SL1                                   #                        +DPSI*SIN(CDUX))
023111,000617: 34,2433           00743                                    SINCDUX                               
023112,000618: 34,2434           41325                           PDDL     DMP                                   
023113,000619: 34,2435           00751                                    COSCDUX                               
023114,000620: 34,2436           00003                                    2                                     
023115,000621: 34,2437           72425                           DSU      SL1                                   
023116,000622: 34,2440           77626                           STADR                                          
023117,000623: 34,2441           77754                           STORE    18D                                   #  18D,  .5(-DTHETA*SIN(CDUX)*COS(CDUZ)
023118,000624: 34,2442           77751                           TLOAD                                          #                        +DPSI*COS(CDUX))
023119,000625: 34,2443           00021                                    16D                                   
023120,000626: 34,2444           03077                           STORE    AK                                    #  STORE ATTITUDE ERRORS IN AK,AK1,AK2
023121,000627: 34,2445           77776                           EXIT                                           
023122,000628: 
023123,000629: 34,2446           31725                           CA       SATSW                                 
023124,000630: 34,2447           10000                           CCS      A                                     #  CHK TAKEOVER STATUS
023125,000631: 34,2450           02471                           TC       SATOUT                                #  POS - DISPLAY ONLY
023126,000632: 34,2451           02477                           TC       AKLOAD                                #  0     STORE BIAS
023127,000633: 34,2452           06006        STEERSAT           TC       INTPRET                               #  NEG   STEER L/V
023128,000634: 34,2453           76351                           TLOAD    TAD                                   
023129,000635: 34,2454           03327                                    BIASAK                                
023130,000636: 34,2455           03077                                    AK                                    
023131,000637: 34,2456           03077                           STORE    AK                                    #  AKS = AKS - STORED BIAS
023132,000638: 34,2457           77776                           EXIT                                           
023133,000639: 34,2460           31476                           CA       AK                                    
023134,000640: 34,2461           02623                           TC       RESCALES                              
023135,000641: 34,2462           55476                           TS       AK                                    
023136,000642: 34,2463           31477                           CA       AK1                                   
023137,000643: 34,2464           02623                           TC       RESCALES                              
023138,000644: 34,2465           55477                           TS       AK1                                   
023139,000645: 34,2466           31500                           CA       AK2                                   
023140,000646: 34,2467           02623                           TC       RESCALES                              
023141,000647: 34,2470           55500                           TS       AK2                                   
023142,000648:                                                                                                  #        DISPLAY ATTITUDE ERRORS ON FDAI VIA NEEDLER
023143,000649: 
023144,000650: 34,2471           04676        SATOUT             TC       BANKCALL                              
023145,000651: 34,2472           42432                           CADR     NEEDLER                               
023146,000652: 34,2473           34113        ATERSET            CAF      OCT31                                 #  DELAY .25 SEC
023147,000653: 34,2474           04676                           TC       BANKCALL                              #  EXECUTION + DELAY = .56SEC APPROX
023148,000654: 34,2475           01732                           CADR     DELAYJOB                              
023149,000655: 34,2476           02345                           TC       ATERJOB                               #  END OF ATT ERROR DISPLAY CYCLE
023150,000656: 
023151,000657: 34,2477           41476        AKLOAD             CS       AK                                    #  STORE AKS
023152,000658: 34,2500           55726                           TS       BIASAK                                #  INTO BIAS
023153,000659: 34,2501           41477                           CS       AK1                                   #  COMPLEMENTED
023154,000660: 34,2502           55727                           TS       BIASAK     +1                         
023155,000661: 34,2503           41500                           CS       AK2                                   
023156,000662: 34,2504           55730                           TS       BIASAK     +2                         
023157,000663: 34,2505           45033                           CS       BIT1                                  #  SET SW
023158,000664: 34,2506           55725                           TS       SATSW                                 #  TO STEER
023159,000665: 34,2507           02452                           TC       STEERSAT                              #  GO STEER
023160,000666: 34,2510           31725        STRSAT             CA       SATSW                                 #  CHECK IF NEEDLER
023161,000667: 34,2511           00006                           EXTEND                                         #  HAS BEEN INITIALIZED
023162,000668: 34,2512           62363                           BZMF     ATTDISP                               #  YES - CONTINUE
023163,000669: 34,2513           41501        ATRESET            CS       RCSFLAGS                              #  NO - SET
023164,000670: 34,2514           75031                           MASK     BIT3                                  #  INITIALIZATION SW
023165,000671: 34,2515           27501                           ADS      RCSFLAGS                              #  FOR NEEDLER
023166,000672: 34,2516           04676                           TC       BANKCALL                              #  AND GO
023167,000673: 34,2517           42432                           CADR     NEEDLER                               #  DO IT
023168,000674: 34,2520           36211                           CAF      REVCNT                                #  OCT 6
023169,000675: 34,2521           04676                           TC       BANKCALL                              #  DELAY JOB
023170,000676: 34,2522           01732                           CADR     DELAYJOB                              #  60 MS -WAIT TILL IMUERRCNTR ZEROED
023171,000677: 34,2523           11725                           CCS      SATSW                                 #  CHECK SW STATUS
023172,000678: 34,2524           02534                           TC       TAKEON                                #  POS   STEER INIT.
023173,000679: 34,2525           02526                           TC       +1                                    #  0     RETURN TO DISPLAY
023174,000680: 34,2526           35033                           CA       BIT1                                  #  NEG   RETURN TO DISPLAY
023175,000681: 34,2527           55725                           TS       SATSW                                 #  SW = DISPLAY ONLY
023176,000682: 34,2530           45023                           CS       BIT9                                  #  DISABLE
023177,000683: 34,2531           00006                           EXTEND                                         #  SIVB
023178,000684: 34,2532           03012                           WAND     CHAN12                                #  TAKEOVER
023179,000685: 34,2533           02471                           TC       SATOUT                                #  DISPLAY
023180,000686: 34,2534           35023        TAKEON             CAF      BIT9                                  #  ENABLE
023181,000687: 34,2535           00006                           EXTEND                                         #  SIVB
023182,000688: 34,2536           05012                           WOR      CHAN12                                #  TAKEOVER
023183,000689: 34,2537           35035                           CA       ZERO                                  #  INDICATE NEEDLER
023184,000690: 34,2540           55725                           TS       SATSW                                 #  WAS INITIALIZED
023185,000691: 34,2541           02471                           TC       SATOUT                                
023186,000692: 34,2542           51575        S11.1              VLOAD    ABVAL                                 
023187,000693: 34,2543           01177                                    VN                                    
023188,000694: 34,2544           27723                           STOVL    VMAGI                                 #  VI    SCALED 2(7) IN METERS/CSEC
023189,000695: 34,2545           01171                                    RN                                    
023190,000696: 34,2546           50256                           UNIT     DOT                                   
023191,000697: 34,2547           01177                                    VN                                    
023192,000698: 34,2550           77752                           SL1                                            
023193,000699: 34,2551           17741                           STODL    HDOT                                  
023194,000700: 34,2552           05152                                    RPAD                                  
023195,000701: 34,2553           77214                           BOF      VLOAD                                 
023196,000702: 34,2554           00355                                    AMOONFLG                              
023197,000703: 34,2555           70560                                    EARTHALT                              
023198,000704: 34,2556           02026                                    RLS                                   
023199,000705: 34,2557           60446                           ABVAL    SR2                                   
023200,000706: 34,2560           77621        EARTHALT           BDSU                                           
023201,000707: 34,2561           00045                                    36D                                   
023202,000708: 34,2562           03737                           STORE    ALTI                                  
023203,000709: 34,2563           77616                           RVQ                                            
023204,000710: 34,2564           31716        DELSTOR            CA       BOOSTEMP                              
023205,000711: 34,2565           00006                           EXTEND                                         #  STORE DELTACDU INTO PDL 0,2,4
023206,000712: 34,2566           20154                           MSU      MPAC                                  
023207,000713: 34,2567           50120                           INDEX    FIXLOC                                
023208,000714: 34,2570           54000                           TS       0                                     
023209,000715: 34,2571           31717                           CA       BOOSTEMP   +1                         
023210,000716: 34,2572           00006                           EXTEND                                         
023211,000717: 34,2573           20155                           MSU      MPAC       +1                         
023212,000718: 34,2574           50120                           INDEX    FIXLOC                                
023213,000719: 34,2575           54002                           TS       2                                     
023214,000720: 34,2576           31720                           CA       BOOSTEMP   +2                         
023215,000721: 34,2577           00006                           EXTEND                                         
023216,000722: 34,2600           20156                           MSU      MPAC       +2                         
023217,000723: 34,2601           50120                           INDEX    FIXLOC                                
023218,000724: 34,2602           54004                           TS       4                                     
023219,000725: 34,2603           16030                           TCF      DANZIG                                
023220,000726: 34,2604           30154        RLTST              CA       MPAC                                  #  DETERMINE IF ROLLOUT
023221,000727: 34,2605           00006                           EXTEND                                         #  IS COMPLETED
023222,000728: 34,2606           71701                           MP       SATRLRT    +1                         
023223,000729: 34,2607           00006                           EXTEND                                         
023224,000730: 34,2610           66030                           BZMF     DANZIG                                #  UNLIKE SIGNS STILL ROLLING
023225,000731: 34,2611           00006                           EXTEND                                         #  ROLLOUT COMPLETED
023226,000732: 34,2612           33672                           DCA      MBDYTCTL   +2                         #  ZERO OUT ROLL CONTRIBUTION
023227,000733: 34,2613           52155                           DXCH     MPAC                                  
023228,000734: 34,2614           06030                           TC       DANZIG                                
023229,000735: 34,2615           06006        NOPOLY             TC       INTPRET                               #  COMES HERE IF
023230,000736: 34,2616           52001                           SETPD    GOTO                                  #  ATTITUDE HOLD
023231,000737: 34,2617           00001                                    0                                     
023232,000738: 34,2620           76242                                    NOPOLYM                               
023233,000739: 34,2621           01673        COEFPOLY           ADRES    POLYLOC                               
023234,000740: 34,2622           01476        V06N62             VN       0662                                  
023235,000741: 34,2623           00006        RESCALES           EXTEND                                         #  RESCALE AK S FOR
023236,000742: 34,2624           71731                           MP       SATSCALE                              #  NEW HARDWARE
023237,000743: 34,2625           20001                           DDOUBL                                         #  SCALING FOR
023238,000744: 34,2626           20001                           DDOUBL                                         #  STEERING
023239,000745: 34,2627           00002                           TC       Q                                     #  SATURN
023240,000746: 
023241,000747:                                                                                                  #  SATURN TAKEOVER FUNCTION
023242,000748:                                                                                                  #  ************************
023243,000749:                                                                                                  #  
023244,000750:                                                                                                  #  PROGRAM DESCRIPTION
023245,000751: 
023246,000752:                                                                                                  #        MOD NUMBER 1
023247,000753:                                                                                                  #        MOD BY ELIASSEN
023248,000754: 
023249,000755:                                                                                                  #  FUNCTIONAL DESCRIPTION
023250,000756: 
023251,000757:                                                                                                  #        DURING THE COASTING PHASE OF SIVB ATTACHED, THE
023252,000758:                                                                                                  #        ASTRONAUT MAY REQUEST SATURN TAKEOVER THROUGH
023253,000759:                                                                                                  #        EXTENDED VERB 46 (BITS 13,14 OF DAPDATR1 SET ).
023254,000760:                                                                                                  #        THE CMC REGARDS RHC COMMANDS AS BODY-AXES RATE
023255,000761:                                                                                                  #        COMMANDS AND IT TRANSMITS THESE TO SATURN AS DC
023256,000762:                                                                                                  #        VOLTAGES.  THE VALUE OF THE CONSTANT RATE COMMAND
023257,000763:                                                                                                  #        IS 0.5 DEG/SEC.  AN ABSENCE OF RHC ACTIVITY RE-
023258,000764:                                                                                                  #        SULTS IN A ZERO RATE COMMAND.
023259,000765: 
023260,000766:                                                                                                  #        THE FDAI ERROR NEEDLES WILL INDICATE THE VALUE
023261,000767:                                                                                                  #        OF THE RATE COMMAND.
023262,000768: 
023263,000769:                                                                                                  #  CALLING SEQUENCE
023264,000770: 
023265,000771:                                                                                                  #        DAPFIG +9D      TC      POSTJUMP
023266,000772:                                                                                                  #                        CADR    SATSTKON
023267,000773: 
023268,000774:                                                                                                  #  SUBROUTINES CALLED
023269,000775: 
023270,000776:                                                                                                  #        ENDEXT
023271,000777:                                                                                                  #        IBNKCALL
023272,000778:                                                                                                  #        STICKCHK
023273,000779:                                                                                                  #        NEEDLER
023274,000780:                                                                                                  #        T5RUPT
023275,000781:                                                                                                  #        RESUME
023276,000782: 
023277,000783:                                                                                                  #  ASTRONAUT REQUESTS
023278,000784: 
023279,000785:                                                                                                  #        ENTRY -  VERB 46 ENTER
023280,000786:                                                                                                  #                 (CONDITION - BITS 13, 14 OF DAPDATR1 SET)
023281,000787: 
023282,000788:                                                                                                  #        EXIT -   VERB 48 ENTER  (FLASH V06N46)
023283,000789:                                                                                                  #                 VERB 21 ENTER  AXXXX ENTER WHERE A=0 OR 1
023284,000790:                                                                                                  #                 VERB 34 ENTER
023285,000791:                                                                                                  #                 VERB 46 ENTER
023286,000792: 
023287,000793:                                                                                                  #  NORMAL EXIT MODE
023288,000794: 
023289,000795:                                                                                                  #        VERB 46 ENTER   (SEE ASTRONAUT ABOVE)
023290,000796: 
023291,000797:                                                                                                  #  ALARM OR ABORT EXIT MODES
023292,000798: 
023293,000799:                                                                                                  #        NONE
023294,000800: 
023295,000801:                                                                                                  #  OUTPUT
023296,000802: 
023297,000803:                                                                                                  #        SATURN RATES IN CDUXCMD, CDUYCMD, CDUZCMD
023298,000804: 
023299,000805:                                                                                                  #  ERASABLE INITIALIZATION
023300,000806: 
023301,000807:                                                                                                  #        DAPDATR1        (BITS 13, 14 MUST BE SET)
023302,000808: 
023303,000809:                                                                                                  #  DEBRIS
023304,000810: 
023305,000811:                                                                                                  #        CENTRALS
023306,000812:                                                                                                  #        CDUXCMD, CDUYCMD, CDUZCMD
023307,000813: 
023308,000814: 43,3225                                           BANK     43                                    
023309,000815: 43,2000                                           SETLOC   EXTVERBS                              
023310,000816: 43,2000                                           BANK                                           
023311,000817: 
023312,000818: 43,3225                                           COUNT    23/STTKE                              
023313,000819: 43,3225           00006        SATSTKON           EXTEND                                         
023314,000820: 43,3226           33243                           DCA      2REDOSAT                              
023315,000821: 43,3227           00004                           INHINT                                         
023316,000822: 43,3230           53313                           DXCH     T5LOC                                 
023317,000823: 43,3231           35013                           CAF      POSMAX                                
023318,000824: 43,3232           54030                           TS       TIME5                                 
023319,000825: 43,3233           40102                           CS       FLAGWRD6                              #  TURN ON BITS 15,14 OF
023320,000826: 43,3234           74105                           MASK     RELTAB11                              #  FLAGWRD6
023321,000827: 43,3235           26102                           ADS      FLAGWRD6                              #        SATSTICK CONTROL OF T5
023322,000828: 43,3236           04754                           TC       IBNKCALL                              #  ZERO JET CHANNELS IN 14 MS AND THEN
023323,000829: 43,3237           42644                           CADR     ZEROJET                               #  LEAVE THE T6 CLOCK DISABLED
023324,000830: 43,3240           00003                           RELINT                                         
023325,000831: 43,3241           02123                           TC       GOPIN                                 #  EXIT THUS BECAUSE WE CAME VIA V46
023326,000832: 
023327,000833: 43,3242  E6,1704                                  EBANK=   BODY3                                 
023328,000834: 43,3242           02767 46106  2REDOSAT           2CADR    REDOSAT                               
023329,000835: 
023330,000836: 
023331,000837: 43,3244  30,2000                                  SBANK=   LOWSUPER                              
023332,000838: 32,2017                                           BANK     32                                    
023333,000839: 23,2000                                           SETLOC   P11FOUR                               
023334,000840: 23,2000                                           BANK                                           
023335,000841: 
023336,000842: 23,2767           22016        REDOSAT            LXCH     BANKRUPT                              #  ALSO COMES HERE FOR RESTARTS
023337,000843: 23,2770           00006                           EXTEND                                         
023338,000844: 23,2771           22012                           QXCH     QRUPT                                 
023339,000845: 23,2772           41501                           CS       RCSFLAGS                              #  TURN ON BIT3 OF RCSFLAGX
023340,000846: 23,2773           75031                           MASK     BIT3                                  #  FOR
023341,000847: 23,2774           27501                           ADS      RCSFLAGS                              #  NEEDLER INITIALIZATION
023342,000848: 23,2775           04754                           TC       IBNKCALL                              
023343,000849: 23,2776           42432                           CADR     NEEDLER                               #  DISABLE IMU ERR COUNTERS ETC.
023344,000850: 23,2777           35023                           CAF      BIT9                                  #  SIVB
023345,000851: 23,3000           00006                           EXTEND                                         #  TAKEOVER
023346,000852: 23,3001           05012                           WOR      CHAN12                                #  ENABLE
023347,000853: 23,3002           00006                           EXTEND                                         #  SET UP T5 CYCLE
023348,000854: 23,3003           33044                           DCA      2SATSTCK                              
023349,000855: 23,3004           53313                           DXCH     T5LOC                                 
023350,000856: 23,3005           33042                           CAF      100MST5                               #  IN 100 MSECS
023351,000857: 23,3006           54030                           TS       TIME5                                 
023352,000858: 23,3007           15347                           TCF      RESUME                                #  END OF SATURN STICK INITIALIZATION
023353,000859: 
023354,000860:                                                                                                  #        THIS SECTION IS EXECUTED EVERY 100 MSECS
023355,000861: 23,3010           22016        SATSTICK           LXCH     BANKRUPT                              
023356,000862: 23,3011           00006                           EXTEND                                         
023357,000863: 23,3012           22012                           QXCH     QRUPT                                 
023358,000864: 
023359,000865: 23,3013           33043                           CAF      2SATSTCK                              #  SET UP RUPT
023360,000866: 23,3014           55312                           TS       T5LOC                                 #  LO ORDER LOC SET
023361,000867: 23,3015           33042                           CAF      100MST5                               #  100 MSECS
023362,000868: 23,3016           54030                           TS       TIME5                                 
023363,000869: 23,3017           33041                           CAF      STIKBITS                              
023364,000870: 23,3020           00006                           EXTEND                                         
023365,000871: 23,3021           06031                           RXOR     CHAN31                                #  CHECK IF MAN ROT BITS SAME
023366,000872: 23,3022           73041                           MASK     STIKBITS                              
023367,000873: 23,3023           04754                           TC       IBNKCALL                              #  SET RATE INDICES
023368,000874: 23,3024           43142                           CADR     STICKCHK                              #  FOR PITCH YAW AND ROLL
023369,000875: 
023370,000876: 23,3025           51656                           INDEX    RMANNDX                               #  SET SATURN RATES
023371,000877: 23,3026           31721                           CA       SATRATE                               
023372,000878: 23,3027           55476                           TS       AK                                    #        ROLL
023373,000879: 23,3030           51657                           INDEX    PMANNDX                               
023374,000880: 23,3031           31721                           CA       SATRATE                               
023375,000881: 23,3032           55477                           TS       AK1                                   #        PITCH
023376,000882: 23,3033           51660                           INDEX    YMANNDX                               
023377,000883: 23,3034           31721                           CA       SATRATE                               
023378,000884: 23,3035           55500                           TS       AK2                                   #        YAW
023379,000885: 
023380,000886: 23,3036           04754                           TC       IBNKCALL                              #  FOR SATURN INTERFACE AND FDAI DISPLAY
023381,000887: 23,3037           42432                           CADR     NEEDLER                               
023382,000888: 23,3040           15347                           TCF      RESUME                                #  END OF SATURN STICK CONTROL
023383,000889: 
023384,000890: 23,3041           00077        STIKBITS           OCT      00077                                 
023385,000891: 23,3042           37766        100MST5            DEC      16374      B-14                       
023386,000892: 23,3043  E6,1704                                  EBANK=   BODY3                                 
023387,000893: 23,3043           03010 46066  2SATSTCK           2CADR    SATSTICK                              

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