Source Code
These source-code files are part of a reconstructed copy of Comanche 45/2 (AKA Manche45 revision 2),
the final, flown mission release of the Apollo 10 Command Module (CM) Apollo Guidance
Computer (AGC) software. Comanche 45/2 was preceded by Comanche 44 and Comanche 45. The
reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era
listing of Comanche 45/2, some explanation of the reconstruction process is needed
to insure confidence in that accuracy.
The starting point was the source code of Comanche 45 (itself previously accurately reconstructed). Comanche 45 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 45 and 45/2. The now-reconstructed Comanche 45/2 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code tend to match those in the Comanche 55, the most-similar revision of Comanche for which we have access to an actual non-reconstructed hardcopy; the source code would likely have different page numbers in a contemporary Comanche 45 listing. Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 44. Here's a guide to the Apollo documentation referenced in those annotations:
|
042701,000002: ## Copyright: Public domain.
042702,000003: ## Filename: TVCSTROKETEST.agc
042703,000004: ## Purpose: A section of Manche45 revision 2.
042704,000005: ## It is part of the reconstructed source code for the
042705,000006: ## final, flown release of the flight software for the Command
042706,000007: ## Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
042707,000008: ## The code has been recreated from a copy of Comanche 055. It
042708,000009: ## has been adapted such that the resulting bugger words
042709,000010: ## exactly match those specified for Manche 45/2 in NASA drawing
042710,000011: ## 2021153D, which gives relatively high confidence that the
042711,000012: ## reconstruction is correct.
042712,000013: ## Assembler: yaYUL
042713,000014: ## Contact: Ron Burkey <info@sandroid.org>.
042714,000015: ## Website: www.ibiblio.org/apollo/index.html
042715,000016: ## Mod history: 2020-12-24 MAS Created from Comanche 45.
042716,000017:
Page 979 |
042718,000019: # NAME STROKE TEST PACKAGE (INCLUDING INITIALIZATION PACKAGE)
042719,000020: # LOG SECTION...TVCSTROKETEST SUBROUTINE...DAPCSM
042720,000021: # MODIFIED BY SCHLUNDT 21 OCTOBER 1968
042721,000022:
042722,000023: # FUNCTIONAL DESCRIPTION....
042723,000024: # STROKE TEST PACKAGE GENERATES A WAVEFORM DESIGNED TO EXCITE BENDING
042724,000025: # STRKTSTI (STROKE TEST INITIALIZATION) IS CALLED AS A JOB BY VB68.
042725,000026: # IT INITIALIZES ALL ERASABLES REQD FOR A STROKE TEST, AND
042726,000027: # THEN TESTS FOR CSM/LM (BIT 13 OF DAPDATR1). IF CSM/LM,
042727,000028: # IN EITHER HIGH OR LOW-BANDWIDTH MODE, THE TEST IS STARTED
042728,000029: # IMMEDIATELY. IF NOT CSM/LM, PROGRAM EXITS WITH NO ACTION.
042729,000030: # HACK (STROKE TEST) GENERATES THE WAVEFORM BY DUMPING PULSE BURSTS
042730,000031: # OF PROPER SIGN AND IN PROPER SEQUENCE DIRECTLY INTO
042731,000032: # TVCPITCH, WORKING IN CONJUNCITON WITH BOTH PITCH AND YAW
042732,000033: # TVC DAPS, WITH INTERMEDIATE WAITLIST CALLS. NOTE, HOWEVER
042733,000034: # THAT THE STROKE TEST IS PERFORMED ONLY IN THE PITCH AXIS.
042734,000035: # AN EXAMPLE WAVEFORM IS GIVEN BELOW, TO DEMONSTRATE STROKE-
042735,000036: # TEST PARAMETER SELECTION
042736,000037: # RESTARTS CAUSE TEST TO BE TERMINATED. ANOTHER V68 REQD IF TEST
042737,000038: # IS TO BE RE-RUN.
042738,000039: # PULSE BURST SIZE IS PAD-LOADED (ESTROKER) SO THAT AMPLITUDE OF
042739,000040: # WAVEFORM CAN BE CHANGED. THERE ARE TEN PULSE BURSTS IN
042740,000041: # THE HALF-AMPLITUDE OF THE FIRST FREQUENCY SET IN THE
042741,000042: # STANDARD WAVEFORM. AMPLITUDE IS 10(ESTROKER)(1/42.15),
042742,000043: # NOMINALLY 50/42.15 = 1.185 DEG
042743,000044:
042744,000045: # CALLING SEQUENCE....
042745,000046: # EXTENDED VERB 68 SETS UP STRKTSTI JOB
042746,000047: # PITCH AND YAW TVCDAPS, FINDING STROKER NON-ZERO, DO A ..TC HACK..
042747,000048: # AN INTERNALLY-GENERATED WAITLIST CALL ENTERS AT ..HACKWLST..
042748,000049:
042749,000050: # NORMAL EXIT MODES....
042750,000051: # TC BUNKER (..Q.. IF ENTRY FROM DAP, ..TCTSKOVR.. IF FROM WAITLIST) LIST
042751,000052:
042752,000053: # SUBROUTINES CALLED....
042753,000054: # WAITLIST
042754,000055:
042755,000056: # ALARM OR ABORT EXIT MODES....
042756,000057: # NONE
042757,000058:
042758,000059: # ERASABLE INITIALIZATION REQUIRED....
042759,000060: # ESTROKER (PAD-LOAD)
042760,000061: # STROKER, CADDY, REVS, CARD, N
042761,000062:
042762,000063: # OUTPUT....
042763,000064: # STRKTSTI...INITIALIZATION FOR STROKE TEST
042764,000065: # HACK, HACKWLST...PULSE BURSTS INTO TVCPITCH VIA ..ADS..
042765,000066: # RESETS STROKER = +0 WHEN TEST COMPLETED
042766,000067:
042767,000068: # DEBRIS....
042768,000069: # N = CADDY = +0, CARD = -0, REVS = -1
042769,000070: # BUNKER
Page 980 |
042771,000072:
042772,000073: # EXAMPLE STROKE TEST WAVE FORM, DEMONSTRATING PARAMETER SELECTION
042773,000074:
042774,000075: # NOTE....THIS IS NOT THE OFFICIAL WAVEFORM....
042775,000076:
042776,000077: # ** **
042777,000078: # ** **
042778,000079: # ** ** EXAMPLE WAVEFORM (EACH * REPRESENTS
042779,000080: # * * * * 85.41 ARCSEC OF ACTUATOR CMND)
042780,000081: # * * * *
042781,000082: # * * * *
042782,000083: # * * * * ** ** ** ** **
042783,000084: # * * * * ** ** ** ** **
042784,000085: # * * * * ** ** ** ** **
042785,000086: # * * * * * * * * * * * * * * ** ** ** ** **
042786,000087: # * * * * * * * * * * * * * * ** ** ** ** **
042787,000088: # * * * * * * * * * * * * * * ** ** ** ** **
042788,000089: # -----------------------------------------------------------------------------------------------------
042789,000090: # * * * * * * * * * * * * * * ** ** ** ** **
042790,000091: # * * * * * * * * * * * * * * ** ** ** ** **
042791,000092: # * * * * * * * * * * * * * * ** ** ** ** **
042792,000093: # * * * * ** ** ** ** **
042793,000094: # * * * * ** ** ** ** **
042794,000095: # * * * * ** ** ** ** **
042795,000096: # * * * *
042796,000097: # * * * *
042797,000098: # * * * *
042798,000099: # ** **
042799,000100: # ** **
042800,000101: # ** **
042801,000102:
042802,000103: # FOR THIS (UNOFFICIAL, EXAMPLE) WAVEFORM, THE REQUIRED PARAMETERS ARE AS FOLLOWS....
042803,000104:
042804,000105: # FCARD = +3 (NUMBER OF SETS)
042805,000106: # ESTROKER = +3 (PULSE BURST SIZE, SC.AT 85.41 ARCSEC/BIT)
042806,000107:
042807,000108: # SET1..
042808,000109: # FREVS = +3 (NUMBER REVERSALS MINUS 1)
042809,000110: # FCADDY = +4 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042810,000111: # SET2..
042811,000112: # FCARD1 = +9 (NUMBER REVERSALS MINUS 1)
042812,000113: # FCARD4 = +2 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042813,000114: # SET3..
042814,000115: # FCARD2 = +9 (NUMBER REVERSALS MINUS 1)
042815,000116: # FCARD5 = +1 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042816,000117: # SET4..
042817,000118: # FCARD3 = +0 (NUMBER REVERSALS MINUS 1)
042818,000119: # FCARD6 = +0 (NUMBER OF PULSE BURSTS IN 1/2 AMPLITUDE)
042819,000120:
Page 981 |
042821,000122: # STROKE TEST INITIALIZATION PACKAGE (AS A JOB, FROM VERB 68)
042822,000123:
042823,000124: 17,2552 BANK 17
042824,000125: 20,2000 SETLOC DAPS2
042825,000126: 20,2000 BANK
042826,000127:
042827,000128: 20,3501 COUNT* $$/STRK
042828,000129: 20,3501 E6,1655 EBANK= CADDY
042829,000130:
042830,000131: 20,3501 03512 STRKTSTI TCR TSTINIT # STROKE TEST INITIALIZATION PKG (CALLED
042831,000132: # AS A JOB BY VERB68)
042832,000133:
042833,000134: 20,3502 00004 STRKCHK INHINT
042834,000135:
042835,000136: 20,3503 31466 CAE DAPDATR1 # CHECK FOR CSM/LM CONFIGURATION
042836,000137: 20,3504 75002 MASK BIT14
042837,000138: 20,3505 00006 EXTEND
042838,000139: 20,3506 13511 BZF +3
042839,000140:
042840,000141: 20,3507 31413 CAE ESTROKER # BEGIN ON NEXT DAP PASS (PITCH OR YAW)
042841,000142: 20,3510 55574 TS STROKER # (STROKING DONE IN PITCH ONLY, HOWEVER)
042842,000143:
042843,000144: 20,3511 15217 TCF ENDOFJOB
042844,000145:
042845,000146: 20,3512 43522 TSTINIT CS FCADDY # NORMAL ENTRY FROM STRKTSTI
042846,000147: 20,3513 55655 TS CADDY
042847,000148: 20,3514 55656 TS N # NOTE SGN CHNG FCADDY(+) TO CADDY(-)
042848,000149:
042849,000150: 20,3515 33523 CAF FREVS
042850,000151: 20,3516 55660 TS REVS
042851,000152:
042852,000153: 20,3517 43524 CS FCARD # NOTE SGN CHNG FCARD(+) TO CARD(-)
042853,000154: 20,3520 55661 TS CARD
042854,000155:
042855,000156: 20,3521 00002 TC Q # RETURN TO STRKTSTI+1 (OR CHKSTRK+2 OR +4)
042856,000157:
Page 982 |
042858,000159: # THE OFFICIAL STROKE TEST WAVEFORM (3 JAN, 1967) CONSISTS OF FOUR STROKE SETS, AS FOLLOWS....
042859,000160:
042860,000161: # SET 1...10 BURSTS IN 1/2 AMP, 4 REVERSALS
042861,000162: # SET 2... 6 BURSTS IN 1/2 AMP, 6 REVERSALS
042862,000163: # SET 3... 5 BURSTS IN 1/2 AMP, 10 REVERSALS
042863,000164: # SET 4... 4 BURSTS IN 1/2 AMP, 14 REVERSALS
042864,000165:
042865,000166: # THE PULSE BURST SIZE (ESTROKER) IS PAD-LOADED (5 BITS AS OF 3 JAN, 1967)
042866,000167: # THE REMAINING WAVEFORM-GENERATING PARAMETERS ARE AS FOLLOWS....
042867,000168:
042868,000169: 20,3522 00012 FCADDY DEC 10 B-14 # NO. PULSE BURSTS IN 1/2 AMP, SET1..(+10)
042869,000170: 20,3523 00003 FREVS DEC 3 B-14 # NO. REVERSALS MINUS 1, SET1........( 3)
042870,000171:
042871,000172: 20,3524 00004 FCARD DEC 4 B-14 # NO. STROKE SETS....................(+ 4)
042872,000173:
042873,000174: 20,3525 00005 FCARD1 DEC 5 B-14 # NO. REVERSALS MINUS 1, SET2........( 5)
042874,000175:
042875,000176: 20,3526 00011 FCARD2 DEC 9 B-14 # 3........( 9)
042876,000177: 20,3527 00015 FCARD3 DEC 13 B-14 # 4........( 13)
042877,000178:
042878,000179: 20,3530 00006 FCARD4 DEC 6 B-14 # NO. PULSE BURSTS IN 1/2 AMP, SET2..(+ 6)
042879,000180: 20,3531 00005 FCARD5 DEC 5 B-14 # SET3..(+ 5)
042880,000181: 20,3532 00004 FCARD6 DEC 4 B-14 # SET4..(+ 4)
042881,000182:
042882,000183: 20,3533 5016 20MS = BIT2
042883,000184:
042884,000185: # STROKE TEST PACKAGE PROPER....
042885,000186:
042886,000187: 20,3533 E6,1657 EBANK= BUNKER
042887,000188:
042888,000189: 20,3533 00006 HACK EXTEND # ENTRY (IN T5 RUPT) FROM TVCDAPS
042889,000190: 20,3534 23657 QXCH BUNKER # SAVE Q FOR DAP RETURN
042890,000191:
042891,000192: 20,3535 35016 CAF 20MS # 2DAPSX2(PASSES/DAP)X2(CS/PASS)=8CS=TVCDT
042892,000193: 20,3536 05245 TC WAITLIST
042893,000194: 20,3537 E6,1657 EBANK= BUNKER
042894,000195: 20,3537 03542 40066 2CADR HACKWLST
042895,000196:
042896,000197: 20,3541 13544 TCF +3
042897,000198:
042898,000199: 20,3542 34367 HACKWLST CAF TCTSKOVR # ENTRY FROM WAITLIST
042899,000200: 20,3543 55657 TS BUNKER # BUNKER IS TC TASKOVER
042900,000201:
042901,000202: 20,3544 31574 CA STROKER # STROKE
042902,000203: 20,3545 26054 ADS TVCPITCH
042903,000204:
042904,000205: 20,3546 35005 CAF BIT11 # RELEASE THE ERROR COUNTERS
042905,000206: 20,3547 00006 EXTEND
042906,000207: 20,3550 05014 WOR CHAN14
042907,000208: 20,3551 25655 INCR CADDY # COUNT DOWN THE NO. BURSTS, THIS SLOPE
Page 983 |
042909,000210: 20,3552 41655 CS CADDY
042910,000211: 20,3553 00006 EXTEND
042911,000212: 20,3554 63556 BZMF +2
042912,000213: 20,3555 01657 TC BUNKER # EXIT, WHILE ON A SLOPE
042913,000214:
042914,000215: 20,3556 11660 CCS REVS
042915,000216: 20,3557 13577 TCF REVUP # POSITIVE REVS
042916,000217: 20,3560 13603 TCF REVUP +4 # FINAL REVERSAL, THIS SET
042917,000218:
042918,000219: 20,3561 25661 INCR CARD # NEGATIVE REVS SET LAST PASS, READY FOR
042919,000220: 20,3562 41661 CS CARD # THE NEXT SET. CHECK IF NO MORE SETS
042920,000221: 20,3563 00006 EXTEND
042921,000222: 20,3564 13575 BZF STROKILL # ALL SETS COMPLETED
042922,000223:
042923,000224: 20,3565 51661 INDEX CARD
042924,000225: 20,3566 33530 CAF FCARD +4 # PICK UP NO. REVERSALS (-), NEXT SET
042925,000226: 20,3567 55660 TS REVS # REINITIALIZE
042926,000227: 20,3570 51661 INDEX CARD
042927,000228: 20,3571 43533 CS FCARD +7 # PICK UP NO. BURSTS IN 1/2AMP, NEXT SET
042928,000229: 20,3572 55656 TS N # REINITIALIZE
042929,000230: 20,3573 55655 TS CADDY
042930,000231: 20,3574 01657 TC BUNKER # EXIT, AT END OF SET
042931,000232:
042932,000233: 20,3575 55574 STROKILL TS STROKER # RESET (TO +0) TO END TEST
042933,000234: 20,3576 01657 TC BUNKER # EXIT, STROKE TEST FINIS
042934,000235:
042935,000236: 20,3577 55660 REVUP TS REVS # ALL REVERSALS EXCEPT LAST OF SET
042936,000237: 20,3600 31656 CA N
042937,000238: 20,3601 60000 DOUBLE # 2 X 1/2AMP
042938,000239: 20,3602 13606 TCF +4
042939,000240:
042940,000241: 20,3603 45017 +4 CS ONE # FINAL REVERSAL, THIS SET
042941,000242: 20,3604 55660 TS REVS # PREPARE TO BRANCH TO NEW BURST
042942,000243: 20,3605 31656 CA N # JUST RETURN TO ZERO, FINAL SLOPE OF SET
042943,000244: 20,3606 55655 TS CADDY # CADUP
042944,000245:
042945,000246: 20,3607 41574 CS STROKER # CHANGE SIGN OF SLOPE
042946,000247: 20,3610 55574 TS STROKER
042947,000248: 20,3611 01657 TC BUNKER # EXIT AT A REVERSAL (SLOPE CHANGE)
042948,000249:
End of include-file TVCSTROKETEST.agc. Parent file is MAIN.agc