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. |
064943,000002: ## Copyright: Public domain.
064944,000003: ## Filename: ALARM_AND_ABORT.agc
064945,000004: ## Purpose: Part of the source code for Comanche, build 055. It
064946,000005: ## is part of the source code for the Command Module's
064947,000006: ## (CM) Apollo Guidance Computer (AGC), Apollo 11.
064948,000007: ## Assembler: yaYUL
064949,000008: ## Reference: pp. 1493-1496
064950,000009: ## Contact: Ron Burkey <info@sandroid.org>
064951,000010: ## Website: http://www.ibiblio.org/apollo.
064952,000011: ## Mod history: 2009-05-07 RSB Adapted from Colossus249 file of the same
064953,000012: ## name, and page images. Corrected various
064954,000013: ## typos in the transcription of program
064955,000014: ## comments, and these should be back-ported
064956,000015: ## to Colossus249.
064957,000016: ## 2010-08-24 JL Fixed page numbers and some indents.
064958,000017: ## 2016-12-22 RSB Proofed comment text using octopus/ProoferComments
064959,000018: ## and corrected the errors found.
064960,000019: ##
064961,000020: ## The contents of the "Comanche055" files, in general, are transcribed
064962,000021: ## from scanned documents.
064963,000022: ##
064964,000023: ## Assemble revision 055 of AGC program Comanche by NASA
064965,000024: ## 2021113-051. April 1, 1969.
064966,000025: ##
064967,000026: ## This AGC program shall also be referred to as Colossus 2A
064968,000027: ##
064969,000028: ## Prepared by
064970,000029: ## Massachusetts Institute of Technology
064971,000030: ## 75 Cambridge Parkway
064972,000031: ## Cambridge, Massachusetts
064973,000032: ##
064974,000033: ## under NASA contract NAS 9-4065.
064975,000034: ##
064976,000035: ## Refer directly to the online document mentioned above for further
064977,000036: ## information. Please report any errors to info@sandroid.org.
064978,000037:
![]() |
Page 1493 |
064980,000039: # THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION. IT MAY BE CALLED
064981,000040: # EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
064982,000041:
064983,000042: # CALLING SEQUENCE IS AS FOLLOWS:
064984,000043: # TC ALARM
064985,000044: # OCT NNNNN
064986,000045: # (RETURNS HERE)
064987,000046:
064988,000047: 5650 BLOCK 02
064989,000048: 4000 SETLOC FFTAG7
064990,000049: 4000 BANK
064991,000050:
064992,000051: 5650 0375 EBANK= FAILREG
064993,000052:
064994,000053: 5650 COUNT 02/ALARM
064995,000054:
064996,000055: # ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
064997,000056:
064998,000057: 5650 00004 ALARM INHINT
064999,000058:
065000,000059: 5651 30002 CA Q
065001,000060: 5652 55363 ALARM2 TS ALMCADR
065002,000061: 5653 50002 INDEX Q
065003,000062: 5654 30000 CA 0
065004,000063: 5655 54001 BORTENT TS L
065005,000064:
065006,000065: 5656 30006 PRIOENT CA BBANK
065007,000066: 5657 00006 +1 EXTEND
065008,000067: 5660 04007 ROR SUPERBNK # ADD SUPER BITS.
065009,000068: 5661 55364 TS ALMCADR +1
065010,000069:
065011,000070: 5662 30002 LARMENT CA Q # STORE RETURN FOR ALARM
065012,000071: 5663 54061 TS ITEMP1
065013,000072:
065014,000073: 5664 30164 CA LOC
065015,000074: 5665 54057 TS LOCALARM
065016,000075: 5666 30165 CA BANKSET
065017,000076: 5667 54060 TS BANKALRM
065018,000077:
065019,000078: 5670 10375 CHKFAIL1 CCS FAILREG # IS ANYTHING IN FAILREG
065020,000079: 5671 15674 TCF CHKFAIL2 # YES TRY NEXT REG
065021,000080: 5672 22375 LXCH FAILREG
065022,000081: 5673 15706 TCF PROGLARM # TURN ALARM LIGHT ON FOR FIRST ALARM
065023,000082:
065024,000083: 5674 10376 CHKFAIL2 CCS FAILREG +1
065025,000084: 5675 15700 TCF FAIL3
065026,000085: 5676 22376 LXCH FAILREG +1
065027,000086: 5677 15711 TCF MULTEXIT
065028,000087:
065029,000088: 5700 30377 FAIL3 CA FAILREG +2
![]() |
Page 1494 |
065031,000090: 5701 74777 MASK POSMAX
065032,000091: 5702 10000 CCS A
065033,000092: 5703 15715 TCF MULTFAIL
065034,000093: 5704 22377 LXCH FAILREG +2
065035,000094: 5705 15711 TCF MULTEXIT
065036,000095:
065037,000096: 5706 41036 PROGLARM CS DSPTAB +11D
065038,000097: 5707 77765 MASK OCT40400
065039,000098: 5710 27036 ADS DSPTAB +11D
065040,000099:
065041,000100: 5711 56061 MULTEXIT XCH ITEMP1 # OBTAIN RETURN ADDRESS IN A
065042,000101: 5712 00003 RELINT
065043,000102: 5713 50000 INDEX A
065044,000103: 5714 00001 TC 1
065045,000104:
065046,000105: 5715 30001 MULTFAIL CA L
065047,000106: 5716 65001 AD BIT15
065048,000107: 5717 54377 TS FAILREG +2
065049,000108:
065050,000109: 5720 15711 TCF MULTEXIT
065051,000110:
065052,000111: # PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
065053,000112: # AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4. EXAMPLE FOLLOWS,
065054,000113: # CAF OCTXX ALARM CODE
065055,000114: # TC BANKCALL
065056,000115: # CADR PRIOLARM
065057,000116:
065058,000117: # ... ...
065059,000118: # ... ...
065060,000119: # ... ... ASTRONAUT RETURN
065061,000120: # TC PHASCHNG IMMEDIATE RETURN TO USER. RESTART
065062,000121: # OCT X.1 PHASE CHANGE FOR PRIO DISPLAY
065063,000122:
065064,000123: 10,3766 BANK 10
065065,000124: 10,2000 SETLOC DISPLAYS
065066,000125: 10,2000 BANK
065067,000126:
065068,000127: 10,3766 COUNT 10/DSPLA
065069,000128: 10,3766 00004 PRIOLARM INHINT # * * * KEEP IN DISPLAY ROUTINES BANK
065070,000129: 10,3767 54001 TS L # SAVE ALARM CODE
065071,000130:
065072,000131: 10,3770 30133 CA BUF2 # 2 CADR OF PRIOLARM USER
065073,000132: 10,3771 55363 TS ALMCADR
065074,000133: 10,3772 30134 CA BUF2 +1
065075,000134: 10,3773 05657 TC PRIOENT +1 # * LEAVE L ALONE
065076,000135: 10,3774 77467 -2SEC DEC -200 B-14 # *** DONT MOVE
065077,000136: 10,3775 35050 CAF V05N09
065078,000137: 10,3776 12726 TCF PRIODSPR
065079,000138:
![]() |
Page 1495 |
065081,000140:
065082,000141: 5721 BLOCK 02
065083,000142: 6000 SETLOC FFTAG13
065084,000143: 6000 BANK
065085,000144:
065086,000145: 7755 COUNT 02/ALARM
065087,000146:
065088,000147: 7755 00004 BAILOUT INHINT
065089,000148: 7756 30002 CA Q
065090,000149: 7757 55363 TS ALMCADR
065091,000150:
065092,000151: 7760 04662 TC BANKCALL
065093,000152: 7761 40000 CADR VAC5STOR
065094,000153:
065095,000154: 7762 51363 INDEX ALMCADR
065096,000155: 7763 30000 CAF 0
065097,000156: 7764 05655 TC BORTENT
065098,000157: 7765 40400 OCT40400 OCT 40400
065099,000158:
065100,000159: 7766 00004 INHINT
065101,000160: 7767 35016 WHIMPER CA TWO
065102,000161: 7770 60005 AD Z
065103,000162: 7771 54017 TS BRUPT
065104,000163: 7772 50017 RESUME
065105,000164: 7773 04701 TC POSTJUMP # RESUME SENDS CONTROL HERE
065106,000165: 7774 12651 CADR ENEMA
065107,000166:
065108,000167: 4000 SETLOC FFTAG7
065109,000168: 4000 BANK
065110,000169:
065111,000170: 5721 00004 POODOO INHINT
065112,000171: 5722 30002 CA Q
065113,000172: 5723 55363 TS ALMCADR
065114,000173:
065115,000174: 5724 04662 TC BANKCALL
065116,000175: 5725 40000 CADR VAC5STOR # STORE ERASABLES FOR DEBUGGING PURPOSES.
065117,000176:
065118,000177: 5726 51363 INDEX ALMCADR
065119,000178: 5727 30000 CAF 0
065120,000179: 5730 05655 ABORT2 TC BORTENT
065121,000180: 5731 77770 OCT77770 OCT 77770 # DONT MOVE
065122,000181: 5732 35012 CA V37FLBIT # IS AVERAGE G ON
065123,000182: 5733 70103 MASK FLAGWRD7
065124,000183: 5734 10000 CCS A
065125,000184: 5735 07766 TC WHIMPER -1 # YES. DONT DO POODOO. DO BAILOUT.
065126,000185:
065127,000186: 5736 05560 TC DOWNFLAG
065128,000187: 5737 00067 ADRES STATEFLG
065129,000188:
065130,000189: 5740 05560 TC DOWNFLAG
065131,000190:
![]() |
Page 1496 |
065133,000192: 5741 00236 ADRES REINTFLG
065134,000193:
065135,000194: 5742 05560 TC DOWNFLAG
065136,000195: 5743 00054 ADRES NODOFLAG
065137,000196:
065138,000197: 5744 04662 TC BANKCALL
065139,000198: 5745 12501 CADR MR.KLEAN
065140,000199: 5746 07767 TC WHIMPER
065141,000200:
065142,000201: 5747 00004 CCSHOLE INHINT
065143,000202: 5750 30002 CA Q
065144,000203: 5751 55363 TS ALMCADR
065145,000204: 5752 04662 TC BANKCALL
065146,000205: 5753 40000 CADR VAC5STOR
065147,000206: 5754 35756 CA OCT1103
065148,000207: 5755 05730 TC ABORT2
065149,000208: 5756 01103 OCT1103 OCT 1103
065150,000209: 5757 00004 CURTAINS INHINT
065151,000210: 5760 30002 CA Q
065152,000211: 5761 05652 TC ALARM2
065153,000212: 5762 00217 OCT217 OCT 00217
065154,000213: 5763 01363 TC ALMCADR # RETURN TO USER
065155,000214:
065156,000215: 5764 5217 DOALARM EQUALS ENDOFJOB
065157,000216:
065158,000217: # CALLING SEQUENCE FOR VARALARM
065159,000218:
065160,000219: # CAF (ALARM)
065161,000220: # TC VARALARM
065162,000221:
065163,000222: # VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
065164,000223:
065165,000224: 5764 00004 VARALARM INHINT
065166,000225:
065167,000226: 5765 54001 TS L # SAVE USERS ALARM CODE
065168,000227:
065169,000228: 5766 30002 CA Q # SAVE USERS Q
065170,000229: 5767 55363 TS ALMCADR
065171,000230:
065172,000231: 5770 05656 TC PRIOENT
065173,000232: 5771 00014 OCT14 OCT 14 # DONT MOVE
065174,000233:
065175,000234: 5772 01363 TC ALMCADR # RETURN TO USER
065176,000235:
065177,000236: 5773 7755 ABORT EQUALS BAILOUT # *** TEMPORARY UNTIL ABORT CALLS OUT
End of include-file ALARM_AND_ABORT.agc. Parent file is MAIN.agc