Source Code
These source-code files are part of a reconstructed copy of Luminary 178, the
final release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer
(AGC) software.
The reconstruction began with source code of Zerlina 56, Luminary 210, and Luminary 131, previously transcribed from digitized copies of those programs. The code was created by combining the three, using Zerlina 56 as a base, since it was based off of Luminary 183. The differences between the three were carefully merged using the Luminary memos as a guide, with all changes made after Luminary 178 being backed out. 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 178 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. |
056739,000002: ## Copyright: Public domain.
056740,000003: ## Filename: KEYRUPT,_UPRUPT.agc
056741,000004: ## Purpose: A section of Luminary revision 178.
056742,000005: ## It is part of the reconstructed source code for the final
056743,000006: ## release of the flight software for the Lunar Module's
056744,000007: ## (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
056745,000008: ## code has been recreated from copies of Zerlina 56, Luminary
056746,000009: ## 210, and Luminary 131, as well as many Luminary memos.
056747,000010: ## It has been adapted such that the resulting bugger words
056748,000011: ## exactly match those specified for Luminary 178 in NASA
056749,000012: ## drawing 2021152N, which gives relatively high confidence
056750,000013: ## that the reconstruction is correct.
056751,000014: ## Reference: pp. 1327-1329
056752,000015: ## Assembler: yaYUL
056753,000016: ## Contact: Ron Burkey <info@sandroid.org>.
056754,000017: ## Website: www.ibiblio.org/apollo/index.html
056755,000018: ## Mod history: 2019-08-14 MAS Created from Zerlina 56.
056756,000019:
Page 1327 |
056758,000021: 14,3775 BANK 14
056759,000022: 04,2000 SETLOC KEYRUPT
056760,000023: 04,2000 BANK
056761,000024: 04,3261 COUNT* $$/KEYUP
056762,000025:
056763,000026: 04,3261 54016 KEYRUPT1 TS BANKRUPT
056764,000027: 04,3262 56002 XCH Q
056765,000028: 04,3263 54012 TS QRUPT
056766,000029: 04,3264 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
056767,000030: 04,3265 34346 CAF LOW5
056768,000031: 04,3266 00006 EXTEND
056769,000032: 04,3267 02015 RAND MNKEYIN # CHECK IF KEYS 5M-1M ON
056770,000033: 04,3270 54073 KEYCOM TS RUPTREG4
056771,000034: 04,3271 40101 CS FLAGWRD5
056772,000035: 04,3272 74735 MASK DSKYFBIT
056773,000036: 04,3273 26101 ADS FLAGWRD5
056774,000037:
056775,000038: 04,3274 34355 ACCEPTUP CAF CHRPRIO # (NOTE: RUPTREG4 = KEYTEMP1)
056776,000039: 04,3275 05072 TC NOVAC
056777,000040: 04,3276 0776 EBANK= DSPCOUNT
056778,000041: 04,3276 02077 60101 2CADR CHARIN
056779,000042:
056780,000043: 04,3300 30073 CA RUPTREG4
056781,000044: 04,3301 50064 INDEX LOCCTR
056782,000045: 04,3302 54154 TS MPAC # LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
056783,000046: 04,3303 05301 TC RESUME
056784,000047:
Page 1328 |
056786,000049: # UPRUPT PROGRAM
056787,000050:
056788,000051: 04,3304 54016 UPRUPT TS BANKRUPT
056789,000052: 04,3305 56002 XCH Q
056790,000053: 04,3306 54012 TS QRUPT
056791,000054: 04,3307 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
056792,000055: 04,3310 34755 CAF ZERO
056793,000056: 04,3311 56045 XCH INLINK
056794,000057: 04,3312 54073 TS KEYTEMP1
056795,000058: 04,3313 30077 CA FLAGWRD3 # AFTER EARTH LAUNCH?
056796,000059: 04,3314 74741 MASK NOP07BIT
056797,000060: 04,3315 10000 CCS A
056798,000061: 04,3316 13322 TCF UPRPT1 # YES
056799,000062: 04,3317 30073 CA KEYTEMP1 # NO: SUM UPLINK DATA
056800,000063: 04,3320 27245 ADS UPSUM
056801,000064: 04,3321 25246 INCR UPSUM +1
056802,000065: 04,3322 34751 UPRPT1 CAF BIT3 # TURN ON UPACT LIGHT
056803,000066: 04,3323 00006 EXTEND # (BIT 3 OF CHANNEL 11)
056804,000067: 04,3324 05011 WOR DSALMOUT
056805,000068: 04,3325 34346 CAF LOW5 # TEST FOR TRIPLE CHAR REDUNDANCY
056806,000069: 04,3326 70073 MASK KEYTEMP1 # LOW5 OF WORD
056807,000070: 04,3327 56073 XCH KEYTEMP1 # LOW5 INTO KEYTEMP1
056808,000071: 04,3330 00006 EXTEND
056809,000072: 04,3331 74742 MP BIT10 # SHIFT RIGHT 5
056810,000073: 04,3332 54332 TS KEYTEMP2
056811,000074: 04,3333 74346 MASK LOW5 # MID 5
056812,000075: 04,3334 63370 AD HI10
056813,000076: 04,3335 03365 TC UPTEST
056814,000077: 04,3336 34742 CAF BIT10
056815,000078: 04,3337 00006 EXTEND
056816,000079: 04,3340 70332 MP KEYTEMP2 # SHIFT RIGHT 5
056817,000080: 04,3341 74346 MASK LOW5 # HIGH 5
056818,000081: 04,3342 40000 COM
056819,000082: 04,3343 03365 TC UPTEST
056820,000083:
056821,000084: 04,3344 43373 UPOK CS ELRCODE # CODE IS GOOD. IF CODE = 'ERROR RESET',
056822,000085: 04,3345 60073 AD KEYTEMP1 # CLEAR UPLOCKFL(SET BIT4 OF FLAGWRD7 = 0)
056823,000086: 04,3346 00006 EXTEND # IF CODE DOES NOT = 'ERROR RESET', ACCEPT
056824,000087: 04,3347 13355 BZF CLUPLOCK # CODE ONLY IF UPLOCKFL IS CLEAR (=0).
056825,000088:
056826,000089: 04,3350 34750 CAF UPLOCBIT # TEST UPLOCKFL FOR 0 OR 1
056827,000090: 04,3351 70103 MASK FLAGWRD7
056828,000091: 04,3352 10000 CCS A
056829,000092: 04,3353 05301 TC RESUME # UPLOCKFL = 1
056830,000093: 04,3354 03274 TC ACCEPTUP # UPLOCKFL = 0
056831,000094:
056832,000095: 04,3355 44750 CLUPLOCK CS UPLOCBIT # CLEAR UPLOCKFL (I.E.,SET BIT 4 OF )
056833,000096: 04,3356 70103 MASK FLAGWRD7 # FLAGWRD7 = 0)
056834,000097: 04,3357 54103 TS FLAGWRD7
056835,000098: 04,3360 03274 TC ACCEPTUP
Page 1329 |
056837,000100: # CODE IS BAD
056838,000101: 04,3361 40103 TMFAIL2 CS FLAGWRD7 # LOCK OUT FURTHER UPLINK ACTIVITY
056839,000102: 04,3362 74750 MASK UPLOCBIT # (BY SETTING UPLOCKFL = 1) UNTIL
056840,000103: 04,3363 26103 ADS FLAGWRD7 # 'ERROR RESET' IS SENT VIA UPLINK.
056841,000104: 04,3364 05301 TC RESUME
056842,000105: 04,3365 60073 UPTEST AD KEYTEMP1
056843,000106: 04,3366 10000 CCS A
056844,000107: 04,3367 03361 TC TMFAIL2
056845,000108: 04,3370 77740 HI10 OCT 77740
056846,000109: 04,3371 03361 TC TMFAIL2
056847,000110: 04,3372 00002 TC Q
056848,000111:
056849,000112: 04,3373 00022 ELRCODE OCT 22
056850,000113:
056851,000114: # 'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
056852,000115: # 1. VBRELDSP
056853,000116: # 2. ERROR RESET
056854,000117: # 3. UPDATE PROGRAM(P27) ENTERED BY V70,V71,V72,AND V73.
056855,000118:
056856,000119:
056857,000120: # -
056858,000121: # THE RECEPTION OF A BAD CODE(I.E CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
056859,000122: # THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
056860,000123: # WHEN UPLINK ACTIVITY IS LOCKED OUT ,IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
056861,000124: # (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
056862,000125: # BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
056863,000126: # FAILURE)
056864,000127: # UPLINK ACTIVITY IS ALSO ALLOWED(UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
End of include-file KEYRUPT,_UPRUPT.agc. Parent file is MAIN.agc