Source Code
These source-code files were obtained by digitally photographing
an Artemis 72 (Apollo 15-17 Command Module) program listing from a private
collection and then
modifying pre-existing Comanche 55 (Apollo 11) source files to
incorporate changes. Photography was by Ron Burkey, and transcription
was performed by a team of volunteers. Note that the page images
presented online are of reduced quality, and that additional images
may be 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 072 OF AGC PROGRAM ARTEMIS BY NASA 2021114-011 11:40 FEB. 26, 1971Note that the date is the date of the printout, not the date of the program revision. |
042377,000002: ## Copyright: Public domain.
042378,000003: ## Filename: TVCRESTARTS.agc
042379,000004: ## Purpose: Part of the source code for Artemis (i.e., Colossus 3),
042380,000005: ## build 072. This is for the Command Module's (CM)
042381,000006: ## Apollo Guidance Computer (AGC), for
042382,000007: ## Apollo 15-17.
042383,000008: ## Assembler: yaYUL
042384,000009: ## Contact: Steve Case <case1780@adelphia.net>
042385,000010: ## Website: www.ibiblio.org/apollo/index.html
042386,000011: ## Page Scans: www.ibiblio.org/apollo/ScansForConversion/Artemis072/
042387,000012: ## Mod history: 2009-09-13 SMC Adapted from Comanche055 files.
042388,000013: ## 2009-09-14 JL Fix typos. Fix page numbers. Remove change comments. Restore hard tabs.
042389,000014: ## 2010-02-20 RSB Un-##'d this header.
042390,000015: ## 2017-02-09 RSB Proofed comment text by diff'ing vs Comanche 55
042391,000016: ## and/or octopus/ProoferComments as most-appropriate.
042392,000017:
Page 959 |
042394,000019:
042395,000020: # NAME....TVCRESTART PACKAGE, CONSISTING OF REDOTVC, ENABL1, 2, CMDSOUT, PHSCHK2, ETC.
042396,000021: # LOG SECTION...TVCRESTARTS SUBROUTINE...DAPCSM
042397,000022: # MODIFIED BY SCHLUNDT 21 OCTOBER 1968
042398,000023: # MODIFIED BY BEALS TO ELIMINATE CSMMASS UPDATE LOGIC (NOW DONE IN S40.8)
042399,000024: # FUNCTIONAL DESCRIPTION....
042400,000025:
042401,000026: # *RESTART-PROOFS THE TVC DAPS, INCLUDING PITCHDAP, YAWDAP,
042402,000027: # TVCEXECUTIVE, ROLLDAP, TVCINIT4, TVCDAPON, AND CSM/.M V46 SWTCHOVR.
042403,000028: # *TVC RESTARTS DESERVE SPECIAL CONSIDERATION IN SEVERAL AREAS.
042404,000029: # RESTART DOWN-TIME IS IMPORTANT BECAUSE OF THE TRANSIENTS INTRODUCED
042405,000030: # BY THE THRUST VECTOR RETURN TO THE ACTUATOR MECHANICAL NULLS
042406,000031: # FOLLOWING TVC- AND OPTICS-ERROR-COUNTER-DISENABLES (CHANNEL 12).
042407,000032: # TVC USES A MIXTURE OF WAITLIST, T5, T6, AND JOB CALLS. THERE IS
042408,000033: # FILTER MEMORY (UP TO 6TH ORDER) TO BE PROTECTED IF WILD TRANSIENTS
042409,000034: # ARE TO BE AVOIDED. COUNTERS ARE INVOLVED FOR ONE-SHOT
042410,000035: # CORRECTIONS AND GAIN UPDATES. THE GIMBAL TRIM ESTIMATORS AND THE
042411,000036: # BODY AXIS ATTITUDE ERROR INTEGRATORS INVOLVE DIGITAL SUMMATION.
042412,000037: # DIGITAL DIFFERENTIATORS ARE INVOLVED IN THE BODY AXIS RATE ESTIMA-
042413,000038: # TIONS AND IN THE OUTPUTTING OF ACTUATOR COMMANDS. THERE IS AN
042414,000039: # OFFSET-TRACKER-FILTER TO PROTECT. ETC., ETC.
042415,000040: # *THOSE QUANTITIES WHICH MUST BE PROTECTED ARE STORED IN TEMPORARY
042416,000041: # REGISTERS AS THEY ARE COMPUTED, FOR UPDATING THE REAL REGISTERS
042417,000042: # DURING COPYCYCLES.
042418,000043: # *THE SEVERAL COPYCYCLES ARE EACH PROTECTED BY PHASE POINTS AT THEIR
042419,000044: # BEGINNING AND AT THEIR TERMINATION. THE PHASE POINTS ARE SIMPLY
042420,000045: # ..INCR.. INSTRUCTIONS, EITHER ..INCR TVCEXPHS.. FOR COPYCYCLES
042421,000046: # IN THE TVCEXECUTIVE, OR ..INCR TVCPHASE.. FOR THE PITCH AND YAW
042422,000047: # COPYCYCLES. INDEXING ON EACH OF THESE POINTERS THEN PERMITS A
042423,000048: # RETURN TO THE APPROPRIATE RESTART POINTS.
042424,000049: # *IF A RESTART OCCURS DURING EITHER COPYCYCLE, THAT COPYCYCLE IS
042425,000050: # COMPLETED. THEN THE NORMAL TVCINIT4....DAPINIT....PITCHDAP STARTUP
042426,000051: # SEQUENCE IS CALLED UPON TO GET THINGS GOING AGAIN.
042427,000052: # *TVC-ENABLE AND OPTICS-ERROR-COUNTER ENABLE MUST BE SET ASAP
042428,000053: # (ALLOWING FOR PROCEDURAL DELAYS). THEN THE ENGINES ARE COMMANDED
042429,000054: # TO THE P,YACTOFF TRIM VALUES. THE DAPS ARE THEN READY TO GO ON THE
042430,000055: # AIR, WITH THE REGULAR STARTUP SEQUENCE, EITHER AT MRCLEAN FOR A
042431,000056: # COMPLETE INITIALIZATION OR AT TVCINIT4 FOR A PARTIAL INITIALIZATION
042432,000057: # *FOR RESTARTS PRIOR TO THE SETTING OF THE T5 BITS AT DOTVCON THE
042433,000058: # PRE40.6 SECTION OF S40.6 TAKES CARE OF RE-ESTABLISHING TRIMS.
042434,000059: # *IF A RESTART OCCURS DURING THE TVCEXEC....TVCEXFIN SEQUENCE THE
042435,000060: # COMPUTATIONS WILL BE COMPLETED, STARTING AT THE APPROPRIATE RESTART
042436,000061: # POINT, AFTER THE DAPS ARE READY TO GO ON THE AIR.
042437,000062: # *IF A RESTART OCCURS PRIOR TO TVCINIT4 (TVCPHASE = -1) E.G. DURING
042438,000063: # THE EARLY DAP INITIALIZATION PHASE, THE DAP STARTUP SEQUENCE IS
042439,000064: # ENTERED AT MRCLEAN FOR A FULL INITIALIZATION.
042440,000065: # *FOR RESTARTS DURING CSM/LM V46 SWITCH-OVER, TVCPHASE IS SET TO -2.
042441,000066: # AND THE RESTART LOGIC GOES BACK TO REDO SWITCH-OVER (AFTER THE
042442,000067: # NORMAL DAP RESTART SEQUENCE IS FOLLOWED).
042443,000068: # *RESTARTS ARE NOT CRITICAL TO THE ROLL DAP PERFORMANCES HENCE THE
042444,000069: # THE ROLL DAP IS MERELY RESTARTED.
Page 960 |
042446,000071: # *REDOTVC IS REACHED FOLLOWING ANY RESTART WHICH FINDS THE T5 BITS
042447,000072: # (BITS 15,14 OF FLAGWRD6) SET FOR TVC. DOTVCON SETS TVCPHASE = -1
042448,000073: # AND TVC EXPHS = 0 JUST BEFORE SETTING THESE BITS, JUST BEFORE
042449,000074: # MAKING THE T5 CALL TO TVCDAPON. ON A NORMAL SHUTDOWN DOTVCRCS
042450,000075: # CALLS RCSDAPON, WHICH RESETS THE T5 BITS FOR RCS.
042451,000076: # CALLING SEQUENCE....T5, IN PARTICULAR BY ELRSKIP OF FRESH START/RESTART
042452,000077:
042453,000078: # NORMAL EXIT MODES....RESUME, NOQRSM, POSTJUMP (TO TVCINIT4 OR MRCLEAN)
042454,000079:
042455,000080: # ALARM OR ABORT EXIT MODES....NONE
042456,000081:
042457,000082: # SUBROUTINES CALLED....
042458,000083:
042459,000084: # *PCOPY+1, YCOPY+1 (PITCH AND YAW COPYCYCLES)
042460,000085: # *ENABLE1,2, CMDSOUT (RE-ESTABLISH ACTUATOR TRIMS)
042461,000086: # *MRCLEAN OR TVCINIT4 (TVCDAP INITIALIZATIONS)
042462,000087: # *SWICHOVR +5 (CSM/LM V46 SWITCH-OVER)
042463,000088: # *EXRSTRT AND TVCEXECUTIVE PHASE POINTS 1 THRU 6
042464,000089: # *WAITLIST, IBNKCALL, POSTJUMP, ISWCALL
042465,000090:
042466,000091: # OTHER INTERFACES....DOTVCON AND RCSDAPON (T5 BITS), ELRSKIP (CALLS IT)
042467,000092: # ERASABLE INITIALIZATION REQUIRED....
042468,000093:
042469,000094: # *T5 BITS (1,0), TVCPHASE (-2,-1,0,1,2,3), TVCEXPHS (1 THRU 6)
042470,000095: # *TVC DAP VARIABLES
042471,000096: # *OPERATIONS PERFORMED BY REDOTVC ARE BASED ON THE ASSUMPTION THAT
042472,000097: # THE TVC DAPS ARE RUNNING NORMALLY
042473,000098:
042474,000099: # OUTPUT....
042475,000100:
042476,000101: # *PITCH AND YAW TVC DAP COPYCYCLES COMPLETED IF INTERUPTED
042477,000102: # *TVCEXECUTIVE COMPLETED IF INTERUPTED
042478,000103: # *CSM/LM V46 SWITCH-OVER REPEATED IF INTERRUPTED
042479,000104: # *ACTUATOR TRIMS RE-ESTABLISHED (ACTUATORS BACK ON THE AIR)
042480,000105: # *TVC DAP INITIALIZATION AS REQUIRED
042481,000106: # *ALL TVC DAP OPERATIONS ON THE AIR
042482,000107:
042483,000108: # DEBRIS....TVC TEMPORARIES IN EBANK6
042484,000109:
Page 961 |
042486,000111: 16,2000 SETLOC DAPROLL
042487,000112: 16,2000 BANK
042488,000113: 16,3222 E6,1635 EBANK= TVCPHASE
042489,000114: 16,3222 COUNT* $$/RSRT
042490,000115:
042491,000116: 16,3222 22016 REDOTVC LXCH BANKRUPT # TVC RESTART PACKAGE
042492,000117: 16,3223 00006 EXTEND
042493,000118: 16,3224 22012 QXCH QRUPT # ( ..TCR.. IN ..FINCOPY.. )
042494,000119:
042495,000120: 16,3225 11644 EXECPHS CCS TVCEXPHS # CHECK TVCEXECUTIVE PHASE
042496,000121: 16,3226 13230 TCF +2 # MUST RESTART TVCEXECUTIVE
042497,000122: 16,3227 13233 TCF TVCDAPHS # NO NEED TO RESTART TVCEXECUTIVE
042498,000123:
042499,000124: 16,3230 34322 CAF NINE # 9CS DELAY TO FORCE EXRSTRT TO OCCUR
042500,000125: 16,3231 05223 TC TWIDDLE # BEFORE PITCHDAP, AFTER CMDSOUT
042501,000126: 16,3232 03325 ADRES EXRSTRT
042502,000127: 16,3233 47663 TVCDAPHS CS OCT37776 # CHECK BITS 15 AND 1 OF TVCPHASE TO SEE
042503,000128: 16,3234 71635 MASK TVCPHASE # DAP RESTART LOCATION (-1,1,2,3)
042504,000129: 16,3235 10000 CCS A
042505,000130: 16,3236 13315 TCF FINCOPY # FINISH THE COPYCYCLE FIRST
042506,000131: 16,3237 13244 TCF ENABL1 # JUST PREPARE THE OUTCOUNTERS AND GO
042507,000132:
042508,000133: 16,3240 41635 CS TVCPHASE # TEST FOR TVCPHASE = -2
042509,000134: 16,3241 74767 MASK BIT2 # (THIS INDICATES RESTART OCCURRED
042510,000135: 16,3242 00006 EXTEND # DURING CSM/LM V46 SWITCH-OVER)
042511,000136: 16,3243 13321 BZF TRIM/CMD # NO, TVCPHASE = -1, RSTRT WAS IN TVCINIT
042512,000137:
042513,000138: 16,3244 34761 ENABL1 CAF BIT8 # TVC ENABLE, FOLLOWED BY 40 MS (MIN) WAIT
042514,000139: 16,3245 64756 AD BIT11 # SET BIT FOR OPTICS-DAC-ENABLE ALSO
042515,000140: 16,3246 00006 EXTEND # (ENABL1 ENTERED FROM TVCDAPHS / FINCOPY)
042516,000141: 16,3247 05012 WOR CHAN12
042517,000142: 16,3250 33331 CAF TVCADDR # WAIT, CALLING ENABL2 (BBCON THERE)
042518,000143: 16,3251 54112 TS T5LOC
042519,000144: 16,3252 33335 CAF TVCADDR +4 # 60 MS (TVCEXADR)
042520,000145: 16,3253 54030 TS TIME5
042521,000146:
042522,000147: 16,3254 15323 TCF RESUME
042523,000148:
042524,000149: 16,3255 22016 ENABL2 LXCH BANKRUPT # CONTINUE PREPARATION OF OUTCOUNTERS
042525,000150:
042526,000151: 16,3256 34767 CAF BIT2 # OPTICS ERROR CNTR ENABLE, 4MS MIN WAIT
042527,000152: 16,3257 00006 EXTEND
042528,000153: 16,3260 05012 WOR CHAN12
042529,000154: 16,3261 33333 CAF TVCADDR +2 # WAIT, CALLING CMDSOUT (BBCON THERE)
042530,000155: 16,3262 54112 TS T5LOC
042531,000156: 16,3263 37663 CAF OCT37776 # 20MS
042532,000157: 16,3264 54030 TS TIME5
Page 962 |
042534,000159: 16,3265 15325 TCF NOQRSM
042535,000160:
042536,000161: 16,3266 22016 CMDSOUT LXCH BANKRUPT # CONTINUE PREPARATION OF OUTCOUNTERS
042537,000162: 16,3267 00006 EXTEND
042538,000163: 16,3270 22012 QXCH QRUPT
042539,000164:
042540,000165: 16,3271 44772 CS ZERO # MOST RECENT ACTUATOR COMMANDS
042541,000166: 16,3272 61623 AD PCMD # (AVOID +0)
042542,000167: 16,3273 54054 TS TVCPITCH
042543,000168: 16,3274 44772 CS ZERO
042544,000169: 16,3275 61624 AD YCMD
042545,000170: 16,3276 54053 TS TVCYAW
042546,000171:
042547,000172: 16,3277 35050 CAF PRIO6 # RELEASE THE COUNTERS (BITS 11,12)
042548,000173: 16,3300 00006 EXTEND
042549,000174: 16,3301 05014 WOR CHAN14
042550,000175:
042551,000176: 16,3302 11635 PHSCHK2 CCS TVCPHASE # CHECK TVCPHASE AGAIN
042552,000177: 16,3303 13313 TCF JUMPTVC4
042553,000178: 16,3304 13313 TCF JUMPTVC4
042554,000179: 16,3305 10000 CCS A # A CONTAINS THE DIMINISHED ABSOLUTE OF
042555,000180: 16,3306 03311 TC +3 # TVCPHASE (-2 BECOMES +1. -1 BECOMES +0)
042556,000181:
042557,000182: 16,3307 04655 TC POSTJUMP # REPEAT TVC INITIALIZATION
042558,000183: 16,3310 36166 CADR MRCLEAN # (DO NOT RETURN)
042559,000184:
042560,000185: 16,3311 04714 +3 TC IBNKCALL # REPEAT CSM/LM V46 SWITCH-OVER
042561,000186: 16,3312 36351 CADR SWICHOVR +5 # (RETURN TO CHECK FOR STROKE TEST)
042562,000187:
042563,000188: 16,3313 04655 JUMPTVC4 TC POSTJUMP # IF POSITIVE OR ZERO, RESTART AT
042564,000189: 16,3314 36326 CADR TVCINIT4 # TVCINIT4 (ZEROS TVCPHASE, AND
042565,000190: # CALLS TVC DAPS VIA DAPINIT)
042566,000191: 16,3315 51635 FINCOPY INDEX TVCPHASE # PICK UP THE APPROPRIATE COPYCYCLE
042567,000192: 16,3316 33331 CAF TVCCADR
042568,000193: 16,3317 04720 TCR ISWCALL # RE-ENTER THE COPYCYCLE, RETURN AT END
042569,000194: 16,3320 13244 TCF ENABL1 # NOW PREPARE THE OUTCOUNTERS
042570,000195:
042571,000196:
042572,000197: 16,3321 00006 TRIM/CMD EXTEND # TVCDAPON INITIALIZATION NOT COMPLETED,
042573,000198: 16,3322 31424 DCA PACTOFF # EG. P,YCMD MAY NOT BE SET. SET...
042574,000199: 16,3323 53624 DXCH PCMD
042575,000200: 16,3324 13244 TCF ENABL1 # NOW PREPARE THE OUTCOUNTERS
042576,000201:
042577,000202:
042578,000203: 16,3325 51644 EXRSTRT INDEX TVCEXPHS # TVCEXECUTIVE RESTARTS....GO TO
042579,000204: 16,3326 33335 CAF TVCEXADR # APPROPRIATE RESTART POINT
042580,000205: 16,3327 50000 INDEX A
042581,000206: 16,3330 10000 TCF 0
042582,000207:
Page 963 |
042584,000209:
042585,000210: # TVC RESTART TABLES.... ORDER IS REQUIRED. HI-ORDER WORDS ONLY, OF 2CADRS, SINCE BBCON IS ALREADY THERE.
042586,000211:
042587,000212: 16,3331 16,3331 TVCADDR = TVCCADR # TABLE OF CADRS, UNUSED LOCS FOR GENADRS
042588,000213: 16,3331 03255 TVCCADR GENADR ENABL2 # (FOR T5 CALL, UNUSED TABLE LOC)
042589,000214: 16,3332 41005 +1 CADR PCOPY +1 # PITCH COPYCYCLE
042590,000215: 16,3333 03266 +2 GENADR CMDSOUT # (FOR T5 CALL, UNUSED TABLE LOC)
042591,000216: 16,3334 41171 +3 CADR YCOPY +1 # YAW COPYCYCLE
042592,000217: 16,3335 37772 TVCEXADR OCT 37772 # (UNUSED TABLE LOC, FILL WITH 60MS, T5)
042593,000218: 16,3336 03123 +1 GENADR TEMPSET # TVCEXECUTIVE RESTART POINTS (ORDERED)
042594,000219: 16,3337 03126 +2 GENADR CORSETUP
042595,000220: 16,3340 03204 +3 GENADR CORCOPY +1
042596,000221: 16,3341 03215 +4 GENADR CNTRCOPY
End of include-file TVCRESTARTS.agc. Parent file is MAIN.agc