Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061
	16:27 JULY 14,1969
Note that the date is the date of the printout, not the date of the program revision.

057351,000002:                                                                                                  ## Copyright:   Public domain.
057352,000003:                                                                                                  ## Filename:    KEYRUPT_UPRUPT.agc
057353,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
057354,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
057355,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
057356,000007:                                                                                                  ## Assembler:   yaYUL
057357,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
057358,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
057359,000010:                                                                                                  ## Pages:       1338-1340
057360,000011:                                                                                                  ## Mod history: 2009-05-27 RSB  Adapted from the corresponding 
057361,000012:                                                                                                  ##                              Luminary131 file, using page 
057362,000013:                                                                                                  ##                              images from Luminary 1A.
057363,000014:                                                                                                  ##              2016-12-18 RSB  Proofed text comments with octopus/ProoferComments
057364,000015:                                                                                                  ##                              and corrected the errors found.
057365,000016:                                                                                                  ##              2021-05-30 ABS  UPCK -> UPOK
057366,000017:                                                                                                  ##
057367,000018:                                                                                                  ## This source code has been transcribed or otherwise adapted from
057368,000019:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
057369,000020:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
057370,000021:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
057371,000022:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
057372,000023:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
057373,000024:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
057374,000025:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
057375,000026:                                                                                                  ## actually created.
057376,000027:                                                                                                  ##
057377,000028:                                                                                                  ## Notations on the hardcopy document read, in part:
057378,000029:                                                                                                  ##
057379,000030:                                                                                                  ##      Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
057380,000031:                                                                                                  ##      16:27 JULY 14, 1969 
057381,000032: 

Page 1338

057383,000034: 14,3774                                           BANK     14                                    
057384,000035: 04,2000                                           SETLOC   KEYRUPT                               
057385,000036: 04,2000                                           BANK                                           
057386,000037: 04,3274                                           COUNT*   $$/KEYUP                              
057387,000038: 
057388,000039: 04,3274           54016        KEYRUPT1           TS       BANKRUPT                              
057389,000040: 04,3275           56002                           XCH      Q                                     
057390,000041: 04,3276           54012                           TS       QRUPT                                 
057391,000042: 04,3277           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
057392,000043: 04,3300           34346                           CAF      LOW5                                  
057393,000044: 04,3301           00006                           EXTEND                                         
057394,000045: 04,3302           02015                           RAND     MNKEYIN                               #  CHECK IF KEYS 5M-1M ON
057395,000046: 04,3303           54073        KEYCOM             TS       RUPTREG4                              
057396,000047: 04,3304           40101                           CS       FLAGWRD5                              
057397,000048: 04,3305           74735                           MASK     DSKYFBIT                              
057398,000049: 04,3306           26101                           ADS      FLAGWRD5                              
057399,000050: 
057400,000051: 04,3307           34355        ACCEPTUP           CAF      CHRPRIO                               #  (NOTE: RUPTREG4 = KEYTEMP1)
057401,000052: 04,3310           05072                           TC       NOVAC                                 
057402,000053: 04,3311     0777                                  EBANK=   DSPCOUNT                              
057403,000054: 04,3311           02077 60101                     2CADR    CHARIN                                
057404,000055: 
057405,000056: 04,3313           30073                           CA       RUPTREG4                              
057406,000057: 04,3314           50064                           INDEX    LOCCTR                                
057407,000058: 04,3315           54154                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
057408,000059: 04,3316           05270                           TC       RESUME                                
057409,000060: 

Page 1339

