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

043761,000002:                                                                                                  ## Copyright:   Public domain.
043762,000003:                                                                                                  ## Filename:    TVCSTROKETEST.agc
043763,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
043764,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
043765,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
043766,000007:                                                                                                  ## Assembler:   yaYUL
043767,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
043768,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
043769,000010:                                                                                                  ## Pages:       979-983
043770,000011:                                                                                                  ## Mod history: 2009-05-13 RSB  Adapted from the Colossus249/ file of the
043771,000012:                                                                                                  ##                              same name, using Comanche055 page images.
043772,000013:                                                                                                  ##              2010-08-24 JL   Fixed page 983 number. Fixed some indentation.
043773,000014:                                                                                                  ##              2016-12-21 RSB  Proofed comment text using octopus/ProoferComments
043774,000015:                                                                                                  ##                              and corrected the errors found.
043775,000016:                                                                                                  ##              2017-01-20 RSB  Fixed comment-text errors noted while diff'ing
043776,000017:                                                                                                  ##                              vs Colossus 249.
043777,000018:                                                                                                  ##
043778,000019:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
043779,000020:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
043780,000021:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
043781,000022:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
043782,000023:                                                                                                  ## consequent reduction in image quality as well) are available online at
043783,000024:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
043784,000025:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the 
043785,000026:                                                                                                  ## (much) higher-quality images which Paul actually created.
043786,000027:                                                                                                  ##
043787,000028:                                                                                                  ## Notations on the hardcopy document read, in part:
043788,000029:                                                                                                  ##
043789,000030:                                                                                                  ##      Assemble revision 055 of AGC program Comanche by NASA
043790,000031:                                                                                                  ##      2021113-051.  10:28 APR. 1, 1969  
043791,000032:                                                                                                  ##
043792,000033:                                                                                                  ##      This AGC program shall also be referred to as
043793,000034:                                                                                                  ##                      Colossus 2A
043794,000035: 

Page 979

