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. |
021888,000002: ## Copyright: Public domain.
021889,000003: ## Filename: P76.agc
021890,000004: ## Purpose: Part of the source code for Colossus, build 249.
021891,000005: ## It is part of the source code for the Command Module's (CM)
021892,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
021893,000007: ## Assembler: yaYUL
021894,000008: ## Reference: pp. 502-504.
021895,000009: ## Contact: Ron Burkey <info@sandroid.org>.
021896,000010: ## Website: www.ibiblio.org/apollo.
021897,000011: ## Mod history: 08/12/04 RSB. Adapted from corresponding Luminary131
021898,000012: ## file.
021899,000013: ## 2017-01-06 RSB Page numbers now agree with those on the
021900,000014: ## original harcopy, as opposed to the PDF page
021901,000015: ## numbers in 1701.pdf.
021902,000016: ## 2017-01-18 RSB Cross-diff'd comment text (not whitespace)
021903,000017: ## vs the already-proofed corresponding Colossus
021904,000018: ## 237 and Comanche 55 source-code files
021905,000019: ## and corrected errors found.
021906,000020: ##
021907,000021: ## The contents of the "Colossus249" files, in general, are transcribed
021908,000022: ## from a scanned copy of the program listing. Notations on this
021909,000023: ## document read, in part:
021910,000024: ##
021911,000025: ## Assemble revision 249 of AGC program Colossus by NASA
021912,000026: ## 2021111-041. October 28, 1968.
021913,000027: ##
021914,000028: ## This AGC program shall also be referred to as
021915,000029: ## Colossus 1A
021916,000030: ##
021917,000031: ## Prepared by
021918,000032: ## Massachusetts Institute of Technology
021919,000033: ## 75 Cambridge Parkway
021920,000034: ## Cambridge, Massachusetts
021921,000035: ## under NASA contract NAS 9-4065.
021922,000036: ##
021923,000037: ## Refer directly to the online document mentioned above for further information.
021924,000038: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
021925,000039: ##
021926,000040: ## In some cases, where the source code for Luminary 131 overlaps that of
021927,000041: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
021928,000042: ## source file, and then is proofed to incorporate any changes.
021929,000043:
![]() |
Page 502 |
021931,000045: # 1) PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
021932,000046: # 2) FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
021933,000047: # TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
021934,000048: # TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY EXECUTION OF A THRUSTING MANEUVER. THE
021935,000049: # OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
021936,000050: # BEEN TRANSFORMED FROM LV TO REF COSYS). USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
021937,000051: # VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
021938,000052: # STATES CORRESPOND TO THE SAME TIME.
021939,000053: # 3) ERASABLE INITIALIZATION REQUIRED - NONE.
021940,000054: # 4) CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76E.
021941,000055: # EXITS BY TCF ENDOFJOB.
021942,000056: # 5) OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
021943,000057: # THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
021944,000058: # TO REF COSYS.
021945,000059: # 6) DEBRIS - OTHER VEHICLE STATE VECTOR.
021946,000060: # 7) SUBROUTINES CALLED - BANKCALL, GOXDSPF, CSMPREC (OR LEMPREC), ATOPCSM (OR ATOPLEM), INTSTALL, INTWAKE, PHASCHNG
021947,000061: # INTPRET, INTEGRVS, AND MINIRECT.
021948,000062: # 8) FLAG USE - MOONFLAG, CMOONFLAG, INTYPFLG, RASFLAG, AND MARKCTR.
021949,000063:
021950,000064: 30,2000 BANK 30
021951,000065: 13,2000 SETLOC P76LOC
021952,000066: 13,2000 BANK
021953,000067:
021954,000068: 13,2036 COUNT* $$/P76
021955,000069:
021956,000070: 13,2036 E7,1412 EBANK= TIG
021957,000071:
021958,000072: 13,2036 05435 P76 TC UPFLAG
021959,000073: 13,2037 00031 ADRES TRACKFLG
021960,000074:
021961,000075: 13,2040 32163 CAF V06N84 # FLASH LAST DELTA V,
021962,000076: 13,2041 04555 TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
021963,000077: 13,2042 20624 CADR GOFLASH
021964,000078: 13,2043 12155 TCF ENDP76
021965,000079: 13,2044 02046 TC +2 # PROCEED
021966,000080: 13,2045 02040 TC -5 # STORE DATA AND REPEAT FLASHING
021967,000081: 13,2046 32164 CAF V06N84 +1 # FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
021968,000082: 13,2047 04555 TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
021969,000083: 13,2050 20624 CADR GOFLASH
021970,000084: 13,2051 12155 TCF ENDP76
021971,000085: 13,2052 02054 TC +2
021972,000086: 13,2053 02046 TC -5
021973,000087: 13,2054 06006 TC INTPRET # RETURN TO INTERPRETIVE CODE
021974,000088: 13,2055 77745 DLOAD # SET D(MPAC)=TIG IN CSEC B28
021975,000089: 13,2056 03413 TIG
021976,000090: 13,2057 34041 STCALL TDEC1 # SET TDEC1=TIG FOR ORBITAL INTEGRATION
021977,000091: 13,2060 27036 OTHPREC
021978,000092: 13,2061 53575 COMPMAT VLOAD UNIT
021979,000093: 13,2062 00001 RATT
![]() |
Page 503 |
021981,000095: 13,2063 77676 VCOMP # U(-R)
021982,000096: 13,2064 00031 STORE 24D # U(-R) TO 24D
021983,000097: 13,2065 53435 VXV UNIT # U(-R) X V = U(V X R)
021984,000098: 13,2066 00007 VATT
021985,000099: 13,2067 00023 STORE 18D
021986,000100: 13,2070 53435 VXV UNIT # U(V X R) X U(-R) = U((R X V) X R)
021987,000101: 13,2071 00031 24D
021988,000102: 13,2072 24015 STOVL 12D
021989,000103: 13,2073 03540 DELVOV
021990,000104: 13,2074 76505 VXM VSL1 # V(MPAC)=DELTA V IN REFCOSYS
021991,000105: 13,2075 00015 12D
021992,000106: 13,2076 77655 VAD
021993,000107: 13,2077 00007 VATT
021994,000108: 13,2100 00007 STORE 6 # V(PD6)=VATT + DELTA V
021995,000109: 13,2101 77624 CALL # PREVENT WOULD-BE USER OF ORBITAL
021996,000110: 13,2102 27371 INTSTALL # INTEG FROM INTERFERING WITH UPDATING
021997,000111: 13,2103 77624 CALL
021998,000112: 13,2104 26165 P76SUB1
021999,000113: 13,2105 53775 VLOAD VSR*
022000,000114: 13,2106 00007 6
022001,000115: 13,2107 57176 0,2
022002,000116: 13,2110 25543 STOVL VCV
022003,000117: 13,2111 00001 RATT
022004,000118: 13,2112 77657 VSR*
022005,000119: 13,2113 57176 0,2
022006,000120: 13,2114 15535 STODL RCV
022007,000121: 13,2115 03413 TIG
022008,000122: 13,2116 01517 STORE TET
022009,000123: 13,2117 71214 CLEAR DLOAD
022010,000124: 13,2120 01673 INTYPFLG
022011,000125: 13,2121 01571 TETTHIS
022012,000126: 13,2122 34041 INTOTHIS STCALL TDEC1
022013,000127: 13,2123 27066 INTEGRVS
022014,000128: 13,2124 77624 CALL
022015,000129: 13,2125 27371 INTSTALL
022016,000130: 13,2126 77775 VLOAD
022017,000131: 13,2127 00017 RATT1
022018,000132: 13,2130 01503 STORE RRECT
022019,000133: 13,2131 15535 STODL RCV
022020,000134: 13,2132 00015 TAT
022021,000135: 13,2133 25517 STOVL TET
022022,000136: 13,2134 00025 VATT1
022023,000137: 13,2135 77624 CALL
022024,000138: 13,2136 23360 MINIRECT
022025,000139: 13,2137 77776 EXIT
022026,000140: 13,2140 05301 TC PHASCHNG
022027,000141: 13,2141 04024 OCT 04024
022028,000142:
022029,000143: 13,2142 05435 TC UPFLAG
022030,000144: 13,2143 00236 ADRES REINTFLG
![]() |
Page 504 |
022032,000146:
022033,000147: 13,2144 06006 TC INTPRET
022034,000148: 13,2145 77624 CALL
022035,000149: 13,2146 26711 ATOPOTH
022036,000150: 13,2147 77531 SSP EXIT
022037,000151: 13,2150 00053 QPRET
022038,000152: 13,2151 26154 OUT
022039,000153: 13,2152 04555 TC BANKCALL # PERMIT USE OF ORBITAL INTEGRATION
022040,000154: 13,2153 27426 CADR INTWAKE1
022041,000155: 13,2154 77776 OUT EXIT
022042,000156: 13,2155 34714 ENDP76 CAF ZERO
022043,000157: 13,2156 55126 TS MARKCTR # CLEAR RR TRACKING MARK COUNTER
022044,000158: 13,2157 55125 TS VHFCNT
022045,000159:
022046,000160: 13,2160 37716 CAF NEGONE
022047,000161: 13,2161 55734 TS MRKBUF2 # INVALIDATE MARK BUFFER
022048,000162:
022049,000163: 13,2162 14106 TCF GOTOPOOH
022050,000164:
022051,000165: 13,2163 01524 V06N84 NV 0684
022052,000166: 13,2164 01441 NV 0633
022053,000167: 13,2165 43174 P76SUB1 AXT,2 SET
022054,000168: 13,2166 00002 2
022055,000169: 13,2167 00063 MOONFLAG # SET MEANS MOON IS SPHERE OF INFLUENCE.
022056,000170: 13,2170 77014 BON AXT,2
022057,000171: 13,2171 04303 CMOONFLG # SET MEANS PERM CM STATE IN LUNAR SPHERE.
022058,000172: 13,2172 00052 QPRET
022059,000173: 13,2173 00000 0
022060,000174: 13,2174 43414 CLEAR RVQ
022061,000175: 13,2175 00263 MOONFLAG
022062,000176:
022063,000177:
022064,000178:
022065,000179:
022066,000180:
End of include-file P76.agc. Parent file is MAIN.agc