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,1968
Note that the date is the date of the printout, not the date of the program revision.

051138,000002:                                                                                                  ## Copyright:   Public domain.
051139,000003:                                                                                                  ## Filename:    FIXED_FIXED_CONSTANT_POOL.agc
051140,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus, build 249.
051141,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
051142,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 9.
051143,000007:                                                                                                  ## Assembler:   yaYUL
051144,000008:                                                                                                  ## Reference:   pp. 1170-1174
051145,000009:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
051146,000010:                                                                                                  ## Mod history: 04/27/03 RSB.   Adapted from the Luminary131 file with the 
051147,000011:                                                                                                  ##                              same name.  The changes were highly trivial
051148,000012:                                                                                                  ##                              in nature:
051149,000013:                                                                                                  ##                              1.  A small number of constants were removed.
051150,000014:                                                                                                  ##                              2.  The names of the COUNT* counters were
051151,000015:                                                                                                  ##                                  changed.  
051152,000016:                                                                                                  ##                              3.  Comments (such as pagination and header
051153,000017:                                                                                                  ##                                  materials) were changed.
051154,000018:                                                                                                  ##                              No constants changed value, to my knowledge.
051155,000019:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
051156,000020:                                                                                                  ##                              original harcopy, as opposed to the PDF page
051157,000021:                                                                                                  ##                              numbers in 1701.pdf.
051158,000022:                                                                                                  ##              2017-01-14 RSB  Cross-diff'd comment text (not whitespace)
051159,000023:                                                                                                  ##                              vs the already-proofed corresponding Colossus
051160,000024:                                                                                                  ##                              237 and Comanche 55 source-code files
051161,000025:                                                                                                  ##                              and corrected errors found.  Once there errors
051162,000026:                                                                                                  ##                              were corrected, all 3 versions were identical
051163,000027:                                                                                                  ##                              in terms of comment text.
051164,000028:                                                                                                  ##
051165,000029:                                                                                                  ## The contents of the "Colossus249" files, in general, are transcribed 
051166,000030:                                                                                                  ## from a scanned copy of the program listing.  Notations on this
051167,000031:                                                                                                  ## document read, in part:
051168,000032:                                                                                                  ##
051169,000033:                                                                                                  ##      Assemble revision 249 of AGC program Colossus by NASA
051170,000034:                                                                                                  ##      2021111-041.  October 28, 1968.  
051171,000035:                                                                                                  ##
051172,000036:                                                                                                  ##      This AGC program shall also be referred to as
051173,000037:                                                                                                  ##                              Colossus 1A
051174,000038:                                                                                                  ##
051175,000039:                                                                                                  ##      Prepared by
051176,000040:                                                                                                  ##                      Massachusetts Institute of Technology
051177,000041:                                                                                                  ##                      75 Cambridge Parkway
051178,000042:                                                                                                  ##                      Cambridge, Massachusetts
051179,000043:                                                                                                  ##      under NASA contract NAS 9-4065.
051180,000044:                                                                                                  ##
051181,000045:                                                                                                  ## Refer directly to the online document mentioned above for further information.
051182,000046:                                                                                                  ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
051183,000047:                                                                                                  ##
051184,000048:                                                                                                  ## In some cases, where the source code for Luminary 131 overlaps that of 
051185,000049:                                                                                                  ## Colossus 249, this code is instead copied from the corresponding Luminary 131
051186,000050:                                                                                                  ## source file, and then is proofed to incorporate any changes.
051187,000051: 

Page 1170

