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.

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

Page 950

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

Page 951

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

Page 952

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

Page 953

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

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