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
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

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

Page 1338

057362,000033: 14,3774                                           BANK     14                                    
057363,000034: 04,2000                                           SETLOC   KEYRUPT                               
057364,000035: 04,2000                                           BANK                                           
057365,000036: 04,3274                                           COUNT*   $$/KEYUP                              
057366,000037: 
057367,000038: 04,3274           54016        KEYRUPT1           TS       BANKRUPT                              
057368,000039: 04,3275           56002                           XCH      Q                                     
057369,000040: 04,3276           54012                           TS       QRUPT                                 
057370,000041: 04,3277           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
057371,000042: 04,3300           34346                           CAF      LOW5                                  
057372,000043: 04,3301           00006                           EXTEND                                         
057373,000044: 04,3302           02015                           RAND     MNKEYIN                               #  CHECK IF KEYS 5M-1M ON
057374,000045: 04,3303           54073        KEYCOM             TS       RUPTREG4                              
057375,000046: 04,3304           40101                           CS       FLAGWRD5                              
057376,000047: 04,3305           74735                           MASK     DSKYFBIT                              
057377,000048: 04,3306           26101                           ADS      FLAGWRD5                              
057378,000049: 
057379,000050: 04,3307           34355        ACCEPTUP           CAF      CHRPRIO                               #  (NOTE: RUPTREG4 = KEYTEMP1)
057380,000051: 04,3310           05072                           TC       NOVAC                                 
057381,000052: 04,3311     0777                                  EBANK=   DSPCOUNT                              
057382,000053: 04,3311           02077 60101                     2CADR    CHARIN                                
057383,000054: 
057384,000055: 04,3313           30073                           CA       RUPTREG4                              
057385,000056: 04,3314           50064                           INDEX    LOCCTR                                
057386,000057: 04,3315           54154                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
057387,000058: 04,3316           05270                           TC       RESUME                                
057388,000059: 

Page 1339

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

Page 1340

057441,000112: 04,3372           10000                           CCS      A                                     
057442,000113: 04,3373           03365                           TC       TMFAIL2                               
057443,000114: 04,3374           77740        HI10               OCT      77740                                 
057444,000115: 04,3375           03365                           TC       TMFAIL2                               
057445,000116: 04,3376           00002                           TC       Q                                     
057446,000117: 
057447,000118: 04,3377           00022        ELRCODE            OCT      22                                    
057448,000119: 
057449,000120:                                                                                                  #  'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
057450,000121:                                                                                                  #        1.      VBRELDSP
057451,000122:                                                                                                  #        2.      ERROR RESET
057452,000123:                                                                                                  #        3.      UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
057453,000124:                                                                                                  #                                     -
057454,000125:                                                                                                  #  THE RECEPTION OF A BAD CODE (I.E  CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
057455,000126:                                                                                                  #  THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
057456,000127:                                                                                                  #  WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
057457,000128:                                                                                                  #  (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
057458,000129:                                                                                                  #  BY 15 ZEROES.  THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
057459,000130:                                                                                                  #  FAILURE)
057460,000131: 
057461,000132:                                                                                                  #  UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
057462,000133: 
057463,000134: 04,3400           44753                           CS       XDSPBIT                               
057464,000135: 

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