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:
|
061410,000002: ## Copyright: Public domain.
061411,000003: ## Filename: KEYRUPT,_UPRUPT.agc
061412,000004: ## Purpose: A section of Manche45 revision 2.
061413,000005: ## It is part of the reconstructed source code for the
061414,000006: ## final, flown release of the flight software for the Command
061415,000007: ## Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
061416,000008: ## The code has been recreated from a copy of Comanche 055. It
061417,000009: ## has been adapted such that the resulting bugger words
061418,000010: ## exactly match those specified for Manche 45/2 in NASA drawing
061419,000011: ## 2021153D, which gives relatively high confidence that the
061420,000012: ## reconstruction is correct.
061421,000013: ## Assembler: yaYUL
061422,000014: ## Contact: Ron Burkey <info@sandroid.org>.
061423,000015: ## Website: www.ibiblio.org/apollo/index.html
061424,000016: ## Mod history: 2020-12-24 MAS Created from Comanche 45.
061425,000017:
Page 1449 |
061427,000019: 14,3762 BANK 14
061428,000020: 07,2000 SETLOC KEYRUPT
061429,000021: 07,2000 BANK
061430,000022: 07,3673 COUNT* $$/KEYUP
061431,000023:
061432,000024: 07,3673 54016 KEYRUPT1 TS BANKRUPT
061433,000025: 07,3674 56002 XCH Q
061434,000026: 07,3675 54012 TS QRUPT
061435,000027: 07,3676 04414 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
061436,000028: 07,3677 34362 CAF LOW5
061437,000029: 07,3700 00006 EXTEND
061438,000030: 07,3701 02015 RAND MNKEYIN # CHECK IF KEYS 5M-1M ON
061439,000031: 07,3702 54073 KEYCOM TS RUPTREG4
061440,000032: 07,3703 40101 CS FLAGWRD5
061441,000033: 07,3704 75001 MASK BIT15
061442,000034: 07,3705 26101 ADS FLAGWRD5
061443,000035:
061444,000036: 07,3706 34371 ACCEPTUP CAF CHRPRIO # (NOTE: RUPTREG4 = KEYTEMP1)
061445,000037: 07,3707 05134 TC NOVAC
061446,000038: 07,3710 0777 EBANK= DSPCOUNT
061447,000039: 07,3710 02000 60101 2CADR CHARIN
061448,000040:
061449,000041: 07,3712 30073 CA RUPTREG4
061450,000042: 07,3713 50064 INDEX LOCCTR
061451,000043: 07,3714 54154 TS MPAC # LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
061452,000044: 07,3715 05333 TC RESUME
061453,000045:
Page 1450 |
061455,000047: # UPRUPT PROGRAM
061456,000048:
061457,000049: 07,3716 54016 UPRUPT TS BANKRUPT
061458,000050: 07,3717 56002 XCH Q
061459,000051: 07,3720 54012 TS QRUPT
061460,000052: 07,3721 04414 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
061461,000053: 07,3722 35021 CAF ZERO
061462,000054: 07,3723 56045 XCH INLINK
061463,000055: 07,3724 54073 TS KEYTEMP1
061464,000056: 07,3725 35015 CAF BIT3 # TURN ON UPACT LIGHT
061465,000057: 07,3726 00006 EXTEND # (BIT 3 OF CHANNEL 11)
061466,000058: 07,3727 05011 WOR DSALMOUT
061467,000059: 07,3730 34362 UPRPT1 CAF LOW5 # TEST FOR TRIPLE CHAR REDUNDANCY
061468,000060: 07,3731 70073 MASK KEYTEMP1 # LOW5 OF WORD
061469,000061: 07,3732 56073 XCH KEYTEMP1 # LOW5 INTO KEYTEMP1
061470,000062: 07,3733 00006 EXTEND
061471,000063: 07,3734 75006 MP BIT10 # SHIFT RIGHT 5
061472,000064: 07,3735 54734 TS KEYTEMP2
061473,000065: 07,3736 74362 MASK LOW5 # MID 5
061474,000066: 07,3737 63773 AD HI10
061475,000067: 07,3740 03770 TC UPTEST
061476,000068: 07,3741 35006 CAF BIT10
061477,000069: 07,3742 00006 EXTEND
061478,000070: 07,3743 70734 MP KEYTEMP2 # SHIFT RIGHT 5
061479,000071: 07,3744 74362 MASK LOW5 # HIGH 5
061480,000072: 07,3745 40000 COM
061481,000073: 07,3746 03770 TC UPTEST
061482,000074:
061483,000075: 07,3747 43776 UPOK CS ELRCODE # CODE IS GOOD. IF CODE = 'ERROR RESET',
061484,000076: 07,3750 60073 AD KEYTEMP1 # CLEAR UPLOCKFL (SET BIT4 OF FLAGWRD7 = 0)
061485,000077: 07,3751 00006 EXTEND # IF CODE DOES NOT = 'ERROR RESET', ACCEPT
061486,000078: 07,3752 13760 BZF CLUPLOCK # CODE ONLY IF UPLOCKFL IS CLEAR (=0).
061487,000079:
061488,000080: 07,3753 35014 CAF BIT4 # TEST UPLOCKFL FOR 0 OR 1.
061489,000081: 07,3754 70103 MASK FLAGWRD7
061490,000082: 07,3755 10000 CCS A
061491,000083: 07,3756 05333 TC RESUME # UPLOCKFL = 1
061492,000084: 07,3757 03706 TC ACCEPTUP # UPLOCKFL = 0
061493,000085:
061494,000086: 07,3760 45014 CLUPLOCK CS BIT4 # CLEAR UPLOCKFL (I.E., SET BIT 4 OF
061495,000087: 07,3761 70103 MASK FLAGWRD7 # FLAGWRD7 = 0)
061496,000088: 07,3762 54103 TS FLAGWRD7
061497,000089: 07,3763 03706 TC ACCEPTUP
061498,000090:
061499,000091: # CODE IS BAD
061500,000092: 07,3764 40103 TMFAIL2 CS FLAGWRD7 # LOCK OUT FURTHER UPLINK ACTIVITY
061501,000093: 07,3765 75014 MASK BIT4 # (BY SETTING UPLOCKFL = 1) UNTIL
061502,000094: 07,3766 26103 ADS FLAGWRD7 # 'ERROR RESET' IS SENT VIA UPLINK.
061503,000095: 07,3767 05333 TC RESUME
061504,000096: 07,3770 60073 UPTEST AD KEYTEMP1
Page 1451 |
061506,000098: 07,3771 10000 CCS A
061507,000099: 07,3772 03764 TC TMFAIL2
061508,000100: 07,3773 77740 HI10 OCT 77740
061509,000101: 07,3774 03764 TC TMFAIL2
061510,000102: 07,3775 00002 TC Q
061511,000103:
061512,000104: 07,3776 00022 ELRCODE OCT 22
061513,000105:
061514,000106: # 'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
061515,000107: # 1. VBRELDSP
061516,000108: # 2. ERROR RESET
061517,000109: # 3. UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
061518,000110:
061519,000111: # -
061520,000112: # THE RECEPTION OF A BAD CODE (I.E CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
061521,000113: # THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
061522,000114: # WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
061523,000115: # (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
061524,000116: # BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
061525,000117: # FAILURE)
061526,000118:
061527,000119: # UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
061528,000120:
061529,000121:
End of include-file KEYRUPT,_UPRUPT.agc. Parent file is MAIN.agc