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.

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

Page 1338

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

Page 1339

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

Page 1340

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

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