051189,000053:    4671                                           BLOCK    02                                    
051190,000054:    4671                                           COUNT*   02/FCONS                              
051191,000055: 
051192,000056:                                                                                                  #  THE FOLLOWING TABLE OF 18 VALUES IS INDEXED.  DO NOT INSERT OR REMOVE ANY QUANTITIES.
051193,000057: 
051194,000058:    4671           37777        DPOSMAX            OCT      37777                                 #  MUST PRECEDE POSMAX
051195,000059:    4672           37777        POSMAX             OCT      37777                                 
051196,000060: 
051197,000061:    4673     4673               LIMITS             =        NEG1/2                                
051198,000062: 
051199,000063:    4673           57777        NEG1/2             OCT      -20000                                #  USED BY SIN ROUTINE (MUST BE TWO 
051200,000064:                                                                                                  #  LOCATIONS IN FRONT OF BIT14)
051201,000065: 
051202,000066:                                                                                                  #  BIT TABLE                                     
051203,000067: 
051204,000068:    4674           40000        BIT15              OCT      40000                                 
051205,000069:    4675           20000        BIT14              OCT      20000                                 
051206,000070:    4676           10000        BIT13              OCT      10000                                 
051207,000071:    4677           04000        BIT12              OCT      04000                                 
051208,000072:    4700           02000        BIT11              OCT      02000                                 
051209,000073:    4701           01000        BIT10              OCT      01000                                 
051210,000074:    4702           00400        BIT9               OCT      00400                                 
051211,000075:    4703           00200        BIT8               OCT      00200                                 
051212,000076:    4704           00100        BIT7               OCT      00100                                 
051213,000077:    4705           00040        BIT6               OCT      00040                                 
051214,000078:    4706           00020        BIT5               OCT      00020                                 
051215,000079:    4707           00010        BIT4               OCT      00010                                 
051216,000080:    4710           00004        BIT3               OCT      00004                                 
051217,000081:    4711           00002        BIT2               OCT      00002                                 
051218,000082:    4712           00001        BIT1               OCT      00001                                 
051219,000083: 
051220,000084:                                                                                                  #  DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
051221,000085:    4713           77777        NEG0               OCT      -0                                    #  MUST PRECEDE ZERO
051222,000086:    4714           00000        ZERO               OCT      0                                     #  MUST FOLLOW NEG0
051223,000087:                                                                                                  #  BIT1          OCT     00001
051224,000088:                                                                                                  #  NO.WDS        OCT     2               INTERPRETER
051225,000089:                                                                                                  #  OCTAL3        OCT     3               INTERPRETER
051226,000090:                                                                                                  #  R3D1          OCT     4               PINBALL
051227,000091:    4715           00005        FIVE               OCT      5                                     
051228,000092:                                                                                                  #  REVCNT        OCT     6               INTERPRETER
051229,000093:    4716           00007        SEVEN              OCT      7                                     
051230,000094:                                                                                                  #  BIT4          OCT     00010
051231,000095:                                                                                                  #  R2D1          OCT     11              PINBALL
051232,000096:    4717     4334               OCT11              =        R2D1                                  #  P20S
051233,000097:                                                                                                  #  BINCON        DEC     10              PINBALL         (OCTAL 12)
051234,000098:    4717           00013        ELEVEN             DEC      11         B-14                       
051235,000099:                                                                                                  #  OCT14         OCT     14              ALARM AND ABORT (FILLER)
051236,000100:    4720           00015        OCT15              OCT      15                                    
051237,000101:                                                                                                  #  R1D1          OCT     16              PINBALL

Page 1171

