Source Code
These source-code files were transcribed from scans made from Don Eyles's personal
copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston
facility, and the scanning was sponsored by Mike Stewart. The code was transcribed
from these scans by a team of volunteers who are referenced in the program
comments. Comments from the original source code are in ALL-CAPS, whereas
comments added later in transcription are in Mixed-Case. In some cases, where
similar code blocks exist in previously-transcribed AGC programs (primarily
Luminary 99, from Apollo 11) those code blocks were used as a starting point and
then corrected to agree with the BURST120 scans. The full scans are available
at the Virtual AGC
project's collection at archive.org, while more-convenient reduced-size (but reduced-quality)
images are available at
the main Virtual AGC website. Report any errors noted by creating an
issue report at the Virtual AGC
project's GitHub repository. Notations on the program listing read, in part:YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 BY NASA 2021106-031 DEC 7, 1967 THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.Note that the date is the date of the printout, not the date of the program revision. |
005807,000002: ## Copyright: Public domain.
005808,000003: ## Filename: IMU_MODE_SWITCHING_ROUTINES.agc
005809,000004: ## Purpose: A module for revision 0 of BURST120 (Sunburst).
005810,000005: ## It is part of the source code for the Lunar Module's (LM)
005811,000006: ## Apollo Guidance Computer (AGC) for Apollo 5.
005812,000007: ## Assembler: yaYUL
005813,000008: ## Contact: Ron Burkey <info@sandroid.org>.
005814,000009: ## Website: www.ibiblio.org/apollo/index.html
005815,000010: ## Mod history: 2016-09-30 RSB Created draft version.
005816,000011: ## 2016-10-05 RSB Completed transcription.
005817,000012: ## 2016-10-30 MAS Corrected MODEXIT->MODEEXIT.
005818,000013: ## 2016-11-01 RSB Typos.
005819,000014: ## 2016-12-03 RSB Fixed a bunch of comment errors with
005820,000015: ## octopus/ProoferComments, but the process
005821,000016: ## isn't complete yet because of a handful of
005822,000017: ## pages that don't work well.
005823,000018: ## 2016-12-05 RSB Comment-proofing pass with octopus/ProoferComments
005824,000019: ## completed; fixes made.
005825,000020: ## 2017-03-15 RSB Comment-text fixes identified in 6-way
005826,000021: ## side-by-side diff of Sunburst 120 and Luminary
005827,000022: ## 69/99/116/131/210.
005828,000023: ## 2021-05-30 ABS Removed SPSCODE definition not present in scans.
005829,000024:
Page 137 |
005831,000026: 4314 BLOCK 02
005832,000027: 4314 E3,1455 EBANK= COMMAND
005833,000028:
005834,000029: # FIXED-FIXED ROUTINES.
005835,000030:
005836,000031: 4314 37767 ZEROICDU CAF ZERO # ZERO ICDU COUNTERS.
005837,000032: 4315 54032 TS CDUX
005838,000033: 4316 54033 TS CDUY
005839,000034: 4317 54034 TS CDUZ
005840,000035: 4320 00002 TC Q
005841,000036:
005842,000037: 4321 00620 4SECS DEC 400 B-14
005843,000038: 4322 00454 3SECS DEC 300 B-14
005844,000039:
Page 138 |
005846,000041: # IMU ZEROING ROUTINE.
005847,000042:
005848,000043: 13,2000 BANK 13
005849,000044:
005850,000045: 13,2000 00004 IMUZERO INHINT # ROUTINE TO ZERO ICDUS.
005851,000046: 13,2001 40326 CS DSPTAB +11D # DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
005852,000047: 13,2002 72777 MASK BITS4&6 # COARSE ALIGN.
005853,000048: 13,2003 10000 CCS A
005854,000049: 13,2004 12010 TCF IMUZEROA
005855,000050:
005856,000051: 13,2005 04755 TC ALARM # IF SO.
005857,000052: 13,2006 00206 OCT 206
005858,000053:
005859,000054: 13,2007 12712 TCF CAGETSTJ +4
005860,000055:
005861,000056: 13,2010 47754 IMUZEROA CS IMUSEFLG
005862,000057: 13,2011 70074 MASK STATE # PROGRAM IS USING THE IMU.
005863,000058: 13,2012 67754 AD IMUSEFLG
005864,000059: 13,2013 54074 TS STATE
005865,000060:
005866,000061: 13,2014 02701 TC CAGETSTQ # IF IMU COMING UP, TURN-ON PROGRAM WILL
005867,000062: 13,2015 12043 TCF MODEEXIT # DO ALL THE WORK.
005868,000063:
005869,000064: 13,2016 42776 CS BITS3&4 # INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
005870,000065: 13,2017 70365 MASK IMODES30 # JUST CAME OUT OF COARSE ALIGN).
005871,000066: 13,2020 62776 AD BITS3&4
005872,000067: 13,2021 54365 TS IMODES30
005873,000068:
005874,000069: 13,2022 42777 CS BITS4&6 # SEND ZERO ENCODE WITH COARSE AND ERROR
005875,000070: 13,2023 00006 EXTEND # COUNTER DISABLED.
005876,000071: 13,2024 03012 WAND 12
005877,000072:
005878,000073: 13,2025 02324 TC NOATTOFF # TURN OFF NO ATT LAMP.
005879,000074:
005880,000075: 13,2026 37757 CAF BIT5
005881,000076: 13,2027 00006 EXTEND
005882,000077: 13,2030 05012 WOR 12
005883,000078:
005884,000079: 13,2031 37756 CAF BIT6 # WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
005885,000080: 13,2032 05663 TC WAITLIST # RECEIVE ITS PULSE TRAIN.
005886,000081: 13,2033 E3,1455 EBANK= COMMAND
005887,000082: 13,2033 02045 26063 2CADR IMUZERO2
005888,000083:
005889,000084: 13,2035 40365 CS IMODES30 # SEE IF IMU OPERATING AND ALARM IF NOT.
005890,000085: 13,2036 77753 MASK BIT9
005891,000086: 13,2037 10000 CCS A
005892,000087: 13,2040 12043 TCF MODEEXIT
005893,000088:
005894,000089: 13,2041 04755 TC ALARM
005895,000090: 13,2042 00210 OCT 210
005896,000091:
Page 139 |
005898,000093: 13,2043 00003 MODEEXIT RELINT # GENERAL MODE-SWITCHING EXIT.
005899,000094: 13,2044 15221 TCF SWRETURN
005900,000095:
Page 140 |
005902,000097: 13,2045 02701 IMUZERO2 TC CAGETSTQ # POSSIBLY SWITCH TO TURN-ON PROGRAM.
005903,000098: 13,2046 15727 TCF TASKOVER
005904,000099:
005905,000100: 13,2047 04314 TC ZEROICDU # ZERO COUNTERS.
005906,000101: 13,2050 47757 CS BIT5 # REMOVE ZERO DISCRETE.
005907,000102: 13,2051 00006 EXTEND
005908,000103: 13,2052 03012 WAND 12
005909,000104:
005910,000105: 13,2053 34321 CAF 4SECS
005911,000106: 13,2054 05704 TC VARDELAY
005912,000107:
005913,000108: 13,2055 02701 IMUZERO3 TC CAGETSTQ
005914,000109: 13,2056 15727 TCF TASKOVER
005915,000110:
005916,000111: 13,2057 42776 CS BITS3&4 # REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
005917,000112: 13,2060 70365 MASK IMODES30
005918,000113: 13,2061 54365 TS IMODES30
005919,000114:
005920,000115: 13,2062 05270 TC IBNKCALL # SET ISS WARNING IF EITHER OF ABOVE ARE
005921,000116: 13,2063 24753 CADR SETISSW # PRESENT.
005922,000117:
005923,000118: 13,2064 12664 TCF ENDIMU
005924,000119:
Page 141 |
005926,000121: # IMU COARSE ALIGN MODE.
005927,000122:
005928,000123: 13,2065 00004 IMUCOARS INHINT
005929,000124: 13,2066 02232 TC SETCOARS
005930,000125:
005931,000126: 13,2067 36306 CAF SIX
005932,000127: 13,2070 05663 TC WAITLIST
005933,000128: 13,2071 E3,1455 EBANK= COMMAND
005934,000129: 13,2071 02074 26063 2CADR COARS
005935,000130:
005936,000131: 13,2073 12043 TCF MODEEXIT
005937,000132:
005938,000133: 13,2074 02674 COARS TC CAGETEST
005939,000134: 13,2075 37756 CAF BIT6 # ENABLE ALL THREE ISS CDU ERROR COUNTERS
005940,000135: 13,2076 00006 EXTEND
005941,000136: 13,2077 05012 WOR CHAN12
005942,000137:
005943,000138: 13,2100 37762 CAF TWO # SET CDU INDICATOR
005944,000139: 13,2101 55460 COARS1 TS CDUIND
At first glance, it appears to say "1;S" in the following line of the printout, but it is rather smudged, and since every other AGC version says "1:S" and matches in other respects as well, I assume that "1:S" is what it really says — RSB 2017. |
005948,000143: 13,2102 51460 INDEX CDUIND # COMPUTE THETAD - THETAA IN 1:S
005949,000144: 13,2103 30400 CA THETAD # COMPLEMENT FORM
005950,000145: 13,2104 00006 EXTEND
005951,000146: 13,2105 51460 INDEX CDUIND
005952,000147: 13,2106 20032 MSU CDUX
005953,000148: 13,2107 00006 EXTEND
005954,000149: 13,2110 77747 MP BIT13 # SHIFT RIGHT 2
005955,000150: 13,2111 56001 XCH L # ROUND
005956,000151: 13,2112 60000 DOUBLE
005957,000152: 13,2113 54061 TS ITEMP1
005958,000153: 13,2114 12116 TCF +2
005959,000154: 13,2115 26001 ADS L
005960,000155:
005961,000156: 13,2116 51460 INDEX CDUIND # DIFFERENCE TO BE COMPUTED
005962,000157: 13,2117 23455 LXCH COMMAND
005963,000158: 13,2120 11460 CCS CDUIND
005964,000159: 13,2121 02101 TC COARS1
005965,000160:
005966,000161: 13,2122 37762 CAF TWO # MINIMUM OF 4 MS WAIT
005967,000162: 13,2123 05704 TC VARDELAY
005968,000163:
Page 142 |
005970,000165: 13,2124 02674 COARS2 TC CAGETEST # DONT CONTINUE IF CAGED.
005971,000166: 13,2125 54061 TS ITEMP1 # SETS TO +0.
005972,000167: 13,2126 37762 CAF TWO # SET CDU INDICATOR
005973,000168: 13,2127 55460 +3 TS CDUIND
005974,000169:
005975,000170: 13,2130 51460 INDEX CDUIND
005976,000171: 13,2131 11455 CCS COMMAND # NUMBER OF PULSES REQUIRED
005977,000172: 13,2132 02136 TC COMPOS # GREATER THAN MAX ALLOWED
005978,000173: 13,2133 02145 TC NEXTCDU +1
005979,000174: 13,2134 02211 TC COMNEG
005980,000175: 13,2135 02145 TC NEXTCDU +1
005981,000176:
005982,000177: 13,2136 63002 COMPOS AD -COMMAX # COMMAX = MAX NUMBER OF PULSES ALLOWED
005983,000178: 13,2137 00006 EXTEND # MINUS ONE
005984,000179: 13,2140 62221 BZMF COMZERO
005985,000180: 13,2141 51460 INDEX CDUIND
005986,000181: 13,2142 55455 TS COMMAND # REDUCE COMMAND BY MAX NUMBER OF PULSES
005987,000182: 13,2143 43003 CS -COMMAX- # ALLOWED
005988,000183:
005989,000184: 13,2144 24061 NEXTCDU INCR ITEMP1
005990,000185: 13,2145 67770 AD NEG0 # PREVENT +0 IN OUTPUT COUNTER
005991,000186: 13,2146 51460 INDEX CDUIND
005992,000187: 13,2147 54050 TS CDUXCMD # SET UP COMMAND REGISTER.
005993,000188:
005994,000189: 13,2150 11460 CCS CDUIND
005995,000190: 13,2151 02127 TC COARS2 +3
005996,000191:
005997,000192: 13,2152 10061 CCS ITEMP1 # SEE IF ANY PULSES TO GO OUT.
005998,000193: 13,2153 12225 TCF SENDPULS
005999,000194:
006000,000195: 13,2154 05701 TC FIXDELAY # WAIT FOR GIMBALS TO SETTLE.
006001,000196: 13,2155 00226 DEC 150 B-14
006002,000197:
Page 143 |
006004,000199: 13,2156 37762 CAF TWO # AT END OF COMMAND, CHECK TO SEE THAT
006005,000200: 13,2157 54061 CHKCORS TS ITEMP1 # GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
006006,000201: 13,2160 50000 INDEX A
006007,000202: 13,2161 30032 CA CDUX
006008,000203: 13,2162 00006 EXTEND
006009,000204: 13,2163 50061 INDEX ITEMP1
006010,000205: 13,2164 20400 MSU THETAD
006011,000206: 13,2165 10000 CCS A
006012,000207: 13,2166 12202 TCF COARSERR
006013,000208: 13,2167 12171 TCF CORSCHK2
006014,000209: 13,2170 12202 TCF COARSERR
006015,000210:
006016,000211: 13,2171 10061 CORSCHK2 CCS ITEMP1
006017,000212: 13,2172 12157 TCF CHKCORS
006018,000213: 13,2173 55455 TS GCOMP # ZERO GYRO COMPENSATION REGISTERS IN
006019,000214: 13,2174 55456 TS GCOMP +1 # PREPARATION FOR COMPENSATION.
006020,000215: 13,2175 55457 TS GCOMP +2
006021,000216: 13,2176 55460 TS GCOMP +3
006022,000217: 13,2177 55461 TS GCOMP +4
006023,000218: 13,2200 55462 TS GCOMP +5
006024,000219:
006025,000220: 13,2201 12664 TCF ENDIMU # END OF COARSE ALIGNMENT.
006026,000221:
006027,000222: 13,2202 62210 COARSERR AD COARSTOL # 2 DEGREES.
006028,000223: 13,2203 00006 EXTEND
006029,000224: 13,2204 62171 BZMF CORSCHK2
006030,000225:
006031,000226: 13,2205 04755 TC ALARM # COARSE ALIGN ERROR.
006032,000227: 13,2206 00211 OCT 211
006033,000228:
006034,000229: 13,2207 12672 TCF IMUBAD
006035,000230:
006036,000231: 13,2210 77511 COARSTOL DEC -.01111 # 2 DEGREES SCALED AT HALF-REVOLUTIONS.
006037,000232:
Page 144 |
006039,000234: 13,2211 63002 COMNEG AD -COMMAX
006040,000235: 13,2212 00006 EXTEND
006041,000236: 13,2213 62221 BZMF COMZERO
006042,000237: 13,2214 40000 COM
006043,000238: 13,2215 51460 INDEX CDUIND
006044,000239: 13,2216 55455 TS COMMAND
006045,000240: 13,2217 33003 CA -COMMAX-
006046,000241: 13,2220 02144 TC NEXTCDU
006047,000242:
006048,000243: 13,2221 37767 COMZERO CAF ZERO
006049,000244: 13,2222 51460 INDEX CDUIND
006050,000245: 13,2223 57455 XCH COMMAND
006051,000246: 13,2224 02144 TC NEXTCDU
006052,000247:
006053,000248: 13,2225 33001 SENDPULS CAF 13,14,15
006054,000249: 13,2226 00006 EXTEND
006055,000250: 13,2227 05014 WOR CHAN14
006056,000251: 13,2230 33004 CAF 600MS
006057,000252: 13,2231 12123 TCF COARS2 -1 # AND THEN TO VARDELAY.
006058,000253: 13,2232 47756 SETCOARS CS BIT6 # CLEAR ERROR COUNTER BEFORE MODE SWITCH.
006059,000254: 13,2233 00006 EXTEND
006060,000255: 13,2234 03012 WAND 12
006061,000256: 13,2235 37760 CAF BIT4 # PUT ISS IN COARSE ALIGN.
006062,000257: 13,2236 00006 EXTEND
006063,000258: 13,2237 05012 WOR 12
006064,000259:
006065,000260: 13,2240 42251 CS OCT40010 # TURN ON NO ATT LAMP.
006066,000261: 13,2241 70326 MASK DSPTAB +11D
006067,000262: 13,2242 62251 AD OCT40010
006068,000263: 13,2243 54326 TS DSPTAB +11D
006069,000264:
006070,000265: 13,2244 47760 CS BIT4 # INHIBIT IMU FAIL.
006071,000266: 13,2245 70365 MASK IMODES30
006072,000267: 13,2246 67760 AD BIT4
006073,000268: 13,2247 54365 TS IMODES30
006074,000269:
006075,000270: 13,2250 00002 TC Q
006076,000271:
006077,000272: 13,2251 40010 OCT40010 OCT 40010
006078,000273:
Page 145 |
006080,000275: # IMU FINE ALIGN MODE SWITCH.
006081,000276:
006082,000277: 13,2252 00004 IMUFINE INHINT
006083,000278: 13,2253 02706 TC CAGETSTJ # SEE IF IMU BEING CAGED.
006084,000279:
006085,000280: 13,2254 43000 CS BITS4-6 # RESET ZERO, COARSE, AND ECTR ENABLE.
006086,000281: 13,2255 00006 EXTEND
006087,000282: 13,2256 03012 WAND 12
006088,000283:
006089,000284: 13,2257 02324 TC NOATTOFF # TURN OFF NO ATT LAMP.
006090,000285:
006091,000286: 13,2260 37752 CAF BIT10 # IMU FAIL WAS INHIBITED DURING THE
006092,000287: 13,2261 05663 TC WAITLIST # PRESUMABLY PRECEDING COARSE ALIGN. LEAVE
006093,000288: 13,2262 E3,1455 EBANK= COMMAND
006094,000289: 13,2262 02273 26063 2CADR IFAILOK # IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
006095,000290:
006096,000291: 13,2264 34321 CAF 4SECS # GYRO RE-CENTERING TIME.
006097,000292: 13,2265 05663 TC WAITLIST
006098,000293: 13,2266 E3,1455 EBANK= COMMAND
006099,000294: 13,2266 02271 26063 2CADR IMUFINED
006100,000295:
006101,000296: 13,2270 12043 TCF MODEEXIT
006102,000297:
006103,000298: 13,2271 02674 IMUFINED TC CAGETEST # SEE THAT NO ONE HAS CAGED THE IMU.
006104,000299: 13,2272 12664 TCF ENDIMU
006105,000300:
006106,000301: 13,2273 02701 IFAILOK TC CAGETSTQ # ENABLE IMU FIAL UNLESS IMU BEING CAGED.
006107,000302: 13,2274 15727 TCF TASKOVER # IT IS.
006108,000303:
006109,000304: 13,2275 37760 CAF BIT4 # DONT RESET IMU FAIL INHIBIT IF SOMEONE
006110,000305: 13,2276 00006 EXTEND # HAS GONE INTO COARSE ALIGN.
006111,000306: 13,2277 02012 RAND 12
006112,000307: 13,2300 10000 CCS A
006113,000308: 13,2301 15727 TCF TASKOVER
006114,000309:
006115,000310: 13,2302 47760 CS BIT4
006116,000311: 13,2303 70365 PFAILOK2 MASK IMODES30
006117,000312: 13,2304 54365 TS IMODES30
006118,000313: 13,2305 05270 TC IBNKCALL # THE ISS WARNING LIGHT MAY COME ON NOW
006119,000314: 13,2306 24753 CADR SETISSW # THAT THE INHIBIT HAS BEEN REMOVED.
006120,000315: 13,2307 15727 TCF TASKOVER
006121,000316:
006122,000317: 13,2310 02701 PFAILOK TC CAGETSTQ # ENABLE PIP FAIL PROG ALARM.
006123,000318: 13,2311 15727 TCF TASKOVER
006124,000319:
006125,000320: 13,2312 47752 CS BIT10 # MAKE PREVIOUS VALUE OF PIPA FAIL THE
006126,000321: 13,2313 70365 MASK IMODES30 # NO FAIL STATE SO THAT IF THE FAILURE
006127,000322: 13,2314 67752 AD BIT10 # INDICATION IS ON NOW, IT WILL BE PICKED
006128,000323: 13,2315 54365 TS IMODES30 # UP (ROUTINE DETECTS ONLY CHANGES).
006129,000324:
Page 146 |
006131,000326: 13,2316 47747 CS BIT13 # PIPA FAIL BIT IS KEPT IN TWO PLACES FOR
006132,000327: 13,2317 70366 MASK IMODES33
006133,000328: 13,2320 67747 AD BIT13
006134,000329: 13,2321 54366 TS IMODES33
006135,000330:
006136,000331: 13,2322 47757 CS BIT5
006137,000332: 13,2323 12303 TCF PFAILOK2
006138,000333:
006139,000334: 13,2324 42251 NOATTOFF CS OCT40010 # TURN OFF NO ATT LAMP.
006140,000335: 13,2325 70326 MASK DSPTAB +11D
006141,000336: 13,2326 67745 AD BIT15
006142,000337: 13,2327 54326 TS DSPTAB +11D
006143,000338: 13,2330 00002 TC Q
006144,000339:
Page 147 |
006146,000341: # ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS. NO IMUSTALL REQUIRED IN EITHER CASE.
006147,000342:
006148,000343: 13,2331 02701 PIPUSE TC CAGETSTQ # DONT ENABLE PIPA FAIL IF IMU BEING CAGED
006149,000344: 13,2332 15221 TCF SWRETURN
006150,000345:
006151,000346: 13,2333 00004 INHINT
006152,000347: 13,2334 37767 CAF ZERO # ZERO COUNTERS.
006153,000348: 13,2335 54037 TS PIPAX
006154,000349: 13,2336 54040 TS PIPAY
006155,000350: 13,2337 54041 TS PIPAZ
006156,000351:
006157,000352: 13,2340 47763 CS BIT1 # IF PIPA FAILS FROM NOW ON (UNTIL
006158,000353: 13,2341 70365 MASK IMODES30 # PIPFREE), LIGHT ISS WARNING.
006159,000354: 13,2342 54365 TS IMODES30
006160,000355:
006161,000356: 13,2343 05270 PIPFREE2 TC IBNKCALL # ISS WARNING MIGHT COME ON NOW.
006162,000357: 13,2344 24753 CADR SETISSW # (OR GO OFF ON PIPFREE).
006163,000358:
006164,000359: 13,2345 12043 TCF MODEEXIT
006165,000360:
006166,000361: 13,2346 00004 PIPFREE INHINT # PROGRAM DONE WITH PIPAS. DONT LIGHT
006167,000362: 13,2347 47763 CS BIT1 # ISS WARNING.
006168,000363: 13,2350 70365 MASK IMODES30
006169,000364: 13,2351 67763 AD BIT1
006170,000365: 13,2352 54365 TS IMODES30
006171,000366:
006172,000367: 13,2353 77752 MASK BIT10 # IF PIP FAIL ON, DO PROG ALSRM AND RESET
006173,000368: 13,2354 10000 CCS A # ISS WARNING.
006174,000369: 13,2355 12043 TCF MODEEXIT
006175,000370:
006176,000371: 13,2356 04755 TC ALARM
006177,000372: 13,2357 00212 OCT 212
006178,000373:
006179,000374: 13,2360 00004 INHINT
006180,000375:
006181,000376: 13,2361 12343 TCF PIPFREE2
006182,000377:
Page 148 |
006184,000379: # THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
006185,000380: # BEGINNING AT THE ECADR ARRIVING IN A. THE MINIMUM SIZE OF ANY PULSE TRAIN TO THE GYROS IS 1 PULSE. THE
006186,000381: # UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
006187,000382:
006188,000383: 13,2362 E3,1400 EBANK= 1400 # VARIABLE, ACTUALLY.
006189,000384:
006190,000385: 13,2362 54151 IMUPULSE TS MPAC +5 # SAVE ARRIVING ECADR.
006191,000386: 13,2363 02706 TC CAGETSTJ # DONT PROCEED IF IMU BEING CAGED.
006192,000387:
006193,000388: 13,2364 10356 CCS LGYRO # SEE IF GYROS BUSY.
006194,000389: 13,2365 02427 TC GYROBUSY # SLEEP.
006195,000390:
006196,000391: 13,2366 54146 TS MPAC +2
006197,000392: 13,2367 37756 CAF BIT6 # ENABLE THE POWER SUPPLY.
006198,000393: 13,2370 00006 EXTEND
006199,000394: 13,2371 05014 WOR 14
006200,000395:
006201,000396: 13,2372 37761 CAF FOUR
006202,000397: 13,2373 00004 GWAKE2 INHINT
006203,000398: 13,2374 05663 TC WAITLIST # (IF A JOB WAS PUT TO SLEEP, THE POWER
006204,000399: 13,2375 E3,1455 EBANK= COMMAND # SUPPLY IS LEFT ON BY THE WAKING JOB).
006205,000400: 13,2375 02445 26063 2CADR STRTGYRO
006206,000401:
006207,000402: 13,2377 30151 CA MPAC +5 # SET UP EBANK, SAVING CALLER'S EBANK FOR
006208,000403: 13,2400 56003 XCH EBANK # RESTORATION ON RETURN.
006209,000404: 13,2401 56151 XCH MPAC +5
006210,000405: 13,2402 54356 TS LGYRO # RESERVES GYROS.
006211,000406: 13,2403 74564 MASK LOW8
006212,000407: 13,2404 54061 TS ITEMP1
006213,000408:
006214,000409: 13,2405 37762 CAF TWO # FORCE SIGN AGREEMENT ON INPUTS.
006215,000410: 13,2406 54147 GYROAGRE TS MPAC +3
006216,000411: 13,2407 60000 DOUBLE
006217,000412: 13,2410 60061 AD ITEMP1
006218,000413: 13,2411 54150 TS MPAC +4
006219,000414: 13,2412 00006 EXTEND
006220,000415: 13,2413 50000 INDEX A
006221,000416: 13,2414 31401 DCA 1400
006222,000417: 13,2415 52145 DXCH MPAC
006223,000418: 13,2416 07327 TC TPAGREE
006224,000419: 13,2417 52145 DXCH MPAC
006225,000420: 13,2420 50150 INDEX MPAC +4
006226,000421: 13,2421 53401 DXCH 1400
006227,000422:
006228,000423: 13,2422 10147 CCS MPAC +3
006229,000424: 13,2423 12406 TCF GYROAGRE
006230,000425:
006231,000426: 13,2424 30151 CA MPAC +5 # RESTORE CALLER'S EBANK.
006232,000427: 13,2425 54003 TS EBANK
006233,000428: 13,2426 12043 TCF MODEEXIT
006234,000429:
Page 149 |
006236,000431: # ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
006237,000432:
006238,000433: 13,2427 00006 GYROBUSY EXTEND # SAVE RETURN 2FCADR.
006239,000434: 13,2430 30124 DCA BUF2
006240,000435: 13,2431 52145 DXCH MPAC
006241,000436: 13,2432 32444 REGSLEEP CAF LGWAKE
006242,000437: 13,2433 15545 TCF JOBSLEEP
006243,000438:
006244,000439: 13,2434 10356 GWAKE CCS LGYRO # WHEN AWAKENED, SEE IF GYROS STILL BUSY.
006245,000440: 13,2435 12432 TCF REGSLEEP # IF SO, SLEEP SOME MORE.
006246,000441:
006247,000442: 13,2436 54146 TS MPAC +2
006248,000443: 13,2437 00006 EXTEND
006249,000444: 13,2440 30145 DCA MPAC
006250,000445: 13,2441 52124 DXCH BUF2 # RESTORE SWRETURN INFO.
006251,000446: 13,2442 37763 CAF ONE
006252,000447: 13,2443 12373 TCF GWAKE2
006253,000448:
006254,000449: 13,2444 26434 LGWAKE CADR GWAKE
006255,000450:
Page 150 |
006257,000452: # GYRO-TORQUING WAITLIST TASKS.
006258,000453:
006259,000454: 13,2445 42661 STRTGYRO CS GDESELCT # DE-SELECT LAST GYRO.
006260,000455: 13,2446 00006 EXTEND
006261,000456: 13,2447 03014 WAND 14
006262,000457:
006263,000458: 13,2450 02674 TC CAGETEST
006264,000459:
006265,000460: 13,2451 30356 STRTGYR2 CA LGYRO # JUMP ON PHASE COUNTER IN BITS 13-14.
006266,000461: 13,2452 00006 EXTEND
006267,000462: 13,2453 77760 MP BIT4
006268,000463: 13,2454 50000 INDEX A
006269,000464: 13,2455 12456 TCF +1
006270,000465: 13,2456 02473 TC GSELECT # =0. DO Y GYRO.
006271,000466: 13,2457 00202 OCT 00202
006272,000467:
006273,000468: 13,2460 02473 TC GSELECT # =1. DO Z GYRO.
006274,000469: 13,2461 00302 OCT 00302
006275,000470:
006276,000471: 13,2462 02471 TC GSELECT -2 # =2. DO X GYRO.
006277,000472: 13,2463 00100 OCT 00100
006278,000473:
006279,000474: 13,2464 37767 CAF ZERO # =3. DONE
006280,000475: 13,2465 54356 TS LGYRO
006281,000476: 13,2466 32444 CAF LGWAKE # WAKE A POSSIBLE SLEEPING JOB.
006282,000477: 13,2467 05551 TC JOBWAKE
006283,000478:
006284,000479: 13,2470 12271 NORESET TCF IMUFINED # DO NOT RESET THE POWER SUPPLY
Page 151 |
006286,000481: 13,2471 47761 -2 CS FOUR # SPECIAL ENTRY TO REGRESS LGYRO FOR X.
006287,000482: 13,2472 26356 ADS LGYRO
006288,000483:
006289,000484: 13,2473 50002 GSELECT INDEX Q # SELECT GYRO.
006290,000485: 13,2474 30000 CAF 0 # PACKED WORD CONTAINS GYRO SELECT BITS
006291,000486: 13,2475 54064 TS ITEMP4 # AND INCREMENT TO LGYRO.
006292,000487: 13,2476 77765 MASK SEVEN
006293,000488: 13,2477 67747 AD BIT13
006294,000489: 13,2500 26356 ADS LGYRO
006295,000490: 13,2501 54003 TS EBANK
006296,000491: 13,2502 74564 MASK LOW8
006297,000492: 13,2503 54061 TS ITEMP1
006298,000493:
006299,000494: 13,2504 47765 CS SEVEN
006300,000495: 13,2505 70064 MASK ITEMP4
006301,000496: 13,2506 54064 TS ITEMP4
006302,000497:
006303,000498: 13,2507 00006 EXTEND # MOVE DP COMMAND TO RUPTREGS FOR TESTING.
006304,000499: 13,2510 50061 INDEX ITEMP1
006305,000500: 13,2511 31401 DCA 1400
006306,000501: 13,2512 52071 DXCH RUPTREG1
006307,000502:
006308,000503: 13,2513 10070 CCS RUPTREG1
006309,000504: 13,2514 12527 TCF MAJ+
006310,000505: 13,2515 12517 TCF +2
006311,000506: 13,2516 12642 TCF MAJ-
006312,000507:
006313,000508: 13,2517 10071 CCS RUPTREG2
006314,000509: 13,2520 12524 TCF MIN+
006315,000510: 13,2521 12451 TCF STRTGYR2
006316,000511: 13,2522 12637 TCF MIN-
006317,000512: 13,2523 12451 TCF STRTGYR2
006318,000513:
Page 152 |
006320,000515: 13,2524 62560 MIN+ AD -GYROMIN # SMALL POSITIVE COMMAND. SEE IF AT LEAST
006321,000516: 13,2525 00006 EXTEND # 1 GYRO PULSE.
006322,000517: 13,2526 62451 BZMF STRTGYR2
006323,000518:
006324,000519: 13,2527 00006 MAJ+ EXTEND # DEFINITE POSITIVE OUTPUT.
006325,000520: 13,2530 32663 DCA GYROFRAC
006326,000521: 13,2531 20071 DAS RUPTREG1
006327,000522:
006328,000523: 13,2532 30064 CA ITEMP4 # SELECT POSITIVE TORQUING FOR THIS GYRO.
006329,000524: 13,2533 00006 EXTEND
006330,000525: 13,2534 05014 WOR 14
006331,000526:
006332,000527: 13,2535 35342 CAF LOW7 # LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
006333,000528: 13,2536 70071 MASK RUPTREG2 # TO INITIAL COMMAND IN MAJOR PART OF LONG
006334,000529: 13,2537 56071 XCH RUPTREG2 # TERM STORAGE AND TRUNCATED FRACTION
006335,000530: 13,2540 00006 GMERGE EXTEND # IN MINOR PART. THE MAJOR PART WILL BE
006336,000531: 13,2541 77754 MP BIT8 # COUNTED DOWN TO ZERO IN THE COURSE OF
006337,000532: 13,2542 54062 TS ITEMP2 # PUTTING OUT THE ENTIRE COMMAND.
006338,000533: 13,2543 30070 CA RUPTREG1
006339,000534: 13,2544 00006 EXTEND
006340,000535: 13,2545 77753 MP BIT9
006341,000536: 13,2546 54070 TS RUPTREG1
006342,000537: 13,2547 30001 CA L
006343,000538: 13,2550 00006 EXTEND
006344,000539: 13,2551 77746 MP BIT14
006345,000540: 13,2552 26062 ADS ITEMP2 # INITIAL COMMAND.
006346,000541:
006347,000542: 13,2553 00006 EXTEND # SEE IF MORE THAN ONE PULSE TRAIN NEEDED
006348,000543: 13,2554 30071 DCA RUPTREG1 # (MORE THAN 16383 PULSES).
006349,000544: 13,2555 67771 AD MINUS1
006350,000545: 13,2556 10000 CCS A
006351,000546: 13,2557 12603 TCF LONGGYRO
006352,000547: 13,2560 77600 -GYROMIN OCT -177 # MAY BE ADJUSTED TO SPECIFY MINIMUM CMD.
006353,000548:
006354,000549: 13,2561 12565 TCF +4
006355,000550:
006356,000551: 13,2562 37746 CAF BIT14
006357,000552: 13,2563 26062 ADS ITEMP2
006358,000553: 13,2564 37767 CAF ZERO
006359,000554:
006360,000555: 13,2565 50061 +4 INDEX ITEMP1
006361,000556: 13,2566 53401 DXCH 1400
Page 153 |
006363,000558: 13,2567 30062 CA ITEMP2 # ENTIRE COMMAND.
006364,000559: 13,2570 54047 LASTSEG TS GYROCMD
006365,000560: 13,2571 00006 EXTEND
006366,000561: 13,2572 77752 MP BIT10 # WAITLIST DT
006367,000562: 13,2573 66311 AD THREE # TRUNCATION AND PHASE UNCERTAINTIES.
006368,000563: 13,2574 05663 TC WAITLIST
006369,000564: 13,2575 E3,1455 EBANK= COMMAND
006370,000565: 13,2575 02445 26063 2CADR STRTGYRO
006371,000566:
006372,000567: 13,2577 37752 GYROEXIT CAF BIT10 # TURN ON GYRO ACTIVITY TO START TRAIN.
006373,000568: 13,2600 00006 EXTEND
006374,000569: 13,2601 05014 WOR 14
006375,000570: 13,2602 15727 TCF TASKOVER
006376,000571:
006377,000572: 13,2603 50061 LONGGYRO INDEX ITEMP1
006378,000573: 13,2604 53401 DXCH 1400 # INITIAL COMMAND OUT PLUS N AUGMENTS OF
006379,000574: 13,2605 37746 CAF BIT14 # 8192. INITIAL COMMAND IS AT LEAST 8192.
006380,000575: 13,2606 60062 AD ITEMP2
006381,000576: 13,2607 54047 TS GYROCMD
006382,000577:
006383,000578: 13,2610 00006 AUG3 EXTEND # GET WAITLIST DT TO TIME WHEN TRAIN IS
006384,000579: 13,2611 77752 MP BIT10 # ALMOST OUT.
006385,000580: 13,2612 65340 AD NEG3
006386,000581: 13,2613 05663 TC WAITLIST
006387,000582: 13,2614 E3,1455 EBANK= COMMAND
006388,000583: 13,2614 02617 26063 2CADR 8192AUG
006389,000584:
006390,000585: 13,2616 12577 TCF GYROEXIT
006391,000586:
006392,000587: 13,2617 02674 8192AUG TC CAGETEST
006393,000588:
006394,000589: 13,2620 30356 CA LGYRO # ADD 8192 PULSES TO GYROCMD
006395,000590: 13,2621 54003 TS EBANK
006396,000591: 13,2622 74564 MASK LOW8
006397,000592: 13,2623 54061 TS ITEMP1
006398,000593:
006399,000594: 13,2624 50061 INDEX ITEMP1 # SEE IF THIS IS THE LAST AUG.
006400,000595: 13,2625 11400 CCS 1400
006401,000596: 13,2626 12632 TCF AUG2 # MORE TO COME.
006402,000597:
006403,000598: 13,2627 37746 CAF BIT14
006404,000599: 13,2630 26047 ADS GYROCMD
006405,000600: 13,2631 12571 TCF LASTSEG +1
006406,000601:
006407,000602: 13,2632 50061 AUG2 INDEX ITEMP1
006408,000603: 13,2633 55400 TS 1400
006409,000604: 13,2634 37746 CAF BIT14
006410,000605: 13,2635 26047 ADS GYROCMD
006411,000606: 13,2636 12610 TCF AUG3 # COMPUTE DT.
006412,000607:
Page 154 |
006414,000609: 13,2637 62560 MIN- AD -GYROMIN # POSSIBLE NEGATIVE OUTPUT.
006415,000610: 13,2640 00006 EXTEND
006416,000611: 13,2641 62451 BZMF STRTGYR2
006417,000612:
006418,000613: 13,2642 00006 MAJ- EXTEND # DEFINITE NEGATIVE OUTPUT.
006419,000614: 13,2643 42663 DCS GYROFRAC
006420,000615: 13,2644 20071 DAS RUPTREG1
006421,000616:
006422,000617: 13,2645 30064 CA ITEMP4 # SELECT NEGATIVE TORQUING FOR THIS GYRO.
006423,000618: 13,2646 67753 AD BIT9
006424,000619: 13,2647 00006 EXTEND
006425,000620: 13,2650 05014 WOR 14
006426,000621:
006427,000622: 13,2651 40070 CS RUPTREG1 # SET UP RUPTREGS TO FALL INTO GMERGE.
006428,000623: 13,2652 54070 TS RUPTREG1 # ALL NUMBERS PUT INTO GYROCMD ARE
006429,000624: 13,2653 40071 CS RUPTREG2 # POSITIVE - BIT9 OF CHAN 14 DETERMINES
006430,000625: 13,2654 75342 MASK LOW7 # THE SIGN OF THE COMMAND.
006431,000626: 13,2655 40000 COM
006432,000627: 13,2656 56071 XCH RUPTREG2
006433,000628: 13,2657 40000 COM
006434,000629: 13,2660 12540 TCF GMERGE
006435,000630:
006436,000631: 13,2661 01700 GDESELCT OCT 1700 # TURN OFF SELECT AND ACTIVITY BITS.
006437,000632:
006438,000633: 13,2662 00000 00034 GYROFRAC 2DEC .215 B-21
006439,000634:
Page 155 |
006441,000636: # IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
006442,000637:
006443,000638: 13,2664 00006 ENDIMU EXTEND # MODE IS BAD IF CAGE HAS OCCURED OR IF
006444,000639: 13,2665 00011 READ 11 # ISS WARNING IS ON.
006445,000640: 13,2666 77763 MASK BIT1
006446,000641: 13,2667 10000 CCS A
006447,000642: 13,2670 12672 TCF IMUBAD
006448,000643:
006449,000644: 13,2671 12720 IMUGOOD TCF GOODEND # WITH C(A) = 0.
006450,000645:
006451,000646: 13,2672 37767 IMUBAD CAF ZERO
006452,000647: 13,2673 12715 TCF BADEND
006453,000648:
006454,000649: 13,2674 37756 CAGETEST CAF BIT6 # SUBROUTINE TO TERMINATE IMU MODE
006455,000650: 13,2675 70365 MASK IMODES30 # SWITCH IF IMU HAS BEEN CAGED.
006456,000651: 13,2676 10000 CCS A
006457,000652: 13,2677 12672 TCF IMUBAD # DIRECTLY.
006458,000653: 13,2700 00002 TC Q # WITH C(A) = +0.
006459,000654:
006460,000655: 13,2701 40365 CAGETSTQ CS IMODES30 # SKIP IF IMU NOT BEING CAGED.
006461,000656: 13,2702 77756 MASK BIT6
006462,000657: 13,2703 10000 CCS A
006463,000658: 13,2704 24002 INCR Q
006464,000659: 13,2705 00002 TC Q
006465,000660:
006466,000661: 13,2706 40365 CAGETSTJ CS IMODES30 # IF DURING MODE SWITCH INITIALIZATION
006467,000662: 13,2707 77756 MASK BIT6 # IT IS FOUND THAT THE IMU IS BEING CAGED,
006468,000663: 13,2710 10000 CCS A # SET IMUCADR TO -0 TO INDICATE OPERATION
006469,000664: 13,2711 00002 TC Q # COMPLETE BUT FAILED. RETURN IMMEDIATELY
006470,000665:
006471,000666: 13,2712 47767 CS ZERO # TO SWRETURN.
006472,000667: 13,2713 54367 TS IMUCADR
006473,000668: 13,2714 12043 TCF MODEEXIT
006474,000669:
Page 156 |
006476,000671: # GENERALIZED MODE SWITCHING TERMINATION. ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
006477,000672: # OR AT BADEND FOR AN UNSUCCESSFUL ONE. C(A) OR ARRIVAL =0 FOR IMU, 1 FOR AOT, 2 FOR RADARS, & 3 FOR ATT MANU.
006478,000673:
006479,000674: 13,2715 54071 BADEND TS RUPTREG2 # DEVICE INDEX.
006480,000675: 13,2716 47767 CS ZERO # FOR FAILURE.
006481,000676: 13,2717 12722 TCF GOODEND +2
006482,000677:
006483,000678: 13,2720 54071 GOODEND TS RUPTREG2
006484,000679: 13,2721 47763 CS ONE # FOR SUCCESS.
006485,000680:
006486,000681: 13,2722 54072 TS RUPTREG3
006487,000682: 13,2723 50071 INDEX RUPTREG2 # SEE IF USING PROGRAM ASLEEP.
006488,000683: 13,2724 10367 CCS MODECADR
006489,000684: 13,2725 12727 TCF +2 # YES - WAKE IT UP.
006490,000685: 13,2726 12737 TCF ENDMODE # IF 0, PROGRAM NOT IN YET.
006491,000686:
006492,000687: 13,2727 37767 CAF ZERO # WAKE SLEEPING PROGRAM.
006493,000688: 13,2730 50071 INDEX RUPTREG2
006494,000689: 13,2731 56367 XCH MODECADR
006495,000690: 13,2732 05551 TC JOBWAKE
006496,000691:
006497,000692: 13,2733 40072 CS RUPTREG3 # ADVANCE LOC IF SUCCESSFUL.
006498,000693: 13,2734 50064 INDEX LOCCTR
006499,000694: 13,2735 26154 ADS LOC
006500,000695:
006501,000696: 13,2736 15727 TCF TASKOVER
006502,000697:
006503,000698: 13,2737 30072 ENDMODE CA RUPTREG3 # -0 INDICATES OPERATION COMPLETE BUT
006504,000699: 13,2740 50071 +1 INDEX RUPTREG2 # UNSUCCESSFUL - -1 INDICATES COMPLETE AND
006505,000700: 13,2741 54367 TS MODECADR # SUCCESSFUL.
006506,000701: 13,2742 15727 TCF TASKOVER
006507,000702:
Page 157 |
006509,000704: # GENERAL STALLING ROUTINE. USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
006510,000705:
006511,000706: 13,2743 36311 ATTSTALL CAF THREE # ATTITUDE MANEUVER STALL
006512,000707: 13,2744 12752 TCF STALL
006513,000708:
006514,000709: 13,2745 37762 RADSTALL CAF TWO # RR AND LR STALL.
006515,000710: 13,2746 12752 TCF STALL
006516,000711:
006517,000712: 13,2747 37763 AOTSTALL CAF ONE # AOT.
006518,000713: 13,2750 02752 TC STALL
006519,000714:
006520,000715: 13,2751 13,2747 OPTSTALL EQUALS AOTSTALL
006521,000716:
006522,000717: 13,2751 37767 IMUSTALL CAF ZERO # IMU.
006523,000718:
006524,000719: 13,2752 00004 STALL INHINT
006525,000720: 13,2753 54071 TS RUPTREG2 # SAVE DEVICE INDEX.
006526,000721: 13,2754 50000 INDEX A # SEE IF OPERATION COMPLETE.
006527,000722: 13,2755 10367 CCS MODECADR
006528,000723: 13,2756 12774 TCF MODABORT # ALLOWABLE STATES ARE +0, -1, AND -0.
006529,000724: 13,2757 12770 TCF MODESLP # OPERATION INCOMPLETE.
006530,000725: 13,2760 12764 TCF MODEGOOD # COMPLETE AND GOOD IF = -1.
006531,000726:
006532,000727: 13,2761 50071 MG2 INDEX RUPTREG2 # COMPLETE AND FAILED IF -0. RESET TO +0.
006533,000728: 13,2762 54367 TS MODECADR # RETURN TO CALLER.
006534,000729: 13,2763 12043 TCF MODEEXIT
006535,000730:
006536,000731: 13,2764 10000 MODEGOOD CCS A # MAKE SURE INITIAL STATE -1.
006537,000732: 13,2765 12774 TCF MODABORT
006538,000733:
006539,000734: 13,2766 24123 INCR BUF2 # IF SO, INCREMENT RETURN ADDRESS AND
006540,000735: 13,2767 12761 TCF MG2 # RETURN IMMEDIATELY, SETTING CADR = +0.
006541,000736:
006542,000737: 13,2770 05235 MODESLP TC MAKECADR # CALL FROM SWITCHABLE FIXED ONLY.
006543,000738: 13,2771 50071 INDEX RUPTREG2
006544,000739: 13,2772 54367 TS MODECADR
006545,000740: 13,2773 15545 TCF JOBSLEEP
006546,000741:
006547,000742: 13,2774 06000 MODABORT TC ABORT # TWO PROGRAMS USING SAME DEVICE.
006548,000743: 13,2775 01210 OCT 1210
006549,000744:
Page 158 |
006551,000746: # CONSTANTS FOR MODE SWITCHING ROUTINES
006552,000747:
006553,000748: 13,2776 00014 BITS3&4 OCT 14
006554,000749: 13,2777 00050 BITS4&6 OCT 00050
006555,000750: 13,3000 00070 BITS4-6 OCT 00070
006556,000751: 13,3001 7754 IMUSEFLG EQUALS BIT8 # INTERPRETER SWITCH 7.
006557,000752: 13,3001 70000 13,14,15 OCT 70000
006558,000753:
006559,000754: 13,3002 77500 -COMMAX DEC -191 B-14
006560,000755: 13,3003 77477 -COMMAX- DEC -192 B-14
006561,000756: 13,3004 00074 600MS DEC 60 B-14
006562,000757: 13,3005 4322 3SECSM EQUALS 3SECS
End of include-file IMU_MODE_SWITCHING_ROUTINES.agc. Parent file is MAIN.agc