Source Code

These source-code files were derived from scans of the Colossus 237 (Apollo 8 Command Module) program listing from the private collection of original AGC developer Fred Martin. Scanning was by Ron Burkey. Pre-existing Colossus 249 (Apollo 9 CM) source files were used as a template, and changes between Colossus 249 and Colossus 237 were manually transcribed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional 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:

	GAP: ASSEMBLE REVISION 237 OF AGC PROGRAM COLOSSUS 
	BY NASA 2021111-031  1:17 AUG. 24, 1968
Note that the date is the date of the printout, not the date of the program revision.

042185,000002:                                                                                                  ## Copyright:   Public domain.
042186,000003:                                                                                                  ## Filename:    MYSUBS.agc
042187,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
042188,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
042189,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
042190,000007:                                                                                                  ## Assembler:   yaYUL
042191,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
042192,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042193,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
042194,000011:                                                                                                  ## Mod history: 2011-03-15 JL   Adapted from corresponding Colossus 249 file.
042195,000012:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
042196,000013:                                                                                                  ##                              and fixed errors found.
042197,000014:                                                                                                  ##              2021-05-30 ABS  EBANK= MPAC -> EBANK= KMPAC
042198,000015: 

Page 967

042200,000017: 20,3550                                           BANK     20                                    
042201,000018: 21,2000                                           SETLOC   MYSUBS                                
042202,000019: 21,2000                                           BANK                                           
042203,000020: 
042204,000021: 21,2026  E6,1510                                  EBANK=   KMPAC                                 
042205,000022: 21,2026     4767               SPCOS1             EQUALS   SPCOS                                 
042206,000023: 21,2026     4770               SPSIN1             EQUALS   SPSIN                                 
042207,000024: 21,2026     4767               SPCOS2             EQUALS   SPCOS                                 
042208,000025: 21,2026     4770               SPSIN2             EQUALS   SPSIN                                 
042209,000026: 
042210,000027: 
042211,000028: 21,2026                                           COUNT    21/DAPMS                              
042212,000029: 
042213,000030:                                                                                                  #  ONE AND ONE HALF PRECISION MULTIPLICATION ROUTINE
042214,000031: 
042215,000032: 21,2026           55512        SMALLMP            TS       KMPTEMP                               #  A(X+Y)
042216,000033: 21,2027           00006                           EXTEND                                         
042217,000034: 21,2030           71511                           MP       KMPAC      +1                         
042218,000035: 21,2031           55511                           TS       KMPAC      +1                         #  AY
042219,000036: 21,2032           34714                           CAF      ZERO                                  
042220,000037: 21,2033           57510                           XCH      KMPAC                                 
042221,000038: 21,2034           00006                           EXTEND                                         
042222,000039: 21,2035           71512                           MP       KMPTEMP                               #  AX
042223,000040: 21,2036           21511                           DAS      KMPAC                                 #  AX+AY
042224,000041: 21,2037           00002                           TC       Q                                     
042225,000042: 
042226,000043: 
042227,000044:                                                                                                  #  SUBROUTINE FOR DOUBLE PRECISION ADDITIONS OF ANGLES
042228,000045:                                                                                                  #  A AND L CONTAIN A DP(1S) ANGLE SCALED BY 180 DEGS TO BE ADDED TO KMPAC.
042229,000046:                                                                                                  #  RESULT IS PLACED IN KMPAC.  TIMING = 6 MCT (22 MCT ON OVERFLOW)
042230,000047: 
042231,000048: 21,2040           21511        DPADD              DAS      KMPAC                                 
042232,000049: 21,2041           00006                           EXTEND                                         
042233,000050: 21,2042           12057                           BZF      TSK        +1                         #  NO OVERFLOW
042234,000051: 21,2043           11510                           CCS      KMPAC                                 
042235,000052: 21,2044           12060                           TCF      DPADD+                                #  + OVERFLOW
042236,000053: 21,2045           12047                           TCF      +2                                    
042237,000054: 21,2046           12062                           TCF      DPADD-                                #  - OVERFLOW
042238,000055: 21,2047           11511                           CCS      KMPAC      +1                         
042239,000056: 21,2050           12065                           TCF      DPADD2+                               #  UPPER = 0, LOWER +
042240,000057: 21,2051           12053                           TCF      +2                                    
042241,000058: 21,2052           40000                           COM                                            #  UPPER = 0, LOWER -
042242,000059: 21,2053           64672                           AD       POSMAX                                #  LOWER = 0, A=0
042243,000060: 21,2054           55511                           TS       KMPAC      +1                         #  CAN NOT OVERFLOW
042244,000061: 21,2055           34672                           CA       POSMAX                                #  UPPER WAS = 0
042245,000062: 21,2056           55510        TSK                TS       KMPAC                                 
042246,000063: 21,2057           00002                           TC       Q                                     
042247,000064: 
042248,000065: 21,2060           64674        DPADD+             AD       NEGMAX                                #  KMPAC GREATER THAN 0
042249,000066: 21,2061           12056                           TCF      TSK                                   
042250,000067: 

Page 968

042252,000069: 21,2062           40000        DPADD-             COM                                            
042253,000070: 21,2063           64672                           AD       POSMAX                                #  KMPAC LESS THAN 0
042254,000071: 21,2064           12056                           TCF      TSK                                   
042255,000072: 
042256,000073: 21,2065           64674        DPADD2+            AD       NEGMAX                                #  CAN NOT OVERFLOW
042257,000074: 21,2066           55511                           TS       KMPAC      +1                         
042258,000075: 21,2067           34674                           CA       NEGMAX                                #  UPPER WAS = 0
042259,000076: 21,2070           12056                           TCF      TSK                                   
042260,000077: 

Page 969 Empty page.


End of include-file MYSUBS.agc.  Parent file is MAIN.agc