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, 1971
Note that the date is the date of the printout, not the date of the program revision.

041915,000002:                                                                                                  ## Copyright:   Public domain.
041916,000003:                                                                                                  ## Filename:    TVCEXECUTIVE.agc
041917,000004:                                                                                                  ## Purpose:     Part of the source code for Artemis (i.e., Colossus 3),
041918,000005:                                                                                                  ##              build 072.  This is for the Command Module's (CM)
041919,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for
041920,000007:                                                                                                  ##              Apollo 15-17.
041921,000008:                                                                                                  ## Assembler:   yaYUL
041922,000009:                                                                                                  ## Contact:     Steve Case <case1780@adelphia.net>
041923,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
041924,000011:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Artemis072/
041925,000012:                                                                                                  ## Mod history: 2009-09-13 SMC  Adapted from Comanche055 files.
041926,000013:                                                                                                  ##              2009-09-14 JL   Fix typos. Fix page numbers. Remove change comments. Restore hard tabs.
041927,000014:                                                                                                  ##              2010-02-20 RSB  Un-##'d this header.
041928,000015:                                                                                                  ##              2017-01-28 RSB  WTIH -> WITH.
041929,000016:                                                                                                  ##              2017-02-09 RSB  Proofed comment text by diff'ing vs Comanche 55
041930,000017:                                                                                                  ##                              and/or octopus/ProoferComments as most-appropriate.
041931,000018: 

Page 950

041933,000020:                                                                                                  #  PROGRAM NAME.... TVCEXECUTIVE, CONSISTING OF TVCEXEC, NEEDLEUP, VARGAINS
041934,000021:                                                                                                  #                   1SHOTCHK, REPCHEK, CG.CORR, COPYCYCLES, ETC.
041935,000022:                                                                                                  #  LOG SECTION...TVCEXECUTIVE                    SUBROUTINE...DAPCSM
041936,000023:                                                                                                  #  MODIFIED BY SCHLUNDT                          21 OCTOBER 1968
041937,000024:                                                                                                  #  MODIFIED BY BEALS TO ELIMINATE CSMMASS UPDATE LOGIC (NOW DONE IN S40.8)
041938,000025:                                                                                                  #  FUNCTIONAL DESCRIPTION....
041939,000026: 
041940,000027:                                                                                                  #       *A SELF-PERPETUATING WAITLIST TASK AT 1/2 SECOND INTERVALS WHICH:
041941,000028:                                                                                                  #        PREPARES THE ROLL DAP WITH OGA (CDUX)
041942,000029:                                                                                                  #        PREPARES THE ROLL FDAI NEEDLE (FLY-TO  OGA ERROR)
041943,000030:                                                                                                  #        PREPARES THE ROLL PHASE PLANE  OGAERR  (FLY-FROM  OGA ERROR)
041944,000031:                                                                                                  #        PREPARES THE TVC ROLLDAP TASK WAITLIST CALL (3 CS DELAY)
041945,000032:                                                                                                  #        UPDATES THE NEEDLES DISPLAY
041946,000033:                                                                                                  #        CALLS MASSPROP TO UPDATE INERTIA DATA
041947,000034:                                                                                                  #        UPDATES PITCH, YAW, AND ROLL DAP GAINS FROM MASSPROP DATA
041948,000035:                                                                                                  #        PERFORMS ONE-SHOT CORRECTION FOR TMC LOOP 0-3 SEC AFTER IGNITION
041949,000036:                                                                                                  #        PERFORMS REPETITIVE UPDATES FOR TMC LOOP AFTER THE ONE-SHOT CORR.
041950,000037: 
041951,000038:                                                                                                  #  CALLING SEQUENCE....
041952,000039: 
041953,000040:                                                                                                  #       *TVCEXEC CALLED AS A WAITLIST TASK, IN PARTICULAR BY TVCINIT4 AND BY
041954,000041:                                                                                                  #        ITSELF, BOTH AT 1/2 SECOND INTERVALS
041955,000042: 
041956,000043:                                                                                                  #  NORMAL EXIT MODE.... TASKOVER
041957,000044: 
041958,000045:                                                                                                  #  ALARM OR ABORT EXIT MODES.... NONE
041959,000046: 
041960,000047:                                                                                                  #  SUBROUTINES CALLED....NEEDLER, S40.15, MASSPROP, TASKOVER, IBNKCALL
041961,000048: 
041962,000049:                                                                                                  #  OTHER INTERFACES....
041963,000050: 
041964,000051:                                                                                                  #       *TVCRESTART PACKAGE FOR RESTARTS
041965,000052:                                                                                                  #       *PITCHDAP, YAWDAP FOR VARIABLE GAINS AND ENGINE TRIM ANGLES
041966,000053:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED....
041967,000054: 
041968,000055:                                                                                                  #       *SEE TVCDAPON....TVCINIT4
041969,000056:                                                                                                  #       *VARK AND 1/CONACC (S40.15 OF TVCINITIALIZE)
041970,000057:                                                                                                  #       *PAD LOAD EREPFRAC
041971,000058:                                                                                                  #       *BITS 15,14 OF FLAGWRD6 (T5 BITS)
041972,000059:                                                                                                  #       *TVCEXPHS FOR RESTARTS
041973,000060:                                                                                                  #       *ENGINE-ON BIT (11.13) FOR RESTARTS
041974,000061:                                                                                                  #       *CDUX, OGAD
041975,000062: 
041976,000063:                                                                                                  #  OUTPUT....
041977,000064: 
041978,000065:                                                                                                  #       *ROLL DAP OGANOW, FDAI NEEDLE (AK). AND PHASE PLANE OGAERR
041979,000066:                                                                                                  #       *VARIABLE GAINS FOR PITCH/YAW AND ROLL TVC DAPS
041980,000067:                                                                                                  #       *SINGLE-SHOT AND REPETITIVE CORRECTIONS TO ENGINE TRIM ANGLES
041981,000068:                                                                                                  #        PACTOFF AND YACTOFF
041982,000069:                                                                                                  #  DEBRIS.... MUCH, BUT SHAREABLE WITH RCS/ENTRY, ALL IN EBANK6
041983,000070: 

