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