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. |
045071,000002: ## Copyright: Public domain.
045072,000003: ## Filename: RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc
045073,000004: ## Purpose: Part of the source code for Colossus, build 249.
045074,000005: ## It is part of the source code for the Command Module's (CM)
045075,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
045076,000007: ## Assembler: yaYUL
045077,000008: ## Reference: Starts on p. 1008
045078,000009: ## Contact: Ron Burkey <info@sandroid.org>.
045079,000010: ## Website: www.ibiblio.org/apollo.
045080,000011: ## Mod history: 08/26/04 RSB. Began transcribing.
045081,000012: ## 2017-01-06 RSB Page numbers now agree with those on the
045082,000013: ## original harcopy, as opposed to the PDF page
045083,000014: ## numbers in 1701.pdf.
045084,000015: ## 2017-01-18 RSB Cross-diff'd comment text (not whitespace)
045085,000016: ## vs the already-proofed corresponding Colossus
045086,000017: ## 237 and Comanche 55 source-code files
045087,000018: ## but no errors found.
045088,000019: ##
045089,000020: ## The contents of the "Colossus249" files, in general, are transcribed
045090,000021: ## from a scanned copy of the program listing. Notations on this
045091,000022: ## document read, in part:
045092,000023: ##
045093,000024: ## Assemble revision 249 of AGC program Colossus by NASA
045094,000025: ## 2021111-041. October 28, 1968.
045095,000026: ##
045096,000027: ## This AGC program shall also be referred to as
045097,000028: ## Colossus 1A
045098,000029: ##
045099,000030: ## Prepared by
045100,000031: ## Massachusetts Institute of Technology
045101,000032: ## 75 Cambridge Parkway
045102,000033: ## Cambridge, Massachusetts
045103,000034: ## under NASA contract NAS 9-4065.
045104,000035: ##
045105,000036: ## Refer directly to the online document mentioned above for further information.
045106,000037: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
045107,000038: ##
045108,000039: ## In some cases, where the source code for Luminary 131 overlaps that of
045109,000040: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
045110,000041: ## source file, and then is proofed to incorporate any changes.
045111,000042:
![]() |
Page 1008 |
045113,000044: # CALCULATION OF AMGB, AMBG ONCE EVERY SECOND
045114,000045:
045115,000046: # AMGB = 1 SIN(PSI) 0
045116,000047: # 0 COS(PSI)COS(PHI) SIN(PHI)
045117,000048: # 0 -COS(PSI)SIN(PHI) COS(PHI)
045118,000049:
045119,000050: # AMBG = 1 -TAN(PSI)COS(PHI) TAN(PSI)SIN(PHI)
045120,000051: # 0 COS(PHI)/COS(PSI) -SIN(PHI)/COS(PSI)
045121,000052: # 0 SIN(PHI) COS(PHI)
045122,000053:
045123,000054: # WHERE PHI AND PSI ARE CDU ANGLES
045124,000055:
045125,000056: 20,3565 BANK 20
045126,000057: 22,2000 SETLOC DAPS8
045127,000058: 22,2000 BANK
045128,000059:
045129,000060: 22,3444 COUNT* $$/DAPEX
045130,000061: 22,3444 E6,1510 EBANK= KMPAC
045131,000062: 22,3444 30102 AMBGUPDT CA FLAGWRD6 # CHECK FOR RCS AUTOPILOT
045132,000063: 22,3445 00006 EXTEND
045133,000064: 22,3446 65112 BZMF ENDOFJOB # BIT15 = 0, BIT14 = 1
045134,000065: 22,3447 74675 MASK BIT14 # IF NOT RCS, EXIT
045135,000066: 22,3450 00006 EXTEND
045136,000067: 22,3451 15112 BZF ENDOFJOB # TO PROTECT TVC DAP ON SWITCHOVER
045137,000068:
045138,000069: 22,3452 30034 CA CDUZ
045139,000070: 22,3453 04770 TC SPSIN2
045140,000071: 22,3454 55640 TS AMGB1 # CALCULATE AMGB
045141,000072: 22,3455 30034 CA CDUZ
045142,000073: 22,3456 04767 TC SPCOS2
045143,000074: 22,3457 55645 TS CAPSI # MUST CHECK FOR GIMBAL LOCK
045144,000075: 22,3460 33504 CAF QUADANGL # = 7.25 DEGREES JET QUAD ANGULAR OFFSET
045145,000076: 22,3461 00006 EXTEND
045146,000077: 22,3462 20032 MSU CDUX
045147,000078: 22,3463 40000 COM # CDUX - 7.25 DEG
045148,000079: 22,3464 04767 TC SPCOS1
045149,000080: 22,3465 55644 TS AMGB8
045150,000081: 22,3466 00006 EXTEND
045151,000082: 22,3467 71645 MP CAPSI
045152,000083: 22,3470 55641 TS AMGB4
045153,000084: 22,3471 33504 CAF QUADANGL
045154,000085: 22,3472 00006 EXTEND
045155,000086: 22,3473 20032 MSU CDUX
045156,000087: 22,3474 40000 COM # CDUX - 7.25 DEG
045157,000088: 22,3475 04770 TC SPSIN1
045158,000089: 22,3476 55642 TS AMGB5
045159,000090: 22,3477 00006 EXTEND
045160,000091: 22,3500 71645 MP CAPSI
045161,000092: 22,3501 40000 COM
![]() |
Page 1009 |
045163,000094: 22,3502 55643 TS AMGB7
045164,000095: 22,3503 15112 TCF ENDOFJOB
045165,000096: 22,3504 01224 QUADANGL DEC 660 B-14 # = 7.25 DEGREES
045166,000097:
End of include-file RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc. Parent file is MAIN.agc