Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

057624,000002:                                                                                                  ## Copyright:   Public domain.
057625,000003:                                                                                                  ## Filename:    KEYRUPT,_UPRUPT.agc
057626,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
057627,000005:                                                                                                  ##              It is part of the source code for the original release
057628,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
057629,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
057630,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
057631,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
057632,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
057633,000011:                                                                                                  ##              that the code format has been changed to conform to the
057634,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
057635,000013:                                                                                                  ##              original YUL assembler.
057636,000014:                                                                                                  ## Reference:   pp. 1332-1334
057637,000015:                                                                                                  ## Assembler:   yaYUL
057638,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
057639,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
057640,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
057641,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
057642,000020:                                                                                                  ##              2017-01-05 RRB  Updated for Luminary 69.
057643,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
057644,000022:                                                                                                  ##                              but no errors found.
057645,000023: 

Page 1332

057647,000025: 14,3711                                           BANK     14                                    
057648,000026: 04,2000                                           SETLOC   KEYRUPT                               
057649,000027: 04,2000                                           BANK                                           
057650,000028: 04,3215                                           COUNT*   $$/KEYUP                              
057651,000029: 
057652,000030: 04,3215           54016        KEYRUPT1           TS       BANKRUPT                              
057653,000031: 04,3216           56002                           XCH      Q                                     
057654,000032: 04,3217           54012                           TS       QRUPT                                 
057655,000033: 04,3220           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
057656,000034: 04,3221           34346                           CAF      LOW5                                  
057657,000035: 04,3222           00006                           EXTEND                                         
057658,000036: 04,3223           02015                           RAND     MNKEYIN                               #  CHECK IF KEYS 5M-1M ON
057659,000037: 04,3224           54073        KEYCOM             TS       RUPTREG4                              
057660,000038: 04,3225           40101                           CS       FLAGWRD5                              
057661,000039: 04,3226           74735                           MASK     DSKYFBIT                              
057662,000040: 04,3227           26101                           ADS      FLAGWRD5                              
057663,000041: 
057664,000042: 04,3230           34355        ACCEPTUP           CAF      CHRPRIO                               #  (NOTE: RUPTREG4 = KEYTEMP1)
057665,000043: 04,3231           05072                           TC       NOVAC                                 
057666,000044: 04,3232     0777                                  EBANK=   DSPCOUNT                              
057667,000045: 04,3232           02077 60101                     2CADR    CHARIN                                
057668,000046: 
057669,000047: 04,3234           30073                           CA       RUPTREG4                              
057670,000048: 04,3235           50064                           INDEX    LOCCTR                                
057671,000049: 04,3236           54154                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
057672,000050: 04,3237           05270                           TC       RESUME                                
057673,000051: 

Page 1333

