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.

043735,000002:                                                                                                  ## Copyright:   Public domain.
043736,000003:                                                                                                  ## Filename:    RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc
043737,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
043738,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
043739,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
043740,000007:                                                                                                  ## Assembler:   yaYUL
043741,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
043742,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
043743,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
043744,000011:                                                                                                  ## Mod history: 2011-03-15 JL   Adapted from corresponding Colossus 249 file.
043745,000012:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
043746,000013:                                                                                                  ##                              and fixed errors found.
043747,000014: 

Page 1005

043749,000016:                                                                                                  #  CALCULATION OF  AMGB, AMBG     ONCE EVERY SECOND
043750,000017: 
043751,000018:                                                                                                  #   AMGB =  1   SIN(PSI)           0
043752,000019:                                                                                                  #           0   COS(PSI)COS(PHI)   SIN(PHI)
043753,000020:                                                                                                  #           0   -COS(PSI)SIN(PHI)  COS(PHI)
043754,000021: 
043755,000022:                                                                                                  #   AMBG =  1   -TAN(PSI)COS(PHI)  TAN(PSI)SIN(PHI)
043756,000023:                                                                                                  #           0   COS(PHI)/COS(PSI)  -SIN(PHI)/COS(PSI)
043757,000024:                                                                                                  #           0   SIN(PHI)           COS(PHI)
043758,000025: 
043759,000026:                                                                                                  #   WHERE PHI AND PSI ARE CDU ANGLES
043760,000027: 
043761,000028: 
043762,000029: 20,3550                                           BANK     20                                    
043763,000030: 22,2000                                           SETLOC   DAPS8                                 
043764,000031: 22,2000                                           BANK                                           
043765,000032: 
043766,000033: 22,3444                                           COUNT*   $$/DAPEX                              
043767,000034: 22,3444  E6,1510                                  EBANK=   KMPAC                                 
043768,000035: 22,3444           30102        AMBGUPDT           CA       FLAGWRD6                              #  CHECK FOR RCS AUTOPILOT
043769,000036: 22,3445           00006                           EXTEND                                         
043770,000037: 22,3446           65112                           BZMF     ENDOFJOB                              #  BIT15 = 0, BIT14 = 1
043771,000038: 22,3447           74675                           MASK     BIT14                                 #  IF NOT RCS, EXIT
043772,000039: 22,3450           00006                           EXTEND                                         
043773,000040: 22,3451           15112                           BZF      ENDOFJOB                              #  TO PROTECT TVC DAP ON SWITCHOVER
043774,000041: 
043775,000042: 22,3452           30034                           CA       CDUZ                                  
043776,000043: 22,3453           04770                           TC       SPSIN2                                
043777,000044: 22,3454           55640                           TS       AMGB1                                 #  CALCULATE AMGB
043778,000045: 22,3455           30034                           CA       CDUZ                                  
043779,000046: 22,3456           04767                           TC       SPCOS2                                
043780,000047: 22,3457           55645                           TS       CAPSI                                 #  MUST CHECK FOR GIMBAL LOCK
043781,000048: 22,3460           33504                           CAF      QUADANGL                              #  = 7.25  DEGREES JET QUAD ANGULAR OFFSET
043782,000049: 22,3461           00006                           EXTEND                                         
043783,000050: 22,3462           20032                           MSU      CDUX                                  
043784,000051: 22,3463           40000                           COM                                            #  CDUX - 7.25 DEG
043785,000052: 22,3464           04767                           TC       SPCOS1                                
043786,000053: 22,3465           55644                           TS       AMGB8                                 
043787,000054: 22,3466           00006                           EXTEND                                         
043788,000055: 22,3467           71645                           MP       CAPSI                                 
043789,000056: 22,3470           55641                           TS       AMGB4                                 
043790,000057: 22,3471           33504                           CAF      QUADANGL                              
043791,000058: 22,3472           00006                           EXTEND                                         
043792,000059: 22,3473           20032                           MSU      CDUX                                  
043793,000060: 22,3474           40000                           COM                                            #  CDUX - 7.25 DEG
043794,000061: 22,3475           04770                           TC       SPSIN1                                
043795,000062: 22,3476           55642                           TS       AMGB5                                 
043796,000063: 22,3477           00006                           EXTEND                                         
043797,000064: 22,3500           71645                           MP       CAPSI                                 
043798,000065: 22,3501           40000                           COM                                            

Page 1006

043800,000067: 22,3502           55643                           TS       AMGB7                                 
043801,000068: 22,3503           15112                           TCF      ENDOFJOB                              
043802,000069: 22,3504           01224        QUADANGL           DEC      660        B-14                       #  = 7.25 DEGREES

End of include-file RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc.  Parent file is MAIN.agc