Source Code
![]() |
This is the source-code for the Apollo 9 Command Module's Guidance Computer.
These files were derived originally from the scan from MIT's Dibner Institute's
now-discontinued website titled "History of Recent Science and Technology", which
in turn was originally created by Gary Neff, though his high-quality scans were
unfortunately reduced in legibility when presented online.
The markings on the front of the
printout imply that it was the original AGC developer Norm Brodeur's copy.
A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original
AGC developer Fred Martin. The source code was transcribed from
those images by Ron Burkey. Note that the page images
presented online are of reduced quality, and that higher-quality images
are available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041 20'35 OCT. 28,1968Note that the date is the date of the printout, not the date of the program revision. |
061952,000002: ## Copyright: Public domain.
061953,000003: ## Filename: KEYRUPT_UPRUPT.agc
061954,000004: ## Purpose: Part of the source code for Colossus, build 249.
061955,000005: ## It is part of the source code for the Command Module's (CM)
061956,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
061957,000007: ## Assembler: yaYUL
061958,000008: ## Reference: Starts on p. 1417
061959,000009: ## Contact: Ron Burkey <info@sandroid.org>.
061960,000010: ## Website: www.ibiblio.org/apollo.
061961,000011: ## Mod history: 08/30/04 RSB. Adapted from corresponding Luminary131 file.
061962,000012: ## 2017-01-06 RSB Page numbers now agree with those on the
061963,000013: ## original harcopy, as opposed to the PDF page
061964,000014: ## numbers in 1701.pdf.
061965,000015: ## 2017-01-15 RSB Cross-diff'd comment text (not whitespace)
061966,000016: ## vs the already-proofed corresponding Colossus
061967,000017: ## 237 and Comanche 55 source-code files
061968,000018: ## and corrected errors found. There were no
061969,000019: ## differences between the comment text in the
061970,000020: ## different versions after these corrections.
061971,000021: ## 2017-03-13 RSB Comment-text fixes noted in proofing Luminary 116.
061972,000022: ##
061973,000023: ## The contents of the "Colossus249" files, in general, are transcribed
061974,000024: ## from a scanned copy of the program listing. Notations on this
061975,000025: ## document read, in part:
061976,000026: ##
061977,000027: ## Assemble revision 249 of AGC program Colossus by NASA
061978,000028: ## 2021111-041. October 28, 1968.
061979,000029: ##
061980,000030: ## This AGC program shall also be referred to as
061981,000031: ## Colossus 1A
061982,000032: ##
061983,000033: ## Prepared by
061984,000034: ## Massachusetts Institute of Technology
061985,000035: ## 75 Cambridge Parkway
061986,000036: ## Cambridge, Massachusetts
061987,000037: ## under NASA contract NAS 9-4065.
061988,000038: ##
061989,000039: ## Refer directly to the online document mentioned above for further information.
061990,000040: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
061991,000041: ##
061992,000042: ## In some cases, where the source code for Luminary 131 overlaps that of
061993,000043: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
061994,000044: ## source file, and then is proofed to incorporate any changes.
061995,000045:
![]() |
Page 1417 |
061997,000047: 14,3744 BANK 14
061998,000048: 07,2000 SETLOC KEYRUPT
061999,000049: 07,2000 BANK
062000,000050: 07,3613 COUNT* $$/KEYUP
062001,000051:
062002,000052: 07,3613 54016 KEYRUPT1 TS BANKRUPT
062003,000053: 07,3614 56002 XCH Q
062004,000054: 07,3615 54012 TS QRUPT
062005,000055: 07,3616 04414 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
062006,000056: 07,3617 34362 CAF LOW5
062007,000057: 07,3620 00006 EXTEND
062008,000058: 07,3621 02015 RAND MNKEYIN # CHECK IF KEYS 5M-1M ON
062009,000059: 07,3622 54073 KEYCOM TS RUPTREG4
062010,000060: 07,3623 40101 CS FLAGWRD5
062011,000061: 07,3624 74674 MASK BIT15
062012,000062: 07,3625 26101 ADS FLAGWRD5
062013,000063:
062014,000064: 07,3626 34371 ACCEPTUP CAF CHRPRIO # (NOTE: RUPTREG4 = KEYTEMP1)
062015,000065: 07,3627 05027 TC NOVAC
062016,000066: 07,3630 0777 EBANK= DSPCOUNT
062017,000067: 07,3630 02000 60101 2CADR CHARIN
062018,000068:
062019,000069: 07,3632 30073 CA RUPTREG4
062020,000070: 07,3633 50064 INDEX LOCCTR
062021,000071: 07,3634 54154 TS MPAC # LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
062022,000072: 07,3635 05222 TC RESUME
062023,000073:
![]() |
Page 1418 |
062025,000075: # UPRUPT PROGRAM
062026,000076:
062027,000077: 07,3636 54016 UPRUPT TS BANKRUPT
062028,000078: 07,3637 56002 XCH Q
062029,000079: 07,3640 54012 TS QRUPT
062030,000080: 07,3641 04414 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
062031,000081: 07,3642 34714 CAF ZERO
062032,000082: 07,3643 56045 XCH INLINK
062033,000083: 07,3644 54073 TS KEYTEMP1
062034,000084: 07,3645 34710 CAF BIT3 # TURN ON UPACT LIGHT
062035,000085: 07,3646 00006 EXTEND # (BIT 3 OF CHANNEL 11)
062036,000086: 07,3647 05011 WOR DSALMOUT
062037,000087: 07,3650 34362 UPRPT1 CAF LOW5 # TEST FOR TRIPLE CHAR REDUNDANCY
062038,000088: 07,3651 70073 MASK KEYTEMP1 # LOW5 OF WORD
062039,000089: 07,3652 56073 XCH KEYTEMP1 # LOW5 INTO KEYTEMP1
062040,000090: 07,3653 00006 EXTEND
062041,000091: 07,3654 74701 MP BIT10 # SHIFT RIGHT 5
062042,000092: 07,3655 54734 TS KEYTEMP2
062043,000093: 07,3656 74362 MASK LOW5 # MID 5
062044,000094: 07,3657 63713 AD HI10
062045,000095: 07,3660 03710 TC UPTEST
062046,000096: 07,3661 34701 CAF BIT10
062047,000097: 07,3662 00006 EXTEND
062048,000098: 07,3663 70734 MP KEYTEMP2 # SHIFT RIGHT 5
062049,000099: 07,3664 74362 MASK LOW5 # HIGH 5
062050,000100: 07,3665 40000 COM
062051,000101: 07,3666 03710 TC UPTEST
062052,000102:
062053,000103: 07,3667 43716 UPCK CS ELRCODE # CODE IS GOOD. IF CODE = 'ERROR RESET',
062054,000104: 07,3670 60073 AD KEYTEMP1 # CLEAR UPLOCKFL (SET BIT4 OF FLAGWRD7 = 0)
062055,000105: 07,3671 00006 EXTEND # IF CODE DOES NOT = 'ERROR RESET', ACCEPT
062056,000106: 07,3672 13700 BZF CLUPLOCK # CODE ONLY IF UPLOCKFL IS CLEAR (=0).
062057,000107:
062058,000108: 07,3673 34707 CAF BIT4 # TEST UPLOCKFL FOR 0 OR 1.
062059,000109: 07,3674 70103 MASK FLAGWRD7
062060,000110: 07,3675 10000 CCS A
062061,000111: 07,3676 05222 TC RESUME # UPLOCKFL = 1
062062,000112: 07,3677 03626 TC ACCEPTUP # UPLOCKFL = 0
062063,000113:
062064,000114: 07,3700 44707 CLUPLOCK CS BIT4 # CLEAR UPLOCKFL (I.E., SET BIT 4 OF
062065,000115: 07,3701 70103 MASK FLAGWRD7 # FLAGWRD7 = 0)
062066,000116: 07,3702 54103 TS FLAGWRD7
062067,000117: 07,3703 03626 TC ACCEPTUP
062068,000118:
062069,000119: # CODE IS BAD
062070,000120: 07,3704 40103 TMFAIL2 CS FLAGWRD7 # LOCK OUT FURTHER UPLINK ACTIVITY
062071,000121: 07,3705 74707 MASK BIT4 # (BY SETTING UPLOCKFL = 1) UNTIL
062072,000122: 07,3706 26103 ADS FLAGWRD7 # 'ERROR RESET' IS SENT VIA UPLINK.
062073,000123: 07,3707 05222 TC RESUME
062074,000124: 07,3710 60073 UPTEST AD KEYTEMP1
![]() |
Page 1419 |
062076,000126: 07,3711 10000 CCS A
062077,000127: 07,3712 03704 TC TMFAIL2
062078,000128: 07,3713 77740 HI10 OCT 77740
062079,000129: 07,3714 03704 TC TMFAIL2
062080,000130: 07,3715 00002 TC Q
062081,000131:
062082,000132: 07,3716 00022 ELRCODE OCT 22
062083,000133:
062084,000134: # 'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
062085,000135: # 1. VBRELDSP
062086,000136: # 2. ERROR RESET
062087,000137: # 3. UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
062088,000138: # -
062089,000139: # THE RECEPTION OF A BAD CODE (I.E CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
062090,000140: # THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
062091,000141: # WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
062092,000142: # (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
062093,000143: # BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
062094,000144: # FAILURE)
062095,000145:
062096,000146: # UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
062097,000147:
062098,000148:
End of include-file KEYRUPT,_UPRUPT.agc. Parent file is MAIN.agc