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.

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

Page 1005

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

Page 1006

043794,000067: 22,3502           55643                           TS       AMGB7                                 
043795,000068: 22,3503           15112                           TCF      ENDOFJOB                              
043796,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