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. |
051124,000002: ## Copyright: Public domain.
051125,000003: ## Filename: FIXED_FIXED_CONSTANT_POOL.agc
051126,000004: ## Purpose: Part of the source code for Colossus, build 249.
051127,000005: ## It is part of the source code for the Command Module's (CM)
051128,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
051129,000007: ## Assembler: yaYUL
051130,000008: ## Reference: pp. 1170-1174
051131,000009: ## Contact: Ron Burkey <info@sandroid.org>.
051132,000010: ## Mod history: 04/27/03 RSB. Adapted from the Luminary131 file with the
051133,000011: ## same name. The changes were highly trivial
051134,000012: ## in nature:
051135,000013: ## 1. A small number of constants were removed.
051136,000014: ## 2. The names of the COUNT* counters were
051137,000015: ## changed.
051138,000016: ## 3. Comments (such as pagination and header
051139,000017: ## materials) were changed.
051140,000018: ## No constants changed value, to my knowledge.
051141,000019: ## 2017-01-06 RSB Page numbers now agree with those on the
051142,000020: ## original harcopy, as opposed to the PDF page
051143,000021: ## numbers in 1701.pdf.
051144,000022: ## 2017-01-14 RSB Cross-diff'd comment text (not whitespace)
051145,000023: ## vs the already-proofed corresponding Colossus
051146,000024: ## 237 and Comanche 55 source-code files
051147,000025: ## and corrected errors found. Once there errors
051148,000026: ## were corrected, all 3 versions were identical
051149,000027: ## in terms of comment text.
051150,000028: ##
051151,000029: ## The contents of the "Colossus249" files, in general, are transcribed
051152,000030: ## from a scanned copy of the program listing. Notations on this
051153,000031: ## document read, in part:
051154,000032: ##
051155,000033: ## Assemble revision 249 of AGC program Colossus by NASA
051156,000034: ## 2021111-041. October 28, 1968.
051157,000035: ##
051158,000036: ## This AGC program shall also be referred to as
051159,000037: ## Colossus 1A
051160,000038: ##
051161,000039: ## Prepared by
051162,000040: ## Massachusetts Institute of Technology
051163,000041: ## 75 Cambridge Parkway
051164,000042: ## Cambridge, Massachusetts
051165,000043: ## under NASA contract NAS 9-4065.
051166,000044: ##
051167,000045: ## Refer directly to the online document mentioned above for further information.
051168,000046: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
051169,000047: ##
051170,000048: ## In some cases, where the source code for Luminary 131 overlaps that of
051171,000049: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
051172,000050: ## source file, and then is proofed to incorporate any changes.
051173,000051:
![]() |
Page 1170 |
051175,000053: 4671 BLOCK 02
051176,000054: 4671 COUNT* 02/FCONS
051177,000055:
051178,000056: # THE FOLLOWING TABLE OF 18 VALUES IS INDEXED. DO NOT INSERT OR REMOVE ANY QUANTITIES.
051179,000057:
051180,000058: 4671 37777 DPOSMAX OCT 37777 # MUST PRECEDE POSMAX
051181,000059: 4672 37777 POSMAX OCT 37777
051182,000060:
051183,000061: 4673 4673 LIMITS = NEG1/2
051184,000062:
051185,000063: 4673 57777 NEG1/2 OCT -20000 # USED BY SIN ROUTINE (MUST BE TWO
051186,000064: # LOCATIONS IN FRONT OF BIT14)
051187,000065:
051188,000066: # BIT TABLE
051189,000067:
051190,000068: 4674 40000 BIT15 OCT 40000
051191,000069: 4675 20000 BIT14 OCT 20000
051192,000070: 4676 10000 BIT13 OCT 10000
051193,000071: 4677 04000 BIT12 OCT 04000
051194,000072: 4700 02000 BIT11 OCT 02000
051195,000073: 4701 01000 BIT10 OCT 01000
051196,000074: 4702 00400 BIT9 OCT 00400
051197,000075: 4703 00200 BIT8 OCT 00200
051198,000076: 4704 00100 BIT7 OCT 00100
051199,000077: 4705 00040 BIT6 OCT 00040
051200,000078: 4706 00020 BIT5 OCT 00020
051201,000079: 4707 00010 BIT4 OCT 00010
051202,000080: 4710 00004 BIT3 OCT 00004
051203,000081: 4711 00002 BIT2 OCT 00002
051204,000082: 4712 00001 BIT1 OCT 00001
051205,000083:
051206,000084: # DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
051207,000085: 4713 77777 NEG0 OCT -0 # MUST PRECEDE ZERO
051208,000086: 4714 00000 ZERO OCT 0 # MUST FOLLOW NEG0
051209,000087: # BIT1 OCT 00001
051210,000088: # NO.WDS OCT 2 INTERPRETER
051211,000089: # OCTAL3 OCT 3 INTERPRETER
051212,000090: # R3D1 OCT 4 PINBALL
051213,000091: 4715 00005 FIVE OCT 5
051214,000092: # REVCNT OCT 6 INTERPRETER
051215,000093: 4716 00007 SEVEN OCT 7
051216,000094: # BIT4 OCT 00010
051217,000095: # R2D1 OCT 11 PINBALL
051218,000096: 4717 4334 OCT11 = R2D1 # P20S
051219,000097: # BINCON DEC 10 PINBALL (OCTAL 12)
051220,000098: 4717 00013 ELEVEN DEC 11 B-14
051221,000099: # OCT14 OCT 14 ALARM AND ABORT (FILLER)
051222,000100: 4720 00015 OCT15 OCT 15
051223,000101: # R1D1 OCT 16 PINBALL
![]() |
Page 1171 |
051225,000103: 4721 00017 LOW4 OCT 17
051226,000104: # BIT5 OCT 00020
051227,000105: # ND1 OCT 21 PINBALL
051228,000106: # VD1 OCT 23 PINBALL
051229,000107: # OCT24 OCT 24 SERVICE ROUTINES
051230,000108: # MD1 OCT 25 PINBALL
051231,000109: 4722 00030 BITS4&5 OCT 30
051232,000110: # OCT31 OCT 31 SERVICE ROUTINES
051233,000111: 4723 00032 CALLCODE OCT 00032
051234,000112: # LOW5 OCT 37 PINBALL
051235,000113: # 33DEC DEC 33 PINBALL (OCTAL 41)
051236,000114: # 34DEC DEC 34 PINBALL (OCTAL 42)
051237,000115: 4724 00045 TBUILDFX DEC 37 B-14 # BUILDUP FOR CONVIENCE IN DAPTESTING
051238,000116: 4725 00046 TDECAYFX DEC 38 B-14 # CONVENIENCE FOR DAPTESTING
051239,000117: # BIT6 OCT 00040
051240,000118: 4726 00050 OCT50 OCT 50
051241,000119: 4727 00055 DEC45 DEC 45 B-14
051242,000120: 4730 00060 SUPER011 OCT 60 # BITS FOR SUPERBNK SETTING 011.
051243,000121: 4731 00062 .5SEC DEC 50 B-14
051244,000122: # BIT7 OCT 00100
051245,000123:
051246,000124: 4732 4704 SUPER100 = BIT7 # BITS FOR SUPERBNK SETTING 100
051247,000125: # (LAST 4K OF ROPE)
051248,000126: 4732 00120 SUPER101 OCT 120 # BITS FOR SUPERBNK SETTING 101
051249,000127: # OCT121 OCT 121 SERVICE ROUTINES
051250,000128: # (FIRST 8K OF ACM)
051251,000129: 4733 00140 SUPER110 OCT 140 # BITS FOR SUPERBNK SETTING 110.
051252,000130: # (LAST 8K OF ACM)
051253,000131: 4734 00144 1SEC DEC 100 B-14
051254,000132: # LOW7 OCT 177 INTERPRETER
051255,000133: # BIT8 OCT 00200
051256,000134: # OT215 OCT 215 ALARM AND ABORT
051257,000135: # 8,5 OCT 00220 P20-P25 SUNDANCE
051258,000136: 4735 00310 2SECS DEC 200 B-14
051259,000137: # LOW8 OCT 377 PINBALL
051260,000138: # BIT9 OCT 00400
051261,000139: 4736 00401 GN/CCODE OCT 00401 # SET S/C CONTROL SWITCH TO G/N
051262,000140: 4737 00454 3SECS DEC 300 B-14
051263,000141: 4740 00620 4SECS DEC 400 B-14
051264,000142: 4741 00777 LOW9 OCT 777
051265,000143: # BIT10 OCT 01000
051266,000144: # 5.5DEGS DEC .03056 P20-P25 SUNDANCE (OCTAL 00765)
051267,000145: # OCT1103 OCT 1103 ALARM AND ABORT
051268,000146: 4742 01124 C5/2 DEC .0363551 # (OCTAL 01124)
051269,000147: 4743 01211 V05N09 VN 0509 # (SAME AS OCTAL 1211)
051270,000148: 4744 01400 OCT1400 OCT 01400
051271,000149: 4745 01426 V06N22 VN 0622
051272,000150: # MID5 OCT 1740 PINBALL
051273,000151: 4746 01776 BITS2-10 OCT 1776
051274,000152: 4747 01777 LOW10 OCT 1777
![]() |
Page 1172 |
051276,000154: # BIT11 OCT 02000
051277,000155: # 2K+3 OCT 2003 PINBALL
051278,000156: 4750 02177 LOW7+2K OCT 2177 # OP CODE MASK + BANK 1 FBANK SETTING.
051279,000157: 4751 02400 EBANK5 OCT 02400
051280,000158: 4752 03000 PRIO3 OCT 03000
051281,000159: 4753 03400 EBANK7 OCT 03400
051282,000160: # LOW11 OCT 3777 PINBALL
051283,000161: # BIT12 OCT 04000
051284,000162: # RELTAB OCT 04025 T4RUPT
051285,000163: 4754 05000 PRIO5 OCT 05000
051286,000164: 4755 06000 PRIO6 OCT 06000
051287,000165: 4756 07000 PRIO7 OCT 07000
051288,000166:
051289,000167: # BIT13 OCT 10000
051290,000168: # OCT 10003 T4RUPT RELTAB +1D
051291,000169: # 13,7,2 OCT 10102 P20-P25 SUNDANCE
051292,000170: 4757 11000 PRIO11 OCT 11000
051293,000171: # PRIO12 OCT 12000 BANKCALL
051294,000172: 4760 13000 PRIO13 OCT 13000
051295,000173: 4761 14000 PRIO14 OCT 14000
051296,000174: # OCT 14031 T4RUPT RELTAB +2D
051297,000175: 4762 15000 PRIO15 OCT 15000
051298,000176: 4763 16000 PRIO16 OCT 16000
051299,000177: # 85DEGS DEC .45556 P20-P25 SUNDANCE (OCTAL 16450)
051300,000178: 4764 17000 PRIO17 OCT 17000
051301,000179: 4765 17770 OCT17770 OCT 17770
051302,000180: # BIT14 OCT 20000
051303,000181: # OCT 20033 T4RUPT RELTAB +3D
051304,000182: 4766 21000 PRIO21 OCT 21000
051305,000183:
051306,000184: 7657 BLOCK 03
051307,000185: 7657 COUNT* 03/FCONS
051308,000186:
051309,000187: 7657 22000 PRIO22 OCT 22000 # SERVICE ROUTINES
051310,000188: 7660 23000 PRIO23 OCT 23000
051311,000189: 7661 24000 PRIO24 OCT 24000
051312,000190: # 5/8+1 OCT 24001 SINGLE PRECISION SUBROUTINES
051313,000191: # OCT 24017 T4RUPT RELTAB +4D
051314,000192: 7662 25000 PRIO25 OCT 25000
051315,000193: 7663 26000 PRIO26 OCT 26000
051316,000194: 7664 27000 PRIO27 OCT 27000
051317,000195: # CHRPRIO OCT 30000 PINBALL
051318,000196: # OCT 30036 T4RUPT RELTAB +5D
051319,000197: 7665 31000 PRIO31 OCT 31000
051320,000198: 7666 31103 C1/2 DEC .7853134 # (OCTAL 31103)
051321,000199: 7667 32000 PRIO32 OCT 32000
051322,000200: 7670 33000 PRIO33 OCT 33000
051323,000201: 7671 34000 PRIO34 OCT 34000
051324,000202: # OCT 34034 T4RUPT RELTAB +6D
051325,000203: 7672 35000 PRIO35 OCT 35000
051326,000204: 7673 36000 PRIO36 OCT 36000
![]() |
Page 1173 |
051328,000206: 7674 37000 PRIO37 OCT 37000
051329,000207: 7675 37401 63/64+1 OCT 37401
051330,000208: # MID7 OCT 37600 PINBALL
051331,000209: 7676 37766 OCT37766 OCT 37766
051332,000210: 7677 37774 OCT37774 OCT 37774
051333,000211: 7700 37776 OCT37776 OCT 37776
051334,000212: # DPOSMAX OCT 37777
051335,000213: # BIT15 OCT 40000
051336,000214: # OCT40001 OCT 40001 INTERPRETER (CS 1 INSTRUCTION)
051337,000215: 7701 40014 DLOADCOD OCT 40014
051338,000216: 7702 40015 DLOAD* OCT 40015
051339,000217: # OCT 40023 T4RUPT RELTAB +7D
051340,000218: 7703 40040 BIT15+6 OCT 40040
051341,000219: 7704 40200 OCT40200 OCT 40200
051342,000220: # OCT 44035 T4RUPT RELTAB +8D
051343,000221: # OCT 50037 T4RUPT RELTAB +9D
051344,000222: # OCT 54000 T4RUPT RELTAB +10D
051345,000223: 7705 57777 -BIT14 OCT 57777
051346,000224: # RELTAB11 OCT 60000 T4RUPT
051347,000225: 7706 65552 C3/2 DEC -.3216147 # (OCTAL 65552)
051348,000226: 7707 70000 13,14,15 OCT 70000
051349,000227: 7710 73777 -1/8 OCT 73777
051350,000228: 7711 74000 HIGH4 OCT 74000
051351,000229: 7712 74056 -ENDERAS DEC -2001 B-14 # (OCTAL 74056)
051352,000230: # HI5 OCT 76000 PINBALL
051353,000231: 7713 77700 HIGH9 OCT 77700
051354,000232: # -ENDVAC DEC -45 INTERPRETER (OCTAL 77722)
051355,000233: # -OCT10 OCT -10 (OCT 77767)
051356,000234: # NEG4 DEC -4 (OCTAL 77773)
051357,000235: 7714 77774 NEG3 DEC -3 B-14
051358,000236: 7715 77775 NEG2 OCT 77775
051359,000237: 7716 77776 NEGONE DEC -1 B-14
051360,000238:
![]() |
Page 1174 |
051362,000240:
051363,000241: # DEFINED BY EQUALS
051364,000242:
051365,000243: # IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
051366,000244: # ACCIDENTAL DEFINITION CHANGES.
051367,000245:
051368,000246: 7717 7716 MINUS1 = NEG1
051369,000247: 7717 7716 NEG1 = NEGONE
051370,000248: 7717 4712 ONE = BIT1
051371,000249: 7717 4711 TWO = BIT2
051372,000250: 7717 6214 THREE = OCTAL3
051373,000251: 7717 6214 LOW2 = THREE
051374,000252: 7717 4710 FOUR = BIT3
051375,000253: 7717 6211 SIX = REVCNT
051376,000254: 7717 4716 LOW3 = SEVEN
051377,000255: 7717 4707 EIGHT = BIT4
051378,000256: 7717 4334 NINE = R2D1
051379,000257: 7717 4377 TEN = BINCON
051380,000258: 7717 4717 NOUTCON = ELEVEN
051381,000259: 7717 4374 OCT23 = VD1
051382,000260: 7717 4376 OCT25 = MD1
051383,000261: 7717 4701 PRIO1 = BIT10
051384,000262: 7717 4744 EBANK3 = OCT1400
051385,000263: 7717 4700 PRIO2 = BIT11
051386,000264: 7717 4732 OCT120 = SUPER101
051387,000265: 7717 4733 OCT140 = SUPER110
051388,000266: 7717 4700 2K = BIT11
051389,000267: 7717 4700 EBANK4 = BIT11
051390,000268: 7717 4677 PRIO4 = BIT12
051391,000269: 7717 4752 EBANK6 = PRIO3
051392,000270: 7717 4676 QUARTER = BIT13
051393,000271: 7717 4676 PRIO10 = BIT13
051394,000272: 7717 7632 OCT10001 = CCSL
051395,000273: 7717 4675 POS1/2 = HALF
051396,000274: 7717 4675 PRIO20 = BIT14
051397,000275: 7717 4675 HALF = BIT14
051398,000276: 7717 4371 PRIO30 = CHRPRIO
051399,000277: 7717 4371 BIT13-14 = PRIO30 # INTERPRETER USES IN PROCESSING STORECODE
051400,000278: 7717 6440 OCT30002 = TLOAD +1
051401,000279: 7717 7671 B12T14 = PRIO34
051402,000280: 7717 4674 NEGMAX = BIT15
051403,000281: 7717 4674 VLOADCOD = BIT15
051404,000282: 7717 6056 VLOAD* = OCT40001
051405,000283: 7717 4105 OCT60000 = RELTAB11
051406,000284: 7717 4364 BANKMASK = HI5
051407,000285:
End of include-file FIXED-FIXED_CONSTANT_POOL.agc. Parent file is MAIN.agc