Page 951

041985,000072: 16,2000                                           SETLOC   DAPROLL                               
041986,000073: 16,2000                                           BANK                                           
041987,000074: 16,3037  E6,1446                                  EBANK=   CNTR                                  
041988,000075: 16,3037                                           COUNT*   $$/TVCX                               
041989,000076: 
041990,000077: 
041991,000078: 16,3037           40102        TVCEXEC            CS       FLAGWRD6                              #  CHECK FOR TERMINATION (BITS 15,14 READ
041992,000079: 16,3040           74076                           MASK     DPCONFIG                              #  10 FROM TVCDAPON TO RCSDAPON
041993,000080: 16,3041           00006                           EXTEND                                         
041994,000081: 16,3042           63217                           BZMF     TVCEXFIN                              #  TERMINATE
041995,000082: 
041996,000083: 16,3043           35011                           CAF      .5SEC                                 #  W.L. CALL TO PERPETUATE TVCEXEC
041997,000084: 16,3044           05223                           TC       TWIDDLE                               
041998,000085: 16,3045           03037                           ADRES    TVCEXEC                               
041999,000086: 16,3046           30032        ROLLPREP           CAE      CDUX                                  #  UPDATE ROLL LADDERS (NO NEED TO RESTART-
042000,000087: 16,3047           57645                           XCH      OGANOW                                #        PROTECT, SINCE ROLL DAPS RE-START)
042001,000088: 16,3050           57646                           XCH      OGAPAST                               
042002,000089: 
042003,000090: 16,3051           31447                           CAE      OGAD                                  #  PREPARE ROLL FDAI NEEDLE  WITH FLY-TO
042004,000091: 16,3052           00006                           EXTEND                                         #        ERROR (COMMAND - MEASURED)
042005,000092: 16,3053           21645                           MSU      OGANOW                                
042006,000093: 16,3054           55476                           TS       AK                                    #  FLY-TO OGA ERROR, SC.AT B-1 REVS
042007,000094: 
042008,000095: 16,3055           00006                           EXTEND                                         #  PREPARE ROLL DAP PHASE PLANE  OGAERR
042009,000096: 16,3056           74751                           MP       -BIT14                                
042010,000097: 16,3057           55647                           TS       OGAERR                                #  PHASE-PLANE (FLY-FROM) OGAERROR,
042011,000098:                                                                                                  #        SC.AT B+0 REVS
042012,000099: 
042013,000100: 16,3060           36214                           CAF      THREE                                 #  SET UP ROLL DAP TASK (ALLOW SOME TIME)
042014,000101: 16,3061           05223                           TC       TWIDDLE                               
042015,000102: 16,3062           03342                           ADRES    ROLLDAP                               
042016,000103: 16,3063           04714        NEEDLEUP           TC       IBNKCALL                              #  DO A NEEDLES UPDATE (RETURNS AFTER CADR)
042017,000104: 16,3064           42425                           CADR     NEEDLER                               #        (NEEDLES RESTARTS ITSELF)
042018,000105: 
042019,000106: 16,3065           11634        VARGAINS           CCS      VCNTR                                 #  TEST FOR GAIN UPDATE TIME
042020,000107: 16,3066           13074                           TCF      EXECCOPY                              #  NOT YET                       
042021,000108: 16,3067           04714        GAINCHNG           TC       IBNKCALL                              #  UPDATE IXX, IAVG, IAVG/TLX
042022,000109: 16,3070           13347                           CADR     FIXCW                                 #  MASSPROP ENTRY  (ALREADY INITIALIZED)
042023,000110: 16,3071           04714                           TC       IBNKCALL                              #  UPDATE 1/CONACC, VARK
042024,000111: 16,3072           36452                           CADR     S40.15                                #        (S40.15 IS IN TVCINITIALIZE)
042025,000112: 16,3073           34351                           CAF      NINETEEN                              #  RESET THE VARIABLE-GAIN UPDATE COUNTER
042026,000113: 16,3074           55634        EXECCOPY           TS       VCNTR                                 
042027,000114: 16,3075           11446        1SHOTCHK           CCS      CNTR                                  #  CHECK TIME FOR ONE-SHOT OR REPCORR
042028,000115: 16,3076           13102                           TCF      +4                                    #        NOT YET
042029,000116: 16,3077           13115                           TCF      1SHOTOK                               #        NOW
042030,000117: 16,3100           13106                           TCF      REPCHEK                               #        ONE-SHOT OVER, ON TO REPCORR
042031,000118: 16,3101           13115                           TCF      1SHOTOK                               #        NOW  (ONE-SHOT ONLY, NO REPCORR)
042032,000119: 
042033,000120: 16,3102           55661                 +4        TS       CNTRTMP                               #  COUNT DOWN
042034,000121: 16,3103           34766                           CAF      FOUR                                  #  SET UP TVCEXPHS FOR ENTRY AT CNTRCOPY