043796,000037:                                                                                                  #  NAME          STROKE TEST PACKAGE             (INCLUDING INITIALIZATION PACKAGE)
043797,000038:                                                                                                  #  LOG SECTION...TVCSTROKETEST                   SUBROUTINE...DAPCSM
043798,000039:                                                                                                  #  MODIFIED BY SCHLUNDT                          21 OCTOBER 1968
043799,000040: 
043800,000041:                                                                                                  #  FUNCTIONAL DESCRIPTION....
043801,000042:                                                                                                  #        STROKE TEST PACKAGE GENERATES A WAVEFORM DESIGNED TO EXCITE BENDING
043802,000043:                                                                                                  #        STRKTSTI (STROKE TEST INITIALIZATION) IS CALLED AS A JOB BY VB68.
043803,000044:                                                                                                  #                IT INITIALIZES ALL ERASABLES REQD FOR A STROKE TEST, AND
043804,000045:                                                                                                  #                THEN TESTS FOR CSM/LM (BIT 13 OF DAPDATR1). IF CSM/LM,
043805,000046:                                                                                                  #                IN EITHER HIGH OR LOW-BANDWIDTH MODE, THE TEST IS STARTED
043806,000047:                                                                                                  #                IMMEDIATELY.  IF NOT CSM/LM, PROGRAM EXITS WITH NO ACTION.
043807,000048:                                                                                                  #        HACK (STROKE TEST) GENERATES THE WAVEFORM BY DUMPING PULSE BURSTS
043808,000049:                                                                                                  #                OF PROPER SIGN AND IN PROPER SEQUENCE DIRECTLY INTO
043809,000050:                                                                                                  #                TVCPITCH, WORKING IN CONJUNCITON WITH BOTH PITCH AND YAW
043810,000051:                                                                                                  #                TVC DAPS, WITH INTERMEDIATE WAITLIST CALLS.  NOTE, HOWEVER
043811,000052:                                                                                                  #                THAT THE STROKE TEST IS PERFORMED ONLY IN THE PITCH AXIS.
043812,000053:                                                                                                  #                AN EXAMPLE WAVEFORM IS GIVEN BELOW, TO DEMONSTRATE STROKE-
043813,000054:                                                                                                  #                TEST PARAMETER SELECTION
043814,000055:                                                                                                  #        RESTARTS CAUSE TEST TO BE TERMINATED.  ANOTHER V68 REQD IF TEST
043815,000056:                                                                                                  #                IS TO BE RE-RUN.
043816,000057:                                                                                                  #        PULSE BURST SIZE IS PAD-LOADED (ESTROKER) SO THAT AMPLITUDE OF
043817,000058:                                                                                                  #                WAVEFORM CAN BE CHANGED.  THERE ARE TEN PULSE BURSTS IN
043818,000059:                                                                                                  #                THE HALF-AMPLITUDE OF THE FIRST FREQUENCY SET IN THE
043819,000060:                                                                                                  #                STANDARD WAVEFORM.  AMPLITUDE IS 10(ESTROKER)(1/42.15),
043820,000061:                                                                                                  #                NOMINALLY 50/42.15 = 1.185 DEG
043821,000062: 
043822,000063:                                                                                                  #  CALLING SEQUENCE....
043823,000064:                                                                                                  #        EXTENDED VERB 68 SETS UP STRKTSTI JOB
043824,000065:                                                                                                  #        PITCH AND YAW TVCDAPS, FINDING STROKER NON-ZERO, DO A ..TC HACK..
043825,000066:                                                                                                  #        AN INTERNALLY-GENERATED WAITLIST CALL ENTERS AT ..HACKWLST..
043826,000067: 
043827,000068:                                                                                                  #  NORMAL EXIT MODES....
043828,000069:                                                                                                  #        TC BUNKER (..Q.. IF ENTRY FROM DAP, ..TCTSKOVR.. IF FROM WAITLIST) LIST
043829,000070: 
043830,000071:                                                                                                  #  SUBROUTINES CALLED....
043831,000072:                                                                                                  #        WAITLIST
043832,000073: 
043833,000074:                                                                                                  #  ALARM OR ABORT EXIT MODES....
043834,000075:                                                                                                  #        NONE
043835,000076: 
043836,000077:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED....
043837,000078:                                                                                                  #        ESTROKER (PAD-LOAD)
043838,000079:                                                                                                  #        STROKER, CADDY, REVS, CARD, N
043839,000080: 
043840,000081:                                                                                                  #  OUTPUT....
043841,000082:                                                                                                  #        STRKTSTI...INITIALIZATION FOR STROKE TEST
043842,000083:                                                                                                  #        HACK, HACKWLST...PULSE BURSTS INTO TVCPITCH VIA ..ADS..
043843,000084:                                                                                                  #                          RESETS STROKER = +0 WHEN TEST COMPLETED
043844,000085: 
043845,000086:                                                                                                  #  DEBRIS....
043846,000087:                                                                                                  #        N = CADDY = +0, CARD = -0, REVS = -1
043847,000088:                                                                                                  #        BUNKER

Page 980

