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. |
019759,000002: ## Copyright: Public domain.
019760,000003: ## Filename: GROUND_TRACKING_DETERMINATION_PROGRAM.agc
019761,000004: ## Purpose: Part of the source code for Colossus, build 249.
019762,000005: ## It is part of the source code for the Command Module's (CM)
019763,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
019764,000007: ## Assembler: yaYUL
019765,000008: ## Reference: pp. 449-451.
019766,000009: ## Contact: Ron Burkey <info@sandroid.org>.
019767,000010: ## Website: www.ibiblio.org/apollo.
019768,000011: ## Mod history: 08/11/04 RSB. Began transcribing.
019769,000012: ## 2017-01-06 RSB Page numbers now agree with those on the
019770,000013: ## original harcopy, as opposed to the PDF page
019771,000014: ## numbers in 1701.pdf.
019772,000015: ## 2017-01-14 RSB Cross-diff'd comment text (not whitespace)
019773,000016: ## vs the already-proofed corresponding Colossus
019774,000017: ## 237 and Comanche 55 source-code files
019775,000018: ## and corrected errors found.
019776,000019: ##
019777,000020: ## The contents of the "Colossus249" files, in general, are transcribed
019778,000021: ## from a scanned copy of the program listing. Notations on this
019779,000022: ## document read, in part:
019780,000023: ##
019781,000024: ## Assemble revision 249 of AGC program Colossus by NASA
019782,000025: ## 2021111-041. October 28, 1968.
019783,000026: ##
019784,000027: ## This AGC program shall also be referred to as
019785,000028: ## Colossus 1A
019786,000029: ##
019787,000030: ## Prepared by
019788,000031: ## Massachusetts Institute of Technology
019789,000032: ## 75 Cambridge Parkway
019790,000033: ## Cambridge, Massachusetts
019791,000034: ## under NASA contract NAS 9-4065.
019792,000035: ##
019793,000036: ## Refer directly to the online document mentioned above for further information.
019794,000037: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
019795,000038: ##
019796,000039: ## In some cases, where the source code for Luminary 131 overlaps that of
019797,000040: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
019798,000041: ## source file, and then is proofed to incorporate any changes.
019799,000042:
![]() |
Page 449 |
019801,000044: # GROUND TRACKING DETERMINATION PROGRAM P21
019802,000045:
019803,000046: # PROGRAM DESCRIPTION
019804,000047: # MOD NO - 1
019805,000048: # MOD BY - N. M. NEVILLE
019806,000049:
019807,000050: # FUNCTIONAL DECRIPTION-
019808,000051: # TO PROVIDE THE ASTRONAUT DETAILS OF THE LM OR CSM GROUND TRACK WITHOUT
019809,000052: # THE NEED FOR GROUND COMMUNICATION (REQUESTED BY DSKY).
019810,000053:
019811,000054: # CALLING SEQUENCE-
019812,000055: # ASTRONAUT REQUEST THROUGH DSKY V37E21E
019813,000056:
019814,000057: # SUBROUTINES CALLED-
019815,000058: # GOPERF4
019816,000059: # GOFLASH
019817,000060: # THISPREC
019818,000061: # OTHPREC
019819,000062: # LAT-LONG
019820,000063:
019821,000064: # NORMAL EXIT MODES-
019822,000065: # ASTRONAUT REQUEST TROUGH DSKY TO TERMINATE PROGRAM V34E
019823,000066:
019824,000067: # ALARM OR ABORT EXIT MODES-
019825,000068: # NONE
019826,000069:
019827,000070: # OUTPUT-
019828,000071: # OCTAL DISPLAY OF OPTION CODE AND VEHICLE WHOSE GROUND TRACK IS TO BE
019829,000072: # COMPUTED
019830,000073: # OPTION CODE 00002
019831,000074: # THIS 00001
019832,000075: # OTHER 00002
019833,000076: # DECIMAL DISPLAY OF TIME TO BE INTEGRATED TO HOURS, MINUTES, SECONDS
019834,000077: # DECIMAL DISPLAY OF LAT,LONG,ALT
019835,000078:
019836,000079: # ERASABLE INITIALIZATION REQUIRED
019837,000080: # AX0 2DEC 4.652459653 E-5 RADIANS %68-69 CONSTANTS"
019838,000081: # -AY0 2DEC 2.147535898 E-5 RADIANS
019839,000082: # AZ0 2DEC .7753206164 REVOLUTIONS
019840,000083: # FOR LUNAR ORBITS 504LM VECTOR IS NEEDED
019841,000084: # 504LM 2DEC -2.700340600 E-5 RADIANS
019842,000085: # 504LM _2 2DEC -7.514128400 E-4 RADIANS
019843,000086: # 504LM _4 2DEC _2.553198641 E-4 RADIANS
019844,000087: # NONE
019845,000088:
019846,000089: # DEBRIS
![]() |
Page 450 |
019848,000091: # CENTRALS-A,Q,L
019849,000092: # OTHER-THOSE USED BY THE ABOVE LISTED SUBROUTINES
019850,000093: # SEE LEMPREC, LAT-LONG
019851,000094:
019852,000095: 33,3772 30,2000 SBANK= LOWSUPER # FOR LOW 2CADR'S.
019853,000096:
019854,000097: 33,3772 BANK 33
019855,000098: 37,2000 SETLOC P20S
019856,000099: 37,2000 BANK
019857,000100:
019858,000101: 37,2001 E4,1715 EBANK= P21TIME
019859,000102: 37,2001 COUNT 24/P21
019860,000103:
019861,000104: 37,2001 34712 PROG21 CAF ONE
019862,000105: 37,2002 55132 TS OPTION2 # ASSUMED VEHICLE IS LM, R2 = 00001
019863,000106: 37,2003 34711 CAF BIT2 # OPTION 2
019864,000107: 37,2004 04555 TC BANKCALL
019865,000108: 37,2005 20761 CADR GOPERF4
019866,000109: 37,2006 04106 TC GOTOPOOH # TERMINATE
019867,000110: 37,2007 02011 TC +2 # PROCEED VALUE OF ASSUMED VEHICLE OK
019868,000111: 37,2010 02003 TC -5 # R2 LOADED THROUGH DSKY
019869,000112: 37,2011 32102 P21PROG1 CAF V6N34 # LOAD DESIRED TIME OF LAT-LONG.
019870,000113: 37,2012 04555 TC BANKCALL
019871,000114: 37,2013 20624 CADR GOFLASH
019872,000115: 37,2014 04106 TC GOTOPOOH # TERM
019873,000116: 37,2015 02017 TC +2 # PROCEED VALUES OK
019874,000117: 37,2016 02011 TC -5 # TIME LOADED THROUGH DSKY
019875,000118: 37,2017 06006 TC INTPRET
019876,000119: 37,2020 77745 DLOAD
019877,000120: 37,2021 01046 DSPTEM1
019878,000121: 37,2022 02316 STORE P21TIME
019879,000122: 37,2023 45335 SLOAD DSU
019880,000123: 37,2024 01133 OPTION2
019881,000124: 37,2025 36100 P21ONENN
019882,000125: 37,2026 71230 BHIZ DLOAD
019883,000126: 37,2027 76042 P21PROG2 # VEHICLE TO BE INTEGRATED IS LEM
019884,000127: 37,2030 02316 P21TIME # VEHICLE TO BE INTEGRATED IS CSM
019885,000128: 37,2031 34041 STCALL TDEC1 # INTEGRATE TO TIME SPECIFIED IN TDEC
019886,000129: 37,2032 27036 OTHPREC # ADJUST UNITS FOR LAT-LONG ROUTINE
019887,000130: 37,2033 46135 P21PROGA SLOAD BHIZ
019888,000131: 37,2034 00050 X2
019889,000132: 37,2035 76050 P21PROG3
019890,000133: 37,2036 43175 VLOAD SETGO
019891,000134: 37,2037 00001 RATT
019892,000135: 37,2040 01423 LUNAFLAG
019893,000136: 37,2041 76053 P21PROG4
019894,000137: 37,2042 77745 P21PROG2 DLOAD
019895,000138: 37,2043 02316 P21TIME
019896,000139: 37,2044 34041 STCALL TDEC1
019897,000140: 37,2045 27022 THISPREC
![]() |
Page 451 |
019899,000142: 37,2046 77650 GOTO
019900,000143: 37,2047 76033 P21PROGA
019901,000144: 37,2050 43175 P21PROG3 VLOAD CLEAR
019902,000145: 37,2051 00001 RATT
019903,000146: 37,2052 01663 LUNAFLAG
019904,000147: 37,2053 16152 P21PROG4 STODL ALPHAV
019905,000148: 37,2054 00015 TAT
019906,000149: 37,2055 45014 CLEAR CALL
019907,000150: 37,2056 00662 ERADFLAG
019908,000151: 37,2057 26322 LAT-LONG
019909,000152: 37,2060 77776 EXIT
019910,000153: 37,2061 32101 CAF V06N43 # DISPLAY LAT,LONG,ALT
019911,000154: 37,2062 04555 TC BANKCALL # LAT,LONG = 1/2 REVS B0
019912,000155: 37,2063 20624 CADR GOFLASH # ALT = KM B14
019913,000156: 37,2064 04106 TC GOTOPOOH # TERM
019914,000157: 37,2065 04106 TC GOTOPOOH
019915,000158: 37,2066 06006 TC INTPRET # V32E RECYCLE
019916,000159: 37,2067 43345 DLOAD DAD
019917,000160: 37,2070 02316 P21TIME
019918,000161: 37,2071 36076 600SEC # 600 SECONDS OR 10 MIN
019919,000162: 37,2072 01046 STORE DSPTEM1
019920,000163: 37,2073 77634 RTB
019921,000164: 37,2074 76011 P21PROG1
019922,000165:
019923,000166: 37,2075 00003 25140 600SEC 2DEC 60000 B-28 # 10 MIN
019924,000167: 37,2077 00001 P21ONENN OCT 00001 # NEEDED TO DETERMINE VEHICLE
019925,000168: 37,2100 00000 OCT 00000 # TO BE INTEGRATED
019926,000169:
019927,000170: 37,2101 01453 V06N43 VN 00643
019928,000171: 37,2102 01442 V6N34 VN 00634
019929,000172:
End of include-file GROUND_TRACKING_DETERMINATION_PROGRAM_-_P21.agc. Parent file is MAIN.agc