Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality 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 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051
	10:28 APR.  1,1969
Note that the date is the date of the printout, not the date of the program revision.

046255,000002:                                                                                                  ## Copyright:   Public domain.
046256,000003:                                                                                                  ## Filename:    RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc
046257,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
046258,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
046259,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
046260,000007:                                                                                                  ## Assembler:   yaYUL
046261,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
046262,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
046263,000010:                                                                                                  ## Pages:       1037-1038
046264,000011:                                                                                                  ## Mod history: 2009-05-13 RSB  Adapted from the Colossus249/ file of the
046265,000012:                                                                                                  ##                              same name, using Comanche055 page images.
046266,000013:                                                                                                  ##              2009-05-20 RSB  A "Page N" comment was corrected.
046267,000014:                                                                                                  ##              2016-12-21 RSB  Proofed comment text using octopus/ProoferComments
046268,000015:                                                                                                  ##                              but no errors found.
046269,000016:                                                                                                  ##
046270,000017:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
046271,000018:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
046272,000019:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
046273,000020:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
046274,000021:                                                                                                  ## consequent reduction in image quality as well) are available online at
046275,000022:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
046276,000023:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the 
046277,000024:                                                                                                  ## (much) higher-quality images which Paul actually created.
046278,000025:                                                                                                  ##
046279,000026:                                                                                                  ## Notations on the hardcopy document read, in part:
046280,000027:                                                                                                  ##
046281,000028:                                                                                                  ##      Assemble revision 055 of AGC program Comanche by NASA
046282,000029:                                                                                                  ##      2021113-051.  10:28 APR. 1, 1969  
046283,000030:                                                                                                  ##
046284,000031:                                                                                                  ##      This AGC program shall also be referred to as
046285,000032:                                                                                                  ##                      Colossus 2A
046286,000033: 

Page 1037

046288,000035:                                                                                                  #  CALCULATION OF  AMGB, AMBG  ONCE EVERY SECOND
046289,000036: 
046290,000037:                                                                                                  #        AMGB =  1       SIN(PSI)                0
046291,000038:                                                                                                  #                0       COS(PSI)COS(PHI)        SIN(PHI)
046292,000039:                                                                                                  #                0       -COS(PSI)SIN(PHI)       COS(PHI)
046293,000040: 
046294,000041:                                                                                                  #        AMBG =  1       -TAN(PSI)COS(PHI)       TAN(PSI)SIN(PHI)
046295,000042:                                                                                                  #                0       COS(PHI)/COS(PSI)       -SIN(PHI)/COS(PSI)
046296,000043:                                                                                                  #                0       SIN(PHI)                COS(PHI)
046297,000044: 
046298,000045:                                                                                                  #  WHERE PHI AND PSI ARE CDU ANGLES
046299,000046: 
046300,000047: 20,3612                                           BANK     20                                    
046301,000048: 22,2000                                           SETLOC   DAPS8                                 
046302,000049: 22,2000                                           BANK                                           
046303,000050: 
046304,000051: 22,3447                                           COUNT*   $$/DAPEX                              
046305,000052: 22,3447  E6,1510                                  EBANK=   KMPAC                                 
046306,000053: 22,3447           30102        AMBGUPDT           CA       FLAGWRD6                              #  CHECK FOR RCS AUTOPILOT
046307,000054: 22,3450           00006                           EXTEND                                         
046308,000055: 22,3451           65217                           BZMF     ENDOFJOB                              #  BIT15 = 0, BIT14 = 1
046309,000056: 22,3452           75002                           MASK     BIT14                                 #  IF NOT RCS, EXIT
046310,000057: 22,3453           00006                           EXTEND                                         
046311,000058: 22,3454           15217                           BZF      ENDOFJOB                              #  TO PROTECT TVC DAP ON SWITCHOVER
046312,000059: 
046313,000060: 22,3455           30034                           CA       CDUZ                                  
046314,000061: 22,3456           05075                           TC       SPSIN2                                
046315,000062: 22,3457           55640                           TS       AMGB1                                 #  CALCULATE AMGB
046316,000063: 22,3460           30034                           CA       CDUZ                                  
046317,000064: 22,3461           05074                           TC       SPCOS2                                
046318,000065: 22,3462           55645                           TS       CAPSI                                 #  MUST CHECK FOR GIMBAL LOCK
046319,000066: 22,3463           33507                           CAF      QUADANGL                              #  = 7.25  DEGREES JET QUAD ANGULAR OFFSET
046320,000067: 22,3464           00006                           EXTEND                                         
046321,000068: 22,3465           20032                           MSU      CDUX                                  
046322,000069: 22,3466           40000                           COM                                            #  CDUX - 7.25 DEG
046323,000070: 22,3467           05074                           TC       SPCOS1                                
046324,000071: 22,3470           55644                           TS       AMGB8                                 
046325,000072: 22,3471           00006                           EXTEND                                         
046326,000073: 22,3472           71645                           MP       CAPSI                                 
046327,000074: 22,3473           55641                           TS       AMGB4                                 
046328,000075: 22,3474           33507                           CAF      QUADANGL                              
046329,000076: 22,3475           00006                           EXTEND                                         
046330,000077: 22,3476           20032                           MSU      CDUX                                  
046331,000078: 22,3477           40000                           COM                                            #  CDUX - 7.25 DEG
046332,000079: 22,3500           05075                           TC       SPSIN1                                
046333,000080: 22,3501           55642                           TS       AMGB5                                 
046334,000081: 22,3502           00006                           EXTEND                                         
046335,000082: 22,3503           71645                           MP       CAPSI                                 
046336,000083: 22,3504           40000                           COM                                            

Page 1038

046338,000085: 22,3505           55643                           TS       AMGB7                                 
046339,000086: 22,3506           15217                           TCF      ENDOFJOB                              
046340,000087: 22,3507           01224        QUADANGL           DEC      660        B-14                       #  = 7.25 DEGREES
046341,000088: 

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