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. |
043472,000002: ## Copyright: Public domain.
043473,000003: ## Filename: MYSUBS.agc
043474,000004: ## Purpose: Part of the source code for Colossus, build 249.
043475,000005: ## It is part of the source code for the Command Module's (CM)
043476,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
043477,000007: ## Assembler: yaYUL
043478,000008: ## Reference: Begins on p. 970.
043479,000009: ## Contact: Ron Burkey <info@sandroid.org>.
043480,000010: ## Website: www.ibiblio.org/apollo.
043481,000011: ## Mod history: 08/25/04 RSB. Began transcribing.
043482,000012: ## 2017-01-06 RSB Page numbers now agree with those on the
043483,000013: ## original harcopy, as opposed to the PDF page
043484,000014: ## numbers in 1701.pdf.
043485,000015: ## 2017-01-15 RSB Comment-text proofed by 3-way diff'ing vs
043486,000016: ## Colossus 237 and Comanche 55. No differences
043487,000017: ## were found, so no corrections were made.
043488,000018: ##
043489,000019: ## The contents of the "Colossus249" files, in general, are transcribed
043490,000020: ## from a scanned copy of the program listing. Notations on this
043491,000021: ## document read, in part:
043492,000022: ##
043493,000023: ## Assemble revision 249 of AGC program Colossus by NASA
043494,000024: ## 2021111-041. October 28, 1968.
043495,000025: ##
043496,000026: ## This AGC program shall also be referred to as
043497,000027: ## Colossus 1A
043498,000028: ##
043499,000029: ## Prepared by
043500,000030: ## Massachusetts Institute of Technology
043501,000031: ## 75 Cambridge Parkway
043502,000032: ## Cambridge, Massachusetts
043503,000033: ## under NASA contract NAS 9-4065.
043504,000034: ##
043505,000035: ## Refer directly to the online document mentioned above for further information.
043506,000036: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
043507,000037: ##
043508,000038: ## In some cases, where the source code for Luminary 131 overlaps that of
043509,000039: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
043510,000040: ## source file, and then is proofed to incorporate any changes.
043511,000041:
![]() |
Page 970 |
043513,000043: 20,3565 BANK 20
043514,000044: 21,2000 SETLOC MYSUBS
043515,000045: 21,2000 BANK
043516,000046:
043517,000047: 21,2026 0154 EBANK= MPAC
043518,000048: 21,2026 4767 SPCOS1 EQUALS SPCOS
043519,000049: 21,2026 4770 SPSIN1 EQUALS SPSIN
043520,000050: 21,2026 4767 SPCOS2 EQUALS SPCOS
043521,000051: 21,2026 4770 SPSIN2 EQUALS SPSIN
043522,000052: 21,2026 COUNT 21/DAPMS
043523,000053:
043524,000054: # ONE AND ONE HALF PRECISION MULTIPLICATION ROUTINE
043525,000055:
043526,000056: 21,2026 55512 SMALLMP TS KMPTEMP # A(X+Y)
043527,000057: 21,2027 00006 EXTEND
043528,000058: 21,2030 71511 MP KMPAC +1
043529,000059: 21,2031 55511 TS KMPAC +1 # AY
043530,000060: 21,2032 34714 CAF ZERO
043531,000061: 21,2033 57510 XCH KMPAC
043532,000062: 21,2034 00006 EXTEND
043533,000063: 21,2035 71512 MP KMPTEMP # AX
043534,000064: 21,2036 21511 DAS KMPAC # AX+AY
043535,000065: 21,2037 00002 TC Q
043536,000066:
043537,000067: # SUBROUTINE FOR DOUBLE PRECISION ADDITIONS OF ANGLES
043538,000068: # A AND L CONTAIN A DP(1S) ANGLE SCALED BY 180 DEGS TO BE ADDED TO KMPAC.
043539,000069: # RESULT IS PLACED IN KMPAC. TIMING = 6 MCT (22 MCT ON OVERFLOW)
043540,000070:
043541,000071: 21,2040 21511 DPADD DAS KMPAC
043542,000072: 21,2041 00006 EXTEND
043543,000073: 21,2042 12057 BZF TSK +1 # NO OVERFLOW
043544,000074: 21,2043 11510 CCS KMPAC
043545,000075: 21,2044 12060 TCF DPADD+ # + OVERFLOW
043546,000076: 21,2045 12047 TCF +2
043547,000077: 21,2046 12062 TCF DPADD- # - OVERFLOW
043548,000078: 21,2047 11511 CCS KMPAC +1
043549,000079: 21,2050 12065 TCF DPADD2+ # UPPER = 0, LOWER +
043550,000080: 21,2051 12053 TCF +2
043551,000081: 21,2052 40000 COM # UPPER = 0, LOWER -
043552,000082: 21,2053 64672 AD POSMAX # LOWER = 0, A = 0
043553,000083: 21,2054 55511 TS KMPAC +1 # CAN NOT OVERFLOW
043554,000084: 21,2055 34672 CA POSMAX # UPPER WAS = 0
043555,000085: 21,2056 55510 TSK TS KMPAC
043556,000086: 21,2057 00002 TC Q
043557,000087:
043558,000088: 21,2060 64674 DPADD+ AD NEGMAX # KMPAC GREATER THAN 0
043559,000089: 21,2061 12056 TCF TSK
043560,000090:
![]() |
Page 971 |
043562,000092: 21,2062 40000 DPADD- COM
043563,000093: 21,2063 64672 AD POSMAX # KMPAC LESS THAN 0
043564,000094: 21,2064 12056 TCF TSK
043565,000095:
043566,000096: 21,2065 64674 DPADD2+ AD NEGMAX # CAN NOT OVERFLOW
043567,000097: 21,2066 55511 TS KMPAC +1
043568,000098: 21,2067 34674 CA NEGMAX # UPPER WAS = 0
043569,000099: 21,2070 12056 TCF TSK
043570,000100:
![]() |
Page 972 This page is empty. |
043573,000103:
End of include-file MYSUBS.agc. Parent file is MAIN.agc