Source Code

This is an attempt to recreate Luminary 99 Rev 2, otherwise known as LUM99R2, from Luminary 99 Rev 1 and ephemeris data from Luminary 116. The differences are confined to the last 10-12 lines of the CONTROLLED CONSTANTS. Luminary 99 Rev 1 source-code was transcribed from a printout in the MIT Museum, while Luminary 116 source code was transcribed from a printout belonging to Don Eyles. AGC developer James Kernan, the "rope mother" for the Apollo 11 Lunar Module's AGC, explains as follows: "At the last minute, Dan Lickly, our chief engineer, appeared with ephemerides updates and it took two tries to get it right. The result was that we created Lum99 Revision 1 and Lum99 Revision 2." It is suspected that the former is what's in the MIT Museum, and the latter is what we are trying to recreate here. As for which revision actually flew in Apollo 11, all of the other available surviving evidence points to Rev 1 rather than to Rev 2, so we're just not sure!

056267,000002:                                                                                                  ## Copyright:   Public domain.
056268,000003:                                                                                                  ## Filename:    KEYRUPT_UPRUPT.agc
056269,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
056270,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
056271,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
056272,000007:                                                                                                  ## Assembler:   yaYUL
056273,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
056274,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
056275,000010:                                                                                                  ## Pages:       1338-1340
056276,000011:                                                                                                  ## Mod history: 2009-05-27 RSB  Adapted from the corresponding 
056277,000012:                                                                                                  ##                              Luminary131 file, using page 
056278,000013:                                                                                                  ##                              images from Luminary 1A.
056279,000014:                                                                                                  ##              2016-12-18 RSB  Proofed text comments with octopus/ProoferComments
056280,000015:                                                                                                  ##                              and corrected the errors found.
056281,000016:                                                                                                  ##              2017-03-03 RSB  Snapshot of Luminary 99 Rev 1. 
056282,000017: 

Page 1338

056284,000019: 14,3774                                           BANK     14                                    
056285,000020: 04,2000                                           SETLOC   KEYRUPT                               
056286,000021: 04,2000                                           BANK                                           
056287,000022: 04,3274                                           COUNT*   $$/KEYUP                              
056288,000023: 
056289,000024: 04,3274           54016        KEYRUPT1           TS       BANKRUPT                              
056290,000025: 04,3275           56002                           XCH      Q                                     
056291,000026: 04,3276           54012                           TS       QRUPT                                 
056292,000027: 04,3277           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
056293,000028: 04,3300           34346                           CAF      LOW5                                  
056294,000029: 04,3301           00006                           EXTEND                                         
056295,000030: 04,3302           02015                           RAND     MNKEYIN                               #  CHECK IF KEYS 5M-1M ON
056296,000031: 04,3303           54073        KEYCOM             TS       RUPTREG4                              
056297,000032: 04,3304           40101                           CS       FLAGWRD5                              
056298,000033: 04,3305           74735                           MASK     DSKYFBIT                              
056299,000034: 04,3306           26101                           ADS      FLAGWRD5                              
056300,000035: 
056301,000036: 04,3307           34355        ACCEPTUP           CAF      CHRPRIO                               #  (NOTE: RUPTREG4 = KEYTEMP1)
056302,000037: 04,3310           05072                           TC       NOVAC                                 
056303,000038: 04,3311     0777                                  EBANK=   DSPCOUNT                              
056304,000039: 04,3311           02077 60101                     2CADR    CHARIN                                
056305,000040: 
056306,000041: 04,3313           30073                           CA       RUPTREG4                              
056307,000042: 04,3314           50064                           INDEX    LOCCTR                                
056308,000043: 04,3315           54154                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
056309,000044: 04,3316           05270                           TC       RESUME                                
056310,000045: 

Page 1339

