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.

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

Page 1332

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

Page 1333

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

Page 1334

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

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