Source Code
These source-code files are part of a reconstructed copy of Luminary 97, the
second release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer
(AGC) software. It was created to fix two incorrect ephemeris constants in
Luminary 96, as described by anomaly report LNY-59.
The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memos 83 and 85, using asterisks indicating changed lines in the listing as a guide. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 97 listing. 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. |
056391,000002: ## Copyright: Public domain.
056392,000003: ## Filename: KEYRUPT,_UPRUPT.agc
056393,000004: ## Purpose: A section of Luminary revision 97.
056394,000005: ## It is part of the reconstructed source code for the
056395,000006: ## second release of the flight software for the Lunar
056396,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
056397,000008: ## It was created to fix two incorrect ephemeris constants in
056398,000009: ## Luminary 96, as described by anomaly report LNY-59.
056399,000010: ## The code has been recreated from a copy of Luminary 99
056400,000011: ## revision 001, using asterisks indicating changed lines in
056401,000012: ## the listing and Luminary Memos #83 and #85, which list
056402,000013: ## changes between Luminary 97 and 98, and 98 and 99. The
056403,000014: ## code has been adapted such that the resulting bugger words
056404,000015: ## exactly match those specified for Luminary 97 in NASA drawing
056405,000016: ## 2021152D, which gives relatively high confidence that the
056406,000017: ## reconstruction is correct.
056407,000018: ## Reference: pp. 1338-1340
056408,000019: ## Assembler: yaYUL
056409,000020: ## Contact: Ron Burkey <info@sandroid.org>.
056410,000021: ## Website: www.ibiblio.org/apollo/index.html
056411,000022: ## Mod history: 2019-07-28 MAS Created from Luminary 99.
056412,000023: ## 2021-05-30 ABS UPCK -> UPOK
056413,000024:
Page 1338 |
056415,000026: 14,3774 BANK 14
056416,000027: 04,2000 SETLOC KEYRUPT
056417,000028: 04,2000 BANK
056418,000029: 04,3274 COUNT* $$/KEYUP
056419,000030:
056420,000031: 04,3274 54016 KEYRUPT1 TS BANKRUPT
056421,000032: 04,3275 56002 XCH Q
056422,000033: 04,3276 54012 TS QRUPT
056423,000034: 04,3277 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
056424,000035: 04,3300 34346 CAF LOW5
056425,000036: 04,3301 00006 EXTEND
056426,000037: 04,3302 02015 RAND MNKEYIN # CHECK IF KEYS 5M-1M ON
056427,000038: 04,3303 54073 KEYCOM TS RUPTREG4
056428,000039: 04,3304 40101 CS FLAGWRD5
056429,000040: 04,3305 74735 MASK DSKYFBIT
056430,000041: 04,3306 26101 ADS FLAGWRD5
056431,000042:
056432,000043: 04,3307 34355 ACCEPTUP CAF CHRPRIO # (NOTE: RUPTREG4 = KEYTEMP1)
056433,000044: 04,3310 05072 TC NOVAC
056434,000045: 04,3311 0777 EBANK= DSPCOUNT
056435,000046: 04,3311 02077 60101 2CADR CHARIN
056436,000047:
056437,000048: 04,3313 30073 CA RUPTREG4
056438,000049: 04,3314 50064 INDEX LOCCTR
056439,000050: 04,3315 54154 TS MPAC # LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
056440,000051: 04,3316 05270 TC RESUME
056441,000052:
Page 1339 |
056443,000054: # UPRUPT PROGRAM
056444,000055:
056445,000056: 04,3317 54016 UPRUPT TS BANKRUPT
056446,000057: 04,3320 56002 XCH Q
056447,000058: 04,3321 54012 TS QRUPT
056448,000059: 04,3322 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
056449,000060: 04,3323 34755 CAF ZERO
056450,000061: 04,3324 56045 XCH INLINK
056451,000062: 04,3325 54073 TS KEYTEMP1
056452,000063: 04,3326 34751 CAF BIT3 # TURN ON UPACT LIGHT
056453,000064: 04,3327 00006 EXTEND # (BIT 3 OF CHANNEL 11)
056454,000065: 04,3330 05011 WOR DSALMOUT
056455,000066: 04,3331 34346 UPRPT1 CAF LOW5 # TEST FOR TRIPLE CHAR REDUNDANCY
056456,000067: 04,3332 70073 MASK KEYTEMP1 # LOW5 OF WORD
056457,000068: 04,3333 56073 XCH KEYTEMP1 # LOW5 INTO KEYTEMP1
056458,000069: 04,3334 00006 EXTEND
056459,000070: 04,3335 74742 MP BIT10 # SHIFT RIGHT 5
056460,000071: 04,3336 54734 TS KEYTEMP2
056461,000072: 04,3337 74346 MASK LOW5 # MID 5
056462,000073: 04,3340 63374 AD HI10
056463,000074: 04,3341 03371 TC UPTEST
056464,000075: 04,3342 34742 CAF BIT10
056465,000076: 04,3343 00006 EXTEND
056466,000077: 04,3344 70734 MP KEYTEMP2 # SHIFT RIGHT 5
056467,000078: 04,3345 74346 MASK LOW5 # HIGH 5
056468,000079: 04,3346 40000 COM
056469,000080: 04,3347 03371 TC UPTEST
056470,000081:
056471,000082: 04,3350 43377 UPOK CS ELRCODE # CODE IS GOOD. IF CODE = 'ERROR RESET',
056472,000083: 04,3351 60073 AD KEYTEMP1 # CLEAR UPLOCKFL (SET BIT4 OF FLAGWRD7 = 0)
056473,000084: 04,3352 00006 EXTEND # IF CODE DOES NOT = 'ERROR RESET', ACCEPT
056474,000085: 04,3353 13361 BZF CLUPLOCK # CODE ONLY IF UPLOCKFL IS CLEAR (=0).
056475,000086:
056476,000087: 04,3354 34750 CAF UPLOCBIT # TEST UPLOCKFL FOR 0 OR 1
056477,000088: 04,3355 70103 MASK FLAGWRD7
056478,000089: 04,3356 10000 CCS A
056479,000090: 04,3357 05270 TC RESUME # UPLOCKFL = 1
056480,000091: 04,3360 03307 TC ACCEPTUP # UPLOCKFL = 0
056481,000092:
056482,000093: 04,3361 44750 CLUPLOCK CS UPLOCBIT # CLEAR UPLOCKFL (I.E., SET BIT 4 OF )
056483,000094: 04,3362 70103 MASK FLAGWRD7 # FLAGWRD7 = 0)
056484,000095: 04,3363 54103 TS FLAGWRD7
056485,000096: 04,3364 03307 TC ACCEPTUP
056486,000097:
056487,000098: # CODE IS BAD
056488,000099: 04,3365 40103 TMFAIL2 CS FLAGWRD7 # LOCK OUT FURTHER UPLINK ACTIVITY
056489,000100: 04,3366 74750 MASK UPLOCBIT # (BY SETTING UPLOCKFL = 1) UNTIL
056490,000101: 04,3367 26103 ADS FLAGWRD7 # 'ERROR RESET' IS SENT VIA UPLINK.
056491,000102: 04,3370 05270 TC RESUME
056492,000103: 04,3371 60073 UPTEST AD KEYTEMP1
Page 1340 |
056494,000105: 04,3372 10000 CCS A
056495,000106: 04,3373 03365 TC TMFAIL2
056496,000107: 04,3374 77740 HI10 OCT 77740
056497,000108: 04,3375 03365 TC TMFAIL2
056498,000109: 04,3376 00002 TC Q
056499,000110:
056500,000111: 04,3377 00022 ELRCODE OCT 22
056501,000112:
056502,000113: # 'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
056503,000114: # 1. VBRELDSP
056504,000115: # 2. ERROR RESET
056505,000116: # 3. UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
056506,000117: # -
056507,000118: # THE RECEPTION OF A BAD CODE (I.E CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
056508,000119: # THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
056509,000120: # WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
056510,000121: # (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
056511,000122: # BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
056512,000123: # FAILURE)
056513,000124:
056514,000125: # UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
056515,000126:
056516,000127: 04,3400 44753 CS XDSPBIT
056517,000128:
End of include-file KEYRUPT,_UPRUPT.agc. Parent file is MAIN.agc