057675,000053:                                                                                                  #  UPRUPT PROGRAM
057676,000054: 
057677,000055: 04,3240           54016        UPRUPT             TS       BANKRUPT                              
057678,000056: 04,3241           56002                           XCH      Q                                     
057679,000057: 04,3242           54012                           TS       QRUPT                                 
057680,000058: 04,3243           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
057681,000059: 04,3244           34755                           CAF      ZERO                                  
057682,000060: 04,3245           56045                           XCH      INLINK                                
057683,000061: 04,3246           54073                           TS       KEYTEMP1                              
057684,000062: 04,3247           34751                           CAF      BIT3                                  #  TURN ON UPACT LIGHT
057685,000063: 04,3250           00006                           EXTEND                                         #  (BIT 3 OF CHANNEL 11)
057686,000064: 04,3251           05011                           WOR      DSALMOUT                              
057687,000065: 04,3252           34346        UPRPT1             CAF      LOW5                                  #  TEST FOR TRIPLE CHAR REDUNDANCY
057688,000066: 04,3253           70073                           MASK     KEYTEMP1                              #  LOW5 OF WORD
057689,000067: 04,3254           56073                           XCH      KEYTEMP1                              #  LOW5 INTO KEYTEMP1
057690,000068: 04,3255           00006                           EXTEND                                         
057691,000069: 04,3256           74742                           MP       BIT10                                 #  SHIFT RIGHT 5
057692,000070: 04,3257           54734                           TS       KEYTEMP2                              
057693,000071: 04,3260           74346                           MASK     LOW5                                  #  MID 5
057694,000072: 04,3261           63315                           AD       HI10                                  
057695,000073: 04,3262           03312                           TC       UPTEST                                
057696,000074: 04,3263           34742                           CAF      BIT10                                 
057697,000075: 04,3264           00006                           EXTEND                                         
057698,000076: 04,3265           70734                           MP       KEYTEMP2                              #  SHIFT RIGHT 5
057699,000077: 04,3266           74346                           MASK     LOW5                                  #  HIGH 5
057700,000078: 04,3267           40000                           COM                                            
057701,000079: 04,3270           03312                           TC       UPTEST                                
057702,000080: 
057703,000081: 04,3271           43320        UPCK               CS       ELRCODE                               #  CODE IS GOOD. IF CODE = 'ERROR RESET',
057704,000082: 04,3272           60073                           AD       KEYTEMP1                              #  CLEAR UPLOCKFL(SET BIT4 OF FLAGWRD7 = 0)
057705,000083: 04,3273           00006                           EXTEND                                         #  IF CODE DOES NOT = 'ERROR RESET', ACCEPT
057706,000084: 04,3274           13302                           BZF      CLUPLOCK                              #  CODE ONLY IF UPLOCKFL IS CLEAR (=0).
057707,000085: 
057708,000086: 04,3275           34750                           CAF      UPLOCBIT                              #  TEST UPLOCKFL FOR 0 OR 1
057709,000087: 04,3276           70103                           MASK     FLAGWRD7                              
057710,000088: 04,3277           10000                           CCS      A                                     
057711,000089: 04,3300           05270                           TC       RESUME                                #  UPLOCKFL = 1
057712,000090: 04,3301           03230                           TC       ACCEPTUP                              #  UPLOCKFL = 0
057713,000091: 
057714,000092: 04,3302           44750        CLUPLOCK           CS       UPLOCBIT                              #  CLEAR UPLOCKFL (I.E., SET BIT 4 OF )
057715,000093: 04,3303           70103                           MASK     FLAGWRD7                              #  FLAGWRD7 = 0)
057716,000094: 04,3304           54103                           TS       FLAGWRD7                              
057717,000095: 04,3305           03230                           TC       ACCEPTUP                              
057718,000096: 
057719,000097:                                                                                                  #  CODE IS BAD
057720,000098: 04,3306           40103        TMFAIL2            CS       FLAGWRD7                              #  LOCK OUT FURTHER UPLINK ACTIVITY
057721,000099: 04,3307           74750                           MASK     UPLOCBIT                              #  (BY SETTING UPLOCKFL = 1) UNTIL
057722,000100: 04,3310           26103                           ADS      FLAGWRD7                              #  'ERROR RESET' IS SENT VIA UPLINK.
057723,000101: 04,3311           05270                           TC       RESUME                                
057724,000102: 04,3312           60073        UPTEST             AD       KEYTEMP1                              

Page 1334

057726,000104: 04,3313           10000                           CCS      A                                     
057727,000105: 04,3314           03306                           TC       TMFAIL2                               
057728,000106: 04,3315           77740        HI10               OCT      77740                                 
057729,000107: 04,3316           03306                           TC       TMFAIL2                               
057730,000108: 04,3317           00002                           TC       Q                                     
057731,000109: 
057732,000110: 04,3320           00022        ELRCODE            OCT      22                                    
057733,000111: 
057734,000112:                                                                                                  #  'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
057735,000113:                                                                                                  #        1.      VBRELDSP
057736,000114:                                                                                                  #        2.      ERROR RESET
057737,000115:                                                                                                  #        3.      UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72,AND V73.
057738,000116:                                                                                                  #                                     -
057739,000117:                                                                                                  #  THE RECEPTION OF A BAD CODE (I.E  CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
057740,000118:                                                                                                  #  THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
057741,000119:                                                                                                  #  WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
057742,000120:                                                                                                  #  (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
057743,000121:                                                                                                  #  BY 15 ZEROES.  THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
057744,000122:                                                                                                  #  FAILURE)
057745,000123: 
057746,000124:                                                                                                  #  UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
057747,000125: 
057748,000126: 04,3321           44753                           CS       XDSPBIT                               
057749,000127: 

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