Source Code
These source-code files were reconstructed by Mike Stewart from dumps of the RETREAD 50 program stored in physical AGC core-rope modules (B1 and B2) belonging to the Computer History Museum, Mountain View, California. The reconstruction was aided by pre-existing source code for the AGC programs RETREAD 44 and AURORA 12. Read about the process here. Assembling this source code with yaYUL produces core ropes identical to those of the physical modules. Page-number references refer to corresponding sections of RETREAD 44 source code. No printouts of RETREAD 50 program listings are available. New sections of the software (appearing in EXTENDED_VERBS_FOR_MODING.agc) have been disassembled; labels and comments have been either taken from similar code in later programs or, in cases where this was not possible, added by VirtualAGC for clarity. |
009914,000002: ## Copyright: Public domain.
009915,000003: ## Filename: BANK11.agc
009916,000004: ## Purpose: Part of the source code for AGC program Retread 50.
009917,000005: ## Assembler: yaYUL
009918,000006: ## Contact: Ron Burkey <info@sandroid.org>.
009919,000007: ## Website: www.ibiblio.org/apollo/Restoration.html
009920,000008: ## Mod history: 2019-06-12 MAS Recreated from Computer History Museum's
009921,000009: ## physical core-rope modules.
009922,000010: ## 2019-10-01 MAS Completed disassembly.
009923,000011:
009924,000012: ## This entire section was added between Retread 44 and Retread 50. As such, all labels, variable names,
009925,000013: ## and comments (and even the name of the section itself!) are not original and have been added as part
009926,000014: ## of the disassembly process. Labels and comments were taken from similar code in later programs where
009927,000015: ## possible, and created anew by VirtualAGC where not.
009928,000016:
009929,000017: 11,2000 SETLOC 32000
009930,000018: 11,2000 1202 EBANK= COMMAND
009931,000019:
009932,000020: 11,2000 37642 VBZERO CA BIT5 # ROUTINE TO ZERO ICDUS.
009933,000021: 11,2001 00006 EXTEND
009934,000022: 11,2002 05012 WOR 12
009935,000023:
009936,000024: 11,2003 32342 CA 20MSEC # WAIT 20 MS.
009937,000025: 11,2004 00004 INHINT
009938,000026: 11,2005 04251 TC WAITLIST
009939,000027: 11,2006 02011 22002 2CADR ZEROICDU
009940,000028:
009941,000029: 11,2010 04205 TC ENDOFJOB
009942,000030:
009943,000031: 11,2011 37653 ZEROICDU CAF ZERO # ZERO ICDU COUNTERS.
009944,000032: 11,2012 54032 TS CDUX
009945,000033: 11,2013 54033 TS CDUY
009946,000034: 11,2014 54034 TS CDUZ
009947,000035:
009948,000036: 11,2015 47642 CS BIT5 # REMOVE ZERO DISCRETE.
009949,000037: 11,2016 00006 EXTEND
009950,000038: 11,2017 03012 WAND 12
009951,000039:
009952,000040: 11,2020 04321 TC TASKOVER
009953,000041:
009954,000042: # IMU COARSE ALIGN MODE.
009955,000043:
009956,000044: 11,2021 37643 IMUCOARS CAF BIT4 # SEND COARSE ALIGN ENABLE DISCRETE
009957,000045: 11,2022 00006 EXTEND
009958,000046: 11,2023 05012 WOR 12
009959,000047:
009960,000048: 11,2024 32344 CAF 50MSEC
009961,000049: 11,2025 00004 INHINT
009962,000050: 11,2026 04251 TC WAITLIST
009963,000051: 11,2027 02032 22002 2CADR COARS
009964,000052:
009965,000053: 11,2031 04205 TC ENDOFJOB
009966,000054:
009967,000055: 11,2032 37641 COARS CAF BIT6 # ENABLE ALL THREE ISS CDU ERROR COUNTERS
009968,000056: 11,2033 00006 EXTEND
009969,000057: 11,2034 05012 WOR 12
009970,000058:
009971,000059: 11,2035 37645 CAF TWO # SET CDU INDICATOR
009972,000060: 11,2036 55200 COARS1 TS CDUIND
009973,000061:
009974,000062: 11,2037 51200 INDEX CDUIND # COMPUTE THETAD - THETAA IN 1:S
009975,000063: 11,2040 30716 CA THETAD # COMPLEMENT FORM
009976,000064: 11,2041 00006 EXTEND
009977,000065: 11,2042 51200 INDEX CDUIND
009978,000066: 11,2043 20032 MSU CDUX
009979,000067: 11,2044 00006 EXTEND
009980,000068: 11,2045 77632 MP BIT13 # SHIFT RIGHT 2
009981,000069: 11,2046 56001 XCH L # ROUND
009982,000070: 11,2047 60000 DOUBLE
009983,000071: 11,2050 55201 TS ITEMP1
009984,000072: 11,2051 12053 TCF +2
009985,000073: 11,2052 26001 ADS L
009986,000074:
009987,000075: 11,2053 51200 INDEX CDUIND # DIFFERENCE TO BE COMPUTED
009988,000076: 11,2054 23202 LXCH COMMAND
009989,000077: 11,2055 11200 CCS CDUIND
009990,000078: 11,2056 02036 TC COARS1
009991,000079:
009992,000080: 11,2057 32342 CA 20MSEC
009993,000081: 11,2060 04251 TC WAITLIST
009994,000082: 11,2061 02064 22002 2CADR COARS2
009995,000083:
009996,000084: 11,2063 04321 TC TASKOVER
009997,000085:
009998,000086: 11,2064 37653 COARS2 CAF ZERO
009999,000087: 11,2065 55201 TS ITEMP1 # SETS TO +0.
010000,000088: 11,2066 37645 CAF TWO # SET CDU INDICATOR
010001,000089: 11,2067 55200 +3 TS CDUIND
010002,000090:
010003,000091: 11,2070 51200 INDEX CDUIND
010004,000092: 11,2071 11202 CCS COMMAND # NUMBER OF PULSES REQUIRED
010005,000093: 11,2072 02076 TC COMPOS # GREATER THAN MAX ALLOWED
010006,000094: 11,2073 02105 TC NEXTCDU +1
010007,000095: 11,2074 02117 TC COMNEG
010008,000096: 11,2075 02105 TC NEXTCDU +1
010009,000097:
010010,000098: 11,2076 62350 COMPOS AD -COMMAX # COMMAX = MAX NUMBER OF PULSES ALLOWED
010011,000099: 11,2077 00006 EXTEND # MINUS ONE
010012,000100: 11,2100 62127 BZMF COMZERO
010013,000101: 11,2101 51200 INDEX CDUIND
010014,000102: 11,2102 55202 TS COMMAND # REDUCE COMMAND BY MAX NUMBER OF PULSES
010015,000103: 11,2103 42351 CS -COMMAX- # ALLOWED
010016,000104:
010017,000105: 11,2104 25201 NEXTCDU INCR ITEMP1
010018,000106: 11,2105 51200 INDEX CDUIND
010019,000107: 11,2106 54050 TS CDUXCMD # SET UP COMMAND REGISTER.
010020,000108:
010021,000109: 11,2107 11200 CCS CDUIND
010022,000110: 11,2110 02067 TC COARS2 +3
010023,000111:
010024,000112: 11,2111 11201 CCS ITEMP1 # SEE IF ANY PULSES TO GO OUT.
010025,000113: 11,2112 02133 TC SENDPULS
010026,000114: 11,2113 02035 TC COARS1 -1
010027,000115: 11,2114 00006 EXTEND
010028,000116: 11,2115 03012 WAND 12
010029,000117:
010030,000118: 11,2116 04321 TC TASKOVER
010031,000119:
010032,000120: 11,2117 62350 COMNEG AD -COMMAX
010033,000121: 11,2120 00006 EXTEND
010034,000122: 11,2121 62127 BZMF COMZERO
010035,000123: 11,2122 40000 COM
010036,000124: 11,2123 51200 INDEX CDUIND
010037,000125: 11,2124 55202 TS COMMAND
010038,000126: 11,2125 32351 CA -COMMAX-
010039,000127: 11,2126 02104 TC NEXTCDU
010040,000128:
010041,000129: 11,2127 37653 COMZERO CAF ZERO
010042,000130: 11,2130 51200 INDEX CDUIND
010043,000131: 11,2131 57202 XCH COMMAND
010044,000132: 11,2132 02104 TC NEXTCDU
010045,000133:
010046,000134: 11,2133 32360 SENDPULS CAF 13,14,15
010047,000135: 11,2134 00006 EXTEND
010048,000136: 11,2135 05014 WOR 14
010049,000137: 11,2136 32345 CAF 600MS
010050,000138: 11,2137 04251 TC WAITLIST
010051,000139: 11,2140 02064 22002 2CADR COARS2
010052,000140: 11,2142 04321 TC TASKOVER
010053,000141:
010054,000142: # KEYBOARD REQUEST TO PULSE TORQUE IRIGA
010055,000143:
010056,000144: 11,2143 42355 TORQGYRS CS BITS4-6 # RESET ZERO, COARSE, AND ECTR ENABLE.
010057,000145: 11,2144 00006 EXTEND
010058,000146: 11,2145 03012 WAND 12
010059,000147:
010060,000148: 11,2146 37645 CAF TWO # INITIALIZE THE GYRO INDEX ERASABLES.
010061,000149: 11,2147 55205 TS GYRONUM
010062,000150: 11,2150 60000 DOUBLE
010063,000151: 11,2151 55206 TS GYCMDIDX
010064,000152: 11,2152 67646 AD ONE
010065,000153: 11,2153 55207 TS GYCMDIDX +1
010066,000154:
010067,000155: 11,2154 37641 CAF BIT6 # ENABLE THE POWER SUPPLY.
010068,000156: 11,2155 00006 EXTEND
010069,000157: 11,2156 05014 WOR 14
010070,000158:
010071,000159: 11,2157 32343 CAF 30MSEC
010072,000160: 11,2160 00004 INHINT
010073,000161: 11,2161 04251 TC WAITLIST
010074,000162: 11,2162 02165 22002 2CADR IMUPULSE
010075,000163:
010076,000164: 11,2164 04205 TC ENDOFJOB
010077,000165:
010078,000166: # THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
010079,000167: # BEGINNING AT LOCATION OGC. THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS). THE
010080,000168: # UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
010081,000169:
010082,000170: 11,2165 51206 IMUPULSE INDEX GYCMDIDX
010083,000171: 11,2166 11210 CCS OGC # SEE IF MORE THAN ONE PULSE TRAIN NEEDED
010084,000172: 11,2167 02173 TC LONGGYRO # (MORE THAN 16383 PULSES).
010085,000173: 11,2170 02220 TC LASTSEG
010086,000174: 11,2171 02173 TC LONGGYRO
010087,000175: 11,2172 02220 TC LASTSEG
010088,000176:
010089,000177: 11,2173 51206 LONGGYRO INDEX GYCMDIDX # SEND MAXIMUM 16383 PULSES.
010090,000178: 11,2174 55210 TS OGC
010091,000179:
010092,000180: 11,2175 51207 INDEX GYCMDIDX +1
010093,000181: 11,2176 25210 INCR OGC
010094,000182:
010095,000183: 11,2177 37626 CAF POSMAX
010096,000184: 11,2200 54047 TS GYROCTR
010097,000185:
010098,000186: 11,2201 32352 CA 5.13SEC # WAIT FOR FULL PULSE TRAIN TO GO OUT.
010099,000187: 11,2202 02203 TC +1
010100,000188: 11,2203 04251 TC WAITLIST
010101,000189: 11,2204 02165 22002 2CADR IMUPULSE
010102,000190:
010103,000191: 11,2206 51207 STRTGYRO INDEX GYCMDIDX +1 # DETERMINE POLARITY OF COMMAND.
010104,000192: 11,2207 11210 CCS OGC
010105,000193: 11,2210 37653 CAF ZERO
010106,000194: 11,2211 12213 TCF +2
010107,000195: 11,2212 37636 CAF BIT9
010108,000196:
010109,000197: 11,2213 51205 INDEX GYRONUM # SEND PULSE COMMAND TO GYRO.
010110,000198: 11,2214 62361 AD GYBITTAB
010111,000199: 11,2215 00006 EXTEND
010112,000200: 11,2216 01014 WRITE 14
010113,000201:
010114,000202: 11,2217 04321 TC TASKOVER
010115,000203:
010116,000204: 11,2220 51207 LASTSEG INDEX GYCMDIDX +1 # ENTIRE COMMAND.
010117,000205: 11,2221 11210 CCS OGC
010118,000206: 11,2222 02226 TC +4
010119,000207: 11,2223 02244 TC GYROEXIT
010120,000208: 11,2224 02226 TC +2
010121,000209: 11,2225 02244 TC GYROEXIT
010122,000210:
010123,000211: 11,2226 67646 AD ONE
010124,000212: 11,2227 54047 TS GYROCTR
010125,000213:
010126,000214: 11,2230 62353 AD -GYROMIN # SMALL GYRO COMMAND. SEE IF AT LEAST
010127,000215: 11,2231 00006 EXTEND # 16 GYRO PULSES.
010128,000216: 11,2232 62244 BZMF GYROEXIT
010129,000217:
010130,000218: 11,2233 37635 CAF BIT10 # GET WAITLIST DT TO TIME WHEN TRAIN IS
010131,000219: 11,2234 00006 EXTEND # ALMOST OUT.
010132,000220: 11,2235 70047 MP GYROCTR
010133,000221: 11,2236 67645 AD TWO
010134,000222: 11,2237 02240 TC +1
010135,000223: 11,2240 04251 TC WAITLIST
010136,000224: 11,2241 02244 22002 2CADR GYROEXIT
010137,000225:
010138,000226: 11,2243 02206 TC STRTGYRO
010139,000227:
010140,000228: 11,2244 11205 GYROEXIT CCS GYRONUM
010141,000229: 11,2245 12252 TCF NEXTGYRO
010142,000230:
010143,000231: 11,2246 47641 CS BIT6 # RESET GYRO ENABLE.
010144,000232: 11,2247 00006 EXTEND
010145,000233: 11,2250 03014 WAND 14
010146,000234:
010147,000235: 11,2251 04321 TC TASKOVER
010148,000236:
010149,000237: 11,2252 55205 NEXTGYRO TS GYRONUM
010150,000238: 11,2253 60000 DOUBLE
010151,000239: 11,2254 55206 TS GYCMDIDX
010152,000240: 11,2255 67646 AD ONE
010153,000241: 11,2256 55207 TS GYCMDIDX +1
010154,000242: 11,2257 02165 TC IMUPULSE
010155,000243:
010156,000244: # KEYBOARD REQUEST TO TURN ON INERTIAL SUBSYSTEM
010157,000245:
010158,000246: 11,2260 47630 ISSUP CS BIT15 # REMOVE IMU DELAY COMPLETE DISCRETE.
010159,000247: 11,2261 00006 EXTEND
010160,000248: 11,2262 03012 WAND 12
010161,000249:
010162,000250: 11,2263 37631 CAF BIT14 # SEE IF ISS HAS TURNED ON.
010163,000251: 11,2264 00006 EXTEND
010164,000252: 11,2265 02030 RAND 30
010165,000253:
010166,000254: 11,2266 10000 CCS A
010167,000255: 11,2267 02271 TC +2
010168,000256: 11,2270 02276 TC CAGESUB
010169,000257:
010170,000258: 11,2271 32346 CAF 1SEC # CHECK AGAIN IN ONE SECOND.
010171,000259: 11,2272 04251 TC WAITLIST
010172,000260: 11,2273 02260 22002 2CADR ISSUP
010173,000261:
010174,000262: 11,2275 04321 TC TASKOVER
010175,000263:
010176,000264: 11,2276 32356 CAGESUB CA BITS4&5 # SEND ZERO AND COARSE.
010177,000265: 11,2277 00006 EXTEND
010178,000266: 11,2300 05012 WOR 12
010179,000267:
010180,000268: 11,2301 32347 CA 90SECS
010181,000269: 11,2302 02303 TC +1
010182,000270: 11,2303 04251 TC WAITLIST
010183,000271: 11,2304 02307 22002 2CADR ENDTNON
010184,000272:
010185,000273: 11,2306 04321 TC TASKOVER
010186,000274:
010187,000275: 11,2307 37630 ENDTNON CAF BIT15 # SEND ISS DELAY COMPLETE.
010188,000276: 11,2310 00006 EXTEND
010189,000277: 11,2311 05012 WOR 12
010190,000278:
010191,000279: 11,2312 37631 ENDTNON2 CAF BIT14
010192,000280: 11,2313 00006 EXTEND
010193,000281: 11,2314 02030 RAND 30
010194,000282:
010195,000283: 11,2315 10000 CCS A # IS TURN-ON COMPLETE?
010196,000284: 11,2316 02320 TC +2 # YES.
010197,000285: 11,2317 02327 TC ENDTNON3 # NO. TRY AGAIN IN 10 MS.
010198,000286:
010199,000287: 11,2320 42357 CS BITS5&15 # REMOVE IMU ZERO AND DELAY COMPLETE.
010200,000288: 11,2321 00006 EXTEND
010201,000289: 11,2322 03012 WAND 12
010202,000290:
010203,000291: 11,2323 37641 CAF BIT6 # ENABLE ERROR COUNTERS.
010204,000292: 11,2324 00006 EXTEND
010205,000293: 11,2325 05012 WOR 12
010206,000294:
010207,000295: 11,2326 04321 TC TASKOVER
010208,000296:
010209,000297: 11,2327 32341 ENDTNON3 CAF 10MSEC
010210,000298: 11,2330 02331 TC +1
010211,000299: 11,2331 04251 TC WAITLIST
010212,000300: 11,2332 02312 22002 2CADR ENDTNON2
010213,000301:
010214,000302: 11,2334 04321 TC TASKOVER
010215,000303:
010216,000304: # IMU FINE ALIGN MODE SWITCH.
010217,000305:
010218,000306: 11,2335 42355 IMUFINE CS BITS4-6 # RESET ZERO, COARSE, AND ECTR ENABLE.
010219,000307: 11,2336 00006 EXTEND
010220,000308: 11,2337 03012 WAND 12
010221,000309: 11,2340 04205 TC ENDOFJOB
010222,000310:
010223,000311:
010224,000312: # WAITLIST DELAY TIME CONSTANTS
010225,000313:
010226,000314: 11,2341 00001 10MSEC DEC 1 B-14
010227,000315: 11,2342 00002 20MSEC DEC 2 B-14
010228,000316: 11,2343 00003 30MSEC DEC 3 B-14
010229,000317: 11,2344 00005 50MSEC DEC 5 B-14
010230,000318: 11,2345 00074 600MS DEC 60 B-14
010231,000319: 11,2346 00144 1SEC DEC 100 B-14
010232,000320: 11,2347 21450 90SECS DEC 9000 B-14
010233,000321:
010234,000322: # CONSTANTS FOR MODE SWITCHING ROUTINES
010235,000323:
010236,000324: 11,2350 77500 -COMMAX DEC -191 B-14
010237,000325: 11,2351 77477 -COMMAX- DEC -192 B-14
010238,000326:
010239,000327: 11,2352 01001 5.13SEC DEC 513 B-14
010240,000328: 11,2353 77757 -GYROMIN DEC -16 B-14 # MAY BE ADJUSTED TO SPECIFY MINIMUM CMD.
010241,000329:
010242,000330: 11,2354 00050 BITS4&6 OCT 00050
010243,000331: 11,2355 00070 BITS4-6 OCT 00070
010244,000332: 11,2356 00030 BITS4&5 OCT 00030
010245,000333: 11,2357 40020 BITS5&15 OCT 40020
010246,000334: 11,2360 70000 13,14,15 OCT 70000
010247,000335:
010248,000336: 11,2361 01140 GYBITTAB OCT 1140 # POWER SUPPLY ENABLE, GYRO SELECT,
010249,000337: 11,2362 01340 OCT 1340 # GYRO COMMAND OUT.
010250,000338: 11,2363 01240 OCT 1240
010251,000339:
010252,000340: # FAN-OUT
010253,000341:
010254,000342: 11,2364 02000 LST2FAN TC VBZERO # VB40 ZERO ISS CDU
010255,000343: 11,2365 02021 TC IMUCOARS # VB41 COARSE ALIGN IMU
010256,000344: 11,2366 02335 TC IMUFINE # VB42 FINE ALIGN IMU
010257,000345: 11,2367 02143 TC TORQGYRS # VB43 PULSE TORQUE GYROS
010258,000346: 11,2370 00004 ITURNON INHINT # VB44 ISS TURN ON
010259,000347: 11,2371 37646 CAF ONE
010260,000348: 11,2372 04251 TC WAITLIST
010261,000349: 11,2373 02260 22002 2CADR ISSUP
010262,000350: 11,2375 04205 TC ENDOFJOB
End of include-file EXTENDED_VERBS_FOR_MODING.agc. Parent file is MAIN.agc