Source Code

These source-code files are part of a reconstructed copy of Luminary 96, the original release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. 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 96 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.

056086,000002:                                                                                                  ## Copyright:   Public domain.
056087,000003:                                                                                                  ## Filename:    KEYRUPT,_UPRUPT.agc
056088,000004:                                                                                                  ## Purpose:     A section of Luminary revision 96.
056089,000005:                                                                                                  ##              It is part of the reconstructed source code for the
056090,000006:                                                                                                  ##              original release of the flight software for the Lunar 
056091,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
056092,000008:                                                                                                  ##              The code has been recreated from a previously reconstructed
056093,000009:                                                                                                  ##              copy of Luminary 97 by undoing changes described in anomaly
056094,000010:                                                                                                  ##              report LNY-59. The code has been adapted such that the
056095,000011:                                                                                                  ##              resulting bugger words exactly match those specified for
056096,000012:                                                                                                  ##              Luminary 96 in NASA drawing 2021152D, which gives relatively
056097,000013:                                                                                                  ##              high confidence that the reconstruction is correct.
056098,000014:                                                                                                  ## Reference:   pp. 1338-1340
056099,000015:                                                                                                  ## Assembler:   yaYUL
056100,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
056101,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
056102,000018:                                                                                                  ## Mod history: 2019-08-04 MAS  Created from Luminary 97.
056103,000019: 

Page 1338

056105,000021: 14,3774                                           BANK     14                                    
056106,000022: 04,2000                                           SETLOC   KEYRUPT                               
056107,000023: 04,2000                                           BANK                                           
056108,000024: 04,3274                                           COUNT*   $$/KEYUP                              
056109,000025: 
056110,000026: 04,3274           54016        KEYRUPT1           TS       BANKRUPT                              
056111,000027: 04,3275           56002                           XCH      Q                                     
056112,000028: 04,3276           54012                           TS       QRUPT                                 
056113,000029: 04,3277           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
056114,000030: 04,3300           34346                           CAF      LOW5                                  
056115,000031: 04,3301           00006                           EXTEND                                         
056116,000032: 04,3302           02015                           RAND     MNKEYIN                               #  CHECK IF KEYS 5M-1M ON
056117,000033: 04,3303           54073        KEYCOM             TS       RUPTREG4                              
056118,000034: 04,3304           40101                           CS       FLAGWRD5                              
056119,000035: 04,3305           74735                           MASK     DSKYFBIT                              
056120,000036: 04,3306           26101                           ADS      FLAGWRD5                              
056121,000037: 
056122,000038: 04,3307           34355        ACCEPTUP           CAF      CHRPRIO                               #  (NOTE: RUPTREG4 = KEYTEMP1)
056123,000039: 04,3310           05072                           TC       NOVAC                                 
056124,000040: 04,3311     0777                                  EBANK=   DSPCOUNT                              
056125,000041: 04,3311           02077 60101                     2CADR    CHARIN                                
056126,000042: 
056127,000043: 04,3313           30073                           CA       RUPTREG4                              
056128,000044: 04,3314           50064                           INDEX    LOCCTR                                
056129,000045: 04,3315           54154                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
056130,000046: 04,3316           05270                           TC       RESUME                                
056131,000047: 

Page 1339

