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.

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

Page 1037

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

Page 1038

046323,000085: 22,3505           55643                           TS       AMGB7                                 
046324,000086: 22,3506           15217                           TCF      ENDOFJOB                              
046325,000087: 22,3507           01224        QUADANGL           DEC      660        B-14                       #  = 7.25 DEGREES
046326,000088: 

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