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.

041601,000002:                                                                                                  ## Copyright:   Public domain.
041602,000003:                                                                                                  ## Filename:    S-BAND_ANTENNA_FOR_CM.agc
041603,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
041604,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
041605,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
041606,000007:                                                                                                  ## Assembler:   yaYUL
041607,000008:                                                                                                  ## Contact:     Jim Lawton <jim.lawton@gmail.com>.
041608,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
041609,000010:                                                                                                  ## Pages:       934-935
041610,000011:                                                                                                  ## Mod history: 2009-05-11 JVL  Adapted from the Colossus249/ file
041611,000012:                                                                                                  ##                              of the same name, using Comanche055 page
041612,000013:                                                                                                  ##                              images.
041613,000014:                                                                                                  ##              2016-12-21 RSB  Proofed comment text using octopus/ProoferComments
041614,000015:                                                                                                  ##                              and corrected the errors found.
041615,000016:                                                                                                  ##
041616,000017:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
041617,000018:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
041618,000019:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
041619,000020:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
041620,000021:                                                                                                  ## consequent reduction in image quality as well) are available online at
041621,000022:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
041622,000023:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the
041623,000024:                                                                                                  ## (much) higher-quality images which Paul actually created.
041624,000025:                                                                                                  ##
041625,000026:                                                                                                  ## Notations on the hardcopy document read, in part:
041626,000027:                                                                                                  ##
041627,000028:                                                                                                  ##    Assemble revision 055 of AGC program Comanche by NASA
041628,000029:                                                                                                  ##    2021113-051.  10:28 APR. 1, 1969 
041629,000030:                                                                                                  ##
041630,000031:                                                                                                  ##    This AGC program shall also be referred to as
041631,000032:                                                                                                  ##            Colossus 2A
041632,000033: 

Page 934

041634,000035: 23,3205                                           BANK     23                                    
041635,000036: 42,2000                                           SETLOC   SBAND                                 
041636,000037: 42,2000                                           BANK                                           
041637,000038: 
041638,000039: 42,3652                                           COUNT*   $$/R05                                
041639,000040: 42,3652  E4,1417                                  EBANK=   EMSALT                                
041640,000041: 
041641,000042: 42,3652           04662        SBANDANT           TC       BANKCALL                              #  V 64 E GETS US HERE
041642,000043: 42,3653           17653                           CADR     R02BOTH                               #  CHECK IF IMU IS ON AND ALIGNED
041643,000044: 42,3654           06006                           TC       INTPRET                               
041644,000045: 42,3655           45034                           RTB      CALL                                  
041645,000046: 42,3656           45510                                    LOADTIME                              #  PICKUP CURRENT TIME SCALED B-28
041646,000047: 42,3657           47477                                    CDUTRIG                               #  COMPUTE SINES AND COSINES OF CDU ANGLES
041647,000048: 42,3660           34041                           STCALL   TDEC1                                 #  ADVANCE INTEGRATION TO TIME IN TDEC1
041648,000049: 42,3661           27114                                    CSMCONIC                              #  USING CONIC INTEGRATION
041649,000050: 42,3662           46135                           SLOAD    BHIZ                                  #  ORIGIN OF REFERENCE INERTIAL SYSTEM IS
041650,000051: 42,3663           00050                                    X2                                    #  EARTH = 0, MOON = 2
041651,000052: 42,3664           65677                                    EISOI                                 
041652,000053: 42,3665           77775                           VLOAD                                          
041653,000054: 42,3666           00001                                    RATT                                  
041654,000055: 42,3667           00003                           STORE    RCM                                   #  MOVE RATT TO PREVENT WIPEOUT
041655,000056: 42,3670           45145                           DLOAD    CALL                                  #  MOON, PUSH ON
041656,000057: 42,3671           00015                                    TAT                                   #  GET ORIGINAL TIME
041657,000058: 42,3672           54115                                    LUNPOS                                #  COMPUTE POSITION VECTOR OF MOON
041658,000059: 42,3673           57455                           VAD      VCOMP                                 #  R= -(REM+RCM) = NEG. OF S/C POS. VEC
041659,000060: 42,3674           00003                                    RCM                                   
041660,000061: 42,3675           77650                           GOTO                                           
041661,000062: 42,3676           65701                                    EISOI      +2                         
041662,000063: 42,3677           57575        EISOI              VLOAD    VCOMP                                 #  EARTH, R= -RCM
041663,000064: 42,3700           00001                                    RATT                                  
041664,000065: 42,3701           64201                           SETPD    MXV                                   #  RCS TO STABLE MEMBER- B-1X B-29X B+1
041665,000066: 42,3702           00003                                    2D                                    #  2D
041666,000067: 42,3703           01736                                    REFSMMAT                              #  STABLE MEMBER.  B-1X B-29X B+1= B-29
041667,000068: 42,3704           65372                           VSL1     PDDL                                  #  8D
041668,000069: 42,3705           15335                                    HI6ZEROS                              
041669,000070: 42,3706           24025                           STOVL    YAWANG                                #  ZERO OUT YAWANG, SET UP FOR SMNB
041670,000071: 42,3707           00003                                    RCM                                   #  TRANSFORMATION.  SM COORD.  SCALED B-29
041671,000072: 42,3710           77624                           CALL                                           
041672,000073: 42,3711           47644                                    *SMNB*                                
041673,000074: 42,3712           00003                           STORE    R                                     #  SAVE NAV. BASE COORDINATES
041674,000075: 42,3713           63256                           UNIT     PDVL                                  #  14D
041675,000076: 42,3714           00003                                    R                                     
041676,000077: 42,3715           72431                           VPROJ    VSL2                                  #  COMPUTE PROJECTION OF VECTOR INTO CM
041677,000078: 42,3716           15327                                    HIUNITZ                               #  XY-PLANE, R-(R.UZ)UZ
041678,000079: 42,3717           40045                           BVSU     BOV                                   #  CLEAR OVERFLOW INDICATOR IF SET
041679,000080: 42,3720           00003                                    R                                     
041680,000081: 42,3721           65722                                    COVCNV                                
041681,000082: 42,3722           40056        COVCNV             UNIT     BOV                                   #  TEST OVERFLOW FOR INDICATION OF NULL
041682,000083: 42,3723           65737                                    NOADJUST                              #  VECTOR
041683,000084: 42,3724           50206                           PUSH     DOT                                   #  20D

