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.

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

Page 979

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

Page 980

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

Page 981

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

Page 982

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

Page 983

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

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