043849,000090: 
043850,000091:                                                                                                  #  EXAMPLE STROKE TEST WAVE FORM, DEMONSTRATING PARAMETER SELECTION
043851,000092: 
043852,000093:                                                                                                  #  NOTE....THIS IS NOT THE OFFICIAL WAVEFORM....
043853,000094: 
043854,000095:                                                                                                  #         **              **
043855,000096:                                                                                                  #         **              **
043856,000097:                                                                                                  #         **              **             EXAMPLE WAVEFORM (EACH * REPRESENTS
043857,000098:                                                                                                  #        *  *            *  *                 85.41 ARCSEC OF ACTUATOR CMND)
043858,000099:                                                                                                  #        *  *            *  *
043859,000100:                                                                                                  #        *  *            *  *
043860,000101:                                                                                                  #       *    *          *    *          **      **      **      **      **
043861,000102:                                                                                                  #       *    *          *    *          **      **      **      **      **
043862,000103:                                                                                                  #       *    *          *    *          **      **      **      **      **
043863,000104:                                                                                                  #      *      *        *      *        *  *    *  *    *  *    *  *    *  *    **  **  **  **  **
043864,000105:                                                                                                  #      *      *        *      *        *  *    *  *    *  *    *  *    *  *    **  **  **  **  **
043865,000106:                                                                                                  #      *      *        *      *        *  *    *  *    *  *    *  *    *  *    **  **  **  **  **
043866,000107:                                                                                                  #  -----------------------------------------------------------------------------------------------------
043867,000108:                                                                                                  #              *      *        *      *    *  *    *  *    *  *    *  *    *  *  **  **  **  **  **
043868,000109:                                                                                                  #              *      *        *      *    *  *    *  *    *  *    *  *    *  *  **  **  **  **  **
043869,000110:                                                                                                  #              *      *        *      *    *  *    *  *    *  *    *  *    *  *  **  **  **  **  **
043870,000111:                                                                                                  #               *    *          *    *      **      **      **      **      **
043871,000112:                                                                                                  #               *    *          *    *      **      **      **      **      **
043872,000113:                                                                                                  #               *    *          *    *      **      **      **      **      **
043873,000114:                                                                                                  #                *  *            *  *
043874,000115:                                                                                                  #                *  *            *  *
043875,000116:                                                                                                  #                *  *            *  *
043876,000117:                                                                                                  #                 **              **
043877,000118:                                                                                                  #                 **              **
043878,000119:                                                                                                  #                 **              **
043879,000120: 
043880,000121:                                                                                                  #  FOR THIS (UNOFFICIAL, EXAMPLE) WAVEFORM, THE REQUIRED PARAMETERS ARE AS FOLLOWS....
043881,000122: 
043882,000123:                                                                                                  #        FCARD    = +3           (NUMBER OF SETS)
043883,000124:                                                                                                  #        ESTROKER = +3           (PULSE BURST SIZE, SC.AT 85.41 ARCSEC/BIT)
043884,000125: 
043885,000126:                                                                                                  #        SET1..
043886,000127:                                                                                                  #                FREVS   = +3    (NUMBER REVERSALS MINUS 1)
043887,000128:                                                                                                  #                FCADDY  = +4    (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
043888,000129:                                                                                                  #        SET2..
043889,000130:                                                                                                  #                FCARD1  = +9    (NUMBER REVERSALS MINUS 1)
043890,000131:                                                                                                  #                FCARD4  = +2    (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
043891,000132:                                                                                                  #        SET3..
043892,000133:                                                                                                  #                FCARD2  = +9    (NUMBER REVERSALS MINUS 1)
043893,000134:                                                                                                  #                FCARD5  = +1    (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
043894,000135:                                                                                                  #        SET4..
043895,000136:                                                                                                  #                FCARD3  = +0    (NUMBER REVERSALS MINUS 1)
043896,000137:                                                                                                  #                FCARD6  = +0    (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
043897,000138: 

Page 981

043899,000140:                                                                                                  #  STROKE TEST INITIALIZATION PACKAGE (AS A JOB, FROM VERB 68)
043900,000141: 
043901,000142: 17,2552                                           BANK     17                                    
043902,000143: 20,2000                                           SETLOC   DAPS2                                 
043903,000144: 20,2000                                           BANK                                           
043904,000145: 
043905,000146: 20,3501                                           COUNT*   $$/STRK                               
043906,000147: 20,3501  E6,1655                                  EBANK=   CADDY                                 
043907,000148: 
043908,000149: 20,3501           03512        STRKTSTI           TCR      TSTINIT                               #  STROKE TEST INITIALIZATION PKG (CALLED
043909,000150:                                                                                                  #  AS A JOB BY VERB68)
043910,000151: 
043911,000152: 20,3502           00004        STRKCHK            INHINT                                         
043912,000153: 
043913,000154: 20,3503           31466                           CAE      DAPDATR1                              #  CHECK FOR CSM/LM CONFIGURATION
043914,000155: 20,3504           75002                           MASK     BIT14                                 
043915,000156: 20,3505           00006                           EXTEND                                         
043916,000157: 20,3506           13511                           BZF      +3                                    
043917,000158: 
043918,000159: 20,3507           31413                           CAE      ESTROKER                              #  BEGIN ON NEXT DAP PASS (PITCH OR YAW)
043919,000160: 20,3510           55574                           TS       STROKER                               #  (STROKING DONE IN PITCH ONLY, HOWEVER)
043920,000161: 
043921,000162: 20,3511           15217                           TCF      ENDOFJOB                              
043922,000163: 
043923,000164: 20,3512           43522        TSTINIT            CS       FCADDY                                #  NORMAL ENTRY FROM STRKTSTI
043924,000165: 20,3513           55655                           TS       CADDY                                 
043925,000166: 20,3514           55656                           TS       N                                     #        NOTE SGN CHNG FCADDY(+) TO CADDY(-)
043926,000167: 
043927,000168: 20,3515           33523                           CAF      FREVS                                 
043928,000169: 20,3516           55660                           TS       REVS                                  
043929,000170: 
043930,000171: 20,3517           43524                           CS       FCARD                                 #        NOTE SGN CHNG FCARD(+) TO CARD(-)
043931,000172: 20,3520           55661                           TS       CARD                                  
043932,000173: 
043933,000174: 20,3521           00002                           TC       Q                                     #  RETURN TO STRKTSTI+1 (OR CHKSTRK+2 OR +4)
043934,000175: 

