Source Code
These source-code files derive from a printout of Luminary 116 (the Apollo 12
Lunar Module guidance computer program), from the personal library of
original AGC developer Don Eyles, digitally photographed at archive.org,
financially sponsored by Ron Burkey, and transcribed to source code by a
team of volunteers. This colorized, syntax-highlighted form was created
by assembling that transcribed source code. Note that the full page images
are available on the
Virtual AGC project page at archive.org, while reduced-size images
are presented at the VirtualAGC project website. Report or fix any
transcription errors at
the Virtual AGC project code repository. Notations on the program listing read, in part: GAP: ASSEMBLE REVISION 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071 19:09 AUG. 11,1969Note that the date is the date of the printout, not the date of the program revision. |
056314,000002: ## Copyright: Public domain.
056315,000003: ## Filename: KEYRUPT,_UPRUPT.agc
056316,000004: ## Purpose: A section of Luminary revision 116.
056317,000005: ## It is part of the source code for the Lunar Module's (LM)
056318,000006: ## Apollo Guidance Computer (AGC) for Apollo 12.
056319,000007: ## This file is intended to be a faithful transcription, except
056320,000008: ## that the code format has been changed to conform to the
056321,000009: ## requirements of the yaYUL assembler rather than the
056322,000010: ## original YUL assembler.
056323,000011: ## Reference: pp. 1328-1330
056324,000012: ## Assembler: yaYUL
056325,000013: ## Contact: Ron Burkey <info@sandroid.org>.
056326,000014: ## Website: www.ibiblio.org/apollo/index.html
056327,000015: ## Mod history: 2017-01-22 MAS Created from Luminary 99.
056328,000016: ## 2017-02-03 RRB Updated for Luminary 116.
056329,000017: ## 2017-03-13 RSB Proofed comment text via 3-way diff vs
056330,000018: ## Luminary 99 and 131.
056331,000019: ## 2021-05-30 ABS UPCK -> UPOK
056332,000020:
Page 1328 |
056334,000022: 14,3775 BANK 14
056335,000023: 04,2000 SETLOC KEYRUPT
056336,000024: 04,2000 BANK
056337,000025: 04,3256 COUNT* $$/KEYUP
056338,000026:
056339,000027: 04,3256 54016 KEYRUPT1 TS BANKRUPT
056340,000028: 04,3257 56002 XCH Q
056341,000029: 04,3260 54012 TS QRUPT
056342,000030: 04,3261 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
056343,000031: 04,3262 34346 CAF LOW5
056344,000032: 04,3263 00006 EXTEND
056345,000033: 04,3264 02015 RAND MNKEYIN # CHECK IF KEYS 5M-1M ON
056346,000034: 04,3265 54073 KEYCOM TS RUPTREG4
056347,000035: 04,3266 40101 CS FLAGWRD5
056348,000036: 04,3267 74735 MASK DSKYFBIT
056349,000037: 04,3270 26101 ADS FLAGWRD5
056350,000038:
056351,000039: 04,3271 34355 ACCEPTUP CAF CHRPRIO # (NOTE: RUPTREG4 = KEYTEMP1)
056352,000040: 04,3272 05072 TC NOVAC
056353,000041: 04,3273 0776 EBANK= DSPCOUNT
056354,000042: 04,3273 02077 60101 2CADR CHARIN
056355,000043:
056356,000044: 04,3275 30073 CA RUPTREG4
056357,000045: 04,3276 50064 INDEX LOCCTR
056358,000046: 04,3277 54154 TS MPAC # LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
056359,000047: 04,3300 05270 TC RESUME
056360,000048:
Page 1329 |
056362,000050: # UPRUPT PROGRAM
056363,000051:
056364,000052: 04,3301 54016 UPRUPT TS BANKRUPT
056365,000053: 04,3302 56002 XCH Q
056366,000054: 04,3303 54012 TS QRUPT
056367,000055: 04,3304 04400 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
056368,000056: 04,3305 34755 CAF ZERO
056369,000057: 04,3306 56045 XCH INLINK
056370,000058: 04,3307 54073 TS KEYTEMP1
056371,000059: 04,3310 34751 CAF BIT3 # TURN ON UPACT LIGHT
056372,000060: 04,3311 00006 EXTEND # (BIT 3 OF CHANNEL 11)
056373,000061: 04,3312 05011 WOR DSALMOUT
056374,000062: 04,3313 34346 UPRPT1 CAF LOW5 # TEST FOR TRIPLE CHAR REDUNDANCY
056375,000063: 04,3314 70073 MASK KEYTEMP1 # LOW5 OF WORD
056376,000064: 04,3315 56073 XCH KEYTEMP1 # LOW5 INTO KEYTEMP1
056377,000065: 04,3316 00006 EXTEND
056378,000066: 04,3317 74742 MP BIT10 # SHIFT RIGHT 5
056379,000067: 04,3320 54332 TS KEYTEMP2
056380,000068: 04,3321 74346 MASK LOW5 # MID 5
056381,000069: 04,3322 63356 AD HI10
056382,000070: 04,3323 03353 TC UPTEST
056383,000071: 04,3324 34742 CAF BIT10
056384,000072: 04,3325 00006 EXTEND
056385,000073: 04,3326 70332 MP KEYTEMP2 # SHIFT RIGHT 5
056386,000074: 04,3327 74346 MASK LOW5 # HIGH 5
056387,000075: 04,3330 40000 COM
056388,000076: 04,3331 03353 TC UPTEST
056389,000077:
056390,000078: 04,3332 43361 UPOK CS ELRCODE # CODE IS GOOD. IF CODE = 'ERROR RESET',
056391,000079: 04,3333 60073 AD KEYTEMP1 # CLEAR UPLOCKFL(SET BIT4 OF FLAGWRD7 = 0)
056392,000080: 04,3334 00006 EXTEND # IF CODE DOES NOT = 'ERROR RESET', ACCEPT
056393,000081: 04,3335 13343 BZF CLUPLOCK # CODE ONLY IF UPLOCKFL IS CLEAR (=0).
056394,000082:
056395,000083: 04,3336 34750 CAF UPLOCBIT # TEST UPLOCKFL FOR 0 OR 1
056396,000084: 04,3337 70103 MASK FLAGWRD7
056397,000085: 04,3340 10000 CCS A
056398,000086: 04,3341 05270 TC RESUME # UPLOCKFL = 1
056399,000087: 04,3342 03271 TC ACCEPTUP # UPLOCKFL = 0
056400,000088:
056401,000089: 04,3343 44750 CLUPLOCK CS UPLOCBIT # CLEAR UPLOCKFL (I.E., SET BIT 4 OF )
056402,000090: 04,3344 70103 MASK FLAGWRD7 # FLAGWRD7 = 0)
056403,000091: 04,3345 54103 TS FLAGWRD7
056404,000092: 04,3346 03271 TC ACCEPTUP
056405,000093:
056406,000094: # CODE IS BAD
056407,000095: 04,3347 40103 TMFAIL2 CS FLAGWRD7 # LOCK OUT FURTHER UPLINK ACTIVITY
056408,000096: 04,3350 74750 MASK UPLOCBIT # (BY SETTING UPLOCKFL = 1) UNTIL
056409,000097: 04,3351 26103 ADS FLAGWRD7 # 'ERROR RESET' IS SENT VIA UPLINK.
056410,000098: 04,3352 05270 TC RESUME
056411,000099: 04,3353 60073 UPTEST AD KEYTEMP1
Page 1330 |
056413,000101: 04,3354 10000 CCS A
056414,000102: 04,3355 03347 TC TMFAIL2
056415,000103: 04,3356 77740 HI10 OCT 77740
056416,000104: 04,3357 03347 TC TMFAIL2
056417,000105: 04,3360 00002 TC Q
056418,000106:
056419,000107: 04,3361 00022 ELRCODE OCT 22
056420,000108:
056421,000109: # 'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
056422,000110: # 1. VBRELDSP
056423,000111: # 2. ERROR RESET
056424,000112: # 3. UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
056425,000113: # -
056426,000114: # THE RECEPTION OF A BAD CODE (I.E CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
056427,000115: # THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
056428,000116: # WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
056429,000117: # (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
056430,000118: # BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
056431,000119: # FAILURE)
056432,000120:
056433,000121: # UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
056434,000122:
End of include-file KEYRUPT,_UPRUPT.agc. Parent file is MAIN.agc