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. |
063854,000002: ## Copyright: Public domain.
063855,000003: ## Filename: ALARM_AND_ABORT.agc
063856,000004: ## Purpose: Part of the source code for Colossus, build 249.
063857,000005: ## It is part of the source code for the Command Module's (CM)
063858,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
063859,000007: ## Assembler: yaYUL
063860,000008: ## Reference: Starts on p. 1461
063861,000009: ## Contact: Ron Burkey <info@sandroid.org>.
063862,000010: ## Website: www.ibiblio.org/apollo.
063863,000011: ## Mod history: 08/30/04 RSB Adapted from corresponding Luminary131 file.
063864,000012: ## 2010-10-24 JL Indentation fixes.
063865,000013: ## 2011-05-07 JL Removed workarounds.
063866,000014: ## 2017-01-06 RSB Page numbers now agree with those on the
063867,000015: ## original harcopy, as opposed to the PDF page
063868,000016: ## numbers in 1701.pdf.
063869,000017: ## 2017-01-07 RSB Cross-diff'd comment text (not whitespace)
063870,000018: ## vs the already-proofed corresponding Colossus
063871,000019: ## 237 and Comanche 55 source-code files
063872,000020: ## and corrected errors found.
063873,000021: ##
063874,000022: ## The contents of the "Colossus249" files, in general, are transcribed
063875,000023: ## from a scanned copy of the program listing. Notations on this
063876,000024: ## document read, in part:
063877,000025: ##
063878,000026: ## Assemble revision 249 of AGC program Colossus by NASA
063879,000027: ## 2021111-041. October 28, 1968.
063880,000028: ##
063881,000029: ## This AGC program shall also be referred to as
063882,000030: ## Colossus 1A
063883,000031: ##
063884,000032: ## Prepared by
063885,000033: ## Massachusetts Institute of Technology
063886,000034: ## 75 Cambridge Parkway
063887,000035: ## Cambridge, Massachusetts
063888,000036: ## under NASA contract NAS 9-4065.
063889,000037: ##
063890,000038: ## Refer directly to the online document mentioned above for further information.
063891,000039: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
063892,000040: ##
063893,000041: ## In some cases, where the source code for Luminary 131 overlaps that of
063894,000042: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
063895,000043: ## source file, and then is proofed to incorporate any changes.
063896,000044:
![]() |
Page 1461 |
063898,000046: # THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION. IT MAY BE CALLED
063899,000047: # EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
063900,000048:
063901,000049: # CALLING SEQUENCE IS AS FOLLOWS:
063902,000050: # TC ALARM
063903,000051: # OCT AAANN ALARM NO. NN IN GENERAL AREA AAA.
063904,000052: # (RETURNS HERE)
063905,000053:
063906,000054: 5537 BLOCK 02
063907,000055: 4000 SETLOC FFTAG7
063908,000056: 4000 BANK
063909,000057:
063910,000058: 5537 0375 EBANK= FAILREG
063911,000059:
063912,000060: 5537 COUNT 02/ALARM
063913,000061:
063914,000062: # ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
063915,000063:
063916,000064: 5537 00004 ALARM INHINT
063917,000065:
063918,000066: 5540 30002 CA Q
063919,000067: 5541 55363 ALARM2 TS ALMCADR
063920,000068: 5542 50002 INDEX Q
063921,000069: 5543 30000 CA 0
063922,000070: 5544 54001 BORTENT TS L
063923,000071:
063924,000072: 5545 30006 PRIOENT CA BBANK
063925,000073: 5546 00006 +1 EXTEND
063926,000074: 5547 04007 ROR SUPERBNK # ADD SUPER BITS.
063927,000075: 5550 55364 TS ALMCADR +1
063928,000076:
063929,000077: 5551 30002 LARMENT CA Q # STORE RETURN FOR ALARM
063930,000078: 5552 54061 TS ITEMP1
063931,000079:
063932,000080: 5553 10375 CHKFAIL1 CCS FAILREG # IS ANYTHING IN FAILREG
063933,000081: 5554 15557 TCF CHKFAIL2 # YES TRY NEXT REG
063934,000082: 5555 22375 LXCH FAILREG
063935,000083: 5556 15571 TCF PROGLARM # TURN ALARM LIGHT ON FOR FIRST ALARM
063936,000084:
063937,000085: 5557 10376 CHKFAIL2 CCS FAILREG +1
063938,000086: 5560 15563 TCF FAIL3
063939,000087: 5561 22376 LXCH FAILREG +1
063940,000088: 5562 15574 TCF MULTEXIT
063941,000089:
063942,000090: 5563 30377 FAIL3 CA FAILREG +2
063943,000091: 5564 74672 MASK POSMAX
063944,000092: 5565 10000 CCS A
063945,000093: 5566 15600 TCF MULTFAIL
063946,000094: 5567 22377 LXCH FAILREG +2
![]() |
Page 1462 |
063948,000096: 5570 15574 TCF MULTEXIT
063949,000097:
063950,000098: 5571 41036 PROGLARM CS DSPTAB +11D
063951,000099: 5572 75612 MASK OCT40400
063952,000100: 5573 27036 ADS DSPTAB +11D
063953,000101:
063954,000102: 5574 56061 MULTEXIT XCH ITEMP1 # OBTAIN RETURN ADDRESS IN A
063955,000103: 5575 00003 RELINT
063956,000104: 5576 50000 INDEX A
063957,000105: 5577 00001 TC 1
063958,000106:
063959,000107: 5600 30001 MULTFAIL CA L
063960,000108: 5601 64674 AD BIT15
063961,000109: 5602 54377 TS FAILREG +2
063962,000110:
063963,000111: 5603 15574 TCF MULTEXIT
063964,000112:
063965,000113: # PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
063966,000114: # AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4. EXAMPLE FOLLOWS,
063967,000115: # CAF OCTXX ALARM CODE
063968,000116: # TC BANKCALL
063969,000117: # CADR PRIOLARM
063970,000118: # ... ...
063971,000119: # ... ...
063972,000120: # ... ... ASTRONAUT RETURN
063973,000121: # TC PHASCHNG IMMEDIATE RETURN TO USER. RESTART
063974,000122: # OCT X.1 PHASE CHANGE FOR PRIO DISPLAY
063975,000123:
063976,000124: 10,3671 BANK 10
063977,000125: 10,2000 SETLOC DISPLAYS
063978,000126: 10,2000 BANK
063979,000127:
063980,000128: 10,3671 COUNT 10/DSPLA
063981,000129: 10,3671 00004 PRIOLARM INHINT # * * * KEEP IN DISPLAY ROUTINES BANK
063982,000130: 10,3672 54001 TS L # SAVE ALARM CODE
063983,000131:
063984,000132: 10,3673 30133 CA BUF2 # 2 CADR OF PRIOLARM USER
063985,000133: 10,3674 55363 TS ALMCADR
063986,000134: 10,3675 30134 CA BUF2 +1
063987,000135: 10,3676 05546 TC PRIOENT +1 # * LEAVE L ALONE
063988,000136: 10,3677 77467 -2SEC DEC -200 B-14 # *** DONT MOVE
063989,000137: 10,3700 34743 CAF V05N09
063990,000138: 10,3701 12632 TCF PRIODSPR
063991,000139:
063992,000140: 5604 BLOCK 02
063993,000141: 4000 SETLOC FFTAG7
063994,000142: 4000 BANK
063995,000143:
![]() |
Page 1463 |
063997,000145: 5604 COUNT 02/ALARM
063998,000146:
063999,000147: 5604 00004 BAILOUT INHINT
064000,000148: 5605 30002 CA Q
064001,000149: 5606 55363 TS ALMCADR
064002,000150:
064003,000151: 5607 50002 INDEX Q
064004,000152: 5610 30000 CAF 0
064005,000153: 5611 05544 TC BORTENT
064006,000154: 5612 40400 OCT40400 OCT 40400
064007,000155:
064008,000156: 5613 00004 INHINT
064009,000157: 5614 34711 WHIMPER CA TWO
064010,000158: 5615 60005 AD Z
064011,000159: 5616 54017 TS BRUPT
064012,000160: 5617 50017 RESUME
064013,000161: 5620 04574 TC POSTJUMP # RESUME SENDS CONTROL HERE
064014,000162: 5621 12641 CADR ENEMA
064015,000163: 5622 00004 POODOO INHINT
064016,000164: 5623 30002 CA Q
064017,000165: 5624 55363 ABORT2 TS ALMCADR
064018,000166: 5625 50002 INDEX Q
064019,000167: 5626 30000 CAF 0
064020,000168: 5627 05544 TC BORTENT
064021,000169: 5630 77770 OCT77770 OCT 77770 # DONT MOVE
064022,000170: 5631 34705 CA V37FLBIT # IS AVERAGE G ON
064023,000171: 5632 70103 MASK FLAGWRD7
064024,000172: 5633 10000 CCS A
064025,000173: 5634 05613 TC WHIMPER -1 # YES. DONT DO POODOO. DO BAILOUT.
064026,000174:
064027,000175: 5635 04555 TC BANKCALL
064028,000176: 5636 12474 CADR MR.KLEAN
064029,000177: 5637 05614 TC WHIMPER
064030,000178:
064031,000179: 5640 00004 CCSHOLE INHINT
064032,000180: 5641 30002 CA Q
064033,000181: 5642 05624 TC ABORT2
064034,000182: 5643 01103 OCT1103 OCT 1103
064035,000183: 5644 00004 CURTAINS INHINT
064036,000184: 5645 30002 CA Q
064037,000185: 5646 05541 TC ALARM2
064038,000186: 5647 00217 OCT217 OCT 00217
064039,000187: 5650 01363 TC ALMCADR # RETURN TO USER
064040,000188:
064041,000189: 5651 5112 DOALARM EQUALS ENDOFJOB
064042,000190:
064043,000191: # CALLING SEQUENCE FOR VARALARM
064044,000192: # CAF (ALARM)
064045,000193: # TC VARALARM
![]() |
Page 1464 |
064047,000195:
064048,000196: # VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
064049,000197:
064050,000198: 5651 00004 VARALARM INHINT
064051,000199:
064052,000200: 5652 54001 TS L # SAVE USERS ALARM CODE
064053,000201:
064054,000202: 5653 30002 CA Q # SAVE USERS Q
064055,000203: 5654 55363 TS ALMCADR
064056,000204:
064057,000205: 5655 05545 TC PRIOENT
064058,000206: 5656 00014 OCT14 OCT 14 # DONT MOVE
064059,000207:
064060,000208: 5657 01363 TC ALMCADR # RETURN TO USER
064061,000209:
064062,000210: 5660 5604 ABORT EQUALS BAILOUT # *** TEMPORARY UNTIL ABORT CALLS OUT
End of include-file ALARM_AND_ABORT.agc. Parent file is MAIN.agc