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

043512,000002:                                                                                                 #  Copyright:    Public domain.
043513,000003:                                                                                                 #  Filename:      RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc
043514,000004:                                                                                                 #  Purpose:      Part of the source code for Colossus build 237.
043515,000005:                                                                                                 #                This is for the Command Module's (CM) Apollo Guidance
043516,000006:                                                                                                 #                Computer (AGC), we believe for Apollo 8.
043517,000007:                                                                                                 #  Assembler:    yaYUL
043518,000008:                                                                                                 #  Contact:      Jim Lawton <jim DOT lawton AT gmail DOT com>
043519,000009:                                                                                                 #  Website:      www.ibiblio.org/apollo/index.html
043520,000010:                                                                                                 #  Page scans:   www.ibiblio.org/apollo/ScansForConversion/Colossus237/
043521,000011:                                                                                                 #  Mod history:  2011-03-15 JL    Adapted from corresponding Colossus 249 file.
043522,000012: 
043523,000013:                                                                                                 # # Page 1012
043524,000014:                                                                                                 #  CALCULATION OF  AMGB, AMBG     ONCE EVERY SECOND
043525,000015: 
043526,000016:                                                                                                 #   AMGB =  1   SIN(PSI)           0
043527,000017:                                                                                                 #           0   COS(PSI)COS(PHI)   SIN(PHI)
043528,000018:                                                                                                 #           0   -COS(PSI)SIN(PHI)  COS(PHI)
043529,000019: 
043530,000020:                                                                                                 #   AMBG =  1   -TAN(PSI)COS(PHI)  TAN(PSI)SIN(PHI)
043531,000021:                                                                                                 #           0   COS(PHI)/COS(PSI)  -SIN(PHI)/COS(PSI)
043532,000022:                                                                                                 #           0   SIN(PHI)           COS(PHI)
043533,000023: 
043534,000024:                                                                                                 #   WHERE PHI AND PSI ARE CDU ANGLES
043535,000025: 
043536,000026: 
043537,000027: 20,3550                                          BANK     20                                    
043538,000028: 22,2000                                          SETLOC   DAPS8                                 
043539,000029: 22,2000                                          BANK                                           
043540,000030: 
043541,000031: 22,3444                                          COUNT*   $$/DAPEX                              
043542,000032: 22,3444  E6,1510                                 EBANK=   KMPAC                                 
043543,000033: 22,3444           30102        AMBGUPDT          CA       FLAGWRD6                              #  CHECK FOR RCS AUTOPILOT
043544,000034: 22,3445           00006                          EXTEND                                         
043545,000035: 22,3446           65112                          BZMF     ENDOFJOB                              #  BIT15 = 0, BIT14 = 1
043546,000036: 22,3447           74675                          MASK     BIT14                                 #  IF NOT RCS, EXIT
043547,000037: 22,3450           00006                          EXTEND                                         
043548,000038: 22,3451           15112                          BZF      ENDOFJOB                              #  TO PROTECT TVC DAP ON SWITCHOVER
043549,000039: 
043550,000040: 22,3452           30034                          CA       CDUZ                                  
043551,000041: 22,3453           04770                          TC       SPSIN2                                
043552,000042: 22,3454           55640                          TS       AMGB1                                 #  CALCULATE AMGB
043553,000043: 22,3455           30034                          CA       CDUZ                                  
043554,000044: 22,3456           04767                          TC       SPCOS2                                
043555,000045: 22,3457           55645                          TS       CAPSI                                 #  MUST CHECK FOR GIMBAL LOCK
043556,000046: 22,3460           33504                          CAF      QUADANGL                              #  = 7.25  DEGREES JET QUAD ANGULAR OFFSET
043557,000047: 22,3461           00006                          EXTEND                                         
043558,000048: 22,3462           20032                          MSU      CDUX                                  
043559,000049: 22,3463           40000                          COM                                            #  CDUX - 7.25 DEG
043560,000050: 22,3464           04767                          TC       SPCOS1                                
043561,000051: 22,3465           55644                          TS       AMGB8                                 
043562,000052: 22,3466           00006                          EXTEND                                         
043563,000053: 22,3467           71645                          MP       CAPSI                                 
043564,000054: 22,3470           55641                          TS       AMGB4                                 
043565,000055: 22,3471           33504                          CAF      QUADANGL                              
043566,000056: 22,3472           00006                          EXTEND                                         
043567,000057: 22,3473           20032                          MSU      CDUX                                  
043568,000058: 22,3474           40000                          COM                                            #  CDUX - 7.25 DEG
043569,000059: 22,3475           04770                          TC       SPSIN1                                
043570,000060: 22,3476           55642                          TS       AMGB5                                 
043571,000061: 22,3477           00006                          EXTEND                                         
043572,000062: 22,3500           71645                          MP       CAPSI                                 
043573,000063: 22,3501           40000                          COM                                            
043574,000064:                                                                                                 # # Page 1013
043575,000065: 22,3502           55643                          TS       AMGB7                                 
043576,000066: 22,3503           15112                          TCF      ENDOFJOB                              
043577,000067: 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