Source Code

These source-code files were transcribed from a printout in Don Eyles's personal collection, scanned by archive.org, and financially sponsored by Peter McDermott. A team of volunteers performed the transcription and proof-reading. The scanned page images are available at the Virtual AGC Project website, as well as higher-quality (but much larger) images at the Virtual AGC Project's collection in the Internet Archive. Report any problems by creating "issues" at the Virtual AGC Project's GitHub Repository.

Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: NEW PROGRAM SHEPATIN BY EYLES
	DEC 13, 1966

	THIS PROGRAM WAS ASSEMBLED AS A VERSION OF REVISION 37 
        OF PROGRAM SUNBURST BY LEM GROUP
Note that the date is the date of the printout, not the date of the program revision.

008862,000002:                                                                                                  ## Copyright:   Public domain.
008863,000003:                                                                                                  ## Filename:    KEYRUPT,_UPRUPT.agc
008864,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
008865,000005:                                                                                                  ##              It is part of an early development version of the software
008866,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
008867,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
008868,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
008869,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
008870,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
008871,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
008872,000012:                                                                                                  ##              that the code format has been changed to conform to the
008873,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
008874,000014:                                                                                                  ##              original YUL assembler.
008875,000015:                                                                                                  ## Reference:   pp. 215-218
008876,000016:                                                                                                  ## Assembler:   yaYUL
008877,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
008878,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
008879,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
008880,000020:                                                                                                  ##              2017-05-29 HG   Transcribed
008881,000021:                                                                                                  ##              2017-06-21 RSB  Proofed using octopus/ProoferComments.
008882,000022: 

Page 215

008884,000024: 13,3506                                           BANK     13                                    
008885,000025: 13,3506           54016        KEYRUPT1           TS       BANKRUPT                              
008886,000026: 13,3507           56002                           XCH      Q                                     
008887,000027: 13,3510           54012                           TS       QRUPT                                 
008888,000028: 13,3511           04574                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
008889,000029: 13,3512           34545                           CAF      LOW5                                  
008890,000030: 13,3513           00006                           EXTEND                                         
008891,000031: 13,3514           02015                           RAND     MNKEYIN                               
008892,000032: 13,3515           54073        KEYCOM             TS       RUPTREG4                              
008893,000033: 13,3516           35226                           CAF      CHRPRIO                               
008894,000034: 13,3517           05523                           TC       NOVAC                                 
008895,000035: 13,3520     0270                                  EBANK=   DSPCOUNT                              
008896,000036: 13,3520           02002 10000                     2CADR    CHARIN                                
008897,000037: 13,3522           30073                           CA       RUPTREG4                              
008898,000038: 13,3523           50064                           INDEX    LOCCTR                                
008899,000039: 13,3524           54144                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
008900,000040: 13,3525           05751                           TC       RESUME                                
008901,000041: 

Page 216

