Source Code
![]() |
These source-code files were from the printout at the MIT Museum, with many thanks
to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing
it to us. The printout was digitally photographed by Paul Fjeld. A team of
volunteers transcribed the source code manually from these images or, where
appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9)
source code to agree with the images from the printout. 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:GAP: ASSEMBLE REVISION 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051 10:28 APR. 1,1969Note that the date is the date of the printout, not the date of the program revision. |
018431,000002: ## Copyright: Public domain.
018432,000003: ## Filename: SYSTEM_TEST_STANDARD_LEAD_INS.agc
018433,000004: ## Purpose: Part of the source code for Comanche, build 055.
018434,000005: ## It is part of the source code for the Command Module's (CM)
018435,000006: ## Apollo Guidance Computer (AGC), Apollo 11.
018436,000007: ## Assembler: yaYUL
018437,000008: ## Reference: pp. 420-422
018438,000009: ## Contact: Onno Hommes <ohommes@cmu.edu>.
018439,000010: ## Website: www.ibiblio.org/apollo.
018440,000011: ## Mod history: 05/07/09 OH Transcription Batch 1 Assignment
018441,000012: ## 2016-12-10 RSB Proofed comments with octopus/ProoferComments
018442,000013: ## and fixed the errors found.
018443,000014: ## 2017-01-18 RSB Fixed comment-text errors noted while diff'ing
018444,000015: ## vs Colossus 249.
018445,000016: ##
018446,000017: ## The contents of the "Comanche055" files, in general, are transcribed
018447,000018: ## from scanned documents.
018448,000019: ##
018449,000020: ## Assemble revision 055 of AGC program Comanche by NASA
018450,000021: ## 2021113-051. April 1, 1969.
018451,000022: ##
018452,000023: ## This AGC program shall also be referred to as Colossus 2A
018453,000024: ##
018454,000025: ## Prepared by
018455,000026: ## Massachusetts Institute of Technology
018456,000027: ## 75 Cambridge Parkway
018457,000028: ## Cambridge, Massachusetts
018458,000029: ##
018459,000030: ## under NASA contract NAS 9-4065.
018460,000031: ##
018461,000032: ## Refer directly to the online document mentioned above for further information.
018462,000033: ## Please report any errors to info@sandroid.org.
018463,000034:
018464,000035:
![]() |
Page 420 |
018466,000037: 22,3151 E5,1671 EBANK= XSM
018467,000038:
018468,000039: 33,2000 BANK 33
018469,000040: 13,2000 SETLOC E/PROG1
018470,000041: 13,2000 BANK
018471,000042:
018472,000043: 13,2036 COUNT* $$/P07
018473,000044:
018474,000045: # SPECIAL PROGRAMS TO EASE THE PANGS OF ERASABLE MEMORY PROGRAMS.
018475,000046:
018476,000047: # E/BKCALL FOR DOING BANKCALLS FROM AND RETURNING TO ERASABLE.
018477,000048:
018478,000049: # THIS ROUTINE IS CALLABLE FROM ERASABLE OR FIXED. LIKE BANKCALL, HOWEVER, SWITCHING BETWEEN S3 AND S4
018479,000050: # IS NOT POSSIBLE.
018480,000051:
018481,000052: # THE CALLING SEQUENCE IS:
018482,000053:
018483,000054: # TC BANKCALL
018484,000055: # CADR E/BKCALL
018485,000056: # CADR ROUTINE WHERE YOU WANT TO GO IN FIXED.
018486,000057: # RETURN HERE FROM DISPLAY TERMINATE, BAD STALL OR TC Q.
018487,000058: # RETURN HERE FROM DISPLAY PROCEED OR GOOD RETURN FROM STALL.
018488,000059: # RETURN HERE FROM DISPLAY ENTER OR RECYCLE.
018489,000060:
018490,000061: # THIS ROUTINE REQUIRES TWO ERASABLES (EBUF2, +1) IN UNSWITCHED WHICH ARE UNSHARED BY INTERRUPTS AND
018491,000062: # OTHER EMEMORY PROGRAMS.
018492,000063:
018493,000064: # A + L ARE PRESERVED THROUGH BANKCALL AND E/BKCALL.
018494,000065:
018495,000066: 13,2036 52134 E/BKCALL DXCH BUF2 # SAVE A,L AND GET DP RETURN.
018496,000067: 13,2037 52365 DXCH EBUF2 # SAVE DP RETURN.
018497,000068: 13,2040 24364 INCR EBUF2 # RETURN +1 BECAUSE DOUBLE CADR.
018498,000069: 13,2041 30006 CA BBANK
018499,000070: 13,2042 75054 MASK LOW10 # GET CURRENT EBANK. (SBANK SOMEDAY)
018500,000071: 13,2043 26365 ADS EBUF2 +1 # FORM BBCON. (WAS FBANK)
018501,000072: 13,2044 50364 NDX EBUF2
018502,000073: 13,2045 27777 CA 0 -1 # GET CADR OF ROUTINE.
018503,000074: 13,2046 04666 TC SWCALL # GO TO ROUTINE, SETTING Q TO SWRETURN
018504,000075: # AND RESTORING A + L.
018505,000076: 13,2047 02053 TC +4 # TX Q, V34, OR BAD STALL RETURN.
018506,000077: 13,2050 02052 TC +2 # PROCEED OR GOOD STALL RETURN.
018507,000078: 13,2051 24364 INCR EBUF2 # ENTER OR RECYCLE RETURN.
018508,000079: 13,2052 24364 INCR EBUF2
018509,000080: 13,2053 52365 E/SWITCH DXCH EBUF2
018510,000081: 13,2054 52006 DTCB
018511,000082:
![]() |
Page 421 |
018513,000084: # E/CALL FOR CALLING A FIXED MEMORY INTERPRETIVE SUBROUTINE FROM ERASABLE AND RETURNING TO ERASABLE.
018514,000085:
018515,000086: # THE CALLING SEQUENCE IS...
018516,000087:
018517,000088: # RTB
018518,000089: # E/CALL
018519,000090: # CADR ROUTINE THE INTERPRETIVE SUBROUTINE YOU WANT.
018520,000091: # RETURNS HERE IN INTERPRETIVE.
018521,000092:
018522,000093: 13,2055 22164 E/CALL LXCH LOC # ADRES -1 OF CADR.
018523,000094: 13,2056 50001 INDEX L
018524,000095: 13,2057 30001 CA L # CADR IN A.
018525,000096: 13,2060 24001 INCR L
018526,000097: 13,2061 24001 INCR L # RETURN ADRES IN L.
018527,000098: 13,2062 52365 DXCH EBUF2 # STORE CADR AND RETURN.
018528,000099: 13,2063 06006 TC INTPRET
018529,000100: 13,2064 77624 CALL
018530,000101: 13,2065 00364 EBUF2 # INDIRECTLY EXECUTE ROUTINE. IT MUST
018531,000102: 13,2066 77776 EXIT # LEAVE VIA RVQ OR EQUIVALENT.
018532,000103: 13,2067 22365 LXCH EBUF2 +1 # PICK UP RETURN.
018533,000104: 13,2070 16010 TCF INTPRET +2 # SET LOC AND RETURB TO CALLER
018534,000105:
![]() |
Page 422 |
018536,000107: # E/JOBWAK FOR WAKING UP ERASABLE MEMORY JOBS.
018537,000108:
018538,000109: # THIS ROUTINE MUST BE CALLED IN INTERRUPT OR WITH INTERRUPTS INHIBITED.
018539,000110:
018540,000111: # THE CALLING SEQUENCE IS:
018541,000112:
018542,000113: # INHINT
018543,000114: # .
018544,000115: # .
018545,000116: # CA WAKEADR ADDRESS OF SLEEPING JOB
018546,000117: # TC IBNKCALL
018547,000118: # CADR E/JOBWAK
018548,000119: # . RETURNS HERE
018549,000120: # .
018550,000121: # .
018551,000122: # RELINT IF YOU DID AN INHINT.
018552,000123:
018553,000124: 33,2000 BANK 33
018554,000125: 04,2000 SETLOC E/PROG
018555,000126: 04,2000 BANK
018556,000127:
018557,000128: 04,2606 COUNT* $$/P07
018558,000129:
018559,000130: 04,2606 05201 E/JOBWAK TC JOBWAKE # ARRIVE IWTH ADRES IN A.
018560,000131: 04,2607 45005 CS BIT11
018561,000132: 04,2610 50064 NDX LOCCTR
018562,000133: 04,2611 26164 ADS LOC # KNOCK FIXED MEMORY BIT OUT OF ADRES.
018563,000134: 04,2612 00072 TC RUPTREG3 # RETURN
018564,000135:
018565,000136:
018566,000137: # THESE PROGRAMS ARE PROVIDED TO ALLOW OVERLAY OF BANKS 30 THRU 33 OF THE 205 VERSIONS OF SYSTEM TESTS AND
018567,000138: # PRELAUNCH ALIGN. THE INTENT IS TO ALLOW THE STG AND HYBRID LABS TO RUN ALL THE TESTS WITH COLOSSUS.
018568,000139:
018569,000140:
018570,000141: 33,2000 BANK 33
018571,000142: 33,2000 SETLOC TESTLEAD
018572,000143: 33,2000 BANK
018573,000144:
018574,000145: 33,2000 COUNT 33/COMST
018575,000146:
018576,000147: 33,2000 E5,1425 EBANK= QPLACE
018577,000148:
018578,000149: 33,2000 03436 COMPVER TC GCOMPVER # MUST BE 33,2000.
018579,000150:
018580,000151: 33,2001 03131 GTSCPSS1 TC GTSCPSS # MUST BE AT 33,2001
018581,000152:
018582,000153: 33,2002 05354 REDO TC NEWMODEX # DISPLAY MM 07.
018583,000154: 33,2003 00007 MM 07 B-14 # FALL INTO IMUTEST
018584,000155:
End of include-file SYSTEM_TEST_STANDARD_LEAD_INS.agc. Parent file is MAIN.agc