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