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.

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

Page 967

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

Page 968

042244,000068: 21,2062           40000        DPADD-             COM                                            
042245,000069: 21,2063           64672                           AD       POSMAX                                #  KMPAC LESS THAN 0
042246,000070: 21,2064           12056                           TCF      TSK                                   
042247,000071: 
042248,000072: 21,2065           64674        DPADD2+            AD       NEGMAX                                #  CAN NOT OVERFLOW
042249,000073: 21,2066           55511                           TS       KMPAC      +1                         
042250,000074: 21,2067           34674                           CA       NEGMAX                                #  UPPER WAS = 0
042251,000075: 21,2070           12056                           TCF      TSK                                   
042252,000076: 

Page 969 Empty page.


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