Source Code

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

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memo 85, using asterisks indicating changed lines in the listing as a guide. While no listing of this version is known to exist, nor are the memory-bank checksums available, the reconstruction is believed to be correct because it was an an intermediate step in reconstructing Luminary 97 whose reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152G. 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 98 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.

055964,000002:                                                                                                  ## Copyright:   Public domain.
055965,000003:                                                                                                  ## Filename:    KEYRUPT,_UPRUPT.agc
055966,000004:                                                                                                  ## Purpose:     A section of Luminary revision 98.
055967,000005:                                                                                                  ##              It is part of the reconstructed source code for the a
055968,000006:                                                                                                  ##              development version of the flight software for the Lunar 
055969,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
055970,000008:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
055971,000009:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
055972,000010:                                                                                                  ##              the listing and Luminary Memo #85, which lists changes between
055973,000011:                                                                                                  ##              Luminary 98 and 99.
055974,000012:                                                                                                  ## Reference:   pp. 1338-1340
055975,000013:                                                                                                  ## Assembler:   yaYUL
055976,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
055977,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
055978,000016:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99.
055979,000017:                                                                                                  ##              2021-05-30 ABS  UPCK -> UPOK
055980,000018: 

Page 1338

055982,000020: 14,3774                                           BANK     14                                    
055983,000021: 04,2000                                           SETLOC   KEYRUPT                               
055984,000022: 04,2000                                           BANK                                           
055985,000023: 04,3274                                           COUNT*   $$/KEYUP                              
055986,000024: 
055987,000025: 04,3274           54016        KEYRUPT1           TS       BANKRUPT                              
055988,000026: 04,3275           56002                           XCH      Q                                     
055989,000027: 04,3276           54012                           TS       QRUPT                                 
055990,000028: 04,3277           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
055991,000029: 04,3300           34346                           CAF      LOW5                                  
055992,000030: 04,3301           00006                           EXTEND                                         
055993,000031: 04,3302           02015                           RAND     MNKEYIN                               #  CHECK IF KEYS 5M-1M ON
055994,000032: 04,3303           54073        KEYCOM             TS       RUPTREG4                              
055995,000033: 04,3304           40101                           CS       FLAGWRD5                              
055996,000034: 04,3305           74735                           MASK     DSKYFBIT                              
055997,000035: 04,3306           26101                           ADS      FLAGWRD5                              
055998,000036: 
055999,000037: 04,3307           34355        ACCEPTUP           CAF      CHRPRIO                               #  (NOTE: RUPTREG4 = KEYTEMP1)
056000,000038: 04,3310           05072                           TC       NOVAC                                 
056001,000039: 04,3311     0777                                  EBANK=   DSPCOUNT                              
056002,000040: 04,3311           02077 60101                     2CADR    CHARIN                                
056003,000041: 
056004,000042: 04,3313           30073                           CA       RUPTREG4                              
056005,000043: 04,3314           50064                           INDEX    LOCCTR                                
056006,000044: 04,3315           54154                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
056007,000045: 04,3316           05270                           TC       RESUME                                
056008,000046: 

Page 1339