051239,000103:    4721           00017        LOW4               OCT      17                                    
051240,000104:                                                                                                  #  BIT5          OCT     00020
051241,000105:                                                                                                  #  ND1           OCT     21              PINBALL
051242,000106:                                                                                                  #  VD1           OCT     23              PINBALL
051243,000107:                                                                                                  #  OCT24         OCT     24              SERVICE ROUTINES
051244,000108:                                                                                                  #  MD1           OCT     25              PINBALL
051245,000109:    4722           00030        BITS4&5            OCT      30                                    
051246,000110:                                                                                                  #  OCT31         OCT     31              SERVICE ROUTINES
051247,000111:    4723           00032        CALLCODE           OCT      00032                                 
051248,000112:                                                                                                  #  LOW5          OCT     37              PINBALL
051249,000113:                                                                                                  #  33DEC         DEC     33              PINBALL         (OCTAL 41)
051250,000114:                                                                                                  #  34DEC         DEC     34              PINBALL         (OCTAL 42)
051251,000115:    4724           00045        TBUILDFX           DEC      37         B-14                       #  BUILDUP FOR CONVIENCE IN DAPTESTING
051252,000116:    4725           00046        TDECAYFX           DEC      38         B-14                       #  CONVENIENCE FOR DAPTESTING
051253,000117:                                                                                                  #  BIT6          OCT     00040
051254,000118:    4726           00050        OCT50              OCT      50                                    
051255,000119:    4727           00055        DEC45              DEC      45         B-14                       
051256,000120:    4730           00060        SUPER011           OCT      60                                    #  BITS FOR SUPERBNK SETTING 011.
051257,000121:    4731           00062        .5SEC              DEC      50         B-14                       
051258,000122:                                                                                                  #  BIT7          OCT     00100
051259,000123: 
051260,000124:    4732     4704               SUPER100           =        BIT7                                  #  BITS FOR SUPERBNK SETTING 100
051261,000125:                                                                                                  #  (LAST 4K OF ROPE)
051262,000126:    4732           00120        SUPER101           OCT      120                                   #  BITS FOR SUPERBNK SETTING 101
051263,000127:                                                                                                  #  OCT121        OCT     121             SERVICE ROUTINES
051264,000128:                                                                                                  #  (FIRST 8K OF ACM)
051265,000129:    4733           00140        SUPER110           OCT      140                                   #  BITS FOR SUPERBNK SETTING 110.
051266,000130:                                                                                                  #  (LAST 8K OF ACM)
051267,000131:    4734           00144        1SEC               DEC      100        B-14                       
051268,000132:                                                                                                  #  LOW7          OCT     177             INTERPRETER
051269,000133:                                                                                                  #  BIT8          OCT     00200
051270,000134:                                                                                                  #  OT215         OCT     215             ALARM AND ABORT
051271,000135:                                                                                                  #  8,5           OCT     00220           P20-P25 SUNDANCE
051272,000136:    4735           00310        2SECS              DEC      200        B-14                       
051273,000137:                                                                                                  #  LOW8          OCT     377             PINBALL
051274,000138:                                                                                                  #  BIT9          OCT     00400
051275,000139:    4736           00401        GN/CCODE           OCT      00401                                 #  SET S/C CONTROL SWITCH TO G/N
051276,000140:    4737           00454        3SECS              DEC      300        B-14                       
051277,000141:    4740           00620        4SECS              DEC      400        B-14                       
051278,000142:    4741           00777        LOW9               OCT      777                                   
051279,000143:                                                                                                  #  BIT10         OCT     01000
051280,000144:                                                                                                  #  5.5DEGS       DEC     .03056          P20-P25 SUNDANCE        (OCTAL 00765)
051281,000145:                                                                                                  #  OCT1103       OCT     1103            ALARM AND ABORT
051282,000146:    4742           01124        C5/2               DEC      .0363551                              #                        (OCTAL 01124)
051283,000147:    4743           01211        V05N09             VN       0509                                  #  (SAME AS OCTAL 1211)
051284,000148:    4744           01400        OCT1400            OCT      01400                                 
051285,000149:    4745           01426        V06N22             VN       0622                                  
051286,000150:                                                                                                  #  MID5          OCT     1740            PINBALL
051287,000151:    4746           01776        BITS2-10           OCT      1776                                  
051288,000152:    4747           01777        LOW10              OCT      1777                                  

Page 1172

