Source Code
This source code is very close to the Apollo Guidance Computer software for the
Apollo 13 Lunar module. This revision of the Luminary 131 program is from December
of 1969, whereas there was a later revision in January of 1970, and still another
revision in February, which is the code that flew on the mission.
As far as this transcription is concerned, it was originally from a copy made in 1991 of
a printout from the collection of AGC developer Don Eyles for collector David Craig.
It was subsequently scanned by Gary Neff, reprocessed for online
presentation at the now-discontinued History of Recent Science and Technology (HRST) website
of MIT's Dibner Institute (the full-quality scans being discarded in the process),
and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a
high-quality replacement scan for a completely illegible page was later provided by Gary
Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many
errors to be introduced into the transcription. Accordingly, a second scan of the same physical
printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive,
and used to correct the transcription errors. All of the scanned materials mentioned,
as well as other Luminary 131 related material, are available online.
Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017,
so the two scans are not identical in that respect. The page-headings in the printout read, in part:GAP: ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091 17:53 DEC. 19, 1969Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together. |
058873,000002: ## Copyright: Public domain.
058874,000003: ## Filename: T6-RUPT_PROGRAMS.agc
058875,000004: ## Purpose: A section of Luminary 1C, revision 131.
058876,000005: ## It is part of the source code for the Lunar Module's (LM)
058877,000006: ## Apollo Guidance Computer (AGC) for Apollo 13.
058878,000007: ## This file is intended to be a faithful transcription, except
058879,000008: ## that the code format has been changed to conform to the
058880,000009: ## requirements of the yaYUL assembler rather than the
058881,000010: ## original YUL assembler.
058882,000011: ## Reference: pp. 1395-1397
058883,000012: ## Contact: Ron Burkey <info@sandroid.org>.
058884,000013: ## Website: www.ibiblio.org/apollo/index.html
058885,000014: ## Mod history: 06/07/03 RSB. Began transcribing.
058886,000015: ## 05/14/05 RSB Corrected website reference above.
058887,000016: ## 2017-01-06 RSB Page numbers now agree with those on the
058888,000017: ## original hardcopy, as opposed to the PDF page
058889,000018: ## numbers in 1701.pdf.
058890,000019: ## 2017-02-28 RSB Proofed comment text using octopus/ProoferComments.
058891,000020: ## 2017-08-29 MAS Fixed a comment-text error found while transcribing
058892,000021: ## Zerlina 56.
058893,000022:
Page 1395 |
058895,000024: # PROGRAM NAMES: (1) T6JOBCHK MOD. NO. 5 OCTOBER 2, 1967
058896,000025: # (2) DOT6RUPT
058897,000026: # MODIFICATION BY: LOWELL G HULL (A.C.ELECTRONICS)
058898,000027:
058899,000028: # THESE PROGRAMS ENABLE THE LM DAP TO CONTROL THE THRUST TIMES OF THE REACTION CONTROL SYSTEM JETS BY USING TIME6.
058900,000029: # SINCE THE LM DAP MAINTAINS EXCLUSIVE CONTROL OVER TIME6 AND ITS INTERRUPTS, THE FOLLOWING CONVENTIONS HAVE BEEN
058901,000030: # ESTABLISHED AND MUST NOT BE TAMPERED WITH:
058902,000031: # 1. NO NUMBER IS EVER PLACED INTO TIME6 EXCEPT BY LM DAP.
058903,000032: # 2. NO PROGRAM OTHER THAN LM DAP ENABLES THE TIME6 COUNTER.
058904,000033: # 3. TO USE TIME6, THE FOLLOWING SEQUENCE IS ALWAYS EMPLOYED:
058905,000034: # A. A POSITIVE (NON-ZERO) NUMBER IS STORED IN TIME6.
058906,000035: # B. THE TIME6 CLOCK IS ENABLED.
058907,000036: # C. TIME6 IS INTERROGATED AND IS:
058908,000037: # I. NEVER FOUND NEGATIVE (NON-ZERO) OR +0.
058909,000038: # II. SOMETIMES FOUND POSITIVE (BETWEEN 1 AND 240D) INDICATING THAT IT IS ACTIVE.
058910,000039: # III. SOMETIMES FOUND POSMAX INDICATING THAT IT IS INACTIVE AND NOT ENABLED.
058911,000040: # IV. SOMETIMES FOUND NEGATIVE ZERO INDICATING THAT:
058912,000041: # A. A T6RUPT IS ABOUT TO OCCUR AT THE NEXT DINC, OR
058913,000042: # B. A T6RUPT IS WAITING IN THE PRIORITY CHAIN, OR
058914,000043: # C. A T6RUPT IS IN PROCESS NOW.
058915,000044: # 4) ALL PROGRAMS WHICH OPERATE IN EITHER INTERRUPT MODE OR WITH INTERRUPT INHIBITED MUST CALL T6JOBCHK
058916,000045: # EVERY 5 MILLISECONDS TO PROCESS A POSSIBLE WAITING T6RUPT BEFORE IT CAN BE HONORED BY THE HARDWARE.
058917,000046: # (5. PROGRAM JTLST, IN Q,R-AXES, HANDLES THE INPUT LIST.)
058918,000047:
058919,000048: # T6JOBCHK CALLING SEQUENCE:
058920,000049: # L TC T6JOBCHK
058921,000050: # L+1 (RETURN)
058922,000051:
058923,000052: # DOT6RUPT CALLING SEQUENCE:
058924,000053: # DXCH ARUPT T6RUPT LEAD IN AT LOCATION 4004.
058925,000054: # EXTEND
058926,000055: # DCA T6ADR
058927,000056: # DTCB
058928,000057:
058929,000058: # SUBROUTINES CALLED: DOT6RUPT CALLS T6JOBCHK.
058930,000059:
058931,000060: # NORMAL EXIT MODES: T6JOBCHK RETURNS TO L +1.
058932,000061: # DOT6RUPT TRANSFERS CONTROL TO RESUME.
058933,000062:
058934,000063: # ALARM/ABORT MODES: NONE.
058935,000064:
058936,000065: # INPUT: TIME6 NXT6ADR OUTPUT: TIME6 NXT6ADR CHANNEL 5
058937,000066: # T6NEXT T6NEXT +1 T6NEXT T6NEXT +1 CHANNEL 6
058938,000067: # T6FURTHA T6FURTHA +1 T6FURTHA T6FURTHA +1 BIT15/CH13
058939,000068:
058940,000069: # DEBRIS: T6JOBCHK CLOBBERS A. DOT6RUPT CLOBBERS NOTHING.
058941,000070:
058942,000071: 5743 BLOCK 02
Page 1396 |
058944,000073: 17,2055 BANK 17
058945,000074: 17,2000 SETLOC DAPS2
058946,000075: 17,2000 BANK
058947,000076: 17,2055 E6,1466 EBANK= T6NEXT
058948,000077: 17,2055 COUNT* $$/DAPT6
058949,000078:
058950,000079: 17,2055 10031 T6JOBCHK CCS TIME6 # CHECK TIME6 FOR WAITING T6RUPT:
058951,000080: 17,2056 00002 TC Q # NONE: CLOCK COUTING DOWN.
058952,000081: 17,2057 05675 TC CCSHOLE
058953,000082: 17,2060 05675 TC CCSHOLE
058954,000083:
058955,000084: # CONTROL PASSES TO T6JOB ONLY WHEN C(TIME6) = -0 (I.E. WHEN A T6RUPT MUST BE PROCESSED).
058956,000085:
058957,000086: 17,2061 34733 T6JOB CA POSMAX
058958,000087: 17,2062 22007 ZL
058959,000088: 17,2063 53471 DXCH T6FURTHA
058960,000089: 17,2064 53467 DXCH T6NEXT
058961,000090: 17,2065 23465 LXCH NXT6ADR
058962,000091: 17,2066 54031 TS TIME6
058963,000092:
058964,000093: 17,2067 67730 AD PRIO37
058965,000094: 17,2070 54000 TS A
058966,000095: 17,2071 12075 TCF ENABLET6
058967,000096: 17,2072 34733 CA POSMAX
058968,000097: 17,2073 54031 TS TIME6
058969,000098: 17,2074 12115 TCF GOCH56
058970,000099: 17,2075 00006 ENABLET6 EXTEND
058971,000100: 17,2076 23265 QXCH C13QSAV
058972,000101: 17,2077 22070 LXCH RUPTREG1
058973,000102: 17,2100 06022 TC C13STALL
058974,000103: 17,2101 00006 EXTEND
058975,000104: 17,2102 23265 QXCH C13QSAV
058976,000105: 17,2103 22070 LXCH RUPTREG1
058977,000106: 17,2104 34735 CAF BIT15
058978,000107: 17,2105 00006 EXTEND
058979,000108: 17,2106 05013 WOR CHAN13
058980,000109: 17,2107 31466 CA T6NEXT
058981,000110: 17,2110 67730 AD PRIO37
058982,000111: 17,2111 54000 TS A
058983,000112: 17,2112 12115 TCF GOCH56
058984,000113: 17,2113 34733 CA POSMAX
058985,000114: 17,2114 55466 TS T6NEXT
058986,000115: 17,2115 50001 GOCH56 INDEX L
058987,000116: 17,2116 15743 TCF WRITEP -1
058988,000117:
058989,000118: 5743 BLOCK 02
058990,000119: 4000 SETLOC FFTAG9
058991,000120: 4000 BANK
058992,000121: 5743 E6,1634 EBANK= CDUXD
058993,000122: 5743 COUNT* $$/DAPT6
Page 1397 |
058995,000124: 5743 31472 CA NEXTP
058996,000125: 5744 00006 WRITEP EXTEND
058997,000126: 5745 01006 WRITE CHAN6
058998,000127: 5746 00002 TC Q
058999,000128:
059000,000129: 5747 31473 CA NEXTU
059001,000130: 5750 54001 WRITEU TS L
059002,000131: 5751 45764 CS 00314OCT
059003,000132: 5752 00006 EXTEND
059004,000133: 5753 02005 RAND CHAN5
059005,000134: 5754 60001 AD L
059006,000135: 5755 00006 EXTEND
059007,000136: 5756 01005 WRITE CHAN5
059008,000137: 5757 00002 TC Q
059009,000138:
059010,000139: 5760 31474 CA NEXTV
059011,000140: 5761 54001 WRITEV TS L
059012,000141: 5762 35764 CA 00314OCT
059013,000142: 5763 15752 TCF -9D
059014,000143: 5764 00314 00314OCT OCT 00314
059015,000144:
059016,000145: 17,2117 BANK 17
059017,000146: 17,2000 SETLOC DAPS2
059018,000147: 17,2000 BANK
059019,000148:
059020,000149: 17,2117 E6,1466 EBANK= T6NEXT
059021,000150: 17,2117 COUNT* $$/DAPT6
059022,000151:
059023,000152: 17,2117 22016 DOT6RUPT LXCH BANKRUPT # (INTERRUPT LEAD INS CONTINUED)
059024,000153: 17,2120 00006 EXTEND
059025,000154: 17,2121 22012 QXCH QRUPT
059026,000155:
059027,000156: 17,2122 02055 TC T6JOBCHK # CALL T6JOBCHK.
059028,000157:
059029,000158: 17,2123 15270 TCF RESUME # END TIME6 INTERRUPT PROCESSOR.
059030,000159:
059031,000160:
End of include-file T6-RUPT_PROGRAMS.agc. Parent file is MAIN.agc