Source Code

These source-code files are part of a reconstructed copy of Comanche 44, the initial release (though not the final mission release) of the Apollo 10 Command Module (CM) Apollo Guidance Computer (AGC) software. Subsequent releases were Comanche 45 and Comanche 45/2 (the flown release on Apollo 10). The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 44, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 51 (separately previously reconstructed from an Apollo-era listing of Comanche 55, flown on Apollo 11). Comanche 51 source code was then modified by undoing changes known to have been made between revisions 44 and 51. The now-reconstructed Comanche 44 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code match those on the Comanche 55 printout, although the source code would likely have different page numbers in a contemporary Comanche 44 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 51. Here's a guide to the Apollo documentation referenced in those annotations:
In most cases, only the titles (rather than the full texts) of PCRs are known. In addition to the explanatory annotations, there is also a step-by-step commentary about the reconstruction process.

Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository.

041190,000002:                                                                                                  ## Copyright:   Public domain.
041191,000003:                                                                                                  ## Filename:    S-BAND_ANTENNA_FOR_CM.agc
041192,000004:                                                                                                  ## Purpose:     A section of Comanche revision 044.
041193,000005:                                                                                                  ##              It is part of the reconstructed source code for the
041194,000006:                                                                                                  ##              original release of the flight software for the Command
041195,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
041196,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
041197,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
041198,000010:                                                                                                  ##              exactly match those specified for Comanche 44 in NASA drawing
041199,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
041200,000012:                                                                                                  ##              reconstruction is correct.
041201,000013:                                                                                                  ## Assembler:   yaYUL
041202,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
041203,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
041204,000016:                                                                                                  ## Mod history: 2020-12-03 MAS  Created from Comanche 51.
041205,000017: 

Page 934

041207,000019: 23,3205                                           BANK     23                                    
041208,000020: 42,2000                                           SETLOC   SBAND                                 
041209,000021: 42,2000                                           BANK                                           
041210,000022: 
041211,000023: 42,3652                                           COUNT*   $$/R05                                
041212,000024: 42,3652  E4,1417                                  EBANK=   EMSALT                                
041213,000025: 
041214,000026: 42,3652           04662        SBANDANT           TC       BANKCALL                              #  V 64 E GETS US HERE
041215,000027: 42,3653           17653                           CADR     R02BOTH                               #  CHECK IF IMU IS ON AND ALIGNED
041216,000028: 42,3654           06006                           TC       INTPRET                               
041217,000029: 42,3655           45034                           RTB      CALL                                  
041218,000030: 42,3656           45510                                    LOADTIME                              #  PICKUP CURRENT TIME SCALED B-28
041219,000031: 42,3657           47477                                    CDUTRIG                               #  COMPUTE SINES AND COSINES OF CDU ANGLES
041220,000032: 42,3660           34041                           STCALL   TDEC1                                 #  ADVANCE INTEGRATION TO TIME IN TDEC1
041221,000033: 42,3661           27114                                    CSMCONIC                              #  USING CONIC INTEGRATION
041222,000034: 42,3662           46135                           SLOAD    BHIZ                                  #  ORIGIN OF REFERENCE INERTIAL SYSTEM IS
041223,000035: 42,3663           00050                                    X2                                    #  EARTH = 0, MOON = 2
041224,000036: 42,3664           65677                                    EISOI                                 
041225,000037: 42,3665           77775                           VLOAD                                          
041226,000038: 42,3666           00001                                    RATT                                  
041227,000039: 42,3667           00003                           STORE    RCM                                   #  MOVE RATT TO PREVENT WIPEOUT
041228,000040: 42,3670           45145                           DLOAD    CALL                                  #  MOON, PUSH ON
041229,000041: 42,3671           00015                                    TAT                                   #  GET ORIGINAL TIME
041230,000042: 42,3672           54115                                    LUNPOS                                #  COMPUTE POSITION VECTOR OF MOON
041231,000043: 42,3673           57455                           VAD      VCOMP                                 #  R= -(REM+RCM) = NEG. OF S/C POS. VEC
041232,000044: 42,3674           00003                                    RCM                                   
041233,000045: 42,3675           77650                           GOTO                                           
041234,000046: 42,3676           65701                                    EISOI      +2                         
041235,000047: 42,3677           57575        EISOI              VLOAD    VCOMP                                 #  EARTH, R= -RCM
041236,000048: 42,3700           00001                                    RATT                                  
041237,000049: 42,3701           64201                           SETPD    MXV                                   #  RCS TO STABLE MEMBER- B-1X B-29X B+1
041238,000050: 42,3702           00003                                    2D                                    #  2D
041239,000051: 42,3703           01736                                    REFSMMAT                              #  STABLE MEMBER.  B-1X B-29X B+1= B-29
041240,000052: 42,3704           65372                           VSL1     PDDL                                  #  8D
041241,000053: 42,3705           15335                                    HI6ZEROS                              
041242,000054: 42,3706           24025                           STOVL    YAWANG                                #  ZERO OUT YAWANG, SET UP FOR SMNB
041243,000055: 42,3707           00003                                    RCM                                   #  TRANSFORMATION.  SM COORD.  SCALED B-29
041244,000056: 42,3710           77624                           CALL                                           
041245,000057: 42,3711           47644                                    *SMNB*                                
041246,000058: 42,3712           00003                           STORE    R                                     #  SAVE NAV. BASE COORDINATES
041247,000059: 42,3713           63256                           UNIT     PDVL                                  #  14D
041248,000060: 42,3714           00003                                    R                                     
041249,000061: 42,3715           72431                           VPROJ    VSL2                                  #  COMPUTE PROJECTION OF VECTOR INTO CM
041250,000062: 42,3716           15327                                    HIUNITZ                               #  XY-PLANE, R-(R.UZ)UZ
041251,000063: 42,3717           40045                           BVSU     BOV                                   #  CLEAR OVERFLOW INDICATOR IF SET
041252,000064: 42,3720           00003                                    R                                     
041253,000065: 42,3721           65722                                    COVCNV                                
041254,000066: 42,3722           40056        COVCNV             UNIT     BOV                                   #  TEST OVERFLOW FOR INDICATION OF NULL
041255,000067: 42,3723           65737                                    NOADJUST                              #  VECTOR
041256,000068: 42,3724           50206                           PUSH     DOT                                   #  20D