051290,000154:                                                                                                  #  BIT11         OCT     02000
051291,000155:                                                                                                  #  2K+3          OCT     2003            PINBALL
051292,000156:    4750           02177        LOW7+2K            OCT      2177                                  #  OP CODE MASK + BANK 1 FBANK SETTING.
051293,000157:    4751           02400        EBANK5             OCT      02400                                 
051294,000158:    4752           03000        PRIO3              OCT      03000                                 
051295,000159:    4753           03400        EBANK7             OCT      03400                                 
051296,000160:                                                                                                  #  LOW11         OCT     3777            PINBALL
051297,000161:                                                                                                  #  BIT12         OCT     04000
051298,000162:                                                                                                  #  RELTAB        OCT     04025           T4RUPT
051299,000163:    4754           05000        PRIO5              OCT      05000                                 
051300,000164:    4755           06000        PRIO6              OCT      06000                                 
051301,000165:    4756           07000        PRIO7              OCT      07000                                 
051302,000166: 
051303,000167:                                                                                                  #  BIT13         OCT     10000
051304,000168:                                                                                                  #                OCT     10003           T4RUPT  RELTAB +1D
051305,000169:                                                                                                  #  13,7,2        OCT     10102           P20-P25 SUNDANCE
051306,000170:    4757           11000        PRIO11             OCT      11000                                 
051307,000171:                                                                                                  #  PRIO12        OCT     12000           BANKCALL
051308,000172:    4760           13000        PRIO13             OCT      13000                                 
051309,000173:    4761           14000        PRIO14             OCT      14000                                 
051310,000174:                                                                                                  #                OCT     14031           T4RUPT  RELTAB +2D
051311,000175:    4762           15000        PRIO15             OCT      15000                                 
051312,000176:    4763           16000        PRIO16             OCT      16000                                 
051313,000177:                                                                                                  #  85DEGS        DEC     .45556          P20-P25 SUNDANCE        (OCTAL 16450)
051314,000178:    4764           17000        PRIO17             OCT      17000                                 
051315,000179:    4765           17770        OCT17770           OCT      17770                                 
051316,000180:                                                                                                  #  BIT14         OCT     20000
051317,000181:                                                                                                  #                OCT     20033           T4RUPT  RELTAB +3D
051318,000182:    4766           21000        PRIO21             OCT      21000                                 
051319,000183: 
051320,000184:    7657                                           BLOCK    03                                    
051321,000185:    7657                                           COUNT*   03/FCONS                              
051322,000186: 
051323,000187:    7657           22000        PRIO22             OCT      22000                                 #  SERVICE ROUTINES
051324,000188:    7660           23000        PRIO23             OCT      23000                                 
051325,000189:    7661           24000        PRIO24             OCT      24000                                 
051326,000190:                                                                                                  #  5/8+1         OCT     24001           SINGLE PRECISION SUBROUTINES
051327,000191:                                                                                                  #                OCT     24017           T4RUPT  RELTAB +4D
051328,000192:    7662           25000        PRIO25             OCT      25000                                 
051329,000193:    7663           26000        PRIO26             OCT      26000                                 
051330,000194:    7664           27000        PRIO27             OCT      27000                                 
051331,000195:                                                                                                  #  CHRPRIO       OCT     30000           PINBALL
051332,000196:                                                                                                  #                OCT     30036           T4RUPT  RELTAB +5D
051333,000197:    7665           31000        PRIO31             OCT      31000                                 
051334,000198:    7666           31103        C1/2               DEC      .7853134                              #                        (OCTAL 31103)
051335,000199:    7667           32000        PRIO32             OCT      32000                                 
051336,000200:    7670           33000        PRIO33             OCT      33000                                 
051337,000201:    7671           34000        PRIO34             OCT      34000                                 
051338,000202:                                                                                                  #                OCT     34034           T4RUPT  RELTAB +6D              
051339,000203:    7672           35000        PRIO35             OCT      35000                                 
051340,000204:    7673           36000        PRIO36             OCT      36000                                 

Page 1173

051342,000206:    7674           37000        PRIO37             OCT      37000                                 
051343,000207:    7675           37401        63/64+1            OCT      37401                                 
051344,000208:                                                                                                  #  MID7          OCT     37600           PINBALL
051345,000209:    7676           37766        OCT37766           OCT      37766                                 
051346,000210:    7677           37774        OCT37774           OCT      37774                                 
051347,000211:    7700           37776        OCT37776           OCT      37776                                 
051348,000212:                                                                                                  #  DPOSMAX       OCT     37777
051349,000213:                                                                                                  #  BIT15         OCT     40000
051350,000214:                                                                                                  #  OCT40001      OCT     40001           INTERPRETER (CS 1 INSTRUCTION)
051351,000215:    7701           40014        DLOADCOD           OCT      40014                                 
051352,000216:    7702           40015        DLOAD*             OCT      40015                                 
051353,000217:                                                                                                  #                OCT     40023           T4RUPT  RELTAB +7D
051354,000218:    7703           40040        BIT15+6            OCT      40040                                 
051355,000219:    7704           40200        OCT40200           OCT      40200                                 
051356,000220:                                                                                                  #                OCT     44035           T4RUPT  RELTAB +8D
051357,000221:                                                                                                  #                OCT     50037           T4RUPT  RELTAB +9D
051358,000222:                                                                                                  #                OCT     54000           T4RUPT  RELTAB +10D
051359,000223:    7705           57777        -BIT14             OCT      57777                                 
051360,000224:                                                                                                  #  RELTAB11      OCT     60000           T4RUPT
051361,000225:    7706           65552        C3/2               DEC      -.3216147                             #                        (OCTAL 65552)
051362,000226:    7707           70000        13,14,15           OCT      70000                                 
051363,000227:    7710           73777        -1/8               OCT      73777                                 
051364,000228:    7711           74000        HIGH4              OCT      74000                                 
051365,000229:    7712           74056        -ENDERAS           DEC      -2001      B-14                       #                        (OCTAL 74056)
051366,000230:                                                                                                  #  HI5           OCT     76000           PINBALL
051367,000231:    7713           77700        HIGH9              OCT      77700                                 
051368,000232:                                                                                                  #  -ENDVAC       DEC     -45             INTERPRETER             (OCTAL 77722)
051369,000233:                                                                                                  #  -OCT10        OCT     -10                                     (OCT 77767)
051370,000234:                                                                                                  #  NEG4          DEC     -4                                      (OCTAL 77773)
051371,000235:    7714           77774        NEG3               DEC      -3         B-14                       
051372,000236:    7715           77775        NEG2               OCT      77775                                 
051373,000237:    7716           77776        NEGONE             DEC      -1         B-14                       
051374,000238: 

