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.

057655,000002:                                                                                                  ## Copyright:   Public domain.
057656,000003:                                                                                                  ## Filename:    KEYRUPT,_UPRUPT.agc
057657,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
057658,000005:                                                                                                  ##              It is part of the source code for the original release
057659,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
057660,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
057661,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
057662,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
057663,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
057664,000011:                                                                                                  ##              that the code format has been changed to conform to the
057665,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
057666,000013:                                                                                                  ##              original YUL assembler.
057667,000014:                                                                                                  ## Reference:   pp. 1332-1334
057668,000015:                                                                                                  ## Assembler:   yaYUL
057669,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
057670,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
057671,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
057672,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
057673,000020:                                                                                                  ##              2017-01-05 RRB  Updated for Luminary 69.
057674,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
057675,000022:                                                                                                  ##                              but no errors found.
057676,000023:                                                                                                  ##              2021-05-30 ABS  UPCK -> UPOK
057677,000024: 

Page 1332

057679,000026: 14,3711                                           BANK     14                                    
057680,000027: 04,2000                                           SETLOC   KEYRUPT                               
057681,000028: 04,2000                                           BANK                                           
057682,000029: 04,3215                                           COUNT*   $$/KEYUP                              
057683,000030: 
057684,000031: 04,3215           54016        KEYRUPT1           TS       BANKRUPT                              
057685,000032: 04,3216           56002                           XCH      Q                                     
057686,000033: 04,3217           54012                           TS       QRUPT                                 
057687,000034: 04,3220           04400                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
057688,000035: 04,3221           34346                           CAF      LOW5                                  
057689,000036: 04,3222           00006                           EXTEND                                         
057690,000037: 04,3223           02015                           RAND     MNKEYIN                               #  CHECK IF KEYS 5M-1M ON
057691,000038: 04,3224           54073        KEYCOM             TS       RUPTREG4                              
057692,000039: 04,3225           40101                           CS       FLAGWRD5                              
057693,000040: 04,3226           74735                           MASK     DSKYFBIT                              
057694,000041: 04,3227           26101                           ADS      FLAGWRD5                              
057695,000042: 
057696,000043: 04,3230           34355        ACCEPTUP           CAF      CHRPRIO                               #  (NOTE: RUPTREG4 = KEYTEMP1)
057697,000044: 04,3231           05072                           TC       NOVAC                                 
057698,000045: 04,3232     0777                                  EBANK=   DSPCOUNT                              
057699,000046: 04,3232           02077 60101                     2CADR    CHARIN                                
057700,000047: 
057701,000048: 04,3234           30073                           CA       RUPTREG4                              
057702,000049: 04,3235           50064                           INDEX    LOCCTR                                
057703,000050: 04,3236           54154                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
057704,000051: 04,3237           05270                           TC       RESUME                                
057705,000052: 

Page 1333

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

Page 1334

057758,000105: 04,3313           10000                           CCS      A                                     
057759,000106: 04,3314           03306                           TC       TMFAIL2                               
057760,000107: 04,3315           77740        HI10               OCT      77740                                 
057761,000108: 04,3316           03306                           TC       TMFAIL2                               
057762,000109: 04,3317           00002                           TC       Q                                     
057763,000110: 
057764,000111: 04,3320           00022        ELRCODE            OCT      22                                    
057765,000112: 
057766,000113:                                                                                                  #  'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
057767,000114:                                                                                                  #        1.      VBRELDSP
057768,000115:                                                                                                  #        2.      ERROR RESET
057769,000116:                                                                                                  #        3.      UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72,AND V73.
057770,000117:                                                                                                  #                                     -
057771,000118:                                                                                                  #  THE RECEPTION OF A BAD CODE (I.E  CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
057772,000119:                                                                                                  #  THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
057773,000120:                                                                                                  #  WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
057774,000121:                                                                                                  #  (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
057775,000122:                                                                                                  #  BY 15 ZEROES.  THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
057776,000123:                                                                                                  #  FAILURE)
057777,000124: 
057778,000125:                                                                                                  #  UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
057779,000126: 
057780,000127: 04,3321           44753                           CS       XDSPBIT                               
057781,000128: 

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