Page 935

041258,000070: 42,3725           15333                                    HIUNITX                               #  COMPUTE YAW ANGLE = ACOS (URP.UX)
041259,000071: 42,3726           65552                           SL1      ACOS                                  #  REVOLUTIONS SCALED B0
041260,000072: 42,3727           50315                           PDVL     DOT                                   #  22D YAWANG
041261,000073: 42,3730           00017                                    URP                                   
041262,000074: 42,3731           15331                                    HIUNITY                               #  COMPUTE FOLLOWING- URP.UY
041263,000075: 42,3732           51152                           SL1      BPL                                   #  POSITIVE
041264,000076: 42,3733           65737                                    NOADJUST                              #  YES, 0-180 DEGREES
041265,000077: 42,3734           45345                           DLOAD    DSU                                   #  NO, 181-360 DEGREES 20D
041266,000078: 42,3735           15343                                    DPPOSMAX                              #  COMPUTE 2 PI MINUS YAW ANGLE
041267,000079: 42,3736           77606                           PUSH                                           #  22D YAWANG
041268,000080: 42,3737           50375        NOADJUST           VLOAD    DOT                                   #  COMPUTE PITCH ANGLE
041269,000081: 42,3740           00011                                    UR                                    #  ACOS (UR.UZ) - PI/2
041270,000082: 42,3741           15327                                    HIUNITZ                               
041271,000083: 42,3742           65552                           SL1      ACOS                                  #  REVOLUTIONS B0
041272,000084: 42,3743           77625                           DSU                                            
041273,000085: 42,3744           15325                                    HIDP1/4                               
041274,000086: 42,3745           16321                           STODL    RHOSB                                 
041275,000087: 42,3746           00025                                    YAWANG                                
041276,000088: 42,3747           02323                           STORE    GAMMASB                               #  PATCH FOR CHECKOUT
041277,000089: 42,3750           77776                           EXIT                                           
041278,000090: 42,3751           31044                           CA       EXTVBACT                              #  IS BIT 5 STILL ON
041279,000091: 42,3752           75013                           MASK     BIT5                                  
041280,000092: 42,3753           00006                           EXTEND                                         
041281,000093: 42,3754           15534                           BZF      ENDEXT                                #  NO, WE HAVE BEEN ANSWERED
041282,000094: 42,3755           33771                           CAF      V06N51                                #  DISPLAY ANGLES
041283,000095: 42,3756           04662                           TC       BANKCALL                              
041284,000096: 42,3757           20600                           CADR     GOMARKFR                              
041285,000097: 42,3760           05625                           TC       B5OFF                                 #  TERMINATE
041286,000098: 42,3761           05625                           TC       B5OFF                                 
041287,000099: 42,3762           05217                           TC       ENDOFJOB                              #  RECYCLE
041288,000100: 42,3763           35015                           CAF      BIT3                                  #  IMMEDIATE RETURN
041289,000101: 42,3764           05526                           TC       BLANKET                               #  BLANK R3
041290,000102: 42,3765           35017                           CAF      BIT1                                  #  DELAY MINIMUM TIME TO ALLOW DISPLAY IN
041291,000103: 42,3766           04662                           TC       BANKCALL                              
041292,000104: 42,3767           01732                           CADR     DELAYJOB                              
041293,000105: 42,3770           13654                           TCF      SBANDANT   +2                         
041294,000106: 42,3771           01463        V06N51             VN       0651                                  
041295,000107: 42,3772                        RCM                EQUALS   2D                                    
041296,000108: 42,3772                        UR                 EQUALS   8D                                    
041297,000109: 42,3772                        URP                EQUALS   14D                                   
041298,000110: 42,3772                        YAWANG             EQUALS   20D                                   
041299,000111: 42,3772                        PITCHANG           EQUALS   22D                                   
041300,000112: 42,3772  0000002               R                  EQUALS   RCM                                   
041301,000113: 42,3772  30,2000                                  SBANK=   LOWSUPER                              
041302,000114: 

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