Source Code
These source-code files are part of a reconstructed copy of Luminary 163, the
first (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance
Computer (AGC) software.
The reconstruction began with reconstructed source code for Luminary 173. Changes between revision 163 and 173 were backed out, as described by Luminary memos 157 and 158. 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 163 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. |
056574,000002: ## Copyright: Public domain.
056575,000003: ## Filename: KEYRUPT,_UPRUPT.agc
056576,000004: ## Purpose: A section of Luminary revision 163.
056577,000005: ## It is part of the reconstructed source code for the first
056578,000006: ## (unflown) release of the flight software for the Lunar
056579,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
056580,000008: ## The code has been recreated from a reconstructed copy of
056581,000009: ## Luminary 173, as well as Luminary memos 157 amd 158.
056582,000010: ## It has been adapted such that the resulting bugger words
056583,000011: ## exactly match those specified for Luminary 163 in NASA
056584,000012: ## drawing 2021152N, which gives relatively high confidence
056585,000013: ## that the reconstruction is correct.
056586,000014: ## Reference: pp. 1327-1329
056587,000015: ## Assembler: yaYUL
056588,000016: ## Contact: Ron Burkey <info@sandroid.org>.
056589,000017: ## Website: www.ibiblio.org/apollo/index.html
056590,000018: ## Mod history: 2019-08-21 MAS Created from Luminary 173.
056591,000019:
Page 1327 |
056593,000021: 14,3775 BANK 14
056594,000022: 04,2000 SETLOC KEYRUPT
056595,000023: 04,2000 BANK
056596,000024: 04,3261 COUNT* $$/KEYUP
056597,000025:
056598,000026: 04,3261 54016 KEYRUPT1 TS BANKRUPT
056599,000027: 04,3262 56002 XCH Q
056600,000028: 04,3263 54012 TS QRUPT
056601,000029: 04,3264 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
056602,000030: 04,3265 34346 CAF LOW5
056603,000031: 04,3266 00006 EXTEND
056604,000032: 04,3267 02015 RAND MNKEYIN # CHECK IF KEYS 5M-1M ON
056605,000033: 04,3270 54073 KEYCOM TS RUPTREG4
056606,000034: 04,3271 40101 CS FLAGWRD5
056607,000035: 04,3272 74735 MASK DSKYFBIT
056608,000036: 04,3273 26101 ADS FLAGWRD5
056609,000037:
056610,000038: 04,3274 34355 ACCEPTUP CAF CHRPRIO # (NOTE: RUPTREG4 = KEYTEMP1)
056611,000039: 04,3275 05072 TC NOVAC
056612,000040: 04,3276 0776 EBANK= DSPCOUNT
056613,000041: 04,3276 02077 60101 2CADR CHARIN
056614,000042:
056615,000043: 04,3300 30073 CA RUPTREG4
056616,000044: 04,3301 50064 INDEX LOCCTR
056617,000045: 04,3302 54154 TS MPAC # LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
056618,000046: 04,3303 05301 TC RESUME
056619,000047:
Page 1328 |
056621,000049: # UPRUPT PROGRAM
056622,000050:
056623,000051: 04,3304 54016 UPRUPT TS BANKRUPT
056624,000052: 04,3305 56002 XCH Q
056625,000053: 04,3306 54012 TS QRUPT
056626,000054: 04,3307 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
056627,000055: 04,3310 34755 CAF ZERO
056628,000056: 04,3311 56045 XCH INLINK
056629,000057: 04,3312 54073 TS KEYTEMP1
056630,000058: 04,3313 30077 CA FLAGWRD3 # AFTER EARTH LAUNCH?
056631,000059: 04,3314 74741 MASK NOP07BIT
056632,000060: 04,3315 10000 CCS A
056633,000061: 04,3316 13322 TCF UPRPT1 # YES
056634,000062: 04,3317 30073 CA KEYTEMP1 # NO: SUM UPLINK DATA
056635,000063: 04,3320 27245 ADS UPSUM
056636,000064: 04,3321 25246 INCR UPSUM +1
056637,000065: 04,3322 34751 UPRPT1 CAF BIT3 # TURN ON UPACT LIGHT
056638,000066: 04,3323 00006 EXTEND # (BIT 3 OF CHANNEL 11)
056639,000067: 04,3324 05011 WOR DSALMOUT
056640,000068: 04,3325 34346 CAF LOW5 # TEST FOR TRIPLE CHAR REDUNDANCY
056641,000069: 04,3326 70073 MASK KEYTEMP1 # LOW5 OF WORD
056642,000070: 04,3327 56073 XCH KEYTEMP1 # LOW5 INTO KEYTEMP1
056643,000071: 04,3330 00006 EXTEND
056644,000072: 04,3331 74742 MP BIT10 # SHIFT RIGHT 5
056645,000073: 04,3332 54332 TS KEYTEMP2
056646,000074: 04,3333 74346 MASK LOW5 # MID 5
056647,000075: 04,3334 63370 AD HI10
056648,000076: 04,3335 03365 TC UPTEST
056649,000077: 04,3336 34742 CAF BIT10
056650,000078: 04,3337 00006 EXTEND
056651,000079: 04,3340 70332 MP KEYTEMP2 # SHIFT RIGHT 5
056652,000080: 04,3341 74346 MASK LOW5 # HIGH 5
056653,000081: 04,3342 40000 COM
056654,000082: 04,3343 03365 TC UPTEST
056655,000083:
056656,000084: 04,3344 43373 UPOK CS ELRCODE # CODE IS GOOD. IF CODE = 'ERROR RESET',
056657,000085: 04,3345 60073 AD KEYTEMP1 # CLEAR UPLOCKFL(SET BIT4 OF FLAGWRD7 = 0)
056658,000086: 04,3346 00006 EXTEND # IF CODE DOES NOT = 'ERROR RESET', ACCEPT
056659,000087: 04,3347 13355 BZF CLUPLOCK # CODE ONLY IF UPLOCKFL IS CLEAR (=0).
056660,000088:
056661,000089: 04,3350 34750 CAF UPLOCBIT # TEST UPLOCKFL FOR 0 OR 1
056662,000090: 04,3351 70103 MASK FLAGWRD7
056663,000091: 04,3352 10000 CCS A
056664,000092: 04,3353 05301 TC RESUME # UPLOCKFL = 1
056665,000093: 04,3354 03274 TC ACCEPTUP # UPLOCKFL = 0
056666,000094:
056667,000095: 04,3355 44750 CLUPLOCK CS UPLOCBIT # CLEAR UPLOCKFL (I.E.,SET BIT 4 OF )
056668,000096: 04,3356 70103 MASK FLAGWRD7 # FLAGWRD7 = 0)
056669,000097: 04,3357 54103 TS FLAGWRD7
056670,000098: 04,3360 03274 TC ACCEPTUP
Page 1329 |
056672,000100: # CODE IS BAD
056673,000101: 04,3361 40103 TMFAIL2 CS FLAGWRD7 # LOCK OUT FURTHER UPLINK ACTIVITY
056674,000102: 04,3362 74750 MASK UPLOCBIT # (BY SETTING UPLOCKFL = 1) UNTIL
056675,000103: 04,3363 26103 ADS FLAGWRD7 # 'ERROR RESET' IS SENT VIA UPLINK.
056676,000104: 04,3364 05301 TC RESUME
056677,000105: 04,3365 60073 UPTEST AD KEYTEMP1
056678,000106: 04,3366 10000 CCS A
056679,000107: 04,3367 03361 TC TMFAIL2
056680,000108: 04,3370 77740 HI10 OCT 77740
056681,000109: 04,3371 03361 TC TMFAIL2
056682,000110: 04,3372 00002 TC Q
056683,000111:
056684,000112: 04,3373 00022 ELRCODE OCT 22
056685,000113:
056686,000114: # 'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
056687,000115: # 1. VBRELDSP
056688,000116: # 2. ERROR RESET
056689,000117: # 3. UPDATE PROGRAM(P27) ENTERED BY V70,V71,V72,AND V73.
056690,000118:
056691,000119:
056692,000120: # -
056693,000121: # THE RECEPTION OF A BAD CODE(I.E CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
056694,000122: # THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
056695,000123: # WHEN UPLINK ACTIVITY IS LOCKED OUT ,IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
056696,000124: # (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
056697,000125: # BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
056698,000126: # FAILURE)
056699,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