Source Code
These source-code files are part of a reconstructed copy of Skylark 048, the
Block II Command Module (CM) Apollo Guidance Computer (AGC) software for the
Skylab-2, Skylab-3, Skylab-4, and Apollo-Soyuz Test Project missions.
They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on Skylab-2, part numbers 2010802-541, 2010802-551, 2010802-561, 2010802-571, 2010802-581, and 2010802-591. Access to these modules was provided by the New Mexico Museum of Space History, who we are much indebted to. The source code for the Apollo 15, 16, and 17 software, Artemis 072, was used as a starting point. Heavy use was made of TRW 4900.5-244, Programmed Guidance Equations for Skylark Command Module Earth Orbital Program, dated 14 February 1972. This document contains pseudocode of essentially all of Skylark, using original program labels which have been copied for this source reconstruction. Since only binary dumps (rather than listings) of Skylark are available as source material, all comments and labels are approximate. They have been taken from the Programmed Guidance Equations or other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
059700,000002: ## Copyright: Public domain.
059701,000003: ## Filename: ALARM_AND_ABORT.agc
059702,000004: ## Purpose: A section of Skylark revision 048.
059703,000005: ## It is part of the source code for the Apollo Guidance Computer (AGC)
059704,000006: ## for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of
059705,000007: ## this software are available; instead, this file was created via
059706,000008: ## disassembly of dumps of the core rope modules actually flown on
059707,000009: ## Skylab-2. Access to these modules was provided by the New Mexico
059708,000010: ## Museum of Space History.
059709,000011: ## Assembler: yaYUL
059710,000012: ## Contact: Ron Burkey <info@sandroid.org>.
059711,000013: ## Website: www.ibiblio.org/apollo/index.html
059712,000014: ## Mod history: 2023-09-04 MAS Created from Artemis 072.
059713,000015:
059714,000016:
059715,000017: # THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION. IT MAY BE CALLED
059716,000018: # EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
059717,000019:
059718,000020: # CALLING SEQUENCE IS AS FOLLOWS:
059719,000021:
059720,000022: # TC ALARM
059721,000023: # OCT NNNNN
059722,000024: # (RETURNS HERE)
059723,000025:
059724,000026: 4000 SETLOC FFTAG7
059725,000027: 4000 BANK
059726,000028:
059727,000029: 5644 0374 EBANK= FAILREG
059728,000030:
059729,000031: 5644 COUNT* $$/ALARM
059730,000032:
059731,000033: # ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
059732,000034:
059733,000035: 5644 00004 ALARM INHINT
059734,000036:
059735,000037: 5645 30002 CA Q
059736,000038: 5646 55363 ALARM2 TS ALMCADR
059737,000039: 5647 50002 INDEX Q
059738,000040: 5650 30000 CA 0
059739,000041: 5651 54001 BORTENT TS L
059740,000042:
059741,000043: 5652 30006 PRIOENT CA BBANK
059742,000044: 5653 00006 +1 EXTEND
059743,000045: 5654 04007 ROR SUPERBNK # ADD SUPER BITS.
059744,000046: 5655 55364 TS ALMCADR +1
059745,000047:
059746,000048: 5656 30002 LARMENT CA Q # STORE RETURN FOR ALARM
059747,000049: 5657 54061 TS ITEMP1
059748,000050:
059749,000051: 5660 10374 CHKFAIL1 CCS FAILREG # IS ANYTHING IN FAILREG
059750,000052: 5661 15665 TCF CHKFAIL2 # YES TRY NEXT REG
059751,000053: 5662 30001 CA L
059752,000054: 5663 54374 TS FAILREG
059753,000055: 5664 15671 TCF PROGLARM # TURN ALARM LIGHT ON FOR FIRST ALARM
059754,000056:
059755,000057: 5665 10375 CHKFAIL2 CCS FAILREG +1
059756,000058: 5666 15671 TCF PROGLARM
059757,000059: 5667 30001 CA L
059758,000060: 5670 54375 TS FAILREG +1
059759,000061:
059760,000062: 5671 22376 PROGLARM LXCH FAILREG +2 # STORE AS "MOST RECENT" ALARM CODE
059761,000063:
059762,000064: 5672 41231 CS DSPTAB +11D # TURN ON PROGRAM ALARM IF OFF
059763,000065: 5673 77760 MASK BIT15+9
059764,000066: 5674 27231 ADS DSPTAB +11D
059765,000067:
059766,000068: 5675 56061 MULTEXIT XCH ITEMP1 # OBTAIN RETURN ADDRESS IN A
059767,000069: 5676 00003 RELINT
059768,000070: 5677 50000 INDEX A
059769,000071: 5700 00001 TC 1
059770,000072:
059771,000073: # PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
059772,000074: # AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4. EXAMPLE FOLLOWS,
059773,000075: # CAF OCTXX ALARM CODE
059774,000076: # TC BANKCALL
059775,000077: # CADR PRIOLARM
059776,000078:
059777,000079: # ... ...
059778,000080: # ... ...
059779,000081: # ... ... ASTRONAUT RETURN
059780,000082: # TC PHASCHNG IMMEDIATE RETURN TO USER. RESTART
059781,000083: # OCT X.1 PHASE CHANGE FOR PRIO DISPLAY
059782,000084:
059783,000085: 10,2000 SETLOC DISPLAYS
059784,000086: 10,2000 BANK
059785,000087:
059786,000088: 10,3646 COUNT* $$/DSPLA
059787,000089: 10,3646 00004 PRIOLARM INHINT # * * * KEEP IN DISPLAY ROUTINES BANK
059788,000090: 10,3647 54001 TS L # SAVE ALARM CODE
059789,000091:
059790,000092: 10,3650 30133 CA BUF2 # 2 CADR OF PRIOLARM USER
059791,000093: 10,3651 55363 TS ALMCADR
059792,000094: 10,3652 30134 CA BUF2 +1
059793,000095: 10,3653 05653 TC PRIOENT +1 # * LEAVE L ALONE
059794,000096: 10,3654 77467 -2SEC DEC -200 B-14 # *** DONT MOVE
059795,000097: 10,3655 35036 CAF V05N09
059796,000098: 10,3656 12630 TCF PRIODSPR
059797,000099:
059798,000100: 6000 SETLOC FFTAG13
059799,000101: 6000 BANK
059800,000102:
059801,000103: 7750 COUNT* $$/ALARM
059802,000104: 7750 00004 BAILOUT INHINT
059803,000105: 7751 30002 CA Q
059804,000106: 7752 55363 TS ALMCADR
059805,000107:
059806,000108: 7753 04647 TC BANKCALL
059807,000109: 7754 40000 CADR VAC5STOR
059808,000110:
059809,000111: 7755 51363 INDEX ALMCADR
059810,000112: 7756 30000 CAF 0
059811,000113: 7757 05651 TC BORTENT
059812,000114: 7760 40400 BIT15+9 OCT 40400
059813,000115:
059814,000116: 7761 00004 -1 INHINT
059815,000117: 7762 35000 WHIMPER CA TWO
059816,000118: 7763 60005 AD Z
059817,000119: 7764 54017 TS BRUPT
059818,000120: 7765 50017 RESUME
059819,000121: 7766 04666 TC POSTJUMP # RESUME SENDS CONTROL HERE
059820,000122: 7767 12615 CADR ENEMA
059821,000123:
059822,000124: 4000 SETLOC FFTAG7
059823,000125: 4000 COUNT* $$/ALARM
059824,000126: 4000 BANK
059825,000127:
059826,000128: 5701 00004 POODOO INHINT
059827,000129: 5702 30002 CA Q
059828,000130: 5703 55363 TS ALMCADR
059829,000131:
059830,000132: 5704 04647 TC BANKCALL
059831,000133: 5705 40000 CADR VAC5STOR # STORE ERASABLES FOR DEBUGGING PURPOSES.
059832,000134:
059833,000135: 5706 51363 INDEX ALMCADR
059834,000136: 5707 30000 CAF 0
059835,000137: 5710 05651 ABORT2 TC BORTENT
059836,000138:
059837,000139: 5711 77770 OCT77770 OCT 77770 # DONT MOVE
059838,000140: 5712 34774 CA V37FLBIT # IS AVERAGE G ON
059839,000141: 5713 70103 MASK FLAGWRD7
059840,000142: 5714 10000 CCS A
059841,000143: 5715 07761 TC WHIMPER -1 # YES. DONT DO POODOO. DO BAILOUT.
059842,000144:
059843,000145: 5716 44764 CS BIT14 # DISREGARD ENTRY SETTING
059844,000146: 5717 71237 MASK EXTVBACT # EXTENDED VBS ACTIVE?
059845,000147: 5720 10000 CCS A
059846,000148: 5721 17761 TCF WHIMPER -1 # YES DONT DO POODOO DO BAILOUT
059847,000149:
059848,000150: 5722 07722 TC DOWNFLAG
059849,000151: 5723 00067 ADRES STATEFLG
059850,000152:
059851,000153: 5724 07722 TC DOWNFLAG
059852,000154: 5725 00236 ADRES AUTOSEQ
059853,000155:
059854,000156: 5726 07722 TC DOWNFLAG
059855,000157: 5727 00230 ADRES REINTFLG
059856,000158:
059857,000159: 5730 07722 TC DOWNFLAG
059858,000160: 5731 00176 ADRES UTFLAG
059859,000161: 5732 07722 TC DOWNFLAG
059860,000162: 5733 00010 ADRES RNDVZFLG
059861,000163: 5734 07722 TC DOWNFLAG
059862,000164: 5735 00031 ADRES TRACKFLG # FORCE STOPRATE
059863,000165: 5736 07722 TC DOWNFLAG
059864,000166: 5737 00054 ADRES NODOFLAG
059865,000167:
059866,000168: 5740 04647 TC BANKCALL
059867,000169: 5741 12444 CADR MR.KLEAN
059868,000170: 5742 07762 TC WHIMPER
059869,000171:
059870,000172: 5743 5220 DOALARM EQUALS ENDOFJOB
059871,000173:
059872,000174: # CALLING SEQUENCE FOR VARALARM
059873,000175: # CAF (ALARM)
059874,000176: # TC VARALARM
059875,000177:
059876,000178: # VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
059877,000179:
059878,000180: 5743 00004 VARALARM INHINT
059879,000181:
059880,000182: 5744 54001 TS L # SAVE USERS ALARM CODE
059881,000183:
059882,000184: 5745 30002 CA Q # SAVE USERS Q
059883,000185: 5746 55363 TS ALMCADR
059884,000186:
059885,000187: 5747 05652 TC PRIOENT
059886,000188: 5750 00014 OCT14 OCT 14 # DONT MOVE
059887,000189:
059888,000190: 5751 01363 TC ALMCADR # RETURN TO USER
059889,000191:
059890,000192: 5752 7750 ABORT EQUALS BAILOUT # *** TEMPORARY UNTIL ABORT CALLS OUT
End of include-file ALARM_AND_ABORT.agc. Parent file is MAIN.agc