Page 952

042036,000123: 16,3104           55644                           TS       TVCEXPHS                              
042037,000124: 16,3105           13215                           TCF      CNTRCOPY                              
042038,000125: 
042039,000126: 16,3106           31633        REPCHEK            CAE      REPFRAC                               #  CHECK FOR REPETITIVE UPDATES
042040,000127: 16,3107           00006                           EXTEND                                         
042041,000128: 16,3110           63217                           BZMF     TVCEXFIN                              #        NO, OVER-AND-OUT
042042,000129: 16,3111           55445                           TS       TEMPDAP    +1                         #        YES, SET UP CORRECTION FRACTION
042043,000130: 16,3112           34767                           CAF      TWO                                   #  SET UP TVCEXPHS FOR ENTRY AT CORSETUP
042044,000131: 16,3113           55644                           TS       TVCEXPHS                              
042045,000132: 16,3114           13126                           TCF      CORSETUP                              
042046,000133: 
042047,000134: 16,3115           34762        1SHOTOK            CAF      ENGONBIT                              
042048,000135: 16,3116           70101                           MASK     FLAGWRD5                              
042049,000136: 16,3117           10000                           CCS      A                                     
042050,000137: 16,3120           13122                           TCF      +2                                    #        ONE-SHOT OK
042051,000138: 16,3121           13217                           TCF      TVCEXFIN                              #        NO, TERMINATE
042052,000139: 
042053,000140: 16,3122           25644                           INCR     TVCEXPHS                              #                                        (1)
042054,000141: 16,3123           34754        TEMPSET            CAF      FCORFRAC                              #        SET UP CORRECTION FRACTION
042055,000142: 16,3124           55445                           TS       TEMPDAP    +1                         
042056,000143: 
042057,000144: 16,3125           25644                           INCR     TVCEXPHS                              #  ENTRY FROM REPCHECK AT NEXT LOCATION  (2)
042058,000145: 16,3126           31465        CORSETUP           CAE      DAPDATR1                              #  CHECK FOR LEM-OFF/ON
042059,000146: 16,3127           74754                           MASK     BIT13                                 #  (NOTE, SHOWS LEM-OFF)
042060,000147: 16,3130           00006                           EXTEND                                         
042061,000148: 16,3131           13133                           BZF      +2                                    #  LEM IS ON,  PICK UP   TEMPDAP+1
042062,000149: 16,3132           31445                           CAE      TEMPDAP    +1                         #  LEM IS OFF, PICK UP 2(TEMPDAP+1)
042063,000150: 16,3133           61445                           AD       TEMPDAP    +1                         
042064,000151: 16,3134           55444                           TS       TEMPDAP                               #  CG.CORR USES TEMPDAP
042065,000152: 
042066,000153: 16,3135           37702                           CAF      NEGONE                                #  SET UP FOR CNTR = -1 (ONE-SHOT DONE)
042067,000154: 16,3136           55661                           TS       CNTRTMP                               #        (COPYCYCLE AT .CNTRCOPY.)
042068,000155: 
042069,000156: 16,3137           00006        CG.CORR            EXTEND                                         #  PITCH TMC LOOP
042070,000157: 16,3140           31606                           DCA      PDELOFF                               
042071,000158: 16,3141           53656                           DXCH     PACTTMP                               
042072,000159: 16,3142           00006                           EXTEND                                         
042073,000160: 16,3143           41606                           DCS      PDELOFF                               
042074,000161: 16,3144           20001                           DDOUBL                                         
042075,000162: 16,3145           20001                           DDOUBL                                         
042076,000163: 16,3146           53612                           DXCH     TTMP1                                 
042077,000164: 16,3147           00006                           EXTEND                                         
042078,000165: 16,3150           31602                           DCA      DELPBAR                               
042079,000166: 16,3151           20001                           DDOUBL                                         
042080,000167: 16,3152           20001                           DDOUBL                                         
042081,000168: 16,3153           21612                           DAS      TTMP1                                 
042082,000169: 16,3154           00006                           EXTEND                                         
042083,000170: 16,3155           31612                           DCA      TTMP1                                 
042084,000171: 16,3156           00006                           EXTEND                                         
042085,000172: 16,3157           71444                           MP       TEMPDAP                               