Page 1174

051376,000240: 
051377,000241:                                                                                                  #  DEFINED BY EQUALS
051378,000242: 
051379,000243:                                                                                                  #  IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
051380,000244:                                                                                                  #  ACCIDENTAL DEFINITION CHANGES.
051381,000245: 
051382,000246:    7717     7716               MINUS1             =        NEG1                                  
051383,000247:    7717     7716               NEG1               =        NEGONE                                
051384,000248:    7717     4712               ONE                =        BIT1                                  
051385,000249:    7717     4711               TWO                =        BIT2                                  
051386,000250:    7717     6214               THREE              =        OCTAL3                                
051387,000251:    7717     6214               LOW2               =        THREE                                 
051388,000252:    7717     4710               FOUR               =        BIT3                                  
051389,000253:    7717     6211               SIX                =        REVCNT                                
051390,000254:    7717     4716               LOW3               =        SEVEN                                 
051391,000255:    7717     4707               EIGHT              =        BIT4                                  
051392,000256:    7717     4334               NINE               =        R2D1                                  
051393,000257:    7717     4377               TEN                =        BINCON                                
051394,000258:    7717     4717               NOUTCON            =        ELEVEN                                
051395,000259:    7717     4374               OCT23              =        VD1                                   
051396,000260:    7717     4376               OCT25              =        MD1                                   
051397,000261:    7717     4701               PRIO1              =        BIT10                                 
051398,000262:    7717     4744               EBANK3             =        OCT1400                               
051399,000263:    7717     4700               PRIO2              =        BIT11                                 
051400,000264:    7717     4732               OCT120             =        SUPER101                              
051401,000265:    7717     4733               OCT140             =        SUPER110                              
051402,000266:    7717     4700               2K                 =        BIT11                                 
051403,000267:    7717     4700               EBANK4             =        BIT11                                 
051404,000268:    7717     4677               PRIO4              =        BIT12                                 
051405,000269:    7717     4752               EBANK6             =        PRIO3                                 
051406,000270:    7717     4676               QUARTER            =        BIT13                                 
051407,000271:    7717     4676               PRIO10             =        BIT13                                 
051408,000272:    7717     7632               OCT10001           =        CCSL                                  
051409,000273:    7717     4675               POS1/2             =        HALF                                  
051410,000274:    7717     4675               PRIO20             =        BIT14                                 
051411,000275:    7717     4675               HALF               =        BIT14                                 
051412,000276:    7717     4371               PRIO30             =        CHRPRIO                               
051413,000277:    7717     4371               BIT13-14           =        PRIO30                                #  INTERPRETER USES IN PROCESSING STORECODE
051414,000278:    7717     6440               OCT30002           =        TLOAD      +1                         
051415,000279:    7717     7671               B12T14             =        PRIO34                                
051416,000280:    7717     4674               NEGMAX             =        BIT15                                 
051417,000281:    7717     4674               VLOADCOD           =        BIT15                                 
051418,000282:    7717     6056               VLOAD*             =        OCT40001                              
051419,000283:    7717     4105               OCT60000           =        RELTAB11                              
051420,000284:    7717     4364               BANKMASK           =        HI5                                   
051421,000285: 

End of include-file FIXED-FIXED_CONSTANT_POOL.agc.  Parent file is MAIN.agc