Page 982

043936,000177:                                                                                                  #  THE OFFICIAL STROKE TEST WAVEFORM (3 JAN, 1967) CONSISTS OF FOUR STROKE SETS, AS FOLLOWS....
043937,000178: 
043938,000179:                                                                                                  #        SET 1...10 BURSTS IN 1/2 AMP,   4 REVERSALS
043939,000180:                                                                                                  #        SET 2... 6 BURSTS IN 1/2 AMP,   6 REVERSALS
043940,000181:                                                                                                  #        SET 3... 5 BURSTS IN 1/2 AMP,  10 REVERSALS
043941,000182:                                                                                                  #        SET 4... 4 BURSTS IN 1/2 AMP,  14 REVERSALS
043942,000183: 
043943,000184:                                                                                                  #  THE PULSE BURST SIZE (ESTROKER) IS PAD-LOADED (5 BITS AS OF 3 JAN, 1967)
043944,000185:                                                                                                  #  THE REMAINING WAVEFORM-GENERATING PARAMETERS ARE AS FOLLOWS....
043945,000186: 
043946,000187: 20,3522           00012        FCADDY             DEC      10         B-14                       #  NO. PULSE BURSTS IN 1/2 AMP, SET1..(+10)
043947,000188: 20,3523           00003        FREVS              DEC      3          B-14                       #  NO. REVERSALS MINUS 1, SET1........(  3)
043948,000189: 
043949,000190: 20,3524           00004        FCARD              DEC      4          B-14                       #  NO. STROKE SETS....................(+ 4)
043950,000191: 
043951,000192: 20,3525           00005        FCARD1             DEC      5          B-14                       #  NO. REVERSALS MINUS 1, SET2........(  5)
043952,000193: 
043953,000194: 20,3526           00011        FCARD2             DEC      9          B-14                       #                            3........(  9)
043954,000195: 20,3527           00015        FCARD3             DEC      13         B-14                       #                            4........( 13)
043955,000196: 
043956,000197: 20,3530           00006        FCARD4             DEC      6          B-14                       #  NO. PULSE BURSTS IN 1/2 AMP, SET2..(+ 6)
043957,000198: 20,3531           00005        FCARD5             DEC      5          B-14                       #                               SET3..(+ 5)
043958,000199: 20,3532           00004        FCARD6             DEC      4          B-14                       #                               SET4..(+ 4)
043959,000200: 
043960,000201: 20,3533     5016               20MS               =        BIT2                                  
043961,000202: 
043962,000203:                                                                                                  #  STROKE TEST PACKAGE PROPER....
043963,000204: 
043964,000205: 20,3533  E6,1657                                  EBANK=   BUNKER                                
043965,000206: 
043966,000207: 20,3533           00006        HACK               EXTEND                                         #  ENTRY (IN T5 RUPT) FROM TVCDAPS
043967,000208: 20,3534           23657                           QXCH     BUNKER                                #  SAVE Q FOR DAP RETURN
043968,000209: 
043969,000210: 20,3535           35016                           CAF      20MS                                  #  2DAPSX2(PASSES/DAP)X2(CS/PASS)=8CS=TVCDT
043970,000211: 20,3536           05245                           TC       WAITLIST                              
043971,000212: 20,3537  E6,1657                                  EBANK=   BUNKER                                
043972,000213: 20,3537           03542 40066                     2CADR    HACKWLST                              
043973,000214: 
043974,000215: 20,3541           13544                           TCF      +3                                    
043975,000216: 
043976,000217: 20,3542           34367        HACKWLST           CAF      TCTSKOVR                              #  ENTRY FROM WAITLIST
043977,000218: 20,3543           55657                           TS       BUNKER                                #  BUNKER IS TC TASKOVER
043978,000219: 
043979,000220: 20,3544           31574                           CA       STROKER                               #  STROKE
043980,000221: 20,3545           26054                           ADS      TVCPITCH                              
043981,000222: 
043982,000223: 20,3546           35005                           CAF      BIT11                                 #  RELEASE THE ERROR COUNTERS
043983,000224: 20,3547           00006                           EXTEND                                         
043984,000225: 20,3550           05014                           WOR      CHAN14                                
043985,000226: 20,3551           25655                           INCR     CADDY                                 #  COUNT DOWN THE NO. BURSTS, THIS SLOPE