057411,000062:                                                                                                  #  UPRUPT PROGRAM
057412,000063: 
057413,000064: 04,3317           54016        UPRUPT             TS       BANKRUPT                              
057414,000065: 04,3320           56002                           XCH      Q                                     
057415,000066: 04,3321           54012                           TS       QRUPT                                 
057416,000067: 04,3322           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
057417,000068: 04,3323           34755                           CAF      ZERO                                  
057418,000069: 04,3324           56045                           XCH      INLINK                                
057419,000070: 04,3325           54073                           TS       KEYTEMP1                              
057420,000071: 04,3326           34751                           CAF      BIT3                                  #  TURN ON UPACT LIGHT
057421,000072: 04,3327           00006                           EXTEND                                         #  (BIT 3 OF CHANNEL 11)
057422,000073: 04,3330           05011                           WOR      DSALMOUT                              
057423,000074: 04,3331           34346        UPRPT1             CAF      LOW5                                  #  TEST FOR TRIPLE CHAR REDUNDANCY
057424,000075: 04,3332           70073                           MASK     KEYTEMP1                              #  LOW5 OF WORD
057425,000076: 04,3333           56073                           XCH      KEYTEMP1                              #  LOW5 INTO KEYTEMP1
057426,000077: 04,3334           00006                           EXTEND                                         
057427,000078: 04,3335           74742                           MP       BIT10                                 #  SHIFT RIGHT 5
057428,000079: 04,3336           54734                           TS       KEYTEMP2                              
057429,000080: 04,3337           74346                           MASK     LOW5                                  #  MID 5
057430,000081: 04,3340           63374                           AD       HI10                                  
057431,000082: 04,3341           03371                           TC       UPTEST                                
057432,000083: 04,3342           34742                           CAF      BIT10                                 
057433,000084: 04,3343           00006                           EXTEND                                         
057434,000085: 04,3344           70734                           MP       KEYTEMP2                              #  SHIFT RIGHT 5
057435,000086: 04,3345           74346                           MASK     LOW5                                  #  HIGH 5
057436,000087: 04,3346           40000                           COM                                            
057437,000088: 04,3347           03371                           TC       UPTEST                                
057438,000089: 
057439,000090: 04,3350           43377        UPOK               CS       ELRCODE                               #  CODE IS GOOD.  IF CODE = 'ERROR RESET',
057440,000091: 04,3351           60073                           AD       KEYTEMP1                              #  CLEAR UPLOCKFL (SET BIT4 OF FLAGWRD7 = 0)
057441,000092: 04,3352           00006                           EXTEND                                         #  IF CODE DOES NOT = 'ERROR RESET', ACCEPT
057442,000093: 04,3353           13361                           BZF      CLUPLOCK                              #  CODE ONLY IF UPLOCKFL IS CLEAR (=0).
057443,000094: 
057444,000095: 04,3354           34750                           CAF      UPLOCBIT                              #  TEST UPLOCKFL FOR 0 OR 1
057445,000096: 04,3355           70103                           MASK     FLAGWRD7                              
057446,000097: 04,3356           10000                           CCS      A                                     
057447,000098: 04,3357           05270                           TC       RESUME                                #  UPLOCKFL = 1
057448,000099: 04,3360           03307                           TC       ACCEPTUP                              #  UPLOCKFL = 0
057449,000100: 
057450,000101: 04,3361           44750        CLUPLOCK           CS       UPLOCBIT                              #  CLEAR UPLOCKFL (I.E., SET BIT 4 OF )
057451,000102: 04,3362           70103                           MASK     FLAGWRD7                              #  FLAGWRD7 = 0)
057452,000103: 04,3363           54103                           TS       FLAGWRD7                              
057453,000104: 04,3364           03307                           TC       ACCEPTUP                              
057454,000105: 
057455,000106:                                                                                                  #  CODE IS BAD
057456,000107: 04,3365           40103        TMFAIL2            CS       FLAGWRD7                              #  LOCK OUT FURTHER UPLINK ACTIVITY
057457,000108: 04,3366           74750                           MASK     UPLOCBIT                              #  (BY SETTING UPLOCKFL = 1) UNTIL
057458,000109: 04,3367           26103                           ADS      FLAGWRD7                              #  'ERROR RESET' IS SENT VIA UPLINK.
057459,000110: 04,3370           05270                           TC       RESUME                                
057460,000111: 04,3371           60073        UPTEST             AD       KEYTEMP1                              

Page 1340

057462,000113: 04,3372           10000                           CCS      A                                     
057463,000114: 04,3373           03365                           TC       TMFAIL2                               
057464,000115: 04,3374           77740        HI10               OCT      77740                                 
057465,000116: 04,3375           03365                           TC       TMFAIL2                               
057466,000117: 04,3376           00002                           TC       Q                                     
057467,000118: 
057468,000119: 04,3377           00022        ELRCODE            OCT      22                                    
057469,000120: 
057470,000121:                                                                                                  #  'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
057471,000122:                                                                                                  #        1.      VBRELDSP
057472,000123:                                                                                                  #        2.      ERROR RESET
057473,000124:                                                                                                  #        3.      UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
057474,000125:                                                                                                  #                                     -
057475,000126:                                                                                                  #  THE RECEPTION OF A BAD CODE (I.E  CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
057476,000127:                                                                                                  #  THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
057477,000128:                                                                                                  #  WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
057478,000129:                                                                                                  #  (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
057479,000130:                                                                                                  #  BY 15 ZEROES.  THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
057480,000131:                                                                                                  #  FAILURE)
057481,000132: 
057482,000133:                                                                                                  #  UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
057483,000134: 
057484,000135: 04,3400           44753                           CS       XDSPBIT                               
057485,000136: 

End of include-file KEYRUPT,_UPRUPT.agc.  Parent file is MAIN.agc