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. |
044132,000002: ## Copyright: Public domain.
044133,000003: ## Filename: MYSUBS.agc
044134,000004: ## Purpose: A section of Comanche revision 044.
044135,000005: ## It is part of the reconstructed source code for the
044136,000006: ## original release of the flight software for the Command
044137,000007: ## Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
044138,000008: ## The code has been recreated from a copy of Comanche 055. It
044139,000009: ## has been adapted such that the resulting bugger words
044140,000010: ## exactly match those specified for Comanche 44 in NASA drawing
044141,000011: ## 2021153D, which gives relatively high confidence that the
044142,000012: ## reconstruction is correct.
044143,000013: ## Assembler: yaYUL
044144,000014: ## Contact: Ron Burkey <info@sandroid.org>.
044145,000015: ## Website: www.ibiblio.org/apollo/index.html
044146,000016: ## Mod history: 2020-12-03 MAS Created from Comanche 51.
044147,000017:
Page 999 |
044149,000019: 20,3612 BANK 20
044150,000020: 21,2000 SETLOC MYSUBS
044151,000021: 21,2000 BANK
044152,000022:
044153,000023: 21,2042 E6,1510 EBANK= KMPAC
044154,000024: 21,2042 5074 SPCOS1 EQUALS SPCOS
044155,000025: 21,2042 5075 SPSIN1 EQUALS SPSIN
044156,000026: 21,2042 5074 SPCOS2 EQUALS SPCOS
044157,000027: 21,2042 5075 SPSIN2 EQUALS SPSIN
044158,000028:
044159,000029: 21,2042 COUNT 21/DAPMS
044160,000030:
044161,000031: # ONE AND ONE HALF PRECISION MULTIPLICATION ROUTINE
044162,000032:
044163,000033: 21,2042 55512 SMALLMP TS KMPTEMP # A(X+Y)
044164,000034: 21,2043 00006 EXTEND
044165,000035: 21,2044 71511 MP KMPAC +1
044166,000036: 21,2045 55511 TS KMPAC +1 # AY
044167,000037: 21,2046 35021 CAF ZERO
044168,000038: 21,2047 57510 XCH KMPAC
044169,000039: 21,2050 00006 EXTEND
044170,000040: 21,2051 71512 MP KMPTEMP # AX
044171,000041: 21,2052 21511 DAS KMPAC # AX+AY
044172,000042: 21,2053 00002 TC Q
044173,000043:
044174,000044: # SUBROUTINE FOR DOUBLE PRECISION ADDITIONS OF ANGLES
044175,000045: # A AND L CONTAIN A DP(1S) ANGLE SCALED BY 180 DEGS TO BE ADDED TO KMPAC.
044176,000046: # RESULT IS PLACED IN KMPAC. TIMING = 6 MCT (22 MCT ON OVERFLOW)
044177,000047:
044178,000048: 21,2054 21511 DPADD DAS KMPAC
044179,000049: 21,2055 00006 EXTEND
044180,000050: 21,2056 12073 BZF TSK +1 # NO OVERFLOW
044181,000051: 21,2057 11510 CCS KMPAC
044182,000052: 21,2060 12074 TCF DPADD+ # + OVERFLOW
044183,000053: 21,2061 12063 TCF +2
044184,000054: 21,2062 12076 TCF DPADD- # - OVERFLOW
044185,000055: 21,2063 11511 CCS KMPAC +1
044186,000056: 21,2064 12101 TCF DPADD2+ # UPPER = 0, LOWER +
044187,000057: 21,2065 12067 TCF +2
044188,000058: 21,2066 40000 COM # UPPER = 0, LOWER -
044189,000059: 21,2067 64777 AD POSMAX # LOWER = 0, A = 0
044190,000060: 21,2070 55511 TS KMPAC +1 # CAN NOT OVERFLOW
044191,000061: 21,2071 34777 CA POSMAX # UPPER WAS = 0
044192,000062: 21,2072 55510 TSK TS KMPAC
044193,000063: 21,2073 00002 TC Q
044194,000064:
044195,000065: 21,2074 65001 DPADD+ AD NEGMAX # KMPAC GREATER THAN 0
044196,000066: 21,2075 12072 TCF TSK
044197,000067:
Page 1000 |
044199,000069: 21,2076 40000 DPADD- COM
044200,000070: 21,2077 64777 AD POSMAX # KMPAC LESS THAN 0
044201,000071: 21,2100 12072 TCF TSK
044202,000072:
044203,000073: 21,2101 65001 DPADD2+ AD NEGMAX # CAN NOT OVERFLOW
044204,000074: 21,2102 55511 TS KMPAC +1
044205,000075: 21,2103 35001 CA NEGMAX # UPPER WAS = 0
044206,000076: 21,2104 12072 TCF TSK
044207,000077:
Page 1001 This page is empty. |
044210,000080:
044211,000081:
End of include-file MYSUBS.agc. Parent file is MAIN.agc