Source Code

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

They have been adapted from sources files for Comanche 55, and updated via disassembly of binary dumps of original core rope memory modules, part numbers 2003972-1081, 2003972-1091, 2003972-1111, 2003972-1121, 2003972-1131, and 2003972-1141.

Since only binary dumps (rather than listings) of Comanche 67 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.

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

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