Source Code
These source-code files are part of a reconstructed copy of Luminary 173, the
second (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance
Computer (AGC) software.
The reconstruction began with reconstructed source code for Luminary 178. Changes between revision 173 and 178 were backed out, as described by Luminary memo 167 (revision 1). The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 173 listing would be different. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. |
058551,000002: ## Copyright: Public domain.
058552,000003: ## Filename: ALARM_AND_ABORT.agc
058553,000004: ## Purpose: A section of Luminary revision 173.
058554,000005: ## It is part of the reconstructed source code for the second
058555,000006: ## (unflown) release of the flight software for the Lunar
058556,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
058557,000008: ## The code has been recreated from a reconstructed copy of
058558,000009: ## Luminary 178, as well as Luminary memo 167 (revision 1).
058559,000010: ## It has been adapted such that the resulting bugger words
058560,000011: ## exactly match those specified for Luminary 173 in NASA
058561,000012: ## drawing 2021152N, which gives relatively high confidence
058562,000013: ## that the reconstruction is correct.
058563,000014: ## Reference: pp. 1369-1373
058564,000015: ## Assembler: yaYUL
058565,000016: ## Contact: Ron Burkey <info@sandroid.org>.
058566,000017: ## Website: www.ibiblio.org/apollo/index.html
058567,000018: ## Mod history: 2019-09-18 MAS Created from Luminary 178.
058568,000019:
Page 1369 |
058570,000021: # THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION. IT MAY BE CALLED
058571,000022: # EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
058572,000023:
058573,000024: # CALLING SEQUENCE IS AS FOLLOWS:
058574,000025:
058575,000026: # TC ALARM
058576,000027: # OCT AAANN ALARM NO. NN IN GENERAL AREA AAA.
058577,000028: # (RETURNS HERE)
058578,000029:
058579,000030: 5600 BLOCK 02
058580,000031: 4000 SETLOC FFTAG7
058581,000032: 4000 BANK
058582,000033:
058583,000034: 5600 0375 EBANK= FAILREG
058584,000035:
058585,000036: 5600 COUNT* $$/ALARM
058586,000037: # ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
058587,000038:
058588,000039: 5600 00004 ALARM INHINT
058589,000040:
058590,000041: 5601 30002 CA Q
058591,000042: 5602 55363 ALARM2 TS ALMCADR
058592,000043: 5603 50002 INDEX Q
058593,000044: 5604 30000 CA 0
058594,000045: 5605 54001 BORTENT TS L
058595,000046:
058596,000047: 5606 30006 PRIOENT CA BBANK
058597,000048: 5607 00006 +1 EXTEND
058598,000049: 5610 04007 ROR SUPERBNK # ADD SUPER BITS.
058599,000050: 5611 55364 TS ALMCADR +1
058600,000051:
058601,000052: 5612 30002 LARMENT CA Q # STORE RETURN FOR ALARM
058602,000053: 5613 54061 TS ITEMP1
058603,000054:
058604,000055: 5614 10375 CHKFAIL1 CCS FAILREG # IS ANYTHING IN FAILREG
058605,000056: 5615 15621 TCF CHKFAIL2 # YES TRY NEXT REG
058606,000057: 5616 30001 CA L
058607,000058: 5617 54375 TS FAILREG
058608,000059: 5620 15625 TCF PROGLARM # TURN ALARM LIGHT ON FOR FIRST ALARM
058609,000060:
058610,000061: 5621 10376 CHKFAIL2 CCS FAILREG +1
058611,000062: 5622 15625 TCF PROGLARM
058612,000063: 5623 30001 CA L
058613,000064: 5624 54376 TS FAILREG +1
058614,000065:
058615,000066: 5625 22377 PROGLARM LXCH FAILREG +2 # STORE AS "MOST RECENT" ALARM CODE
058616,000067:
058617,000068: 5626 41035 CS DSPTAB +11D # TURN ON PROGRAM ALARM IF OFF
058618,000069: 5627 75643 MASK OCT40400
058619,000070: 5630 27035 ADS DSPTAB +11D
058620,000071:
Page 1370 |
058622,000073: 5631 56061 MULTEXIT XCH ITEMP1 # OBTAIN RETURN ADDRESS IN A
058623,000074: 5632 00003 RELINT
058624,000075: 5633 50000 INDEX A
058625,000076: 5634 00001 TC 1
058626,000077:
058627,000078: # PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
058628,000079: # AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4. EXAMPLE FOLLOWS,
058629,000080: # CAF OCTXX ALARM CODE
058630,000081: # TC BANKCALL
058631,000082: # CADR PRIOLARM
058632,000083:
058633,000084: # ... ...
058634,000085: # ... ...
058635,000086: # ... ... ASTRONAUT RETURN
058636,000087: # TC PHASCHNG IMMEDIATE RETURN TO USER. RESTART
058637,000088: # OCT X.1 PHASE CHANGE FOR PRIO DISPLAY
058638,000089:
058639,000090: 10,3563 BANK 10
058640,000091: 10,2000 SETLOC DISPLAYS
058641,000092: 10,2000 BANK
058642,000093:
058643,000094: 10,3563 COUNT* $$/DSPLA
058644,000095: 10,3563 00004 PRIOLARM INHINT # * * * KEEP IN DISPLAY ROUTINES BANK
058645,000096: 10,3564 54001 TS L # SAVE ALARM CODE
058646,000097:
058647,000098: 10,3565 30133 CA BUF2 # 2 CADR OF PRIOLARM USER
058648,000099: 10,3566 55363 TS ALMCADR
058649,000100: 10,3567 30134 CA BUF2 +1
058650,000101: 10,3570 05607 TC PRIOENT +1 # * LEAVE L ALONE
058651,000102: 10,3571 77467 -2SEC DEC -200 B-14 # *** DONT MOVE
058652,000103: 10,3572 35006 CAF V05N09
058653,000104: 10,3573 12505 TCF PRIODSPR
058654,000105:
058655,000106: 5635 BLOCK 02
058656,000107: 4000 SETLOC FFTAG7
058657,000108: 4000 BANK
058658,000109:
058659,000110: 5635 COUNT* $$/ALARM
058660,000111: 5635 00004 BAILOUT INHINT
058661,000112: 5636 30002 CA Q
058662,000113: 5637 55363 TS ALMCADR
058663,000114:
058664,000115: 5640 50002 INDEX Q
058665,000116: 5641 30000 CAF 0
058666,000117: 5642 05605 TC BORTENT
058667,000118: 5643 40400 OCT40400 OCT 40400
058668,000119:
058669,000120: 5644 00004 INHINT
058670,000121: 5645 34752 WHIMPER CA TWO
058671,000122: 5646 60005 AD Z
Page 1371 |
058673,000124: 5647 54017 TS BRUPT
058674,000125: 5650 50017 RESUME
058675,000126: 5651 04635 TC POSTJUMP # RESUME SENDS CONTROL HERE
058676,000127: 5652 12775 CADR ENEMA
058677,000128: 5653 00004 POODOO INHINT
058678,000129: 5654 30002 CA Q
058679,000130: 5655 55363 ABORT2 TS ALMCADR
058680,000131: 5656 50002 INDEX Q
058681,000132: 5657 30000 CAF 0
058682,000133: 5660 05605 TC BORTENT
058683,000134: 5661 77770 OCT77770 OCT 77770 # DON'T MOVE
058684,000135:
058685,000136: 5662 34765 CAF OCT35 # 4.35SPOT FOR GOPOODOO
058686,000137: 5663 54001 TS L
058687,000138: 5664 40000 COM
058688,000139: 5665 52760 DXCH -PHASE4
058689,000140: 5666 00004 GOPOODOO INHINT
058690,000141: 5667 04616 TC BANKCALL # RESET STATEFLG, REINTFLG, AND NODOFLAG.
058691,000142: 5670 27746 CADR FLAGS
058692,000143: 5671 30103 CA FLAGWRD7 # IS SERVICER CURRENTLY IN OPERATION?
058693,000144: 5672 74746 MASK V37FLBIT
058694,000145: 5673 10000 CCS A
058695,000146: 5674 15702 TCF STRTIDLE
058696,000147: 5675 04616 TC BANKCALL # TERMINATE GRPS 1, 3, 5, AND 6
058697,000148: 5676 12662 CADR V37KLEAN
058698,000149: 5677 04616 TC BANKCALL # TERMINATE GRPS 2, 4, 1, 3, 5, AND 6
058699,000150: 5700 12653 CADR MR.KLEAN # (I.E., GRP 4 LAST)
058700,000151: 5701 15645 TCF WHIMPER
058701,000152: 5702 35744 STRTIDLE CAF BBSERVDL
058702,000153: 5703 04727 TC SUPERSW
058703,000154: 5704 04616 TC BANKCALL # PUT SERVICER INTO ITS "GROUND" STATE
058704,000155: 5705 57320 CADR SERVIDLE # AND PROCEED TO GOTOPOOH.
058705,000156: 5706 00004 CCSHOLE INHINT
058706,000157: 5707 30002 CA Q
058707,000158: 5710 05655 TC ABORT2
058708,000159: 5711 21103 OCT21103 OCT 21103
058709,000160: 5712 00004 CURTAINS INHINT
058710,000161: 5713 30002 CA Q
058711,000162: 5714 05602 TC ALARM2
058712,000163: 5715 00217 OCT217 OCT 00217
058713,000164: 5716 01363 TC ALMCADR # RETURN TO USER
058714,000165:
058715,000166: 5717 00004 BAILOUT1 INHINT
058716,000167: 5720 53364 DXCH ALMCADR
058717,000168: 5721 35743 CAF ADR40400
058718,000169: 5722 54061 BOTHABRT TS ITEMP1
058719,000170: 5723 50002 INDEX Q
058720,000171: 5724 30000 CAF 0
058721,000172: 5725 54001 TS L
058722,000173: 5726 15614 TCF CHKFAIL1
058723,000174:
Page 1372 |
058725,000176: 5727 00004 POODOO1 INHINT
058726,000177: 5730 53364 DXCH ALMCADR
058727,000178: 5731 35742 CAF ADR77770
058728,000179: 5732 15722 TCF BOTHABRT
058729,000180:
058730,000181: 5733 00004 ALARM1 INHINT
058731,000182: 5734 53364 DXCH ALMCADR
058732,000183: 5735 00004 ALMNCADR INHINT
058733,000184: 5736 50002 INDEX Q
058734,000185: 5737 30000 CA 0
058735,000186: 5740 54001 TS L
058736,000187: 5741 15612 TCF LARMENT
058737,000188:
058738,000189: 5742 15661 ADR77770 TCF OCT77770
058739,000190: 5743 15643 ADR40400 TCF OCT40400
058740,000191: 5744 5155 DOALARM EQUALS ENDOFJOB
058741,000192: 5744 E7,1515 EBANK= DVCNTR
058742,000193: 5744 56067 BBSERVDL BBCON SERVIDLE
058743,000194: # CALLING SEQUENCE FOR VARALARM
058744,000195:
058745,000196: # CAF (ALARM)
058746,000197: # TC VARALARM
058747,000198:
058748,000199: # VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
058749,000200: 5745 00004 VARALARM INHINT
058750,000201:
058751,000202: 5746 54001 TS L # SAVE USERS ALARM CODE
058752,000203:
058753,000204: 5747 30002 CA Q # SAVE USERS Q
058754,000205: 5750 55363 TS ALMCADR
058755,000206:
058756,000207: 5751 05606 TC PRIOENT
058757,000208: 5752 00014 OCT14 OCT 14 # DONT MOVE
058758,000209:
058759,000210: 5753 01363 TC ALMCADR # RETURN TO USER
058760,000211:
058761,000212: 5754 5645 ABORT EQUALS WHIMPER
058762,000213: 13,3746 BANK 13
058763,000214: 13,2000 SETLOC ABTFLGS
058764,000215: 13,2000 BANK
058765,000216: 13,3746 COUNT* $$/ALARM
058766,000217:
058767,000218: 13,3746 44747 FLAGS CS STATEBIT
058768,000219: 13,3747 70077 MASK FLAGWRD3
058769,000220: 13,3750 54077 TS FLAGWRD3
058770,000221: 13,3751 44745 CS REINTBIT
058771,000222: 13,3752 70106 MASK FLGWRD10
058772,000223: 13,3753 54106 TS FLGWRD10
058773,000224: 13,3754 44753 CS NODOBIT
058774,000225: 13,3755 70076 MASK FLAGWRD2
Page 1373 |
058776,000227: 13,3756 54076 TS FLAGWRD2
058777,000228: 13,3757 00002 TC Q
End of include-file ALARM_AND_ABORT.agc. Parent file is MAIN.agc