Page 983

043987,000228: 20,3552           41655                           CS       CADDY                                 
043988,000229: 20,3553           00006                           EXTEND                                         
043989,000230: 20,3554           63556                           BZMF     +2                                    
043990,000231: 20,3555           01657                           TC       BUNKER                                #  EXIT, WHILE ON A SLOPE
043991,000232: 
043992,000233: 20,3556           11660                           CCS      REVS                                  
043993,000234: 20,3557           13577                           TCF      REVUP                                 #  POSITIVE REVS
043994,000235: 20,3560           13603                           TCF      REVUP      +4                         #  FINAL REVERSAL, THIS SET
043995,000236: 
043996,000237: 20,3561           25661                           INCR     CARD                                  #  NEGATIVE REVS SET LAST PASS, READY FOR
043997,000238: 20,3562           41661                           CS       CARD                                  #        THE NEXT SET.  CHECK IF NO MORE SETS
043998,000239: 20,3563           00006                           EXTEND                                         
043999,000240: 20,3564           13575                           BZF      STROKILL                              #  ALL SETS COMPLETED
044000,000241: 
044001,000242: 20,3565           51661                           INDEX    CARD                                  
044002,000243: 20,3566           33530                           CAF      FCARD      +4                         #  PICK UP NO. REVERSALS (-), NEXT SET
044003,000244: 20,3567           55660                           TS       REVS                                  #  REINITIALIZE
044004,000245: 20,3570           51661                           INDEX    CARD                                  
044005,000246: 20,3571           43533                           CS       FCARD      +7                         #  PICK UP NO. BURSTS IN 1/2AMP, NEXT SET
044006,000247: 20,3572           55656                           TS       N                                     #  REINITIALIZE
044007,000248: 20,3573           55655                           TS       CADDY                                 
044008,000249: 20,3574           01657                           TC       BUNKER                                #  EXIT, AT END OF SET
044009,000250: 
044010,000251: 20,3575           55574        STROKILL           TS       STROKER                               #  RESET (TO +0) TO END TEST
044011,000252: 20,3576           01657                           TC       BUNKER                                #  EXIT, STROKE TEST FINIS
044012,000253: 
044013,000254: 20,3577           55660        REVUP              TS       REVS                                  #  ALL REVERSALS EXCEPT LAST OF SET
044014,000255: 20,3600           31656                           CA       N                                     
044015,000256: 20,3601           60000                           DOUBLE                                         #  2 X 1/2AMP
044016,000257: 20,3602           13606                           TCF      +4                                    
044017,000258: 
044018,000259: 20,3603           45017                 +4        CS       ONE                                   #  FINAL REVERSAL, THIS SET
044019,000260: 20,3604           55660                           TS       REVS                                  #  PREPARE TO BRANCH TO NEW BURST
044020,000261: 20,3605           31656                           CA       N                                     #  JUST RETURN TO ZERO, FINAL SLOPE OF SET
044021,000262: 20,3606           55655                           TS       CADDY                                 #  CADUP
044022,000263: 
044023,000264: 20,3607           41574                           CS       STROKER                               #  CHANGE SIGN OF SLOPE
044024,000265: 20,3610           55574                           TS       STROKER                               
044025,000266: 20,3611           01657                           TC       BUNKER                                #  EXIT AT A REVERSAL (SLOPE CHANGE)
044026,000267: 

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