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