Source Code

These source-code files were obtained by digitally photographing the Colossus 237 program listing from the private collection of original AGC developer Fred Martin, and then modifying pre-existing Colossus 249 (Apollo 9) source files to incorporate changes. 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

041977,000002:                                                                                                 #  Copyright:    Public domain.
041978,000003:                                                                                                 #  Filename:      MYSUBS.agc
041979,000004:                                                                                                 #  Purpose:      Part of the source code for Colossus build 237.
041980,000005:                                                                                                 #                This is for the Command Module's (CM) Apollo Guidance
041981,000006:                                                                                                 #                Computer (AGC), we believe for Apollo 8.
041982,000007:                                                                                                 #  Assembler:    yaYUL
041983,000008:                                                                                                 #  Contact:      Jim Lawton <jim DOT lawton AT gmail DOT com>
041984,000009:                                                                                                 #  Website:      www.ibiblio.org/apollo/index.html
041985,000010:                                                                                                 #  Page scans:   www.ibiblio.org/apollo/ScansForConversion/Colossus237/
041986,000011:                                                                                                 #  Mod history:  2011-03-15 JL    Adapted from corresponding Colossus 249 file.
041987,000012: 
041988,000013:                                                                                                 # # Page 967
041989,000014: 20,3550                                          BANK     20                                    
041990,000015: 21,2000                                          SETLOC   MYSUBS                                
041991,000016: 21,2000                                          BANK                                           
041992,000017: 
041993,000018: 21,2026     0154                                 EBANK=   MPAC                                  
041994,000019: 21,2026     4767               SPCOS1            EQUALS   SPCOS                                 
041995,000020: 21,2026     4770               SPSIN1            EQUALS   SPSIN                                 
041996,000021: 21,2026     4767               SPCOS2            EQUALS   SPCOS                                 
041997,000022: 21,2026     4770               SPSIN2            EQUALS   SPSIN                                 
041998,000023: 
041999,000024: 
042000,000025: 21,2026                                          COUNT    21/DAPMS                              
042001,000026: 
042002,000027:                                                                                                 #  ONE AND ONE HALF PRECISION MULTIPLICATION ROUTINE
042003,000028: 
042004,000029: 21,2026           55512        SMALLMP           TS       KMPTEMP                               #  A(X+Y)
042005,000030: 21,2027           00006                          EXTEND                                         
042006,000031: 21,2030           71511                          MP       KMPAC      +1                         
042007,000032: 21,2031           55511                          TS       KMPAC      +1                         #  AY
042008,000033: 21,2032           34714                          CAF      ZERO                                  
042009,000034: 21,2033           57510                          XCH      KMPAC                                 
042010,000035: 21,2034           00006                          EXTEND                                         
042011,000036: 21,2035           71512                          MP       KMPTEMP                               #  AX
042012,000037: 21,2036           21511                          DAS      KMPAC                                 #  AX+AY
042013,000038: 21,2037           00002                          TC       Q                                     
042014,000039: 
042015,000040: 
042016,000041:                                                                                                 #  SUBROUTINE FOR DOUBLE PRECISION ADDITIONS OF ANGLES
042017,000042:                                                                                                 #  A AND L CONTAIN A DP(1S) ANGLE SCALED BY 180 DEGS TO BE ADDED TO KMPAC.
042018,000043:                                                                                                 #  RESULT IS PLACED IN KMPAC.  TIMING = 6 MCT (22 MCT ON OVERFLOW)
042019,000044: 
042020,000045: 21,2040           21511        DPADD             DAS      KMPAC                                 
042021,000046: 21,2041           00006                          EXTEND                                         
042022,000047: 21,2042           12057                          BZF      TSK        +1                         #  NO OVERFLOW
042023,000048: 21,2043           11510                          CCS      KMPAC                                 
042024,000049: 21,2044           12060                          TCF      DPADD+                                #  + OVERFLOW
042025,000050: 21,2045           12047                          TCF      +2                                    
042026,000051: 21,2046           12062                          TCF      DPADD-                                #  - OVERFLOW
042027,000052: 21,2047           11511                          CCS      KMPAC      +1                         
042028,000053: 21,2050           12065                          TCF      DPADD2+                               #  UPPER = 0, LOWER +
042029,000054: 21,2051           12053                          TCF      +2                                    
042030,000055: 21,2052           40000                          COM                                            #  UPPER = 0, LOWER -
042031,000056: 21,2053           64672                          AD       POSMAX                                #  LOWER = 0, A=0
042032,000057: 21,2054           55511                          TS       KMPAC      +1                         #  CAN NOT OVERFLOW
042033,000058: 21,2055           34672                          CA       POSMAX                                #  UPPER WAS = 0
042034,000059: 21,2056           55510        TSK               TS       KMPAC                                 
042035,000060: 21,2057           00002                          TC       Q                                     
042036,000061: 
042037,000062: 21,2060           64674        DPADD+            AD       NEGMAX                                #  KMPAC GREATER THAN 0
042038,000063: 21,2061           12056                          TCF      TSK                                   
042039,000064: 
042040,000065:                                                                                                 # # Page 968
042041,000066: 21,2062           40000        DPADD-            COM                                            
042042,000067: 21,2063           64672                          AD       POSMAX                                #  KMPAC LESS THAN 0
042043,000068: 21,2064           12056                          TCF      TSK                                   
042044,000069: 
042045,000070: 21,2065           64674        DPADD2+           AD       NEGMAX                                #  CAN NOT OVERFLOW
042046,000071: 21,2066           55511                          TS       KMPAC      +1                         
042047,000072: 21,2067           34674                          CA       NEGMAX                                #  UPPER WAS = 0
042048,000073: 21,2070           12056                          TCF      TSK                                   
042049,000074: 
042050,000075:                                                                                                 # # Page 969

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