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.

019584,000002:                                                                                                  ## Copyright:   Public domain.
019585,000003:                                                                                                  ## Filename:    GROUND_TRACKING_DETERMINATION_PROGRAM_-_P21.agc
019586,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
019587,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
019588,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
019589,000007:                                                                                                  ## Assembler:   yaYUL
019590,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
019591,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
019592,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
019593,000011:                                                                                                  ## Mod history: 2011-02-02 JL   Adapted from corresponding Colossus 249 file.
019594,000012:                                                                                                  ##              2016-12-31 RSB  Proofed comment text using octopus/ProoferComments,
019595,000013:                                                                                                  ##                              and corrected errors found.
019596,000014:                                                                                                  ##              2017-01-14 RSB  Corrected comment-errors located in diff'ing
019597,000015:                                                                                                  ##                              vs Colossus 249
019598,000016: 

Page 447

019600,000018:                                                                                                  #  GROUND TRACKING DETERMINATION PROGRAM P21
019601,000019:                                                                                                  #  PROGRAM DESCRIPTION
019602,000020:                                                                                                  #  MOD NO - 1
019603,000021:                                                                                                  #  MOD BY - N.M.NEVILLE
019604,000022:                                                                                                  #  FUNCTIONAL DECRIPTION-
019605,000023: 
019606,000024:                                                                                                  #  TO PROVIDE THE ASTRONAUT DETAILS OF THE LM OR CSM GROUND TRACK WITHOUT
019607,000025:                                                                                                  #  THE NEED FOR GROUND COMMUNICATION (REQUESTED BY DSKY).
019608,000026:                                                                                                  #  CALLING SEQUENCE-
019609,000027: 
019610,000028:                                                                                                  #  ASTRONAUT REQUEST THROUGH DSKY V37E21E
019611,000029:                                                                                                  #  SUBROUTINES CALLED-
019612,000030: 
019613,000031:                                                                                                  #  GOPERF4
019614,000032:                                                                                                  #  GOFLASH
019615,000033:                                                                                                  #  THISPREC
019616,000034:                                                                                                  #  OTHPREC
019617,000035:                                                                                                  #  LAT-LONG
019618,000036:                                                                                                  #  NORMAL EXIT MODES-
019619,000037: 
019620,000038:                                                                                                  #  ASTRONAUT REQUEST TROUGH DSKY TO TERMINATE PROGRAM V34E
019621,000039:                                                                                                  #  ALARM OR ABORT EXIT MODES-
019622,000040: 
019623,000041:                                                                                                  #  NONE
019624,000042:                                                                                                  #  OUTPUT-
019625,000043: 
019626,000044:                                                                                                  #  OCTAL DISPLAY OF OPTION CODE AND VEHICLE WHOSE GROUND TRACK IS TO BE
019627,000045:                                                                                                  #  COMPUTED
019628,000046:                                                                                                  #           OPTION CODE  00002
019629,000047:                                                                                                  #           THIS         00001
019630,000048:                                                                                                  #           OTHER        00002
019631,000049:                                                                                                  #  DECIMAL DISPLAY OF TIME TO BE INTEGRATED TO HOURS , MINUTES , SECONDS
019632,000050:                                                                                                  #  DECIMAL DISPLAY OF LAT,LONG,ALT
019633,000051:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
019634,000052: 
019635,000053:                                                                                                  #  AX0      2DEC   4.652459653 E-5   RADIANS       %68-69 CONSTANTS"
019636,000054: 
019637,000055:                                                                                                  #  -AY0     2DEC   2.147535898 E-5   RADIANS
019638,000056: 
019639,000057:                                                                                                  #  AZ0      2DEC   .7753206164       REVOLUTIONS
019640,000058:                                                                                                  #  FOR LUNAR ORBITS 504LM VECTOR IS NEEDED
019641,000059: 
019642,000060:                                                                                                  #  504LM    2DEC   -2.700340600 E-5  RADIANS
019643,000061: 
019644,000062:                                                                                                  #  504LM _2 2DEC   -7.514128400 E-4  RADIANS
019645,000063: 
019646,000064:                                                                                                  #  504LM _4 2DEC   _2.553198641 E-4  RADIANS
019647,000065: 
019648,000066:                                                                                                  #        NONE
019649,000067:                                                                                                  #  DEBRIS

Page 448