008903,000043:                                                                                                  #  UPRUPT PROGRAM
008904,000044: 
008905,000045: 13,3526           54016        UPRUPT             TS       BANKRUPT                              
008906,000046: 13,3527           56002                           XCH      Q                                     
008907,000047: 13,3530           54012                           TS       QRUPT                                 
008908,000048: 13,3531           04574                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
008909,000049: 13,3532           37761                           CAF      ZERO                                  
008910,000050: 13,3533           56045                           XCH      INLINK                                
008911,000051: 13,3534           54073                           TS       KEYTEMP1                              
008912,000052: 13,3535           37753                           CAF      BIT3                                  #  TURN ON UPACT LIGHT
008913,000053: 13,3536           00006                           EXTEND                                         #  (BIT 3 OF CHANNEL 11)
008914,000054: 13,3537           05011                           WOR      DSALMOUT                              
008915,000055: 13,3540           34545        UPRPT1             CAF      LOW5                                  #  TEST FOR TRIPLE CHAR REDUNDANCY
008916,000056: 13,3541           70073                           MASK     KEYTEMP1                              #  LOW5 OF WORD
008917,000057: 13,3542           56073                           XCH      KEYTEMP1                              #  LOW5 INTO KEYTEMP1
008918,000058: 13,3543           56021                           XCH      SR                                    #  WHOLE WORD INTO SR
008919,000059: 13,3544           55076                           TS       KEYTEMP2                              #  ORIGINAL SR INTO KEYTEMP2
008920,000060: 13,3545           03611                           TC       SRGHT5                                
008921,000061: 13,3546           74545                           MASK     LOW5                                  #  MID 5
008922,000062: 13,3547           63623                           AD       HI10                                  
008923,000063: 13,3550           03620                           TC       UPTEST                                
008924,000064: 13,3551           03611                           TC       SRGHT5                                
008925,000065: 13,3552           74545                           MASK     LOW5                                  #  HIGH 5
008926,000066: 13,3553           40000                           COM                                            
008927,000067: 13,3554           03620                           TC       UPTEST                                
008928,000068: 13,3555           03605        UPCK               TC       RESTORSR                              #  CODE IS GOOD
008929,000069: 
008930,000070: 13,3556           43562                           CS       ELRCODE                               #  IF CODE = ERROR LIGHT RESET, PUT +0
008931,000071: 13,3557           60073                           AD       KEYTEMP1                              #  INTO BIT1 OF UPLOCK.
008932,000072: 13,3560           10000                           CCS      A                                     #  IF CODE NOT= ELR, PASS CODE ONLY IF
008933,000073: 13,3561           03570                           TC       TSTUPLOK                              #  BIT1 OF UPLOCK = 0.
008934,000074: 13,3562           00022        ELRCODE            OCT      22                                    
008935,000075: 13,3563           03570                           TC       TSTUPLOK                              
008936,000076: 13,3564           47753                           CS       BIT3                                  
008937,000077: 13,3565           70075                           MASK     FLAGWRD1                              
008938,000078: 13,3566           54075                           TS       FLAGWRD1                              
008939,000079: 13,3567           03574                           TC       ACCEPTUP                              
008940,000080: 13,3570           37753        TSTUPLOK           CAF      BIT3                                  
008941,000081: 13,3571           70075                           MASK     FLAGWRD1                              
008942,000082: 13,3572           10000                           CCS      A                                     
008943,000083: 13,3573           05751                           TC       RESUME                                #  BIT1 OF UPLOCK = 1.
008944,000084: 13,3574           56073        ACCEPTUP           XCH      KEYTEMP1                              #  BIT1 OF UPLOCK = 0.
008945,000085: 13,3575           03515                           TC       KEYCOM                                
008946,000086: 
008947,000087: 13,3576           03605        TMFAIL2            TC       RESTORSR                              #  CODE IS BAD
008948,000088: 13,3577           47753                           CS       BIT3                                  
008949,000089: 13,3600           70075                           MASK     FLAGWRD1                              
008950,000090: 13,3601           67753                           AD       BIT3                                  
008951,000091: 13,3602           54075                           TS       FLAGWRD1                              
008952,000092: 13,3603           05751        TMFAIL1            TC       TMALM                                 
008953,000093: 
008954,000094: 13,3604           05751                           TC       RESUME                                
008955,000095: 

Page 217

008957,000097: 13,3605           57076        RESTORSR           XCH      KEYTEMP2                              
008958,000098: 13,3606           60000                           DOUBLE                                         
008959,000099: 13,3607           54021                           TS       SR                                    
008960,000100: 13,3610           00002                           TC       Q                                     
008961,000101: 
008962,000102: 13,3611     5751               TMALM              =        RESUME                                #  FOR NOW
008963,000103: 
008964,000104: 13,3611           40021        SRGHT5             CS       SR                                    
008965,000105: 
008966,000106: 13,3612           40021                           CS       SR                                    
008967,000107: 13,3613           40021                           CS       SR                                    
008968,000108: 13,3614           40021                           CS       SR                                    
008969,000109: 13,3615           40021                           CS       SR                                    
008970,000110: 13,3616           40000                           CS       A                                     
008971,000111: 13,3617           00002                           TC       Q                                     #  DELIVERS WORD UNCOMPLEMENTED
008972,000112: 
008973,000113: 13,3620           60073        UPTEST             AD       KEYTEMP1                              
008974,000114: 13,3621           10000                           CCS      A                                     
008975,000115: 13,3622           03576                           TC       TMFAIL2                               
008976,000116: 13,3623           77740        HI10               OCT      77740                                 
008977,000117: 13,3624           03576                           TC       TMFAIL2                               
008978,000118: 13,3625           00002                           TC       Q                                     
008979,000119: 
008980,000120:                                                                                                  #  UPACT IS TURNED OFF BY VBRELDSP, ALSO BY ERROR LIGHT RESET.
008981,000121: 

Page 218

008983,000123:                                                                                                  #  THE RECEPTION OF A BAD CODE BY UPLINK LOCKS OUT FURTHER UPLINK ACTIVITY
008984,000124:                                                                                                  #  BY PLACING A 1 INTO BIT1 OF UPLOCK. BIT9 (ALONG WITH BIT11) OF TMKEYBUF
008985,000125:                                                                                                  #  IS SET TO 1 TO SEND AN INDICATION OF THIS SITUATION DOWN THE DOWNLINK.
008986,000126:                                                                                                  #  THE UPLINK INTERLOCK IS ALLOWED WHEN AN ERROR LIGHT RESET CODE IS SENT
008987,000127:                                                                                                  #  UP THE UPLINK, OR WHEN A FRESH START IS PERFORMED.

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