Source Code
These source-code files were from the printout at the MIT Museum, with many thanks
to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing
it to us. The printout was digitally photographed by Paul Fjeld. A team of
volunteers transcribed the source code manually from these images or, where
appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9)
source code to agree with the images from the printout. Note that the page images
presented online are of reduced quality, and that higher-quality images
are available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051 10:28 APR. 1,1969Note that the date is the date of the printout, not the date of the program revision. |
042713,000002: ## Copyright: Public domain.
042714,000003: ## Filename: TVCRESTARTS.agc
042715,000004: ## Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
042716,000005: ## It is part of the source code for the Command Module's (CM)
042717,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
042718,000007: ## Assembler: yaYUL
042719,000008: ## Contact: Ron Burkey <info@sandroid.org>.
042720,000009: ## Website: www.ibiblio.org/apollo.
042721,000010: ## Pages: 956-960
042722,000011: ## Mod history: 2009-05-13 RSB Adapted from the Colossus249/ file of the
042723,000012: ## same name, using Comanche055 page images.
042724,000013: ## 2009-05-20 RSB Corrections: TCF -> BZF in one place.
042725,000014: ## 2009-05-21 RSB In PHSCHK2, CS TVCPHASE corrected to
042726,000015: ## CCS TVCPHASE and CCS 4 corrected to CCS A.
042727,000016: ## "Page 924" corrected to 961. CORCOPY +2
042728,000017: ## corrected to CORCOPY +1.
042729,000018: ## 2010-08-24 JL Fixed page 958 number. Fixed some indentation.
042730,000019: ## 2016-12-21 RSB Proofed comment text using octopus/ProoferComments
042731,000020: ## and corrected the errors found.
042732,000021: ## 2017-02-09 RSB Comment-text fixes identified while proofing Artemis 72.
042733,000022: ##
042734,000023: ## This source code has been transcribed or otherwise adapted from digitized
042735,000024: ## images of a hardcopy from the MIT Museum. The digitization was performed
042736,000025: ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
042737,000026: ## thanks to both. The images (with suitable reduction in storage size and
042738,000027: ## consequent reduction in image quality as well) are available online at
042739,000028: ## www.ibiblio.org/apollo. If for some reason you find that the images are
042740,000029: ## illegible, contact me at info@sandroid.org about getting access to the
042741,000030: ## (much) higher-quality images which Paul actually created.
042742,000031: ##
042743,000032: ## Notations on the hardcopy document read, in part:
042744,000033: ##
042745,000034: ## Assemble revision 055 of AGC program Comanche by NASA
042746,000035: ## 2021113-051. 10:28 APR. 1, 1969
042747,000036: ##
042748,000037: ## This AGC program shall also be referred to as
042749,000038: ## Colossus 2A
042750,000039:
Page 956 |
042752,000041: # NAME....TVCRESTART PACKAGE, CONSISTING OF REDOTVC, ENABL1, 2, CMDSOUT, PHSCHK2, ETC.
042753,000042: # LOG SECTION...TVCRESTARTS SUBROUTINE...DAPCSM
042754,000043: # MODIFIED BY SCHLUNDT 21 OCTOBER 1968
042755,000044:
042756,000045: # FUNCTIONAL DESCRIPTION....
042757,000046:
042758,000047: # *RESTART-PROOFS THE TVC DAPS, INCLUDING PITCHDAP, YAWDAP,
042759,000048: # TVCEXECUTIVE, ROLLDAP, TVCINIT4, TVCDAPON, AND CSM/.M V46 SWTCHOVR.
042760,000049:
042761,000050: # *TVC RESTARTS DESERVE SPECIAL CONSIDERATION IN SEVERAL AREAS.
042762,000051: # RESTART DOWN-TIME IS IMPORTANT BECAUSE OF THE TRANSIENTS INTRODUCED
042763,000052: # BY THE THRUST VECTOR RETURN TO THE ACTUATOR MECHANICAL NULLS
042764,000053: # FOLLOWING TVC- AND OPTICS-ERROR-COUNTER-DISENABLES (CHANNEL 12).
042765,000054: # TVC USES A MIXTURE OF WAITLIST, T5, T6, AND JOB CALLS. THERE IS
042766,000055: # FILTER MEMORY (UP TO 6TH ORDER) TO BE PROTECTED IF WILD TRANSIENTS
042767,000056: # ARE TO BE AVOIDED. COUNTERS ARE INVOLVED FOR ONE-SHOT
042768,000057: # CORRECTIONS AND GAIN UPDATES. THE GIMBAL TRIM ESTIMATORS AND THE
042769,000058: # BODY AXIS ATTITUDE ERROR INTEGRATORS INVOLVE DIGITAL SUMMATION.
042770,000059: # DIGITAL DIFFERENTIATORS ARE INVOLVED IN THE BODY AXIS RATE ESTIMA-
042771,000060: # TIONS AND IN THE OUTPUTTING OF ACTUATOR COMMANDS. THERE IS AN
042772,000061: # OFFSET-TRACKER-FILTER TO PROTECT. ETC., ETC.
042773,000062:
042774,000063: # *THOSE QUANTITIES WHICH MUST BE PROTECTED ARE STORED IN TEMPORARY
042775,000064: # REGISTERS AS THEY ARE COMPUTED, FOR UPDATING THE REAL REGISTERS
042776,000065: # DURING COPYCYCLES.
042777,000066:
042778,000067: # *THE SEVERAL COPYCYCLES ARE EACH PROTECTED BY PHASE POINTS AT THEIR
042779,000068: # BEGINNING AND AT THEIR TERMINATION. THE PHASE POINTS ARE SIMPLY
042780,000069: # ..INCR.. INSTRUCTIONS, EITHER ..INCR TVCEXPHS.. FOR COPYCYCLES
042781,000070: # IN THE TVCEXECUTIVE, OR ..INCR TVCPHASE.. FOR THE PITCH AND YAW
042782,000071: # COPYCYCLES. INDEXING ON EACH OF THESE POINTERS THEN PERMITS A
042783,000072: # RETURN TO THE APPROPRIATE RESTART POINTS.
042784,000073:
042785,000074: # *IF A RESTART OCCURS DURING EITHER COPYCYCLE, THAT COPYCYCLE IS
042786,000075: # COMPLETED. THEN THE NORMAL TVCINIT4....DAPINIT....PITCHDAP STARTUP
042787,000076: # SEQUENCE IS CALLED UPON TO GET THINGS GOING AGAIN.
042788,000077:
042789,000078: # *TVC-ENABLE AND OPTICS-ERROR-COUNTER ENABLE MUST BE SET ASAP
042790,000079: # (ALLOWING FOR PROCEDURAL DELAYS). THEN THE ENGINES ARE COMMANDED
042791,000080: # TO THE P,YACTOFF TRIM VALUES. THE DAPS ARE THEN READY TO GO ON THE
042792,000081: # AIR, WITH THE REGULAR STARTUP SEQUENCE, EITHER AT MRCLEAN FOR A
042793,000082: # COMPLETE INITIALIZATION OR AT TVCINIT4 FOR A PARTIAL INITIALIZATION
042794,000083:
042795,000084: # *FOR RESTARTS PRIOR TO THE SETTING OF THE T5 BITS AT DOTVCON THE
042796,000085: # PRE40.6 SECTION OF S40.6 TAKES CARE OF RE-ESTABLISHING TRIMS.
042797,000086:
042798,000087: # *IF A RESTART OCCURS DURING THE TVCEXEC....TVCEXFIN SEQUENCE THE
042799,000088: # COMPUTATIONS WILL BE COMPLETED, STARTING AT THE APPROPRIATE RESTART
042800,000089: # POINT, AFTER THE DAPS ARE READY TO GO ON THE AIR.
042801,000090:
042802,000091: # *IF A RESTART OCCURS PRIOR TO TVCINIT4 (TVCPHASE = -1) E.G. DURING
042803,000092: # THE EARLY DAP INITIALIZATION PHASE, THE DAP STARTUP SEQUENCE IS
042804,000093: # ENTERED AT MRCLEAN FOR A FULL INITIALIZATION.
042805,000094:
042806,000095: # *FOR RESTARTS DURING CSM/LM V46 SWITCH-OVER, TVCPHASE IS SET TO -2.
042807,000096: # AND THE RESTART LOGIC GOES BACK TO REDO SWITCH-OVER (AFTER THE
042808,000097: # NORMAL DAP RESTART SEQUENCE IS FOLLOWED).
042809,000098:
042810,000099: # *RESTARTS ARE NOT CRITICAL TO THE ROLL DAP PERFORMANCES HENCE THE
042811,000100: # THE ROLL DAP IS MERELY RESTARTED.
042812,000101:
042813,000102: # *RESTARTS DURING A STROKE TEST (STROKER IS NON-ZERO) WILL CAUSE THE
Page 957 |
042815,000104: # STROKE TEST TO BE TERMINATED. A NEW V68 ENTRY WILL BE REQUIRED
042816,000105: # TO GET IT GOING AGAIN (NO AUTOMATIC RESTART).
042817,000106: #
042818,000107: # *REDOTVC IS REACHED FOLLOWING ANY RESTART WHICH FINDS THE T5 BITS
042819,000108: # (BITS 15,14 OF FLAGWRD6) SET FOR TVC. DOTVCON SETS TVCPHASE = -1
042820,000109: # AND TVC EXPHS = 0 JUST BEFORE SETTING THESE BITS, JUST BEFORE
042821,000110: # MAKING THE T5 CALL TO TVCDAPON. ON A NORMAL SHUTDOWN DOTVCRCS
042822,000111: # CALLS RCSDAPON, WHICH RESETS THE T5 BITS FOR RCS.
042823,000112:
042824,000113: # CALLING SEQUENCE....T5, IN PARTICULAR BY ELRSKIP OF FRESH START/RESTART
042825,000114:
042826,000115: # NORMAL EXIT MODES....RESUME, NOQRSM, POSTJUMP (TO TVCINIT4 OR MRCLEAN)
042827,000116:
042828,000117: # ALARM OR ABORT EXIT MODES....NONE
042829,000118:
042830,000119: # SUBROUTINES CALLED....
042831,000120:
042832,000121: # *PCOPY+1, YCOPY+1 (PITCH AND YAW COPYCYCLES)
042833,000122: # *ENABLE1,2, CMDSOUT (RE-ESTABLISH ACTUATOR TRIMS)
042834,000123: # *MRCLEAN OR TVCINIT4 (TVCDAP INITIALIZATIONS)
042835,000124: # *SWICHOVR +5 (CSM/LM V46 SWITCH-OVER)
042836,000125: # *EXRSTRT AND TVCEXECUTIVE PHASE POINTS 1 THRU 6
042837,000126: # *WAITLIST, IBNKCALL, POSTJUMP, ISWCALL
042838,000127:
042839,000128: # OTHER INTERFACES....DOTVCON AND RCSDAPON (T5 BITS), ELRSKIP (CALLS IT)
042840,000129:
042841,000130: # ERASABLE INITIALIZATION REQUIRED....
042842,000131:
042843,000132: # *T5 BITS (1,0), TVCPHASE (-2,-1,0,1,2,3), TVCEXPHS (1 THRU 6)
042844,000133: # *TVC DAP VARIABLES
042845,000134: # *OPERATIONS PERFORMED BY REDOTVC ARE BASED ON THE ASSUMPTION THAT
042846,000135: # THE TVC DAPS ARE RUNNING NORMALLY
042847,000136:
042848,000137: # OUTPUT....
042849,000138:
042850,000139: # *PITCH AND YAW TVC DAP COPYCYCLES COMPLETED IF INTERUPTED
042851,000140: # *TVCEXECUTIVE COMPLETED IF INTERUPTED
042852,000141: # *STROKE TEST TERMINATED IF INTERRUPTED
042853,000142: # *CSM/LM V46 SWITCH-OVER REPEATED IF INTERRUPTED
042854,000143: # *ACTUATOR TRIMS RE-ESTABLISHED (ACTUATORS BACK ON THE AIR)
042855,000144: # *TVC DAP INITIALIZATION AS REQUIRED
042856,000145: # *ALL TVC DAP OPERATIONS ON THE AIR
042857,000146:
042858,000147: # DEBRIS....TVC TEMPORARIES IN EBANK6
042859,000148:
Page 958 |
042861,000150:
042862,000151: 16,3140 BANK 16
042863,000152: 16,2000 SETLOC DAPROLL
042864,000153: 16,2000 BANK
042865,000154: 16,3140 E6,1644 EBANK= TVCPHASE
042866,000155: 16,3140 COUNT* $$/RSRT
042867,000156:
042868,000157: 16,3140 22016 REDOTVC LXCH BANKRUPT # TVC RESTART PACKAGE
042869,000158: 16,3141 00006 EXTEND
042870,000159: 16,3142 22012 QXCH QRUPT # (..TCR.. IN ..FINCOPY..)
042871,000160:
042872,000161: 16,3143 11651 EXECPHS CCS TVCEXPHS # CHECK TVCEXECUTIVE PHASE
042873,000162: 16,3144 13146 TCF +2 # MUST RESTART TVCEXECUTIVE
042874,000163: 16,3145 13152 TCF TVCDAPHS # NO NEED TO RESTART TVCEXECUTIVE
042875,000164:
042876,000165: 16,3146 34334 CAF NINE # 9CS DELAY TO FORCE EXRSTRT TO OCCUR
042877,000166: 16,3147 05245 TC WAITLIST # BEFORE PITCHDAP, AFTER CMDSOUT
042878,000167: 16,3150 E6,1651 EBANK= TVCEXPHS
042879,000168: 16,3150 03253 34066 2CADR EXRSTRT
042880,000169:
042881,000170: 16,3152 47700 TVCDAPHS CS OCT37776 # CHECK BITS 15 AND 1 OF TVCPHASE TO SEE
042882,000171: 16,3153 71644 MASK TVCPHASE # DAP RESTART LOCATION (-1,1,2,3)
042883,000172: 16,3154 10000 CCS A
042884,000173: 16,3155 13240 TCF FINCOPY # FINISH THE COPYCYCLE FIRST
042885,000174: 16,3156 13163 TCF ENABL1 # JUST PREPARE THE OUTCOUNTERS AND GO
042886,000175:
042887,000176: 16,3157 41644 CS TVCPHASE # TEST FOR TVCPHASE = -2
042888,000177: 16,3160 75016 MASK BIT2 # (THIS INDICATES RESTART OCCURRED
042889,000178: 16,3161 00006 EXTEND # DURING CSM/LM V46 SWITCH-OVER)
042890,000179: 16,3162 13244 BZF TRIM/CMD # NO, TVCPHASE = -1, RSTRT WAS IN TVCINIT
042891,000180:
042892,000181: 16,3163 35010 ENABL1 CAF BIT8 # TVC ENABLE, FOLLOWED BY 40 MS (MIN) WAIT
042893,000182: 16,3164 65005 AD BIT11 # SET BIT FOR OPTICS-DAC-ENABLE ALSO
042894,000183: 16,3165 00006 EXTEND # (ENABL1 ENTERED FROM TVCDAPHS / FINCOPY)
042895,000184: 16,3166 05012 WOR CHAN12
042896,000185: 16,3167 33257 CAF TVCADDR # WAIT, CALLING ENABL2 (BBCON THERE)
042897,000186: 16,3170 55312 TS T5LOC
042898,000187: 16,3171 33263 CAF TVCADDR +4 # 60 MS (TVCEXADR)
042899,000188: 16,3172 54030 TS TIME5
042900,000189:
042901,000190: 16,3173 15333 TCF RESUME
042902,000191:
042903,000192: 16,3174 22016 ENABL2 LXCH BANKRUPT # CONTINUE PREPARATION OF OUTCOUNTERS
042904,000193:
042905,000194: 16,3175 35016 CAF BIT2 # OPTICS ERROR CNTR ENABLE, 4MS MIN WAIT
042906,000195: 16,3176 00006 EXTEND
042907,000196: 16,3177 05012 WOR CHAN12
Page 959 |
042909,000198: 16,3200 33261 CAF TVCADDR +2 # WAIT, CALLING CMDSOUT (BBCON THERE)
042910,000199: 16,3201 55312 TS T5LOC
042911,000200: 16,3202 37700 CAF OCT37776 # 20MS
042912,000201: 16,3203 54030 TS TIME5
042913,000202:
042914,000203: 16,3204 15335 TCF NOQRSM
042915,000204:
042916,000205: 16,3205 22016 CMDSOUT LXCH BANKRUPT # CONTINUE PREPARATION OF OUTCOUNTERS
042917,000206: 16,3206 00006 EXTEND
042918,000207: 16,3207 22012 QXCH QRUPT
042919,000208:
042920,000209: 16,3210 45021 CS ZERO # MOST RECENT ACTUATOR COMMANDS
042921,000210: 16,3211 61623 AD PCMD # (AVOID +0)
042922,000211: 16,3212 54054 TS TVCPITCH
042923,000212: 16,3213 45021 CS ZERO
042924,000213: 16,3214 61624 AD YCMD
042925,000214: 16,3215 54053 TS TVCYAW
042926,000215:
042927,000216: 16,3216 35062 CAF PRIO6 # RELEASE THE COUNTERS (BITS 11,12)
042928,000217: 16,3217 00006 EXTEND
042929,000218: 16,3220 05014 WOR CHAN14
042930,000219:
042931,000220: 16,3221 11644 PHSCHK2 CCS TVCPHASE # CHECK TVCPHASE AGAIN
042932,000221: 16,3222 13232 TCF CHKSTRK
042933,000222: 16,3223 13232 TCF CHKSTRK
042934,000223: 16,3224 10000 CCS A # A CONTAINS THE DIMINISHED ABSOLUTE OF
042935,000224: 16,3225 03230 TC +3 # TVCPHASE (-2 BECOMES +1. -1 BECOMES +0)
042936,000225:
042937,000226: 16,3226 04701 TC POSTJUMP # REPEAT TVC INITIALIZATION
042938,000227: 16,3227 36152 CADR MRCLEAN # (DO NOT RETURN)
042939,000228:
042940,000229: 16,3230 04740 +3 TC IBNKCALL # REPEAT CSM/LM V46 SWITCH-OVER
042941,000230: 16,3231 36361 CADR SWICHOVR +5 # (RETURN TO CHECK FOR STROKE TEST)
042942,000231:
042943,000232: 16,3232 11574 CHKSTRK CCS STROKER # CHECK FOR STROKE TEST IN PROGRESS
042944,000233: 16,3233 13250 TCF TSTINITJ # YES, KILL IT
042945,000234: 16,3234 13236 TCF +2 # NO, PROCEED
042946,000235: 16,3235 13250 TCF TSTINITJ # YES, KILL IT
042947,000236:
042948,000237: 16,3236 04701 +4 TC POSTJUMP # IF POSITIVE OR ZERO, RESTART AT
042949,000238: 16,3237 36324 CADR TVCINIT4 # TVCINIT4 (ZEROS TVCPHASE, AND
042950,000239: # CALLS TVC DAPS VIA DAPINIT)
042951,000240: 16,3240 51644 FINCOPY INDEX TVCPHASE # PICK UP THE APPROPRIATE COPYCYCLE
042952,000241: 16,3241 33257 CAF TVCCADR
042953,000242: 16,3242 04744 TCR ISWCALL # RE-ENTER THE COPYCYCLE, RETURN AT END
042954,000243: 16,3243 13163 TCF ENABL1 # NOW PREPARE THE OUTCOUNTERS
042955,000244:
042956,000245: 16,3244 00006 TRIM/CMD EXTEND # TVCDAPON INITIALIZATION NOT COMPLETED,
Page 960 |
042958,000247: 16,3245 31424 DCA PACTOFF # EG. P,YCMD MAY NOT BE SET. SET...
042959,000248: 16,3246 53624 DXCH PCMD
042960,000249: 16,3247 13163 TCF ENABL1 # NOW PREPARE THE OUTCOUNTERS
042961,000250:
042962,000251: 16,3250 35021 TSTINITJ CAF ZERO # DISABLE STROKE TEST (-0 SHOWS PRIOR V68)
042963,000252: 16,3251 55574 TS STROKER # (+0 MEANS NEW V68 REQUIRED FOR STARTUP)
042964,000253:
042965,000254: 16,3252 13236 TCF CHKSTRK +4
042966,000255:
042967,000256: 16,3253 51651 EXRSTRT INDEX TVCEXPHS # TVCEXECUTIVE RESTARTS....GO TO
042968,000257: 16,3254 33263 CAF TVCEXADR # APPROPRIATE RESTART POINT
042969,000258: 16,3255 50000 INDEX A
042970,000259: 16,3256 10000 TCF 0
042971,000260:
042972,000261: # TVC RESTART TABLES.... ORDER IS REQUIRED. HI-ORDER WORDS ONLY, OF 2CADRS, SINCE BBCON IS ALREADY THERE.
042973,000262:
042974,000263: 16,3257 16,3257 TVCADDR = TVCCADR # TABLE OF CADRS, UNUSED LOCS FOR GENADRS
042975,000264: 16,3257 03174 TVCCADR GENADR ENABL2 # (FOR T5 CALL, UNUSED TABLE LOC)
042976,000265: 16,3260 40675 +1 CADR PCOPY +1 # PITCH COPYCYCLE
042977,000266: 16,3261 03205 +2 GENADR CMDSOUT # (FOR T5 CALL, UNUSED TABLE LOC)
042978,000267: 16,3262 41051 +3 CADR YCOPY +1 # YAW COPYCYCLE
042979,000268: 16,3263 37772 TVCEXADR OCT 37772 # (UNUSED TABLE LOC, FILL WITH 60MS, T5)
042980,000269: 16,3264 03003 +1 GENADR EXECCOPY +1 # TVCEXECUTIVE RESTART POINTS (ORDERED)
042981,000270: 16,3265 03011 +2 GENADR 1SHOTCHK
042982,000271: 16,3266 03040 +3 GENADR TEMPSET
042983,000272: 16,3267 03043 +4 GENADR CORSETUP
042984,000273: 16,3270 03121 +5 GENADR CORCOPY +1
042985,000274: 16,3271 03132 +6 GENADR CNTRCOPY
End of include-file TVCRESTARTS.agc. Parent file is MAIN.agc