Source Code
This is the source-code for the Apollo 9 Command Module's Guidance Computer.
These files were derived originally from the scan from MIT's Dibner Institute's
now-discontinued website titled "History of Recent Science and Technology", which
in turn was originally created by Gary Neff, though his high-quality scans were
unfortunately reduced in legibility when presented online.
The markings on the front of the
printout imply that it was the original AGC developer Norm Brodeur's copy.
A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original
AGC developer Fred Martin. The source code was transcribed from
those images by Ron Burkey. 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:ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041 20'35 OCT. 28,1968Note that the date is the date of the printout, not the date of the program revision. |
042097,000002: ## Copyright: Public domain.
042098,000003: ## Filename: TVCSTROKETEST.agc
042099,000004: ## Purpose: Part of the source code for Colossus, build 249.
042100,000005: ## It is part of the source code for the Command Module's (CM)
042101,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
042102,000007: ## Assembler: yaYUL
042103,000008: ## Reference: Starts on p. 943.
042104,000009: ## Contact: Ron Burkey <info@sandroid.org>.
042105,000010: ## Website: www.ibiblio.org/apollo/index.html
042106,000011: ## Mod history: 08/23/04 RSB. Began transcribing.
042107,000012: ## 05/14/05 RSB Corrected website reference above.
042108,000013: ## 2010-10-24 JL Indentation fixes.
042109,000014: ## 2017-01-06 RSB Page numbers now agree with those on the
042110,000015: ## original harcopy, as opposed to the PDF page
042111,000016: ## numbers in 1701.pdf.
042112,000017: ## 2017-01-20 RSB Cross-diff'd comment text (not whitespace)
042113,000018: ## vs the already-proofed corresponding Colossus
042114,000019: ## 237 and Comanche 55 source-code files
042115,000020: ## and corrected errors found.
042116,000021: ##
042117,000022: ## The contents of the "Colossus249" files, in general, are transcribed
042118,000023: ## from a scanned copy of the program listing. Notations on this
042119,000024: ## document read, in part:
042120,000025: ##
042121,000026: ## Assemble revision 249 of AGC program Colossus by NASA
042122,000027: ## 2021111-041. October 28, 1968.
042123,000028: ##
042124,000029: ## This AGC program shall also be referred to as
042125,000030: ## Colossus 1A
042126,000031: ##
042127,000032: ## Prepared by
042128,000033: ## Massachusetts Institute of Technology
042129,000034: ## 75 Cambridge Parkway
042130,000035: ## Cambridge, Massachusetts
042131,000036: ## under NASA contract NAS 9-4065.
042132,000037: ##
042133,000038: ## Refer directly to the online document mentioned above for further information.
042134,000039: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
042135,000040: ##
042136,000041: ## In some cases, where the source code for Luminary 131 overlaps that of
042137,000042: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
042138,000043: ## source file, and then is proofed to incorporate any changes.
042139,000044:
Page 943 |
042141,000046: # NAME STROKE TEST PACKAGE (INCLUDING INITIALIZATION PACKAGE)
042142,000047: # ORIGINAL CODING BY OLSSON LOG SECTION....STROKE TEST PACKAGE
042143,000048: # MOD BY ENGEL DATE....21 MARCH, 1967
042144,000049:
042145,000050: # FUNCTIONAL DESCRIPTION....
042146,000051: # STROKE TEST PACKAGE GENERATES A WAVEFORM DESIGNED TO EXCITE BENDING
042147,000052: # STRKTSTI (STROKE TEST INITIALIZATION) IS CALLED AS A JOB BY VB68.
042148,000053: # IT INITIALIZES ALL ERASABLES REQD FOR A STROKE TEST, AND
042149,000054: # THEN TESTS FOR AN 80MS DAP. IF 80MS IT SETS STROKER = ESTROKER
042150,000055: # FOR AN IMMEDIATE STROKE TEST, OTHERWISE IT MERELY ENABLES
042151,000056: # A STROKE TEST BY SETTING STROKER TO -0. THE STROKE TEST
042152,000057: # THEN AWAITS SWITCHOVER TO THE 80MS DAP WHEREUPON IT IS
042153,000058: # ENABLED AFTER AN ADDITIONAL 4 SECOND DELAY TO AVOID
042154,000059: # THE SWITCHOVER TRANSIENTS (SEE STRKCALL, STRKUP IN
042155,000060: # TVCEXECUTIVE)
042156,000061: # HACK (STROKE TEST) GENERATES THE WAVEFORM BY DUMPING PULSE BURSTS
042157,000062: # OF PROPER SIGN AND IN PROPER SEQUENCE DIRECTLY INTO
042158,000063: # TVCPITCH, WORKING IN CONJUNCITON WITH BOTH PITCH AND YAW
042159,000064: # TVC DAPS, WITH INTERMEDIATE WAITLIST CALLS. NOTE, HOWEVER
042160,000065: # THAT THE STROKE TEST IS PERFORMED ONLY IN THE PITCH AXIS.
042161,000066: # AN EXAMPLE WAVEFORM IS GIVEN BELOW, TO DEMONSTRATE STROKE-
042162,000067: # TEST PARAMETER SELECTION
042163,000068: # RESTARTS CAUSE TEST TO BE TERMINATED. ANOTHER V68 REQD IF TEST
042164,000069: # IS TO BE RE-RUN.
042165,000070: # PULSE BURST SIZE IS PAD-LOADED (ESTROKER) SO THAT AMPLITUDE OF
042166,000071: # WAVEFORM CAN BE CHANGED. THERE ARE TEN PULSE BURSTS IN
042167,000072: # THE HALF-AMPLITUDE OF THE FIRST FREQUENCY SET IN THE
042168,000073: # STANDARD WAVEFORM. AMPLITUDE IS 10(ESTROKER)(1/42.15),
042169,000074: # NOMINALLY 50/42.15 = 1.185 DEG
042170,000075:
042171,000076: # CALLING SEQUENCE....
042172,000077: # EXTENDED VERB 68 SETS UP STRKTSTI JOB
042173,000078: # PITCH AND YAW TVCDAPS, FINDING STROKER NON-ZERO, DO A ..TC HACK..
042174,000079: # AN INTERNALLY-GENERATED WAITLIST CALL ENTERS AT ..HACKWLST..
042175,000080:
042176,000081: # NORMAL EXIT MODES....
042177,000082: # TC BUNKER (..Q.. IF ENTRY FROM DAP, ..TCTSKOVR.. IF FROM WAITLIST) LIST
042178,000083:
042179,000084: # SUBROUTINES CALLED....
042180,000085: # WAITLIST
042181,000086:
042182,000087: # ALARM OR ABORT EXIT MODES....
042183,000088: # NONE
042184,000089:
042185,000090: # ERASABLE INITIALIZATION REQUIRED....
042186,000091: # ESTROKER (PAD-LOAD)
042187,000092: # STROKER, CADDY, REVS, CARD, N
042188,000093:
042189,000094: # OUTPUT....
042190,000095: # STRKTSTI...INITIALIZATION FOR STROKE TEST
042191,000096: # HACK, HACKWLST...PULSE BURSTS INTO TVCPITCH VIA..ADS..
042192,000097: # RESETS STROKER = +0 WHEN TEST COMPLETED
042193,000098:
042194,000099: # DEBRIS....
042195,000100: # N = CADDY = +0, CARD = -0, REVS = -1
042196,000101: # BUNKER
Page 944 |
042198,000103:
042199,000104: # EXAMPLE STROKE TEST WAVE FORM, DEMONSTRATING PARAMETER SELECTION
042200,000105: # NOTE....THIS IS NOT THE OFFICIAL WAVEFORM....
042201,000106:
042202,000107: # ** **
042203,000108: # ** **
042204,000109: # ** ** EXAMPLE WAVEFORM (EACH * REPRESENTS
042205,000110: # * * * * 85.41 ARCSEC OF ACTUATOR CMND)
042206,000111: # * * * *
042207,000112: # * * * *
042208,000113: # * * * * ** ** ** ** **
042209,000114: # * * * * ** ** ** ** **
042210,000115: # * * * * ** ** ** ** **
042211,000116: # * * * * * * * * * * * * * * ** ** ** ** **
042212,000117: # * * * * * * * * * * * * * * ** ** ** ** **
042213,000118: # * * * * * * * * * * * * * * ** ** ** ** **
042214,000119: # -----------------------------------------------------------------------------------------------------
042215,000120: # * * * * * * * * * * * * * * ** ** ** ** **
042216,000121: # * * * * * * * * * * * * * * ** ** ** ** **
042217,000122: # * * * * * * * * * * * * * * ** ** ** ** **
042218,000123: # * * * * ** ** ** ** **
042219,000124: # * * * * ** ** ** ** **
042220,000125: # * * * * ** ** ** ** **
042221,000126: # * * * *
042222,000127: # * * * *
042223,000128: # * * * *
042224,000129: # ** **
042225,000130: # ** **
042226,000131: # ** **
042227,000132:
042228,000133: # FOR THIS (UNOFFICIAL, EXAMPLE) WAVEFORM, THE REQUIRED PARAMETERS ARE AS FOLLOWS....
042229,000134:
042230,000135: # FCARD = +3 (NUMBER OF SETS)
042231,000136: # ESTROKER = +3 (PULSE BURST SIZE, SC.AT 85.41 ARCSEC/BIT)
042232,000137:
042233,000138: # SET1..
042234,000139: # FREVS = +3 (NUMBER REVERSALS MINUS 1)
042235,000140: # FCADDY = +4 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042236,000141: # SET2..
042237,000142: # FCARD1 = +9 (NUMBER REVERSALS MINUS 1)
042238,000143: # FCARD4 = +2 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042239,000144: # SET3..
042240,000145: # FCARD2 = +9 (NUMBER REVERSALS MINUS 1)
042241,000146: # FCARD5 = +1 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042242,000147: # SET4..
042243,000148: # FCARD3 = +0 (NUMBER REVERSALS MINUS 1)
042244,000149: # FCARD6 = +0 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042245,000150:
Page 945 |
042247,000152: # STROKE TEST INITIALIZATION PACKAGE (AS A JOB, FROM VERB 68)
042248,000153:
042249,000154: 17,2213 BANK 17
042250,000155: 20,2000 SETLOC DAPS2
042251,000156: 20,2000 BANK
042252,000157:
042253,000158: 20,3446 COUNT* $$/STRK
042254,000159: 20,3446 E6,1665 EBANK= CADDY
042255,000160:
042256,000161: 20,3446 03465 STRKTSTI TCR TSTINIT # STROKE TEST INITIALIZATION PKG (CALLED
042257,000162: # AS A JOB BY VERB68)
042258,000163:
042259,000164: 20,3447 00004 TVCDTCHK INHINT # STROKE TEST PERMITTED ONLY WITH 80MS DAP
042260,000165: 20,3450 31635 CAE T5TVCDT # CHECK CURRENT TIMING
042261,000166: 20,3451 54001 TS L
042262,000167: 20,3452 37677 CAF OCT37774 # LOOK FOR 80MS (T5)
042263,000168: 20,3453 00006 EXTEND
042264,000169: 20,3454 06001 RXOR LCHAN # +0 IF 80MS
042265,000170: 20,3455 10000 CCS A
042266,000171: 20,3456 13462 TCF +4 # NOT 80MS
042267,000172:
042268,000173: 20,3457 31412 CAE ESTROKER # 80MS. OK, SET STROKER FOR TEST
042269,000174: 20,3460 55614 TS STROKER
042270,000175: 20,3461 13464 TCF +3
042271,000176:
042272,000177: 20,3462 44714 CS ZERO # ENABLE, BUT DO NOT ACTIVATE STROKE
042273,000178: 20,3463 55614 TS STROKER # TEST, AWAITING SWITCHOVER
042274,000179: # TO MOD0R (MOD80)
042275,000180: 20,3464 15112 TCF ENDOFJOB
042276,000181: 20,3465 43475 TSTINIT CS FCADDY # NORMAL ENTRY FROM STRKTSTI
042277,000182: 20,3466 55665 TS CADDY
042278,000183: 20,3467 55666 TS N # NOTE SGN CHNG FCADDY(+) TO CADDY(-)
042279,000184:
042280,000185: 20,3470 33476 CAF FREVS
042281,000186: 20,3471 55670 TS REVS
042282,000187:
042283,000188: 20,3472 43477 CS FCARD # NOTE SGN CHNG FCARD(+) TO CARD(-)
042284,000189: 20,3473 55671 TS CARD
042285,000190:
042286,000191: 20,3474 00002 TC Q # RETURN TO STRKTSTI+1 (OR CHKSTRK+2 OR +4)
042287,000192:
Page 946 |
042289,000194: # THE OFFICIAL STROKE TEST WAVEFORM (3 JAN, 1967) CONSISTS OF FOUR STROKE SETS, AS FOLLOWS....
042290,000195:
042291,000196: # SET 1...10 BURSTS IN 1/2 AMP, 4 REVERSALS
042292,000197: # SET 2... 6 BURSTS IN 1/2 AMP, 6 REVERSALS
042293,000198: # SET 3... 5 BURSTS IN 1/2 AMP, 10 REVERSALS
042294,000199: # SET 4... 4 BURSTS IN 1/2 AMP, 14 REVERSALS
042295,000200:
042296,000201: # THE PULSE BURST SIZE (ESTROKER) IS PAD-LOADED (5 BITS AS OF 3 JAN, 1967)
042297,000202: # THE REMAINING WAVEFORM-GENERATING PARAMETERS ARE AS FOLLOWS....
042298,000203:
042299,000204: 20,3475 00012 FCADDY DEC 10 B-14 # NO. PULSE BURSTS IN 1/2 AMP, SET1..(+10)
042300,000205: 20,3476 00003 FREVS DEC 3 B-14 # NO. REVERSALS MINUS 1, SET1........( 3)
042301,000206: 20,3477 00004 FCARD DEC 4 B-14 # NO. STROKE SETS....................(+ 4)
042302,000207: 20,3500 00005 FCARD1 DEC 5 B-14 # NO. REVERSALS MINUS 1, SET2........( 5)
042303,000208: 20,3501 00011 FCARD2 DEC 9 B-14 # 3........( 9)
042304,000209: 20,3502 00015 FCARD3 DEC 13 B-14 # 4........( 13)
042305,000210: 20,3503 00006 FCARD4 DEC 6 B-14 # NO. PULSE BURSTS IN 1/2 AMP, SET2..(+ 6)
042306,000211: 20,3504 00005 FCARD5 DEC 5 B-14 # SET3..(+ 5)
042307,000212: 20,3505 00004 FCARD6 DEC 4 B-14 # SET4..(+ 4)
042308,000213:
042309,000214: 20,3506 4711 20MS = BIT2
042310,000215:
042311,000216: # STROKE TEST PACKAGE PROPER....
042312,000217:
042313,000218: 20,3506 E6,1667 EBANK= BUNKER
042314,000219:
042315,000220: 20,3506 00006 HACK EXTEND # ENTRY (IN T5 RUPT) FROM TVCDAPS
042316,000221: 20,3507 23667 QXCH BUNKER # SAVE Q FOR DAP RETURN
042317,000222:
042318,000223: 20,3510 34711 CAF 20MS # 2DAPSX2(PASSES/DAP)X2(CS/PASS)=8CS=TVCDT
042319,000224: 20,3511 05140 TC WAITLIST
042320,000225: 20,3512 E6,1667 EBANK= BUNKER
042321,000226: 20,3512 03515 40066 2CADR HACKWLST
042322,000227:
042323,000228: 20,3514 13517 TCF +3
042324,000229:
042325,000230: 20,3515 34367 HACKWLST CAF TCTSKOVR # ENTRY FROM WAITLIST
042326,000231: 20,3516 55667 TS BUNKER # BUNKER IS TC TASKOVER
042327,000232:
042328,000233: 20,3517 31614 CA STROKER # STROKE
042329,000234: 20,3520 26054 ADS TVCPITCH
042330,000235:
042331,000236: 20,3521 34700 CAF BIT11 # RELEASE THE ERROR COUNTERS
042332,000237: 20,3522 00006 EXTEND
042333,000238: 20,3523 05014 WOR CHAN14
042334,000239: 20,3524 25665 INCR CADDY # COUNT DOWN THE NO. BURSTS, THIS SLOPE
Page 947 |
042336,000241: 20,3525 41665 CS CADDY
042337,000242: 20,3526 00006 EXTEND
042338,000243: 20,3527 63531 BZMF +2
042339,000244: 20,3530 01667 TC BUNKER # EXIT, WHILE ON A SLOPE
042340,000245: 20,3531 11670 CCS REVS
042341,000246: 20,3532 13552 TCF REVUP # POSITIVE REVS
042342,000247: 20,3533 13556 TCF REVUP +4 # FINAL REVERSAL, THIS SET
042343,000248:
042344,000249: 20,3534 25671 INCR CARD # NEGATIVE REVS SET LAST PASS, READY FOR
042345,000250: 20,3535 41671 CS CARD # THE NEXT SET. CHECK IF NO MORE SETS
042346,000251: 20,3536 00006 EXTEND
042347,000252: 20,3537 13550 BZF STROKILL # ALL SETS COMPLETED
042348,000253:
042349,000254: 20,3540 51671 INDEX CARD
042350,000255: 20,3541 33503 CAF FCARD +4 # PICK UP NO. REVERSALS (-), NEXT SET
042351,000256: 20,3542 55670 TS REVS # REINITIALIZE
042352,000257: 20,3543 51671 INDEX CARD
042353,000258: 20,3544 43506 CS FCARD +7 # PICK UP NO. BURSTS IN 1/2AMP, NEXT SET
042354,000259: 20,3545 55666 TS N # REINITIALIZE
042355,000260: 20,3546 55665 TS CADDY
042356,000261: 20,3547 01667 TC BUNKER # EXIT, AT END OF SET
042357,000262: 20,3550 55614 STROKILL TS STROKER # RESET (TO +0) TO END TEST
042358,000263: 20,3551 01667 TC BUNKER # EXIT, STROKE TEST FINIS
042359,000264: 20,3552 55670 REVUP TS REVS # ALL REVERSALS EXCEPT LAST OF SET
042360,000265: 20,3553 31666 CA N
042361,000266: 20,3554 60000 DOUBLE # 2 X 1/2AMP
042362,000267: 20,3555 13561 TCF +4
042363,000268:
042364,000269: 20,3556 44712 +4 CS ONE # FINAL REVERSAL, THIS SET
042365,000270: 20,3557 55670 TS REVS # PREPARE TO BRANCH TO NEW BURST
042366,000271: 20,3560 31666 CA N # JUST RETURN TO ZERO, FINAL SLOPE OF SET
042367,000272: 20,3561 55665 TS CADDY # CADUP
042368,000273:
042369,000274: 20,3562 41614 CS STROKER # CHANGE SIGN OF SLOPE
042370,000275: 20,3563 55614 TS STROKER
042371,000276: 20,3564 01667 TC BUNKER # EXIT AT A REVERSAL (SLOPE CHANGE)
End of include-file TVCSTROKETEST.agc. Parent file is MAIN.agc