056010,000048:                                                                                                  #  UPRUPT PROGRAM
056011,000049: 
056012,000050: 04,3317           54016        UPRUPT             TS       BANKRUPT                              
056013,000051: 04,3320           56002                           XCH      Q                                     
056014,000052: 04,3321           54012                           TS       QRUPT                                 
056015,000053: 04,3322           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
056016,000054: 04,3323           34755                           CAF      ZERO                                  
056017,000055: 04,3324           56045                           XCH      INLINK                                
056018,000056: 04,3325           54073                           TS       KEYTEMP1                              
056019,000057: 04,3326           34751                           CAF      BIT3                                  #  TURN ON UPACT LIGHT
056020,000058: 04,3327           00006                           EXTEND                                         #  (BIT 3 OF CHANNEL 11)
056021,000059: 04,3330           05011                           WOR      DSALMOUT                              
056022,000060: 04,3331           34346        UPRPT1             CAF      LOW5                                  #  TEST FOR TRIPLE CHAR REDUNDANCY
056023,000061: 04,3332           70073                           MASK     KEYTEMP1                              #  LOW5 OF WORD
056024,000062: 04,3333           56073                           XCH      KEYTEMP1                              #  LOW5 INTO KEYTEMP1
056025,000063: 04,3334           00006                           EXTEND                                         
056026,000064: 04,3335           74742                           MP       BIT10                                 #  SHIFT RIGHT 5
056027,000065: 04,3336           54734                           TS       KEYTEMP2                              
056028,000066: 04,3337           74346                           MASK     LOW5                                  #  MID 5
056029,000067: 04,3340           63374                           AD       HI10                                  
056030,000068: 04,3341           03371                           TC       UPTEST                                
056031,000069: 04,3342           34742                           CAF      BIT10                                 
056032,000070: 04,3343           00006                           EXTEND                                         
056033,000071: 04,3344           70734                           MP       KEYTEMP2                              #  SHIFT RIGHT 5
056034,000072: 04,3345           74346                           MASK     LOW5                                  #  HIGH 5
056035,000073: 04,3346           40000                           COM                                            
056036,000074: 04,3347           03371                           TC       UPTEST                                
056037,000075: 
056038,000076: 04,3350           43377        UPOK               CS       ELRCODE                               #  CODE IS GOOD.  IF CODE = 'ERROR RESET',
056039,000077: 04,3351           60073                           AD       KEYTEMP1                              #  CLEAR UPLOCKFL (SET BIT4 OF FLAGWRD7 = 0)
056040,000078: 04,3352           00006                           EXTEND                                         #  IF CODE DOES NOT = 'ERROR RESET', ACCEPT
056041,000079: 04,3353           13361                           BZF      CLUPLOCK                              #  CODE ONLY IF UPLOCKFL IS CLEAR (=0).
056042,000080: 
056043,000081: 04,3354           34750                           CAF      UPLOCBIT                              #  TEST UPLOCKFL FOR 0 OR 1
056044,000082: 04,3355           70103                           MASK     FLAGWRD7                              
056045,000083: 04,3356           10000                           CCS      A                                     
056046,000084: 04,3357           05270                           TC       RESUME                                #  UPLOCKFL = 1
056047,000085: 04,3360           03307                           TC       ACCEPTUP                              #  UPLOCKFL = 0
056048,000086: 
056049,000087: 04,3361           44750        CLUPLOCK           CS       UPLOCBIT                              #  CLEAR UPLOCKFL (I.E., SET BIT 4 OF )
056050,000088: 04,3362           70103                           MASK     FLAGWRD7                              #  FLAGWRD7 = 0)
056051,000089: 04,3363           54103                           TS       FLAGWRD7                              
056052,000090: 04,3364           03307                           TC       ACCEPTUP                              
056053,000091: 
056054,000092:                                                                                                  #  CODE IS BAD
056055,000093: 04,3365           40103        TMFAIL2            CS       FLAGWRD7                              #  LOCK OUT FURTHER UPLINK ACTIVITY
056056,000094: 04,3366           74750                           MASK     UPLOCBIT                              #  (BY SETTING UPLOCKFL = 1) UNTIL
056057,000095: 04,3367           26103                           ADS      FLAGWRD7                              #  'ERROR RESET' IS SENT VIA UPLINK.
056058,000096: 04,3370           05270                           TC       RESUME                                
056059,000097: 04,3371           60073        UPTEST             AD       KEYTEMP1                              

Page 1340

056061,000099: 04,3372           10000                           CCS      A                                     
056062,000100: 04,3373           03365                           TC       TMFAIL2                               
056063,000101: 04,3374           77740        HI10               OCT      77740                                 
056064,000102: 04,3375           03365                           TC       TMFAIL2                               
056065,000103: 04,3376           00002                           TC       Q                                     
056066,000104: 
056067,000105: 04,3377           00022        ELRCODE            OCT      22                                    
056068,000106: 
056069,000107:                                                                                                  #  'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
056070,000108:                                                                                                  #        1.      VBRELDSP
056071,000109:                                                                                                  #        2.      ERROR RESET
056072,000110:                                                                                                  #        3.      UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
056073,000111:                                                                                                  #                                     -
056074,000112:                                                                                                  #  THE RECEPTION OF A BAD CODE (I.E  CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
056075,000113:                                                                                                  #  THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
056076,000114:                                                                                                  #  WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
056077,000115:                                                                                                  #  (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
056078,000116:                                                                                                  #  BY 15 ZEROES.  THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
056079,000117:                                                                                                  #  FAILURE)
056080,000118: 
056081,000119:                                                                                                  #  UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
056082,000120: 
056083,000121: 04,3400           44753                           CS       XDSPBIT                               
056084,000122: 

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