Source Code
These source-code files are part of a reconstructed copy of Luminary 69/2,
the flown, final release of the Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.
The reconstruction is based on the source code of Luminary 69 — i.e., the initial, unflown version, "revision 0" — of which a contemporary listing was available. The code was then updated by incorporating the differences between Luminary 69 and Luminary 69/2, known from other contemporary documentation. The only such difference is the implementation in Luminary 69/2 of the "R-2 Lunar Potential Model", the source code for which was taken from program Luminary 99/1 (Apollo 11 LM), of which a contemporary listing was also available. Finally, the now-reconstructed Luminary 69/2 was then validated by assembling it to executable form and verifying that its memory banks had the correct checksums, known from still other contemporary documentation. Note that page numbers in the reconstructed code match those in the original Luminary 69 program listing, or in the ORBITAL INTEGRATION log section, in Luminary 99/1. Page numbers would certainly differ somewhat in a contemporary Luminary 69/2 listing. Moreover, annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change in Luminary 69/2 relative to Luminary 69. Here's a guide to the Apollo documentation referenced in those annotations:
|
057399,000002: ## Copyright: Public domain.
057400,000003: ## Filename: KEYRUPT,_UPRUPT.agc
057401,000004: ## Purpose: A section of LUM69 revision 2.
057402,000005: ## It is part of the reconstructed source code for the flown
057403,000006: ## version of the flight software for the Lunar Module's (LM)
057404,000007: ## Apollo Guidance Computer (AGC) for Apollo 10. The code has
057405,000008: ## been recreated from a copy of Luminary revsion 069, using
057406,000009: ## changes present in Luminary 099 which were described in
057407,000010: ## Luminary memos 75 and 78. The code has been adapted such
057408,000011: ## that the resulting bugger words exactly match those specified
057409,000012: ## for LUM69 revision 2 in NASA drawing 2021152B, which gives
057410,000013: ## relatively high confidence that the reconstruction is correct.
057411,000014: ## Reference: pp. 1332-1334
057412,000015: ## Assembler: yaYUL
057413,000016: ## Contact: Ron Burkey <info@sandroid.org>.
057414,000017: ## Website: www.ibiblio.org/apollo/index.html
057415,000018: ## Mod history: 2019-07-27 MAS Created from Luminary 69.
057416,000019: ## 2021-05-30 ABS UPCK -> UPOK
057417,000020:
Page 1332 |
057419,000022: 14,3711 BANK 14
057420,000023: 04,2000 SETLOC KEYRUPT
057421,000024: 04,2000 BANK
057422,000025: 04,3215 COUNT* $$/KEYUP
057423,000026:
057424,000027: 04,3215 54016 KEYRUPT1 TS BANKRUPT
057425,000028: 04,3216 56002 XCH Q
057426,000029: 04,3217 54012 TS QRUPT
057427,000030: 04,3220 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
057428,000031: 04,3221 34346 CAF LOW5
057429,000032: 04,3222 00006 EXTEND
057430,000033: 04,3223 02015 RAND MNKEYIN # CHECK IF KEYS 5M-1M ON
057431,000034: 04,3224 54073 KEYCOM TS RUPTREG4
057432,000035: 04,3225 40101 CS FLAGWRD5
057433,000036: 04,3226 74735 MASK DSKYFBIT
057434,000037: 04,3227 26101 ADS FLAGWRD5
057435,000038:
057436,000039: 04,3230 34355 ACCEPTUP CAF CHRPRIO # (NOTE: RUPTREG4 = KEYTEMP1)
057437,000040: 04,3231 05072 TC NOVAC
057438,000041: 04,3232 0777 EBANK= DSPCOUNT
057439,000042: 04,3232 02077 60101 2CADR CHARIN
057440,000043:
057441,000044: 04,3234 30073 CA RUPTREG4
057442,000045: 04,3235 50064 INDEX LOCCTR
057443,000046: 04,3236 54154 TS MPAC # LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
057444,000047: 04,3237 05270 TC RESUME
057445,000048:
Page 1333 |
057447,000050: # UPRUPT PROGRAM
057448,000051:
057449,000052: 04,3240 54016 UPRUPT TS BANKRUPT
057450,000053: 04,3241 56002 XCH Q
057451,000054: 04,3242 54012 TS QRUPT
057452,000055: 04,3243 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
057453,000056: 04,3244 34755 CAF ZERO
057454,000057: 04,3245 56045 XCH INLINK
057455,000058: 04,3246 54073 TS KEYTEMP1
057456,000059: 04,3247 34751 CAF BIT3 # TURN ON UPACT LIGHT
057457,000060: 04,3250 00006 EXTEND # (BIT 3 OF CHANNEL 11)
057458,000061: 04,3251 05011 WOR DSALMOUT
057459,000062: 04,3252 34346 UPRPT1 CAF LOW5 # TEST FOR TRIPLE CHAR REDUNDANCY
057460,000063: 04,3253 70073 MASK KEYTEMP1 # LOW5 OF WORD
057461,000064: 04,3254 56073 XCH KEYTEMP1 # LOW5 INTO KEYTEMP1
057462,000065: 04,3255 00006 EXTEND
057463,000066: 04,3256 74742 MP BIT10 # SHIFT RIGHT 5
057464,000067: 04,3257 54734 TS KEYTEMP2
057465,000068: 04,3260 74346 MASK LOW5 # MID 5
057466,000069: 04,3261 63315 AD HI10
057467,000070: 04,3262 03312 TC UPTEST
057468,000071: 04,3263 34742 CAF BIT10
057469,000072: 04,3264 00006 EXTEND
057470,000073: 04,3265 70734 MP KEYTEMP2 # SHIFT RIGHT 5
057471,000074: 04,3266 74346 MASK LOW5 # HIGH 5
057472,000075: 04,3267 40000 COM
057473,000076: 04,3270 03312 TC UPTEST
057474,000077:
057475,000078: 04,3271 43320 UPOK CS ELRCODE # CODE IS GOOD. IF CODE = 'ERROR RESET',
057476,000079: 04,3272 60073 AD KEYTEMP1 # CLEAR UPLOCKFL(SET BIT4 OF FLAGWRD7 = 0)
057477,000080: 04,3273 00006 EXTEND # IF CODE DOES NOT = 'ERROR RESET', ACCEPT
057478,000081: 04,3274 13302 BZF CLUPLOCK # CODE ONLY IF UPLOCKFL IS CLEAR (=0).
057479,000082:
057480,000083: 04,3275 34750 CAF UPLOCBIT # TEST UPLOCKFL FOR 0 OR 1
057481,000084: 04,3276 70103 MASK FLAGWRD7
057482,000085: 04,3277 10000 CCS A
057483,000086: 04,3300 05270 TC RESUME # UPLOCKFL = 1
057484,000087: 04,3301 03230 TC ACCEPTUP # UPLOCKFL = 0
057485,000088:
057486,000089: 04,3302 44750 CLUPLOCK CS UPLOCBIT # CLEAR UPLOCKFL (I.E., SET BIT 4 OF )
057487,000090: 04,3303 70103 MASK FLAGWRD7 # FLAGWRD7 = 0)
057488,000091: 04,3304 54103 TS FLAGWRD7
057489,000092: 04,3305 03230 TC ACCEPTUP
057490,000093:
057491,000094: # CODE IS BAD
057492,000095: 04,3306 40103 TMFAIL2 CS FLAGWRD7 # LOCK OUT FURTHER UPLINK ACTIVITY
057493,000096: 04,3307 74750 MASK UPLOCBIT # (BY SETTING UPLOCKFL = 1) UNTIL
057494,000097: 04,3310 26103 ADS FLAGWRD7 # 'ERROR RESET' IS SENT VIA UPLINK.
057495,000098: 04,3311 05270 TC RESUME
057496,000099: 04,3312 60073 UPTEST AD KEYTEMP1
Page 1334 |
057498,000101: 04,3313 10000 CCS A
057499,000102: 04,3314 03306 TC TMFAIL2
057500,000103: 04,3315 77740 HI10 OCT 77740
057501,000104: 04,3316 03306 TC TMFAIL2
057502,000105: 04,3317 00002 TC Q
057503,000106:
057504,000107: 04,3320 00022 ELRCODE OCT 22
057505,000108:
057506,000109: # 'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
057507,000110: # 1. VBRELDSP
057508,000111: # 2. ERROR RESET
057509,000112: # 3. UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72,AND V73.
057510,000113: # -
057511,000114: # THE RECEPTION OF A BAD CODE (I.E CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
057512,000115: # THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
057513,000116: # WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
057514,000117: # (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
057515,000118: # BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
057516,000119: # FAILURE)
057517,000120:
057518,000121: # UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
057519,000122:
057520,000123: 04,3321 44753 CS XDSPBIT
057521,000124:
End of include-file KEYRUPT,_UPRUPT.agc. Parent file is MAIN.agc