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