019651,000069: 
019652,000070:                                                                                                  #  CENTRALS-A,Q,L
019653,000071:                                                                                                  #  OTHER-THOSE USED BY THE ABOVE LISTED SUBROUTINES
019654,000072:                                                                                                  #  SEE LEMPREC,LAT-LONG
019655,000073: 33,3773  30,2000                                  SBANK=   LOWSUPER                              #  FOR LOW 2CADR'S.
019656,000074: 
019657,000075: 33,3773                                           BANK     33                                    
019658,000076: 37,2000                                           SETLOC   P20S                                  
019659,000077: 37,2000                                           BANK                                           
019660,000078: 
019661,000079: 37,2001  E4,1715                                  EBANK=   P21TIME                               
019662,000080: 37,2001                                           COUNT    24/P21                                
019663,000081: 
019664,000082: 37,2001           34712        PROG21             CAF      ONE                                   
019665,000083: 37,2002           55132                           TS       OPTION2                               #  ASSUMED VEHICLE IS LM , R2 = 00001
019666,000084: 37,2003           34711                           CAF      BIT2                                  #   OPTION 2
019667,000085: 37,2004           04555                           TC       BANKCALL                              
019668,000086: 37,2005           20761                           CADR     GOPERF4                               
019669,000087: 37,2006           04106                           TC       GOTOPOOH                              #  TERMINATE
019670,000088: 37,2007           02011                           TC       +2                                    #  PROCEED VALUE OF ASSUMED VEHICLE OK
019671,000089: 37,2010           02003                           TC       -5                                    #  R2 LOADED THROUGH DSKY
019672,000090: 37,2011           32102        P21PROG1           CAF      V6N34                                 #  LOAD DESIRED TIME OF LAT-LONG.
019673,000091: 37,2012           04555                           TC       BANKCALL                              
019674,000092: 37,2013           20624                           CADR     GOFLASH                               
019675,000093: 37,2014           04106                           TC       GOTOPOOH                              #  TERM
019676,000094: 37,2015           02017                           TC       +2                                    #  PROCEED VALUES OK
019677,000095: 37,2016           02011                           TC       -5                                    #  TIME LOADED THROUGH DSKY
019678,000096: 37,2017           06006                           TC       INTPRET                               
019679,000097: 37,2020           77745                           DLOAD                                          
019680,000098: 37,2021           01046                                    DSPTEM1                               
019681,000099: 37,2022           02316                           STORE    P21TIME                               
019682,000100: 37,2023           45335                           SLOAD    DSU                                   
019683,000101: 37,2024           01133                                    OPTION2                               
019684,000102: 37,2025           36100                                    P21ONENN                              
019685,000103: 37,2026           71230                           BHIZ     DLOAD                                 
019686,000104: 37,2027           76042                                    P21PROG2                              #  VEHICLE TO BE INTEGRATED IS LEM
019687,000105: 37,2030           02316                                    P21TIME                               #  VEHICLE TO BE INTEGRATED IS CSM
019688,000106: 37,2031           34041                           STCALL   TDEC1                                 #  INTEGRATE TO TIME SPECIFIED IN TDEC
019689,000107: 37,2032           27036                                    OTHPREC                               #  ADJUST UNITS FOR LAT-LONG ROUTINE
019690,000108: 37,2033           46135        P21PROGA           SLOAD    BHIZ                                  
019691,000109: 37,2034           00050                                    X2                                    
019692,000110: 37,2035           76050                                    P21PROG3                              
019693,000111: 37,2036           43175                           VLOAD    SETGO                                 
019694,000112: 37,2037           00001                                    RATT                                  
019695,000113: 37,2040           01423                                    LUNAFLAG                              
019696,000114: 37,2041           76053                                    P21PROG4                              
019697,000115: 37,2042           77745        P21PROG2           DLOAD                                          
019698,000116: 37,2043           02316                                    P21TIME                               
019699,000117: 37,2044           34041                           STCALL   TDEC1                                 
019700,000118: 37,2045           27022                                    THISPREC                              

Page 449

019702,000120: 37,2046           77650                           GOTO                                           
019703,000121: 37,2047           76033                                    P21PROGA                              
019704,000122: 37,2050           43175        P21PROG3           VLOAD    CLEAR                                 
019705,000123: 37,2051           00001                                    RATT                                  
019706,000124: 37,2052           01663                                    LUNAFLAG                              
019707,000125: 37,2053           16152        P21PROG4           STODL    ALPHAV                                
019708,000126: 37,2054           00015                                    TAT                                   
019709,000127: 37,2055           45014                           CLEAR    CALL                                  
019710,000128: 37,2056           00662                                    ERADFLAG                              
019711,000129: 37,2057           26322                                    LAT-LONG                              
019712,000130: 37,2060           77776                           EXIT                                           
019713,000131: 37,2061           32101                           CAF      V06N43                                #  DISPLAY LAT,LONG,ALT
019714,000132: 37,2062           04555                           TC       BANKCALL                              #  LAT,LONG = 1/2 REVS B0
019715,000133: 37,2063           20624                           CADR     GOFLASH                               #  ALT = KM  B14
019716,000134: 37,2064           04106                           TC       GOTOPOOH                              #  TERM
019717,000135: 37,2065           04106                           TC       GOTOPOOH                              
019718,000136: 37,2066           06006                           TC       INTPRET                               #  V32E RECYCLE
019719,000137: 37,2067           43345                           DLOAD    DAD                                   
019720,000138: 37,2070           02316                                    P21TIME                               
019721,000139: 37,2071           36076                                    600SEC                                #  600 SECONDS OR 10 MIN
019722,000140: 37,2072           01046                           STORE    DSPTEM1                               
019723,000141: 37,2073           77634                           RTB                                            
019724,000142: 37,2074           76011                                    P21PROG1                              
019725,000143: 
019726,000144: 37,2075           00003 25140  600SEC             2DEC     60000      B-28                       #  10 MIN
019727,000145: 37,2077           00001        P21ONENN           OCT      00001                                 #  NEEDED TO DETERMINE VEHICLE
019728,000146: 37,2100           00000                           OCT      00000                                 #  TO BE INTEGRATED
019729,000147: 37,2101           01453        V06N43             VN       00643                                 
019730,000148: 37,2102           01442        V6N34              VN       00634                                 

End of include-file GROUND_TRACKING_DETERMINATION_PROGRAM_-_P21.agc.  Parent file is MAIN.agc