Source Code
These source-code files are part of a reconstructed copy of Comanche 72, the
first release of the Apollo Guidance Computer (AGC) Command Module (CM) software
for Apollo 13.
They have been adapted from sources files created from a listing of Comanche 55. These source files were updated to match binary dumps of a set of Comanche 67 rope modules. They were then further modified by applying known changes between Comanche 67 and Comanche 72. A binary dump of module B2 of Comanche 72, part number 2010802-021, was also used to validate changes made to banks 05-13. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments. Since no contemporary listings of Comanche 72 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
042133,000002: ## Copyright: Public domain.
042134,000003: ## Filename: TVCSTROKETEST.agc
042135,000004: ## Purpose: A section of Comanche revision 072.
042136,000005: ## It is part of the reconstructed source code for the first
042137,000006: ## release of the software for the Command Module's (CM) Apollo
042138,000007: ## Guidance Computer (AGC) for Apollo 13. No original listings
042139,000008: ## of this program are available; instead, this file was recreated
042140,000009: ## from a printout of Comanche 055, binary dumps of a set of
042141,000010: ## Comanche 067 rope modules, and changelogs between Comanche 067
042142,000011: ## and 072. It has been adapted such that the resulting bugger words
042143,000012: ## exactly match those specified for Comanche 072 in NASA drawing
042144,000013: ## 2021153G, which gives relatively high confidence that the
042145,000014: ## reconstruction is correct.
042146,000015: ## Assembler: yaYUL
042147,000016: ## Contact: Ron Burkey <info@sandroid.org>.
042148,000017: ## Website: www.ibiblio.org/apollo/index.html
042149,000018: ## Mod history: 2024-05-13 MAS Created from Comanche 067.
042150,000019:
042151,000020: # NAME STROKE TEST PACKAGE (INCLUDING INITIALIZATION PACKAGE)
042152,000021: # LOG SECTION...TVCSTROKETEST SUBROUTINE...DAPCSM
042153,000022: # MODIFIED BY SCHLUNDT 21 OCTOBER 1968
042154,000023:
042155,000024: # FUNCTIONAL DESCRIPTION....
042156,000025: # STROKE TEST PACKAGE GENERATES A WAVEFORM DESIGNED TO EXCITE BENDING
042157,000026: # STRKTSTI (STROKE TEST INITIALIZATION) IS CALLED AS A JOB BY VB68.
042158,000027: # IT INITIALIZES ALL ERASABLES REQD FOR A STROKE TEST, AND
042159,000028: # THEN TESTS FOR CSM/LM (BIT 13 OF DAPDATR1). IF CSM/LM,
042160,000029: # IN EITHER HIGH OR LOW-BANDWIDTH MODE, THE TEST IS STARTED
042161,000030: # IMMEDIATELY. IF NOT CSM/LM, PROGRAM EXITS WITH NO ACTION.
042162,000031: # HACK (STROKE TEST) GENERATES THE WAVEFORM BY DUMPING PULSE BURSTS
042163,000032: # OF PROPER SIGN AND IN PROPER SEQUENCE DIRECTLY INTO
042164,000033: # TVCPITCH, WORKING IN CONJUNCITON WITH BOTH PITCH AND YAW
042165,000034: # TVC DAPS, WITH INTERMEDIATE WAITLIST CALLS. NOTE, HOWEVER
042166,000035: # THAT THE STROKE TEST IS PERFORMED ONLY IN THE PITCH AXIS.
042167,000036: # AN EXAMPLE WAVEFORM IS GIVEN BELOW, TO DEMONSTRATE STROKE-
042168,000037: # TEST PARAMETER SELECTION
042169,000038: # RESTARTS CAUSE TEST TO BE TERMINATED. ANOTHER V68 REQD IF TEST
042170,000039: # IS TO BE RE-RUN.
042171,000040: # PULSE BURST SIZE IS PAD-LOADED (ESTROKER) SO THAT AMPLITUDE OF
042172,000041: # WAVEFORM CAN BE CHANGED. THERE ARE TEN PULSE BURSTS IN
042173,000042: # THE HALF-AMPLITUDE OF THE FIRST FREQUENCY SET IN THE
042174,000043: # STANDARD WAVEFORM. AMPLITUDE IS 10(ESTROKER)(1/42.15),
042175,000044: # NOMINALLY 50/42.15 = 1.185 DEG
042176,000045:
042177,000046: # CALLING SEQUENCE....
042178,000047: # EXTENDED VERB 68 SETS UP STRKTSTI JOB
042179,000048: # PITCH AND YAW TVCDAPS, FINDING STROKER NON-ZERO, DO A ..TC HACK..
042180,000049: # AN INTERNALLY-GENERATED WAITLIST CALL ENTERS AT ..HACKWLST..
042181,000050:
042182,000051: # NORMAL EXIT MODES....
042183,000052: # TC BUNKER (..Q.. IF ENTRY FROM DAP, ..TCTSKOVR.. IF FROM WAITLIST) LIST
042184,000053:
042185,000054: # SUBROUTINES CALLED....
042186,000055: # WAITLIST
042187,000056:
042188,000057: # ALARM OR ABORT EXIT MODES....
042189,000058: # NONE
042190,000059:
042191,000060: # ERASABLE INITIALIZATION REQUIRED....
042192,000061: # ESTROKER (PAD-LOAD)
042193,000062: # STROKER, CADDY, REVS, CARD, N
042194,000063:
042195,000064: # OUTPUT....
042196,000065: # STRKTSTI...INITIALIZATION FOR STROKE TEST
042197,000066: # HACK, HACKWLST...PULSE BURSTS INTO TVCPITCH VIA ..ADS..
042198,000067: # RESETS STROKER = +0 WHEN TEST COMPLETED
042199,000068:
042200,000069: # DEBRIS....
042201,000070: # N = CADDY = +0, CARD = -0, REVS = -1
042202,000071: # BUNKER
042203,000072:
042204,000073: # EXAMPLE STROKE TEST WAVE FORM, DEMONSTRATING PARAMETER SELECTION
042205,000074:
042206,000075: # NOTE....THIS IS NOT THE OFFICIAL WAVEFORM....
042207,000076:
042208,000077: # ** **
042209,000078: # ** **
042210,000079: # ** ** EXAMPLE WAVEFORM (EACH * REPRESENTS
042211,000080: # * * * * 85.41 ARCSEC OF ACTUATOR CMND)
042212,000081: # * * * *
042213,000082: # * * * *
042214,000083: # * * * * ** ** ** ** **
042215,000084: # * * * * ** ** ** ** **
042216,000085: # * * * * ** ** ** ** **
042217,000086: # * * * * * * * * * * * * * * ** ** ** ** **
042218,000087: # * * * * * * * * * * * * * * ** ** ** ** **
042219,000088: # * * * * * * * * * * * * * * ** ** ** ** **
042220,000089: # -----------------------------------------------------------------------------------------------------
042221,000090: # * * * * * * * * * * * * * * ** ** ** ** **
042222,000091: # * * * * * * * * * * * * * * ** ** ** ** **
042223,000092: # * * * * * * * * * * * * * * ** ** ** ** **
042224,000093: # * * * * ** ** ** ** **
042225,000094: # * * * * ** ** ** ** **
042226,000095: # * * * * ** ** ** ** **
042227,000096: # * * * *
042228,000097: # * * * *
042229,000098: # * * * *
042230,000099: # ** **
042231,000100: # ** **
042232,000101: # ** **
042233,000102:
042234,000103: # FOR THIS (UNOFFICIAL, EXAMPLE) WAVEFORM, THE REQUIRED PARAMETERS ARE AS FOLLOWS....
042235,000104:
042236,000105: # FCARD = +3 (NUMBER OF SETS)
042237,000106: # ESTROKER = +3 (PULSE BURST SIZE, SC.AT 85.41 ARCSEC/BIT)
042238,000107:
042239,000108: # SET1..
042240,000109: # FREVS = +3 (NUMBER REVERSALS MINUS 1)
042241,000110: # FCADDY = +4 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042242,000111: # SET2..
042243,000112: # FCARD1 = +9 (NUMBER REVERSALS MINUS 1)
042244,000113: # FCARD4 = +2 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042245,000114: # SET3..
042246,000115: # FCARD2 = +9 (NUMBER REVERSALS MINUS 1)
042247,000116: # FCARD5 = +1 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042248,000117: # SET4..
042249,000118: # FCARD3 = +0 (NUMBER REVERSALS MINUS 1)
042250,000119: # FCARD6 = +0 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042251,000120:
042252,000121: # STROKE TEST INITIALIZATION PACKAGE (AS A JOB, FROM VERB 68)
042253,000122:
042254,000123: 17,2610 BANK 17
042255,000124: 20,2000 SETLOC DAPS2
042256,000125: 20,2000 BANK
042257,000126:
042258,000127: 20,3537 COUNT* $$/STRK
042259,000128: 20,3537 E6,1657 EBANK= CADDY
042260,000129:
042261,000130: 20,3537 03550 STRKTSTI TCR TSTINIT # STROKE TEST INITIALIZATION PKG (CALLED
042262,000131: # AS A JOB BY VERB68)
042263,000132:
042264,000133: 20,3540 00004 STRKCHK INHINT
042265,000134:
042266,000135: 20,3541 31466 CAE DAPDATR1 # CHECK FOR CSM/LM CONFIGURATION
042267,000136: 20,3542 75016 MASK BIT14
042268,000137: 20,3543 00006 EXTEND
042269,000138: 20,3544 13547 BZF +3
042270,000139:
042271,000140: 20,3545 31413 CAE ESTROKER # BEGIN ON NEXT DAP PASS (PITCH OR YAW)
042272,000141: 20,3546 55574 TS STROKER # (STROKING DONE IN PITCH ONLY, HOWEVER)
042273,000142:
042274,000143: 20,3547 15233 TCF ENDOFJOB
042275,000144:
042276,000145: 20,3550 43560 TSTINIT CS FCADDY # NORMAL ENTRY FROM STRKTSTI
042277,000146: 20,3551 55657 TS CADDY
042278,000147: 20,3552 55660 TS N # NOTE SGN CHNG FCADDY(+) TO CADDY(-)
042279,000148:
042280,000149: 20,3553 33561 CAF FREVS
042281,000150: 20,3554 55662 TS REVS
042282,000151:
042283,000152: 20,3555 43562 CS FCARD # NOTE SGN CHNG FCARD(+) TO CARD(-)
042284,000153: 20,3556 55663 TS CARD
042285,000154:
042286,000155: 20,3557 00002 TC Q # RETURN TO STRKTSTI+1 (OR CHKSTRK+2 OR +4)
042287,000156:
042288,000157: # THE OFFICIAL STROKE TEST WAVEFORM (3 JAN, 1967) CONSISTS OF FOUR STROKE SETS, AS FOLLOWS....
042289,000158:
042290,000159: # SET 1...10 BURSTS IN 1/2 AMP, 4 REVERSALS
042291,000160: # SET 2... 6 BURSTS IN 1/2 AMP, 6 REVERSALS
042292,000161: # SET 3... 5 BURSTS IN 1/2 AMP, 10 REVERSALS
042293,000162: # SET 4... 4 BURSTS IN 1/2 AMP, 14 REVERSALS
042294,000163:
042295,000164: # THE PULSE BURST SIZE (ESTROKER) IS PAD-LOADED (5 BITS AS OF 3 JAN, 1967)
042296,000165: # THE REMAINING WAVEFORM-GENERATING PARAMETERS ARE AS FOLLOWS....
042297,000166:
042298,000167: 20,3560 00012 FCADDY DEC 10 B-14 # NO. PULSE BURSTS IN 1/2 AMP, SET1..(+10)
042299,000168: 20,3561 00003 FREVS DEC 3 B-14 # NO. REVERSALS MINUS 1, SET1........( 3)
042300,000169:
042301,000170: 20,3562 00004 FCARD DEC 4 B-14 # NO. STROKE SETS....................(+ 4)
042302,000171:
042303,000172: 20,3563 00005 FCARD1 DEC 5 B-14 # NO. REVERSALS MINUS 1, SET2........( 5)
042304,000173:
042305,000174: 20,3564 00011 FCARD2 DEC 9 B-14 # 3........( 9)
042306,000175: 20,3565 00015 FCARD3 DEC 13 B-14 # 4........( 13)
042307,000176:
042308,000177: 20,3566 00006 FCARD4 DEC 6 B-14 # NO. PULSE BURSTS IN 1/2 AMP, SET2..(+ 6)
042309,000178: 20,3567 00005 FCARD5 DEC 5 B-14 # SET3..(+ 5)
042310,000179: 20,3570 00004 FCARD6 DEC 4 B-14 # SET4..(+ 4)
042311,000180:
042312,000181: 20,3571 5032 20MS = BIT2
042313,000182:
042314,000183: # STROKE TEST PACKAGE PROPER....
042315,000184:
042316,000185: 20,3571 E6,1661 EBANK= BUNKER
042317,000186:
042318,000187: 20,3571 00006 HACK EXTEND # ENTRY (IN T5 RUPT) FROM TVCDAPS
042319,000188: 20,3572 23661 QXCH BUNKER # SAVE Q FOR DAP RETURN
042320,000189:
042321,000190: 20,3573 35032 CAF 20MS # 2DAPSX2(PASSES/DAP)X2(CS/PASS)=8CS=TVCDT
042322,000191: 20,3574 05261 TC WAITLIST
042323,000192: 20,3575 E6,1661 EBANK= BUNKER
042324,000193: 20,3575 03600 40066 2CADR HACKWLST
042325,000194:
042326,000195: 20,3577 13602 TCF +3
042327,000196:
042328,000197: 20,3600 34367 HACKWLST CAF TCTSKOVR # ENTRY FROM WAITLIST
042329,000198: 20,3601 55661 TS BUNKER # BUNKER IS TC TASKOVER
042330,000199:
042331,000200: 20,3602 31574 CA STROKER # STROKE
042332,000201: 20,3603 26054 ADS TVCPITCH
042333,000202:
042334,000203: 20,3604 35021 CAF BIT11 # RELEASE THE ERROR COUNTERS
042335,000204: 20,3605 00006 EXTEND
042336,000205: 20,3606 05014 WOR CHAN14
042337,000206: 20,3607 25657 INCR CADDY # COUNT DOWN THE NO. BURSTS, THIS SLOPE
042338,000207: 20,3610 41657 CS CADDY
042339,000208: 20,3611 00006 EXTEND
042340,000209: 20,3612 63614 BZMF +2
042341,000210: 20,3613 01661 TC BUNKER # EXIT, WHILE ON A SLOPE
042342,000211:
042343,000212: 20,3614 11662 CCS REVS
042344,000213: 20,3615 13635 TCF REVUP # POSITIVE REVS
042345,000214: 20,3616 13641 TCF REVUP +4 # FINAL REVERSAL, THIS SET
042346,000215:
042347,000216: 20,3617 25663 INCR CARD # NEGATIVE REVS SET LAST PASS, READY FOR
042348,000217: 20,3620 41663 CS CARD # THE NEXT SET. CHECK IF NO MORE SETS
042349,000218: 20,3621 00006 EXTEND
042350,000219: 20,3622 13633 BZF STROKILL # ALL SETS COMPLETED
042351,000220:
042352,000221: 20,3623 51663 INDEX CARD
042353,000222: 20,3624 33566 CAF FCARD +4 # PICK UP NO. REVERSALS (-), NEXT SET
042354,000223: 20,3625 55662 TS REVS # REINITIALIZE
042355,000224: 20,3626 51663 INDEX CARD
042356,000225: 20,3627 43571 CS FCARD +7 # PICK UP NO. BURSTS IN 1/2AMP, NEXT SET
042357,000226: 20,3630 55660 TS N # REINITIALIZE
042358,000227: 20,3631 55657 TS CADDY
042359,000228: 20,3632 01661 TC BUNKER # EXIT, AT END OF SET
042360,000229:
042361,000230: 20,3633 55574 STROKILL TS STROKER # RESET (TO +0) TO END TEST
042362,000231: 20,3634 01661 TC BUNKER # EXIT, STROKE TEST FINIS
042363,000232:
042364,000233: 20,3635 55662 REVUP TS REVS # ALL REVERSALS EXCEPT LAST OF SET
042365,000234: 20,3636 31660 CA N
042366,000235: 20,3637 60000 DOUBLE # 2 X 1/2AMP
042367,000236: 20,3640 13644 TCF +4
042368,000237:
042369,000238: 20,3641 45033 +4 CS ONE # FINAL REVERSAL, THIS SET
042370,000239: 20,3642 55662 TS REVS # PREPARE TO BRANCH TO NEW BURST
042371,000240: 20,3643 31660 CA N # JUST RETURN TO ZERO, FINAL SLOPE OF SET
042372,000241: 20,3644 55657 TS CADDY # CADUP
042373,000242:
042374,000243: 20,3645 41574 CS STROKER # CHANGE SIGN OF SLOPE
042375,000244: 20,3646 55574 TS STROKER
042376,000245: 20,3647 01661 TC BUNKER # EXIT AT A REVERSAL (SLOPE CHANGE)
042377,000246:
End of include-file TVCSTROKETEST.agc. Parent file is MAIN.agc