Source Code

These source-code files were derived from scans of the Colossus 237 (Apollo 8 Command Module) program listing from the private collection of original AGC developer Fred Martin. Scanning was by Ron Burkey. Pre-existing Colossus 249 (Apollo 9 CM) source files were used as a template, and changes between Colossus 249 and Colossus 237 were manually transcribed by a team of volunteers. 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
Note that the date is the date of the printout, not the date of the program revision.

038507,000002:                                                                                                  ## Copyright:   Public domain.
038508,000003:                                                                                                  ## Filename:    S-BAND_ANTENNA_FOR_CM.agc
038509,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
038510,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
038511,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
038512,000007:                                                                                                  ## Assembler:   yaYUL
038513,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
038514,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
038515,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
038516,000011:                                                                                                  ## Mod history: 2011-03-06 JL   Adapted from corresponding Colossus 249 file.
038517,000012:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
038518,000013:                                                                                                  ##                              and fixed errors found.
038519,000014: 

Page 884

038521,000016: 23,3140                                           BANK     23                                    
038522,000017: 42,2000                                           SETLOC   SBAND                                 
038523,000018: 42,2000                                           BANK                                           
038524,000019: 
038525,000020: 42,3565                                           COUNT*   $$/R05                                
038526,000021: 42,3565  E4,1417                                  EBANK=   EMSALT                                
038527,000022: 
038528,000023: 42,3565           04555        SBANDANT           TC       BANKCALL                              #  V 64 E GETS US HERE
038529,000024: 42,3566           17573                           CADR     R02BOTH                               #  CHECK IF IMU IS ON AND ALIGNED
038530,000025: 42,3567           06006                           TC       INTPRET                               
038531,000026: 42,3570           45034                           RTB      CALL                                  
038532,000027: 42,3571           45505                                    LOADTIME                              #  PICKUP CURRENT TIME SCALED B-28
038533,000028: 42,3572           47432                                    CDUTRIG                               #  COMPUTE SINES AND COSINES OF CDU ANGLES
038534,000029: 42,3573           34041                           STCALL   TDEC1                                 #  ADVANCE INTEGRATION TO TIME IN TDEC1
038535,000030: 42,3574           27045                                    CSMCONIC                              #  USING CONIC INTEGRATION
038536,000031: 42,3575           46135                           SLOAD    BHIZ                                  #  ORIGIN OF REFERENCE INERTIAL SYSTEM IS
038537,000032: 42,3576           00050                                    X2                                    #  EARTH = 0, MOON = 2
038538,000033: 42,3577           65612                                    EISOI                                 
038539,000034: 42,3600           77775                           VLOAD                                          
038540,000035: 42,3601           00001                                    RATT                                  
038541,000036: 42,3602           00003                           STORE    RCM                                   #  MOVE RATT TO PREVENT WIPEOUT
038542,000037: 42,3603           45145                           DLOAD    CALL                                  #  MOON, PUSH ON
038543,000038: 42,3604           00015                                    TAT                                   #  GET ORIGINAL TIME
038544,000039: 42,3605           54115                                    LUNPOS                                #  COMPUTE POSITION VECTOR OF MOON
038545,000040: 42,3606           57455                           VAD      VCOMP                                 #  R= -(REM+RCM) = NEG. OF S/C POS. VEC
038546,000041: 42,3607           00003                                    RCM                                   
038547,000042: 42,3610           77650                           GOTO                                           
038548,000043: 42,3611           65614                                    EISOI      +2                         
038549,000044: 42,3612           57575        EISOI              VLOAD    VCOMP                                 #  EARTH, R= -RCM
038550,000045: 42,3613           00001                                    RATT                                  
038551,000046: 42,3614           64201                           SETPD    MXV                                   #  RCS TO STABLE MEMBER- B-1X B-29X B+1
038552,000047: 42,3615           00003                                    2D                                    #  2D
038553,000048: 42,3616           01736                                    REFSMMAT                              #  STABLE MEMBER.  B-1X B-29X B+1= B-29
038554,000049: 42,3617           65372                           VSL1     PDDL                                  #  8D
038555,000050: 42,3620           15332                                    HI6ZEROS                              
038556,000051: 42,3621           24025                           STOVL    YAWANG                                #  ZERO OUT YAWANG, SET UP FOR SMNB
038557,000052: 42,3622           00003                                    RCM                                   #  TRANSFORMATION. SM COORD. SCALED B-29
038558,000053: 42,3623           77624                           CALL                                           
038559,000054: 42,3624           47577                                    *SMNB*                                
038560,000055: 42,3625           00003                           STORE    R                                     #  SAVE NAV. BASE COORDINATES
038561,000056: 42,3626           63256                           UNIT     PDVL                                  #  14D
038562,000057: 42,3627           00003                                    R                                     
038563,000058: 42,3630           72431                           VPROJ    VSL2                                  #  COMPUTE PROJECTION OF VECTOR INTO CM
038564,000059: 42,3631           15324                                    HIUNITZ                               #  XY-PLANE, R-(R.UZ)UZ
038565,000060: 42,3632           40045                           BVSU     BOV                                   #  CLEAR OVERFLOW INDICATOR IF SET
038566,000061: 42,3633           00003                                    R                                     
038567,000062: 42,3634           65635                                    COVCNV                                
038568,000063: 42,3635           40056        COVCNV             UNIT     BOV                                   #  TEST OVERFLOW FOR INDICATION OF NULL
038569,000064: 42,3636           65652                                    NOADJUST                              #  VECTOR
038570,000065: 42,3637           50206                           PUSH     DOT                                   #  20D

