Source Code
These source-code files are part of a reconstructed copy of Skylark 048, the
Block II Command Module (CM) Apollo Guidance Computer (AGC) software for the
Skylab-2, Skylab-3, Skylab-4, and Apollo-Soyuz Test Project missions.
They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on Skylab-2, part numbers 2010802-541, 2010802-551, 2010802-561, 2010802-571, 2010802-581, and 2010802-591. Access to these modules was provided by the New Mexico Museum of Space History, who we are much indebted to. The source code for the Apollo 15, 16, and 17 software, Artemis 072, was used as a starting point. Heavy use was made of TRW 4900.5-244, Programmed Guidance Equations for Skylark Command Module Earth Orbital Program, dated 14 February 1972. This document contains pseudocode of essentially all of Skylark, using original program labels which have been copied for this source reconstruction. Since only binary dumps (rather than listings) of Skylark are available as source material, all comments and labels are approximate. They have been taken from the Programmed Guidance Equations or other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
037925,000002: ## Copyright: Public domain.
037926,000003: ## Filename: TVCEXECUTIVE.agc
037927,000004: ## Purpose: A section of Skylark revision 048.
037928,000005: ## It is part of the source code for the Apollo Guidance Computer (AGC)
037929,000006: ## for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of
037930,000007: ## this software are available; instead, this file was created via
037931,000008: ## disassembly of dumps of the core rope modules actually flown on
037932,000009: ## Skylab-2. Access to these modules was provided by the New Mexico
037933,000010: ## Museum of Space History.
037934,000011: ## Assembler: yaYUL
037935,000012: ## Contact: Ron Burkey <info@sandroid.org>.
037936,000013: ## Website: www.ibiblio.org/apollo/index.html
037937,000014: ## Mod history: 2023-09-04 MAS Created from Artemis 072.
037938,000015:
037939,000016: # PROGRAM NAME.... TVCEXECUTIVE, CONSISTING OF TVCEXEC, NEEDLEUP, VARGAINS
037940,000017: # 1SHOTCHK, REPCHEK, CG.CORR, COPYCYCLES, ETC.
037941,000018: # LOG SECTION...TVCEXECUTIVE SUBROUTINE...DAPCSM
037942,000019: # MODIFIED BY SCHLUNDT 21 OCTOBER 1968
037943,000020: # MODIFIED BY BEALS TO ELIMINATE CSMMASS UPDATE LOGIC (NOW DONE IN S40.8)
037944,000021: # FUNCTIONAL DESCRIPTION....
037945,000022:
037946,000023: # *A SELF-PERPETUATING WAITLIST TASK AT 1/2 SECOND INTERVALS WHICH:
037947,000024: # PREPARES THE ROLL DAP WITH OGA (CDUX)
037948,000025: # PREPARES THE ROLL FDAI NEEDLE (FLY-TO OGA ERROR)
037949,000026: # PREPARES THE ROLL PHASE PLANE OGAERR (FLY-FROM OGA ERROR)
037950,000027: # PREPARES THE TVC ROLLDAP TASK WAITLIST CALL (3 CS DELAY)
037951,000028: # UPDATES THE NEEDLES DISPLAY
037952,000029: # CALLS MASSPROP TO UPDATE INERTIA DATA
037953,000030: # UPDATES PITCH, YAW, AND ROLL DAP GAINS FROM MASSPROP DATA
037954,000031: # PERFORMS ONE-SHOT CORRECTION FOR TMC LOOP 0-3 SEC AFTER IGNITION
037955,000032: # PERFORMS REPETITIVE UPDATES FOR TMC LOOP AFTER THE ONE-SHOT CORR.
037956,000033:
037957,000034: # CALLING SEQUENCE....
037958,000035:
037959,000036: # *TVCEXEC CALLED AS A WAITLIST TASK, IN PARTICULAR BY TVCINIT4 AND BY
037960,000037: # ITSELF, BOTH AT 1/2 SECOND INTERVALS
037961,000038:
037962,000039: # NORMAL EXIT MODE.... TASKOVER
037963,000040:
037964,000041: # ALARM OR ABORT EXIT MODES.... NONE
037965,000042:
037966,000043: # SUBROUTINES CALLED....NEEDLER, S40.15, MASSPROP, TASKOVER, IBNKCALL
037967,000044:
037968,000045: # OTHER INTERFACES....
037969,000046:
037970,000047: # *TVCRESTART PACKAGE FOR RESTARTS
037971,000048: # *PITCHDAP, YAWDAP FOR VARIABLE GAINS AND ENGINE TRIM ANGLES
037972,000049: # ERASABLE INITIALIZATION REQUIRED....
037973,000050:
037974,000051: # *SEE TVCDAPON....TVCINIT4
037975,000052: # *VARK AND 1/CONACC (S40.15 OF TVCINITIALIZE)
037976,000053: # *PAD LOAD EREPFRAC
037977,000054: # *BITS 15,14 OF FLAGWRD6 (T5 BITS)
037978,000055: # *TVCEXPHS FOR RESTARTS
037979,000056: # *ENGINE-ON BIT (11.13) FOR RESTARTS
037980,000057: # *CDUX, OGAD
037981,000058:
037982,000059: # OUTPUT....
037983,000060:
037984,000061: # *ROLL DAP OGANOW, FDAI NEEDLE (AK). AND PHASE PLANE OGAERR
037985,000062: # *VARIABLE GAINS FOR PITCH/YAW AND ROLL TVC DAPS
037986,000063: # *SINGLE-SHOT AND REPETITIVE CORRECTIONS TO ENGINE TRIM ANGLES
037987,000064: # PACTOFF AND YACTOFF
037988,000065: # DEBRIS.... MUCH, BUT SHAREABLE WITH RCS/ENTRY, ALL IN EBANK6
037989,000066:
037990,000067: 16,2000 SETLOC DAPROLL
037991,000068: 16,2000 BANK
037992,000069: 16,3013 E6,1453 EBANK= CNTR
037993,000070: 16,3013 COUNT* $$/TVCX
037994,000071:
037995,000072:
037996,000073: 16,3013 40102 TVCEXEC CS FLAGWRD6 # CHECK FOR TERMINATION (BITS 15,14 READ
037997,000074: 16,3014 74076 MASK DPCONFIG # 10 FROM TVCDAPON TO RCSDAPON
037998,000075: 16,3015 00006 EXTEND
037999,000076: 16,3016 63173 BZMF TVCEXFIN # TERMINATE
038000,000077:
038001,000078: 16,3017 35023 CAF .5SEC # W.L. CALL TO PERPETUATE TVCEXEC
038002,000079: 16,3020 05236 TC TWIDDLE
038003,000080: 16,3021 03013 ADRES TVCEXEC
038004,000081: 16,3022 30032 ROLLPREP CAE CDUX # UPDATE ROLL LADDERS (NO NEED TO RESTART-
038005,000082: 16,3023 57674 XCH OGANOW # PROTECT, SINCE ROLL DAPS RE-START)
038006,000083: 16,3024 57675 XCH OGAPAST
038007,000084:
038008,000085: 16,3025 31454 CAE OGAD # PREPARE ROLL FDAI NEEDLE WITH FLY-TO
038009,000086: 16,3026 00006 EXTEND # ERROR (COMMAND - MEASURED)
038010,000087: 16,3027 21674 MSU OGANOW
038011,000088: 16,3030 55525 TS AK # FLY-TO OGA ERROR, SC.AT B-1 REVS
038012,000089:
038013,000090: 16,3031 00006 EXTEND # PREPARE ROLL DAP PHASE PLANE OGAERR
038014,000091: 16,3032 74762 MP -BIT14
038015,000092: 16,3033 55676 TS OGAERR # PHASE-PLANE (FLY-FROM) OGAERROR,
038016,000093: # SC.AT B+0 REVS
038017,000094:
038018,000095: 16,3034 36214 CAF THREE # SET UP ROLL DAP TASK (ALLOW SOME TIME)
038019,000096: 16,3035 05236 TC TWIDDLE
038020,000097: 16,3036 03316 ADRES ROLLDAP
038021,000098: 16,3037 04725 NEEDLEUP TC IBNKCALL # DO A NEEDLES UPDATE (RETURNS AFTER CADR)
038022,000099: 16,3040 31660 CADR NEEDLER # (NEEDLES RESTARTS ITSELF)
038023,000100:
038024,000101: 16,3041 11663 VARGAINS CCS VCNTR # TEST FOR GAIN UPDATE TIME
038025,000102: 16,3042 13050 TCF EXECCOPY # NOT YET
038026,000103: 16,3043 04725 GAINCHNG TC IBNKCALL # UPDATE IXX, IAVG, IAVG/TLX
038027,000104: 16,3044 13345 CADR FIXCW # MASSPROP ENTRY (ALREADY INITIALIZED)
038028,000105: 16,3045 04725 TC IBNKCALL # UPDATE 1/CONACC, VARK
038029,000106: 16,3046 36510 CADR S40.15 # (S40.15 IS IN TVCINITIALIZE)
038030,000107: 16,3047 34351 CAF NINETEEN # RESET THE VARIABLE-GAIN UPDATE COUNTER
038031,000108: 16,3050 55663 EXECCOPY TS VCNTR
038032,000109: 16,3051 11453 1SHOTCHK CCS CNTR # CHECK TIME FOR ONE-SHOT OR REPCORR
038033,000110: 16,3052 13056 TCF +4 # NOT YET
038034,000111: 16,3053 13071 TCF 1SHOTOK # NOW
038035,000112: 16,3054 13062 TCF REPCHEK # ONE-SHOT OVER, ON TO REPCORR
038036,000113: 16,3055 13071 TCF 1SHOTOK # NOW (ONE-SHOT ONLY, NO REPCORR)
038037,000114:
038038,000115: 16,3056 55710 +4 TS CNTRTMP # COUNT DOWN
038039,000116: 16,3057 34777 CAF FOUR # SET UP TVCEXPHS FOR ENTRY AT CNTRCOPY
038040,000117: 16,3060 55673 TS TVCEXPHS
038041,000118: 16,3061 13171 TCF CNTRCOPY
038042,000119:
038043,000120: 16,3062 31662 REPCHEK CAE REPFRAC # CHECK FOR REPETITIVE UPDATES
038044,000121: 16,3063 00006 EXTEND
038045,000122: 16,3064 63173 BZMF TVCEXFIN # NO, OVER-AND-OUT
038046,000123: 16,3065 55452 TS TEMPDAP +1 # YES, SET UP CORRECTION FRACTION
038047,000124: 16,3066 35000 CAF TWO # SET UP TVCEXPHS FOR ENTRY AT CORSETUP
038048,000125: 16,3067 55673 TS TVCEXPHS
038049,000126: 16,3070 13102 TCF CORSETUP
038050,000127:
038051,000128: 16,3071 34773 1SHOTOK CAF ENGONBIT
038052,000129: 16,3072 70101 MASK FLAGWRD5
038053,000130: 16,3073 10000 CCS A
038054,000131: 16,3074 13076 TCF +2 # ONE-SHOT OK
038055,000132: 16,3075 13173 TCF TVCEXFIN # NO, TERMINATE
038056,000133:
038057,000134: 16,3076 25673 INCR TVCEXPHS # (1)
038058,000135: 16,3077 34765 TEMPSET CAF FCORFRAC # SET UP CORRECTION FRACTION
038059,000136: 16,3100 55452 TS TEMPDAP +1
038060,000137:
038061,000138: 16,3101 25673 INCR TVCEXPHS # ENTRY FROM REPCHECK AT NEXT LOCATION (2)
038062,000139: 16,3102 31514 CORSETUP CAE DAPDATR1 # CHECK FOR LEM-OFF/ON
038063,000140: 16,3103 74765 MASK BIT13 # (NOTE, SHOWS LEM-OFF)
038064,000141: 16,3104 00006 EXTEND
038065,000142: 16,3105 13107 BZF +2 # LEM IS ON, PICK UP TEMPDAP+1
038066,000143: 16,3106 31452 CAE TEMPDAP +1 # LEM IS OFF, PICK UP 2(TEMPDAP+1)
038067,000144: 16,3107 61452 AD TEMPDAP +1
038068,000145: 16,3110 55451 TS TEMPDAP # CG.CORR USES TEMPDAP
038069,000146:
038070,000147: 16,3111 37702 CAF NEGONE # SET UP FOR CNTR = -1 (ONE-SHOT DONE)
038071,000148: 16,3112 55710 TS CNTRTMP # (COPYCYCLE AT .CNTRCOPY.)
038072,000149:
038073,000150: 16,3113 00006 CG.CORR EXTEND # PITCH TMC LOOP
038074,000151: 16,3114 31635 DCA PDELOFF
038075,000152: 16,3115 53705 DXCH PACTTMP
038076,000153: 16,3116 00006 EXTEND
038077,000154: 16,3117 41635 DCS PDELOFF
038078,000155: 16,3120 20001 DDOUBL
038079,000156: 16,3121 20001 DDOUBL
038080,000157: 16,3122 53641 DXCH TTMP1
038081,000158: 16,3123 00006 EXTEND
038082,000159: 16,3124 31631 DCA DELPBAR
038083,000160: 16,3125 20001 DDOUBL
038084,000161: 16,3126 20001 DDOUBL
038085,000162: 16,3127 21641 DAS TTMP1
038086,000163: 16,3130 00006 EXTEND
038087,000164: 16,3131 31641 DCA TTMP1
038088,000165: 16,3132 00006 EXTEND
038089,000166: 16,3133 71451 MP TEMPDAP
038090,000167: 16,3134 21705 DAS PACTTMP
038091,000168:
038092,000169: 16,3135 00006 EXTEND # YAW TMC LOOP
038093,000170: 16,3136 31637 DCA YDELOFF
038094,000171: 16,3137 53707 DXCH YACTTMP
038095,000172: 16,3140 00006 EXTEND
038096,000173: 16,3141 41637 DCS YDELOFF
038097,000174: 16,3142 20001 DDOUBL
038098,000175: 16,3143 20001 DDOUBL
038099,000176: 16,3144 53641 DXCH TTMP1
038100,000177: 16,3145 00006 EXTEND
038101,000178: 16,3146 31633 DCA DELYBAR
038102,000179: 16,3147 20001 DDOUBL
038103,000180: 16,3150 20001 DDOUBL
038104,000181: 16,3151 21641 DAS TTMP1
038105,000182: 16,3152 00006 EXTEND
038106,000183: 16,3153 31641 DCA TTMP1
038107,000184: 16,3154 00006 EXTEND
038108,000185: 16,3155 71451 MP TEMPDAP
038109,000186: 16,3156 21707 DAS YACTTMP
038110,000187:
038111,000188: 16,3157 25673 CORCOPY INCR TVCEXPHS # RESTART PROTECT THE COPYCYCLE (3)
038112,000189: 16,3160 00006 EXTEND # TRIM-ESTIMATES, AND
038113,000190: 16,3161 31705 DCA PACTTMP
038114,000191: 16,3162 55410 TS PACTOFF # TRIMS
038115,000192: 16,3163 53635 DXCH PDELOFF
038116,000193:
038117,000194: 16,3164 00006 EXTEND
038118,000195: 16,3165 31707 DCA YACTTMP
038119,000196: 16,3166 55411 TS YACTOFF
038120,000197: 16,3167 53637 DXCH YDELOFF
038121,000198:
038122,000199: 16,3170 25673 INCR TVCEXPHS # ENTRY FROM 1SHOTCHK AT NEXT LOCATION (4)
038123,000200: 16,3171 31710 CNTRCOPY CAE CNTRTMP # UPDATE CNTR (RESTARTS OK, FOLLOWS CPYCY)
038124,000201: 16,3172 55453 TS CNTR
038125,000202:
038126,000203: 16,3173 35003 TVCEXFIN CAF ZERO # RESET TVCEXPHS
038127,000204: 16,3174 55673 TS TVCEXPHS
038128,000205: 16,3175 15327 TCF TASKOVER # TVCEXECUTIVE FINISHED
038129,000206:
038130,000207:
038131,000208: 16,3176 4765 FCORFRAC = BIT13 # ONE-SHOT CORRECTION FRACTION
End of include-file TVCEXECUTIVE.agc. Parent file is MAIN.agc