Source Code
![]() |
This is the source-code for the Apollo 9 Command Module's Guidance Computer.
These files were derived originally from the scan from MIT's Dibner Institute's
now-discontinued website titled "History of Recent Science and Technology", which
in turn was originally created by Gary Neff, though his high-quality scans were
unfortunately reduced in legibility when presented online.
The markings on the front of the
printout imply that it was the original AGC developer Norm Brodeur's copy.
A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original
AGC developer Fred Martin. The source code was transcribed from
those images by Ron Burkey. 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:ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041 20'35 OCT. 28,1968Note that the date is the date of the printout, not the date of the program revision. |
039491,000002: ## Copyright: Public domain.
039492,000003: ## Filename: S-BAND_ANTENNA_FOR_CM.agc
039493,000004: ## Purpose: Part of the source code for Colossus, build 249.
039494,000005: ## It is part of the source code for the Command Module's (CM)
039495,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
039496,000007: ## Assembler: yaYUL
039497,000008: ## Reference: pp. 887-888.
039498,000009: ## Contact: Ron Burkey <info@sandroid.org>.
039499,000010: ## Website: www.ibiblio.org/apollo.
039500,000011: ## Mod history: 08/22/04 RSB. Began transcribing.
039501,000012: ## 2017-01-06 RSB Page numbers now agree with those on the
039502,000013: ## original harcopy, as opposed to the PDF page
039503,000014: ## numbers in 1701.pdf.
039504,000015: ## 2017-01-18 RSB Cross-diff'd comment text (not whitespace)
039505,000016: ## vs the already-proofed corresponding Colossus
039506,000017: ## 237 and Comanche 55 source-code files
039507,000018: ## and corrected errors found.
039508,000019: ##
039509,000020: ## The contents of the "Colossus249" files, in general, are transcribed
039510,000021: ## from a scanned copy of the program listing. Notations on this
039511,000022: ## document read, in part:
039512,000023: ##
039513,000024: ## Assemble revision 249 of AGC program Colossus by NASA
039514,000025: ## 2021111-041. October 28, 1968.
039515,000026: ##
039516,000027: ## This AGC program shall also be referred to as
039517,000028: ## Colossus 1A
039518,000029: ##
039519,000030: ## Prepared by
039520,000031: ## Massachusetts Institute of Technology
039521,000032: ## 75 Cambridge Parkway
039522,000033: ## Cambridge, Massachusetts
039523,000034: ## under NASA contract NAS 9-4065.
039524,000035: ##
039525,000036: ## Refer directly to the online document mentioned above for further information.
039526,000037: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
039527,000038: ##
039528,000039: ## In some cases, where the source code for Luminary 131 overlaps that of
039529,000040: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
039530,000041: ## source file, and then is proofed to incorporate any changes.
039531,000042:
![]() |
Page 887 |
039533,000044: 23,3140 BANK 23
039534,000045: 42,2000 SETLOC SBAND
039535,000046: 42,2000 BANK
039536,000047:
039537,000048: 42,3565 COUNT* $$/R05
039538,000049: 42,3565 E4,1417 EBANK= EMSALT
039539,000050:
039540,000051: 42,3565 04555 SBANDANT TC BANKCALL # V 64 E GETS US HERE
039541,000052: 42,3566 17573 CADR R02BOTH # CHECK IF IMU IS ON AND ALIGNED
039542,000053: 42,3567 06006 TC INTPRET
039543,000054: 42,3570 45034 RTB CALL
039544,000055: 42,3571 45505 LOADTIME # PICKUP CURRENT TIME SCALED B-28
039545,000056: 42,3572 47432 CDUTRIG # COMPUTE SINES AND COSINES OF CDU ANGLES
039546,000057: 42,3573 34041 STCALL TDEC1 # ADVANCE INTEGRATION TO TIME IN TDEC1
039547,000058: 42,3574 27045 CSMCONIC # USING CONIC INTEGRATION
039548,000059: 42,3575 46135 SLOAD BHIZ # ORIGIN OF REFERENCE INERTIAL SYSTEM IS
039549,000060: 42,3576 00050 X2 # EARTH = 0, MOON = 2
039550,000061: 42,3577 65612 EISOI
039551,000062: 42,3600 77775 VLOAD
039552,000063: 42,3601 00001 RATT
039553,000064: 42,3602 00003 STORE RCM # MOVE RATT TO PREVENT WIPEOUT
039554,000065: 42,3603 45145 DLOAD CALL # MOON, PUSH ON
039555,000066: 42,3604 00015 TAT # GET ORIGINAL TIME
039556,000067: 42,3605 54115 LUNPOS # COMPUTE POSITION VECTOR OF MOON
039557,000068: 42,3606 57455 VAD VCOMP # R= -(REM+RCM) = NEG. OF S/C POS. VEC
039558,000069: 42,3607 00003 RCM
039559,000070: 42,3610 77650 GOTO
039560,000071: 42,3611 65614 EISOI +2
039561,000072: 42,3612 57575 EISOI VLOAD VCOMP # EARTH, R= -RCM
039562,000073: 42,3613 00001 RATT
039563,000074: 42,3614 64201 SETPD MXV # RCS TO STABLE MEMBER- B-1X B-29X B+1
039564,000075: 42,3615 00003 2D # 2D
039565,000076: 42,3616 01736 REFSMMAT # STABLE MEMBER. B-1X B-29X B+1= B-29
039566,000077: 42,3617 65372 VSL1 PDDL # 8D
039567,000078: 42,3620 15332 HI6ZEROS
039568,000079: 42,3621 24025 STOVL YAWANG # ZERO OUT YAWANG, SET UP FOR SMNB
039569,000080: 42,3622 00003 RCM # TRANSFORMATION. SM COORD. SCALED B-29
039570,000081: 42,3623 77624 CALL
039571,000082: 42,3624 47577 *SMNB*
039572,000083: 42,3625 00003 STORE R # SAVE NAV. BASE COORDINATES
039573,000084: 42,3626 63256 UNIT PDVL # 14D
039574,000085: 42,3627 00003 R
039575,000086: 42,3630 72431 VPROJ VSL2 # COMPUTE PROJECTION OF VECTOR INTO CM
039576,000087: 42,3631 15324 HIUNITZ # XY-PLANE, R-(R.UZ)UZ
039577,000088: 42,3632 40045 BVSU BOV # CLEAR OVERFLOW INDICATOR IF SET
039578,000089: 42,3633 00003 R
039579,000090: 42,3634 65635 COVCNV
039580,000091: 42,3635 40056 COVCNV UNIT BOV # TEST OVERFLOW FOR INDICATION OF NULL
039581,000092: 42,3636 65652 NOADJUST # VECTOR
039582,000093: 42,3637 50206 PUSH DOT # 20D
![]() |
Page 888 |
039584,000095: 42,3640 15330 HIUNITX # COMPUTE YAW ANGLE = ACOS (URP.UX)
039585,000096: 42,3641 65552 SL1 ACOS # REVOLUTIONS SCALED B0
039586,000097: 42,3642 50315 PDVL DOT # 22D YAWANG
039587,000098: 42,3643 00017 URP
039588,000099: 42,3644 15326 HIUNITY # COMPUTE FOLLOWING- URP.UY
039589,000100: 42,3645 51152 SL1 BPL # POSITIVE
039590,000101: 42,3646 65652 NOADJUST # YES, 0-180 DEGREES
039591,000102: 42,3647 45345 DLOAD DSU # NO, 181-360 DEGREES 20D
039592,000103: 42,3650 15340 DPPOSMAX # COMPUTE 2 PI MINUS YAW ANGLE
039593,000104: 42,3651 77606 PUSH # 22D YAWANG
039594,000105: 42,3652 50375 NOADJUST VLOAD DOT # COMPUTE PITCH ANGLE
039595,000106: 42,3653 00011 UR # ACOS (UR.UZ) - PI/2
039596,000107: 42,3654 15324 HIUNITZ
039597,000108: 42,3655 65552 SL1 ACOS # REVOLUTIONS B0
039598,000109: 42,3656 77625 DSU
039599,000110: 42,3657 15322 HIDP1/4
039600,000111: 42,3660 16321 STODL RHOSB
039601,000112: 42,3661 00025 YAWANG
039602,000113: 42,3662 02323 STORE GAMMASB # PATCH FOR CHECKOUT
039603,000114: 42,3663 77776 EXIT
039604,000115: 42,3664 31044 CA EXTVBACT # IS BIT 5 STILL ON
039605,000116: 42,3665 74706 MASK BIT5
039606,000117: 42,3666 00006 EXTEND
039607,000118: 42,3667 15423 BZF ENDEXT # NO, WE HAVE BEEN ANSWERED
039608,000119: 42,3670 33704 CAF V06N51 # DISPLAY ANGLES
039609,000120: 42,3671 04555 TC BANKCALL
039610,000121: 42,3672 20504 CADR GOMARKFR
039611,000122: 42,3673 05514 TC B5OFF # TERMINATE
039612,000123: 42,3674 05514 TC B5OFF
039613,000124: 42,3675 05112 TC ENDOFJOB # RECYCLE
039614,000125: 42,3676 34710 CAF BIT3 # IMMEDIATE RETURN
039615,000126: 42,3677 05415 TC BLANKET # BLANK R3
039616,000127: 42,3700 34712 CAF BIT1 # DELAY MINIMUM TIME TO ALLOW DISPLAY IN
039617,000128: 42,3701 04555 TC BANKCALL
039618,000129: 42,3702 01732 CADR DELAYJOB
039619,000130: 42,3703 13567 TCF SBANDANT +2
039620,000131: 42,3704 01463 V06N51 VN 0651
039621,000132: 42,3705 RCM EQUALS 2D
039622,000133: 42,3705 UR EQUALS 8D
039623,000134: 42,3705 URP EQUALS 14D
039624,000135: 42,3705 YAWANG EQUALS 20D
039625,000136: 42,3705 PITCHANG EQUALS 22D
039626,000137: 42,3705 0000002 R EQUALS RCM
039627,000138:
End of include-file S-BAND_ANTENNA_FOR_CM.agc. Parent file is MAIN.agc