056133,000049:                                                                                                  #  UPRUPT PROGRAM
056134,000050: 
056135,000051: 04,3317           54016        UPRUPT             TS       BANKRUPT                              
056136,000052: 04,3320           56002                           XCH      Q                                     
056137,000053: 04,3321           54012                           TS       QRUPT                                 
056138,000054: 04,3322           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
056139,000055: 04,3323           34755                           CAF      ZERO                                  
056140,000056: 04,3324           56045                           XCH      INLINK                                
056141,000057: 04,3325           54073                           TS       KEYTEMP1                              
056142,000058: 04,3326           34751                           CAF      BIT3                                  #  TURN ON UPACT LIGHT
056143,000059: 04,3327           00006                           EXTEND                                         #  (BIT 3 OF CHANNEL 11)
056144,000060: 04,3330           05011                           WOR      DSALMOUT                              
056145,000061: 04,3331           34346        UPRPT1             CAF      LOW5                                  #  TEST FOR TRIPLE CHAR REDUNDANCY
056146,000062: 04,3332           70073                           MASK     KEYTEMP1                              #  LOW5 OF WORD
056147,000063: 04,3333           56073                           XCH      KEYTEMP1                              #  LOW5 INTO KEYTEMP1
056148,000064: 04,3334           00006                           EXTEND                                         
056149,000065: 04,3335           74742                           MP       BIT10                                 #  SHIFT RIGHT 5
056150,000066: 04,3336           54734                           TS       KEYTEMP2                              
056151,000067: 04,3337           74346                           MASK     LOW5                                  #  MID 5
056152,000068: 04,3340           63374                           AD       HI10                                  
056153,000069: 04,3341           03371                           TC       UPTEST                                
056154,000070: 04,3342           34742                           CAF      BIT10                                 
056155,000071: 04,3343           00006                           EXTEND                                         
056156,000072: 04,3344           70734                           MP       KEYTEMP2                              #  SHIFT RIGHT 5
056157,000073: 04,3345           74346                           MASK     LOW5                                  #  HIGH 5
056158,000074: 04,3346           40000                           COM                                            
056159,000075: 04,3347           03371                           TC       UPTEST                                
056160,000076: 
056161,000077: 04,3350           43377        UPCK               CS       ELRCODE                               #  CODE IS GOOD.  IF CODE = 'ERROR RESET',
056162,000078: 04,3351           60073                           AD       KEYTEMP1                              #  CLEAR UPLOCKFL (SET BIT4 OF FLAGWRD7 = 0)
056163,000079: 04,3352           00006                           EXTEND                                         #  IF CODE DOES NOT = 'ERROR RESET', ACCEPT
056164,000080: 04,3353           13361                           BZF      CLUPLOCK                              #  CODE ONLY IF UPLOCKFL IS CLEAR (=0).
056165,000081: 
056166,000082: 04,3354           34750                           CAF      UPLOCBIT                              #  TEST UPLOCKFL FOR 0 OR 1
056167,000083: 04,3355           70103                           MASK     FLAGWRD7                              
056168,000084: 04,3356           10000                           CCS      A                                     
056169,000085: 04,3357           05270                           TC       RESUME                                #  UPLOCKFL = 1
056170,000086: 04,3360           03307                           TC       ACCEPTUP                              #  UPLOCKFL = 0
056171,000087: 
056172,000088: 04,3361           44750        CLUPLOCK           CS       UPLOCBIT                              #  CLEAR UPLOCKFL (I.E., SET BIT 4 OF )
056173,000089: 04,3362           70103                           MASK     FLAGWRD7                              #  FLAGWRD7 = 0)
056174,000090: 04,3363           54103                           TS       FLAGWRD7                              
056175,000091: 04,3364           03307                           TC       ACCEPTUP                              
056176,000092: 
056177,000093:                                                                                                  #  CODE IS BAD
056178,000094: 04,3365           40103        TMFAIL2            CS       FLAGWRD7                              #  LOCK OUT FURTHER UPLINK ACTIVITY
056179,000095: 04,3366           74750                           MASK     UPLOCBIT                              #  (BY SETTING UPLOCKFL = 1) UNTIL
056180,000096: 04,3367           26103                           ADS      FLAGWRD7                              #  'ERROR RESET' IS SENT VIA UPLINK.
056181,000097: 04,3370           05270                           TC       RESUME                                
056182,000098: 04,3371           60073        UPTEST             AD       KEYTEMP1                              

Page 1340

056184,000100: 04,3372           10000                           CCS      A                                     
056185,000101: 04,3373           03365                           TC       TMFAIL2                               
056186,000102: 04,3374           77740        HI10               OCT      77740                                 
056187,000103: 04,3375           03365                           TC       TMFAIL2                               
056188,000104: 04,3376           00002                           TC       Q                                     
056189,000105: 
056190,000106: 04,3377           00022        ELRCODE            OCT      22                                    
056191,000107: 
056192,000108:                                                                                                  #  'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
056193,000109:                                                                                                  #        1.      VBRELDSP
056194,000110:                                                                                                  #        2.      ERROR RESET
056195,000111:                                                                                                  #        3.      UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
056196,000112:                                                                                                  #                                     -
056197,000113:                                                                                                  #  THE RECEPTION OF A BAD CODE (I.E  CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
056198,000114:                                                                                                  #  THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
056199,000115:                                                                                                  #  WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
056200,000116:                                                                                                  #  (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
056201,000117:                                                                                                  #  BY 15 ZEROES.  THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
056202,000118:                                                                                                  #  FAILURE)
056203,000119: 
056204,000120:                                                                                                  #  UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
056205,000121: 
056206,000122: 04,3400           44753                           CS       XDSPBIT                               
056207,000123: 

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