Page 885

038572,000067: 42,3640           15330                                    HIUNITX                               #  COMPUTE YAW ANGLE = ACOS (URP.UX)
038573,000068: 42,3641           65552                           SL1      ACOS                                  #  REVOLUTIONS SCALED B0
038574,000069: 42,3642           50315                           PDVL     DOT                                   #  22D YAWANG
038575,000070: 42,3643           00017                                    URP                                   
038576,000071: 42,3644           15326                                    HIUNITY                               #  COMPUTE FOLLOWING- URP.UY
038577,000072: 42,3645           51152                           SL1      BPL                                   #  POSITIVE
038578,000073: 42,3646           65652                                    NOADJUST                              #  YES, 0- 180 DEGREES
038579,000074: 42,3647           45345                           DLOAD    DSU                                   #  NO, 181-360 DEGREES 20D
038580,000075: 42,3650           15340                                    DPPOSMAX                              #  COMPUTE 2 PI MINUS YAW ANGLE
038581,000076: 42,3651           77606                           PUSH                                           #  22D YAWANG
038582,000077: 42,3652           50375        NOADJUST           VLOAD    DOT                                   #  COMPUTE PITCH ANGLE
038583,000078: 42,3653           00011                                    UR                                    #  ACOS (UR.UZ) - PI/2
038584,000079: 42,3654           15324                                    HIUNITZ                               
038585,000080: 42,3655           65552                           SL1      ACOS                                  #  REVOLUTIONS B0
038586,000081: 42,3656           77625                           DSU                                            
038587,000082: 42,3657           15322                                    HIDP1/4                               
038588,000083: 42,3660           16321                           STODL    RHOSB                                 
038589,000084: 42,3661           00025                                    YAWANG                                
038590,000085: 42,3662           02323                           STORE    GAMMASB                               #  PATCH FOR CHECKOUT
038591,000086: 42,3663           77776                           EXIT                                           
038592,000087: 42,3664           31044                           CA       EXTVBACT                              #  IS BIT 5 STILL ON
038593,000088: 42,3665           74706                           MASK     BIT5                                  
038594,000089: 42,3666           00006                           EXTEND                                         
038595,000090: 42,3667           15423                           BZF      ENDEXT                                #  NO, WE HAVE BEEN ANSWERED
038596,000091: 42,3670           33704                           CAF      V06N51                                #  DISPLAY ANGLES
038597,000092: 42,3671           04555                           TC       BANKCALL                              
038598,000093: 42,3672           20504                           CADR     GOMARKFR                              
038599,000094: 42,3673           05514                           TC       B5OFF                                 #  TERMINATE
038600,000095: 42,3674           05514                           TC       B5OFF                                 
038601,000096: 42,3675           05112                           TC       ENDOFJOB                              #  RECYCLE
038602,000097: 42,3676           34710                           CAF      BIT3                                  #  IMMEDIATE RETURN
038603,000098: 42,3677           05415                           TC       BLANKET                               #  BLANK R3
038604,000099: 42,3700           34712                           CAF      BIT1                                  #  DELAY MINIMUM TIME TO ALLOW DISPLAY IN
038605,000100: 42,3701           04555                           TC       BANKCALL                              
038606,000101: 42,3702           01730                           CADR     DELAYJOB                              
038607,000102: 42,3703           13567                           TCF      SBANDANT   +2                         
038608,000103: 42,3704           01463        V06N51             VN       0651                                  
038609,000104: 42,3705                        RCM                EQUALS   2D                                    
038610,000105: 42,3705                        UR                 EQUALS   8D                                    
038611,000106: 42,3705                        URP                EQUALS   14D                                   
038612,000107: 42,3705                        YAWANG             EQUALS   20D                                   
038613,000108: 42,3705                        PITCHANG           EQUALS   22D                                   
038614,000109: 42,3705  0000002               R                  EQUALS   RCM                                   

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