Page 953

042087,000174: 16,3160           21656                           DAS      PACTTMP                               
042088,000175: 
042089,000176: 16,3161           00006                           EXTEND                                         #  YAW TMC LOOP
042090,000177: 16,3162           31610                           DCA      YDELOFF                               
042091,000178: 16,3163           53660                           DXCH     YACTTMP                               
042092,000179: 16,3164           00006                           EXTEND                                         
042093,000180: 16,3165           41610                           DCS      YDELOFF                               
042094,000181: 16,3166           20001                           DDOUBL                                         
042095,000182: 16,3167           20001                           DDOUBL                                         
042096,000183: 16,3170           53612                           DXCH     TTMP1                                 
042097,000184: 16,3171           00006                           EXTEND                                         
042098,000185: 16,3172           31604                           DCA      DELYBAR                               
042099,000186: 16,3173           20001                           DDOUBL                                         
042100,000187: 16,3174           20001                           DDOUBL                                         
042101,000188: 16,3175           21612                           DAS      TTMP1                                 
042102,000189: 16,3176           00006                           EXTEND                                         
042103,000190: 16,3177           31612                           DCA      TTMP1                                 
042104,000191: 16,3200           00006                           EXTEND                                         
042105,000192: 16,3201           71444                           MP       TEMPDAP                               
042106,000193: 16,3202           21660                           DAS      YACTTMP                               
042107,000194: 
042108,000195: 16,3203           25644        CORCOPY            INCR     TVCEXPHS                              #  RESTART PROTECT THE COPYCYCLE         (3)
042109,000196: 16,3204           00006                           EXTEND                                         #  TRIM-ESTIMATES, AND
042110,000197: 16,3205           31656                           DCA      PACTTMP                               
042111,000198: 16,3206           55423                           TS       PACTOFF                               #        TRIMS
042112,000199: 16,3207           53606                           DXCH     PDELOFF                               
042113,000200: 
042114,000201: 16,3210           00006                           EXTEND                                         
042115,000202: 16,3211           31660                           DCA      YACTTMP                               
042116,000203: 16,3212           55424                           TS       YACTOFF                               
042117,000204: 16,3213           53610                           DXCH     YDELOFF                               
042118,000205: 
042119,000206: 16,3214           25644                           INCR     TVCEXPHS                              #  ENTRY FROM 1SHOTCHK AT NEXT LOCATION  (4)
042120,000207: 16,3215           31661        CNTRCOPY           CAE      CNTRTMP                               #  UPDATE CNTR (RESTARTS OK, FOLLOWS CPYCY)
042121,000208: 16,3216           55446                           TS       CNTR                                  
042122,000209: 
042123,000210: 16,3217           34772        TVCEXFIN           CAF      ZERO                                  #  RESET TVCEXPHS
042124,000211: 16,3220           55644                           TS       TVCEXPHS                              
042125,000212: 16,3221           15314                           TCF      TASKOVER                              #  TVCEXECUTIVE FINISHED
042126,000213: 
042127,000214: 
042128,000215: 16,3222     4754               FCORFRAC           =        BIT13                                 #  ONE-SHOT CORRECTION FRACTION  

End of include-file TVCEXECUTIVE.agc.  Parent file is MAIN.agc