056312,000047:                                                                                                  #  UPRUPT PROGRAM
056313,000048: 
056314,000049: 04,3317           54016        UPRUPT             TS       BANKRUPT                              
056315,000050: 04,3320           56002                           XCH      Q                                     
056316,000051: 04,3321           54012                           TS       QRUPT                                 
056317,000052: 04,3322           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
056318,000053: 04,3323           34755                           CAF      ZERO                                  
056319,000054: 04,3324           56045                           XCH      INLINK                                
056320,000055: 04,3325           54073                           TS       KEYTEMP1                              
056321,000056: 04,3326           34751                           CAF      BIT3                                  #  TURN ON UPACT LIGHT
056322,000057: 04,3327           00006                           EXTEND                                         #  (BIT 3 OF CHANNEL 11)
056323,000058: 04,3330           05011                           WOR      DSALMOUT                              
056324,000059: 04,3331           34346        UPRPT1             CAF      LOW5                                  #  TEST FOR TRIPLE CHAR REDUNDANCY
056325,000060: 04,3332           70073                           MASK     KEYTEMP1                              #  LOW5 OF WORD
056326,000061: 04,3333           56073                           XCH      KEYTEMP1                              #  LOW5 INTO KEYTEMP1
056327,000062: 04,3334           00006                           EXTEND                                         
056328,000063: 04,3335           74742                           MP       BIT10                                 #  SHIFT RIGHT 5
056329,000064: 04,3336           54734                           TS       KEYTEMP2                              
056330,000065: 04,3337           74346                           MASK     LOW5                                  #  MID 5
056331,000066: 04,3340           63374                           AD       HI10                                  
056332,000067: 04,3341           03371                           TC       UPTEST                                
056333,000068: 04,3342           34742                           CAF      BIT10                                 
056334,000069: 04,3343           00006                           EXTEND                                         
056335,000070: 04,3344           70734                           MP       KEYTEMP2                              #  SHIFT RIGHT 5
056336,000071: 04,3345           74346                           MASK     LOW5                                  #  HIGH 5
056337,000072: 04,3346           40000                           COM                                            
056338,000073: 04,3347           03371                           TC       UPTEST                                
056339,000074: 
056340,000075: 04,3350           43377        UPCK               CS       ELRCODE                               #  CODE IS GOOD.  IF CODE = 'ERROR RESET',
056341,000076: 04,3351           60073                           AD       KEYTEMP1                              #  CLEAR UPLOCKFL (SET BIT4 OF FLAGWRD7 = 0)
056342,000077: 04,3352           00006                           EXTEND                                         #  IF CODE DOES NOT = 'ERROR RESET', ACCEPT
056343,000078: 04,3353           13361                           BZF      CLUPLOCK                              #  CODE ONLY IF UPLOCKFL IS CLEAR (=0).
056344,000079: 
056345,000080: 04,3354           34750                           CAF      UPLOCBIT                              #  TEST UPLOCKFL FOR 0 OR 1
056346,000081: 04,3355           70103                           MASK     FLAGWRD7                              
056347,000082: 04,3356           10000                           CCS      A                                     
056348,000083: 04,3357           05270                           TC       RESUME                                #  UPLOCKFL = 1
056349,000084: 04,3360           03307                           TC       ACCEPTUP                              #  UPLOCKFL = 0
056350,000085: 
056351,000086: 04,3361           44750        CLUPLOCK           CS       UPLOCBIT                              #  CLEAR UPLOCKFL (I.E., SET BIT 4 OF )
056352,000087: 04,3362           70103                           MASK     FLAGWRD7                              #  FLAGWRD7 = 0)
056353,000088: 04,3363           54103                           TS       FLAGWRD7                              
056354,000089: 04,3364           03307                           TC       ACCEPTUP                              
056355,000090: 
056356,000091:                                                                                                  #  CODE IS BAD
056357,000092: 04,3365           40103        TMFAIL2            CS       FLAGWRD7                              #  LOCK OUT FURTHER UPLINK ACTIVITY
056358,000093: 04,3366           74750                           MASK     UPLOCBIT                              #  (BY SETTING UPLOCKFL = 1) UNTIL
056359,000094: 04,3367           26103                           ADS      FLAGWRD7                              #  'ERROR RESET' IS SENT VIA UPLINK.
056360,000095: 04,3370           05270                           TC       RESUME                                
056361,000096: 04,3371           60073        UPTEST             AD       KEYTEMP1                              

Page 1340

056363,000098: 04,3372           10000                           CCS      A                                     
056364,000099: 04,3373           03365                           TC       TMFAIL2                               
056365,000100: 04,3374           77740        HI10               OCT      77740                                 
056366,000101: 04,3375           03365                           TC       TMFAIL2                               
056367,000102: 04,3376           00002                           TC       Q                                     
056368,000103: 
056369,000104: 04,3377           00022        ELRCODE            OCT      22                                    
056370,000105: 
056371,000106:                                                                                                  #  'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
056372,000107:                                                                                                  #        1.      VBRELDSP
056373,000108:                                                                                                  #        2.      ERROR RESET
056374,000109:                                                                                                  #        3.      UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
056375,000110:                                                                                                  #                                     -
056376,000111:                                                                                                  #  THE RECEPTION OF A BAD CODE (I.E  CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
056377,000112:                                                                                                  #  THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
056378,000113:                                                                                                  #  WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
056379,000114:                                                                                                  #  (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
056380,000115:                                                                                                  #  BY 15 ZEROES.  THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
056381,000116:                                                                                                  #  FAILURE)
056382,000117: 
056383,000118:                                                                                                  #  UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
056384,000119: 
056385,000120: 04,3400           44753                           CS       XDSPBIT                               
056386,000121: 

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