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.

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

Page 884

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

Page 885

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

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