Page 935

041685,000086: 42,3725           15333                                    HIUNITX                               #  COMPUTE YAW ANGLE = ACOS (URP.UX)
041686,000087: 42,3726           65552                           SL1      ACOS                                  #  REVOLUTIONS SCALED B0
041687,000088: 42,3727           50315                           PDVL     DOT                                   #  22D YAWANG
041688,000089: 42,3730           00017                                    URP                                   
041689,000090: 42,3731           15331                                    HIUNITY                               #  COMPUTE FOLLOWING- URP.UY
041690,000091: 42,3732           51152                           SL1      BPL                                   #  POSITIVE
041691,000092: 42,3733           65737                                    NOADJUST                              #  YES, 0-180 DEGREES
041692,000093: 42,3734           45345                           DLOAD    DSU                                   #  NO, 181-360 DEGREES 20D
041693,000094: 42,3735           15343                                    DPPOSMAX                              #  COMPUTE 2 PI MINUS YAW ANGLE
041694,000095: 42,3736           77606                           PUSH                                           #  22D YAWANG
041695,000096: 42,3737           50375        NOADJUST           VLOAD    DOT                                   #  COMPUTE PITCH ANGLE
041696,000097: 42,3740           00011                                    UR                                    #  ACOS (UR.UZ) - PI/2
041697,000098: 42,3741           15327                                    HIUNITZ                               
041698,000099: 42,3742           65552                           SL1      ACOS                                  #  REVOLUTIONS B0
041699,000100: 42,3743           77625                           DSU                                            
041700,000101: 42,3744           15325                                    HIDP1/4                               
041701,000102: 42,3745           16321                           STODL    RHOSB                                 
041702,000103: 42,3746           00025                                    YAWANG                                
041703,000104: 42,3747           02323                           STORE    GAMMASB                               #  PATCH FOR CHECKOUT
041704,000105: 42,3750           77776                           EXIT                                           
041705,000106: 42,3751           31044                           CA       EXTVBACT                              #  IS BIT 5 STILL ON
041706,000107: 42,3752           75013                           MASK     BIT5                                  
041707,000108: 42,3753           00006                           EXTEND                                         
041708,000109: 42,3754           15534                           BZF      ENDEXT                                #  NO, WE HAVE BEEN ANSWERED
041709,000110: 42,3755           33771                           CAF      V06N51                                #  DISPLAY ANGLES
041710,000111: 42,3756           04662                           TC       BANKCALL                              
041711,000112: 42,3757           20600                           CADR     GOMARKFR                              
041712,000113: 42,3760           05625                           TC       B5OFF                                 #  TERMINATE
041713,000114: 42,3761           05625                           TC       B5OFF                                 
041714,000115: 42,3762           05217                           TC       ENDOFJOB                              #  RECYCLE
041715,000116: 42,3763           35015                           CAF      BIT3                                  #  IMMEDIATE RETURN
041716,000117: 42,3764           05526                           TC       BLANKET                               #  BLANK R3
041717,000118: 42,3765           35017                           CAF      BIT1                                  #  DELAY MINIMUM TIME TO ALLOW DISPLAY IN
041718,000119: 42,3766           04662                           TC       BANKCALL                              
041719,000120: 42,3767           01732                           CADR     DELAYJOB                              
041720,000121: 42,3770           13654                           TCF      SBANDANT   +2                         
041721,000122: 42,3771           01463        V06N51             VN       0651                                  
041722,000123: 42,3772                        RCM                EQUALS   2D                                    
041723,000124: 42,3772                        UR                 EQUALS   8D                                    
041724,000125: 42,3772                        URP                EQUALS   14D                                   
041725,000126: 42,3772                        YAWANG             EQUALS   20D                                   
041726,000127: 42,3772                        PITCHANG           EQUALS   22D                                   
041727,000128: 42,3772  0000002               R                  EQUALS   RCM                                   
041728,000129: 42,3772  30,2000                                  SBANK=   LOWSUPER                              
041729,000130: 

End of include-file S-BAND_ANTENNA_FOR_CM.agc.  Parent file is MAIN.agc