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. |
056642,000002: ## Copyright: Public domain.
056643,000003: ## Filename: KEYRUPT,_UPRUPT.agc
056644,000004: ## Purpose: A section of Luminary revision 173.
056645,000005: ## It is part of the reconstructed source code for the second
056646,000006: ## (unflown) release of the flight software for the Lunar
056647,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
056648,000008: ## The code has been recreated from a reconstructed copy of
056649,000009: ## Luminary 178, as well as Luminary memo 167 (revision 1).
056650,000010: ## It has been adapted such that the resulting bugger words
056651,000011: ## exactly match those specified for Luminary 173 in NASA
056652,000012: ## drawing 2021152N, which gives relatively high confidence
056653,000013: ## that the reconstruction is correct.
056654,000014: ## Reference: pp. 1327-1329
056655,000015: ## Assembler: yaYUL
056656,000016: ## Contact: Ron Burkey <info@sandroid.org>.
056657,000017: ## Website: www.ibiblio.org/apollo/index.html
056658,000018: ## Mod history: 2019-09-18 MAS Created from Luminary 178.
056659,000019:
Page 1327 |
056661,000021: 14,3775 BANK 14
056662,000022: 04,2000 SETLOC KEYRUPT
056663,000023: 04,2000 BANK
056664,000024: 04,3261 COUNT* $$/KEYUP
056665,000025:
056666,000026: 04,3261 54016 KEYRUPT1 TS BANKRUPT
056667,000027: 04,3262 56002 XCH Q
056668,000028: 04,3263 54012 TS QRUPT
056669,000029: 04,3264 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
056670,000030: 04,3265 34346 CAF LOW5
056671,000031: 04,3266 00006 EXTEND
056672,000032: 04,3267 02015 RAND MNKEYIN # CHECK IF KEYS 5M-1M ON
056673,000033: 04,3270 54073 KEYCOM TS RUPTREG4
056674,000034: 04,3271 40101 CS FLAGWRD5
056675,000035: 04,3272 74735 MASK DSKYFBIT
056676,000036: 04,3273 26101 ADS FLAGWRD5
056677,000037:
056678,000038: 04,3274 34355 ACCEPTUP CAF CHRPRIO # (NOTE: RUPTREG4 = KEYTEMP1)
056679,000039: 04,3275 05072 TC NOVAC
056680,000040: 04,3276 0776 EBANK= DSPCOUNT
056681,000041: 04,3276 02077 60101 2CADR CHARIN
056682,000042:
056683,000043: 04,3300 30073 CA RUPTREG4
056684,000044: 04,3301 50064 INDEX LOCCTR
056685,000045: 04,3302 54154 TS MPAC # LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
056686,000046: 04,3303 05301 TC RESUME
056687,000047:
Page 1328 |
056689,000049: # UPRUPT PROGRAM
056690,000050:
056691,000051: 04,3304 54016 UPRUPT TS BANKRUPT
056692,000052: 04,3305 56002 XCH Q
056693,000053: 04,3306 54012 TS QRUPT
056694,000054: 04,3307 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
056695,000055: 04,3310 34755 CAF ZERO
056696,000056: 04,3311 56045 XCH INLINK
056697,000057: 04,3312 54073 TS KEYTEMP1
056698,000058: 04,3313 30077 CA FLAGWRD3 # AFTER EARTH LAUNCH?
056699,000059: 04,3314 74741 MASK NOP07BIT
056700,000060: 04,3315 10000 CCS A
056701,000061: 04,3316 13322 TCF UPRPT1 # YES
056702,000062: 04,3317 30073 CA KEYTEMP1 # NO: SUM UPLINK DATA
056703,000063: 04,3320 27245 ADS UPSUM
056704,000064: 04,3321 25246 INCR UPSUM +1
056705,000065: 04,3322 34751 UPRPT1 CAF BIT3 # TURN ON UPACT LIGHT
056706,000066: 04,3323 00006 EXTEND # (BIT 3 OF CHANNEL 11)
056707,000067: 04,3324 05011 WOR DSALMOUT
056708,000068: 04,3325 34346 CAF LOW5 # TEST FOR TRIPLE CHAR REDUNDANCY
056709,000069: 04,3326 70073 MASK KEYTEMP1 # LOW5 OF WORD
056710,000070: 04,3327 56073 XCH KEYTEMP1 # LOW5 INTO KEYTEMP1
056711,000071: 04,3330 00006 EXTEND
056712,000072: 04,3331 74742 MP BIT10 # SHIFT RIGHT 5
056713,000073: 04,3332 54332 TS KEYTEMP2
056714,000074: 04,3333 74346 MASK LOW5 # MID 5
056715,000075: 04,3334 63370 AD HI10
056716,000076: 04,3335 03365 TC UPTEST
056717,000077: 04,3336 34742 CAF BIT10
056718,000078: 04,3337 00006 EXTEND
056719,000079: 04,3340 70332 MP KEYTEMP2 # SHIFT RIGHT 5
056720,000080: 04,3341 74346 MASK LOW5 # HIGH 5
056721,000081: 04,3342 40000 COM
056722,000082: 04,3343 03365 TC UPTEST
056723,000083:
056724,000084: 04,3344 43373 UPOK CS ELRCODE # CODE IS GOOD. IF CODE = 'ERROR RESET',
056725,000085: 04,3345 60073 AD KEYTEMP1 # CLEAR UPLOCKFL(SET BIT4 OF FLAGWRD7 = 0)
056726,000086: 04,3346 00006 EXTEND # IF CODE DOES NOT = 'ERROR RESET', ACCEPT
056727,000087: 04,3347 13355 BZF CLUPLOCK # CODE ONLY IF UPLOCKFL IS CLEAR (=0).
056728,000088:
056729,000089: 04,3350 34750 CAF UPLOCBIT # TEST UPLOCKFL FOR 0 OR 1
056730,000090: 04,3351 70103 MASK FLAGWRD7
056731,000091: 04,3352 10000 CCS A
056732,000092: 04,3353 05301 TC RESUME # UPLOCKFL = 1
056733,000093: 04,3354 03274 TC ACCEPTUP # UPLOCKFL = 0
056734,000094:
056735,000095: 04,3355 44750 CLUPLOCK CS UPLOCBIT # CLEAR UPLOCKFL (I.E.,SET BIT 4 OF )
056736,000096: 04,3356 70103 MASK FLAGWRD7 # FLAGWRD7 = 0)
056737,000097: 04,3357 54103 TS FLAGWRD7
056738,000098: 04,3360 03274 TC ACCEPTUP
Page 1329 |
056740,000100: # CODE IS BAD
056741,000101: 04,3361 40103 TMFAIL2 CS FLAGWRD7 # LOCK OUT FURTHER UPLINK ACTIVITY
056742,000102: 04,3362 74750 MASK UPLOCBIT # (BY SETTING UPLOCKFL = 1) UNTIL
056743,000103: 04,3363 26103 ADS FLAGWRD7 # 'ERROR RESET' IS SENT VIA UPLINK.
056744,000104: 04,3364 05301 TC RESUME
056745,000105: 04,3365 60073 UPTEST AD KEYTEMP1
056746,000106: 04,3366 10000 CCS A
056747,000107: 04,3367 03361 TC TMFAIL2
056748,000108: 04,3370 77740 HI10 OCT 77740
056749,000109: 04,3371 03361 TC TMFAIL2
056750,000110: 04,3372 00002 TC Q
056751,000111:
056752,000112: 04,3373 00022 ELRCODE OCT 22
056753,000113:
056754,000114: # 'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
056755,000115: # 1. VBRELDSP
056756,000116: # 2. ERROR RESET
056757,000117: # 3. UPDATE PROGRAM(P27) ENTERED BY V70,V71,V72,AND V73.
056758,000118:
056759,000119:
056760,000120: # -
056761,000121: # THE RECEPTION OF A BAD CODE(I.E CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
056762,000122: # THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
056763,000123: # WHEN UPLINK ACTIVITY IS LOCKED OUT ,IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
056764,000124: # (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
056765,000125: # BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
056766,000126: # FAILURE)
056767,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