Source Code
These source-code files are part of a reconstructed copy of Comanche 44, the
initial release (though not the final mission release) of the Apollo 10
Command Module (CM) Apollo Guidance Computer (AGC) software. Subsequent releases
were Comanche 45 and Comanche 45/2 (the flown release on Apollo 10). The reconstruction
is believed to be exactly accurate, but in the absence of an actual Apollo-era
listing of Comanche 44, some explanation of the reconstruction process is needed
to insure confidence in that accuracy.
The starting point was the source code of Comanche 51 (separately previously reconstructed from an Apollo-era listing of Comanche 55, flown on Apollo 11). Comanche 51 source code was then modified by undoing changes known to have been made between revisions 44 and 51. The now-reconstructed Comanche 44 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 match those on the Comanche 55 printout, although the source code would likely have different page numbers in a contemporary Comanche 44 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 51. Here's a guide to the Apollo documentation referenced in those annotations:
Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository. |
045695,000002: ## Copyright: Public domain.
045696,000003: ## Filename: RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc
045697,000004: ## Purpose: A section of Comanche revision 044.
045698,000005: ## It is part of the reconstructed source code for the
045699,000006: ## original release of the flight software for the Command
045700,000007: ## Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
045701,000008: ## The code has been recreated from a copy of Comanche 055. It
045702,000009: ## has been adapted such that the resulting bugger words
045703,000010: ## exactly match those specified for Comanche 44 in NASA drawing
045704,000011: ## 2021153D, which gives relatively high confidence that the
045705,000012: ## reconstruction is correct.
045706,000013: ## Assembler: yaYUL
045707,000014: ## Contact: Ron Burkey <info@sandroid.org>.
045708,000015: ## Website: www.ibiblio.org/apollo/index.html
045709,000016: ## Mod history: 2020-12-03 MAS Created from Comanche 51.
045710,000017:
Page 1037 |
045712,000019: # CALCULATION OF AMGB, AMBG ONCE EVERY SECOND
045713,000020:
045714,000021: # AMGB = 1 SIN(PSI) 0
045715,000022: # 0 COS(PSI)COS(PHI) SIN(PHI)
045716,000023: # 0 -COS(PSI)SIN(PHI) COS(PHI)
045717,000024:
045718,000025: # AMBG = 1 -TAN(PSI)COS(PHI) TAN(PSI)SIN(PHI)
045719,000026: # 0 COS(PHI)/COS(PSI) -SIN(PHI)/COS(PSI)
045720,000027: # 0 SIN(PHI) COS(PHI)
045721,000028:
045722,000029: # WHERE PHI AND PSI ARE CDU ANGLES
045723,000030:
045724,000031: 20,3612 BANK 20
045725,000032: 22,2000 SETLOC DAPS8
045726,000033: 22,2000 BANK
045727,000034:
045728,000035: 22,3447 COUNT* $$/DAPEX
045729,000036: 22,3447 E6,1510 EBANK= KMPAC
045730,000037: 22,3447 30102 AMBGUPDT CA FLAGWRD6 # CHECK FOR RCS AUTOPILOT
045731,000038: 22,3450 00006 EXTEND
045732,000039: 22,3451 65217 BZMF ENDOFJOB # BIT15 = 0, BIT14 = 1
045733,000040: 22,3452 75002 MASK BIT14 # IF NOT RCS, EXIT
045734,000041: 22,3453 00006 EXTEND
045735,000042: 22,3454 15217 BZF ENDOFJOB # TO PROTECT TVC DAP ON SWITCHOVER
045736,000043:
045737,000044: 22,3455 30034 CA CDUZ
045738,000045: 22,3456 05075 TC SPSIN2
045739,000046: 22,3457 55640 TS AMGB1 # CALCULATE AMGB
045740,000047: 22,3460 30034 CA CDUZ
045741,000048: 22,3461 05074 TC SPCOS2
045742,000049: 22,3462 55645 TS CAPSI # MUST CHECK FOR GIMBAL LOCK
045743,000050: 22,3463 33507 CAF QUADANGL # = 7.25 DEGREES JET QUAD ANGULAR OFFSET
045744,000051: 22,3464 00006 EXTEND
045745,000052: 22,3465 20032 MSU CDUX
045746,000053: 22,3466 40000 COM # CDUX - 7.25 DEG
045747,000054: 22,3467 05074 TC SPCOS1
045748,000055: 22,3470 55644 TS AMGB8
045749,000056: 22,3471 00006 EXTEND
045750,000057: 22,3472 71645 MP CAPSI
045751,000058: 22,3473 55641 TS AMGB4
045752,000059: 22,3474 33507 CAF QUADANGL
045753,000060: 22,3475 00006 EXTEND
045754,000061: 22,3476 20032 MSU CDUX
045755,000062: 22,3477 40000 COM # CDUX - 7.25 DEG
045756,000063: 22,3500 05075 TC SPSIN1
045757,000064: 22,3501 55642 TS AMGB5
045758,000065: 22,3502 00006 EXTEND
045759,000066: 22,3503 71645 MP CAPSI
045760,000067: 22,3504 40000 COM
Page 1038 |
045762,000069: 22,3505 55643 TS AMGB7
045763,000070: 22,3506 15217 TCF ENDOFJOB
045764,000071: 22,3507 01224 QUADANGL DEC 660 B-14 # = 7.25 DEGREES
045765,000072:
End of include-file RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc. Parent file is MAIN.agc