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 Mike Higgins. A team of volunteers performed the transcription and proof-reading. Note that 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 section on archive.org. 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 BLK2: REVISION 0 OF PROGRAM RETRED44 BY NASA 2021100
	JUL 9, 1965
Note that the date is the date of the printout, not the date of the program revision.

004748,000002:                                                                                                  ## Copyright:   Public domain.
004749,000003:                                                                                                  ## Filename:    KEYRUPT,_UPRUPT.agc
004750,000004:                                                                                                  ## Purpose:     Part of the source code for Retread 44 (revision 0). It was
004751,000005:                                                                                                  ##              the very first program for the Block II AGC, created as an
004752,000006:                                                                                                  ##              extensive rewrite of the Block I program Sunrise.
004753,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
004754,000008:                                                                                                  ##              that the code format has been changed to conform to the
004755,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
004756,000010:                                                                                                  ##              original YUL assembler.
004757,000011:                                                                                                  ## Reference:   pp. 131-134
004758,000012:                                                                                                  ## Assembler:   yaYUL
004759,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
004760,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
004761,000015:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Aurora 12 version.
004762,000016:                                                                                                  ## Mod history: 2016-12-18 MAS  Transcribed.
004763,000017:                                                                                                  ##              2016-12-27 RSB  Proofed comment text using octopus/ProoferComments,
004764,000018:                                                                                                  ##                              but no errors found.
004765,000019: 

Page 131 The log section title, KEYRUPT, UPRUPT, is circled in red.

004768,000022: 
004769,000023: 01,3153           54016        KEYRUPT1           TS       BANKRUPT                              
004770,000024: 01,3154           56002                           XCH      Q                                     
004771,000025: 01,3155           54012                           TS       QRUPT                                 
004772,000026: 01,3156           04526                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
004773,000027: 01,3157           34473                           CAF      LOW5                                  
004774,000028: 01,3160           00006                           EXTEND                                         
004775,000029: 01,3161           02015                           RAND     MNKEYIN                               
004776,000030: 01,3162           67634        KEYCOM             AD       BIT11                                 
004777,000031: 01,3163           55024                           TS       TMKEYBUF                              
004778,000032: 01,3164           34502                           CAF      CHRPRIO                               
004779,000033: 01,3165           04131                           TC       NOVAC                                 
004780,000034: 01,3166     0637                                  EBANK=   DSPCOUNT                              
004781,000035: 01,3166           02002 10001                     2CADR    CHARIN                                
004782,000036: 
004783,000037: 01,3170           34473                           CA       LOW5                                  
004784,000038: 01,3171           71024                           MASK     TMKEYBUF                              
004785,000039: 01,3172           50635                           INDEX    LOCCTR                                
004786,000040: 01,3173           54140                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
004787,000041: 01,3174           04325                           TC       RESUME                                
004788,000042: 
004789,000043: 
004790,000044: 
004791,000045: 01,3175           54016        KEYRUPT2           TS       BANKRUPT                              
004792,000046: 01,3176           56002                           XCH      Q                                     
004793,000047: 01,3177           54012                           TS       QRUPT                                 
004794,000048: 01,3200           04526                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
004795,000049: 01,3201           34473                           CAF      LOW5                                  
004796,000050: 01,3202           00006                           EXTEND                                         
004797,000051: 01,3203           02016                           RAND     NAVKEYIN                              
004798,000052: 01,3204           03162                           TC       KEYCOM                                
004799,000053: 

Page 132

004801,000055:                                                                                                  #  UPRUPT PROGRAM
004802,000056: 
004803,000057: 01,3205           54016        UPRUPT             TS       BANKRUPT                              
004804,000058: 01,3206           56002                           XCH      Q                                     
004805,000059: 01,3207           54012                           TS       QRUPT                                 
004806,000060: 01,3210           04526                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
004807,000061: 01,3211           37653                           CAF      ZERO                                  
004808,000062: 01,3212           56045                           XCH      INLINK                                
004809,000063: 01,3213           54624                           TS       KEYTEMP1                              
004810,000064: 01,3214           37644                           CAF      BIT3                                  #  TURN ON UPACT LIGHT
004811,000065: 01,3215           00006                           EXTEND                                         #  (BIT 3 OF CHANNEL 11)
004812,000066: 01,3216           05011                           WOR      DSALMOUT                              
004813,000067: 01,3217           34473        UPRUPT1            CAF      LOW5                                  #  TEST FOR TRIPLE CHAR REDUNDANCY
004814,000068: 01,3220           70624                           MASK     KEYTEMP1                              #  LOW5 OF WORD
004815,000069: 01,3221           56624                           XCH      KEYTEMP1                              #  LOW5 INTO KEYTEMP1
004816,000070: 01,3222           56021                           XCH      SR                                    #  WHOLE WORD INTO SR
004817,000071: 01,3223           54636                           TS       KEYTEMP2                              #  ORIGINAL SR INTO KEYTEMP2
004818,000072: 01,3224           03274                           TC       SRGHT5                                
004819,000073: 01,3225           74473                           MASK     LOW5                                  #  MID 5
004820,000074: 01,3226           63311                           AD       HI10                                  
004821,000075: 01,3227           03303                           TC       UPTEST                                
004822,000076: 01,3230           03274                           TC       SRGHT5                                
004823,000077: 01,3231           74473                           MASK     LOW5                                  #  HIGH 5
004824,000078: 01,3232           40000                           COM                                            
004825,000079: 01,3233           03303                           TC       UPTEST                                
004826,000080: 01,3234           03270        UPOK               TC       RESTORSR                              #  CODE IS GOOD
004827,000081: 01,3235           43241                           CS       ELRCODE                               #  IF CODE = ERROR LIGHT RESET, PUT +0
004828,000082: 01,3236           60624                           AD       KEYTEMP1                              #  INTO BIT1 OF UPLOCK.
004829,000083: 01,3237           10000                           CCS      A                                     #  IF CODE NOT= ELR, PASS CODE ONLY IF
004830,000084: 01,3240           03247                           TC       TSTUPLOK                              #  BIT1 OF UPLOCK = 0.
004831,000085: 01,3241           00022        ELRCODE            OCT      22                                    
004832,000086: 01,3242           03247                           TC       TSTUPLOK                              
004833,000087: 01,3243           47646                           CS       BIT1                                  #  PUT 0 INTO BIT1 OF UPLOCK
004834,000088: 01,3244           70715                           MASK     UPLOCK                                
004835,000089: 01,3245           54715                           TS       UPLOCK                                
004836,000090: 01,3246           03253                           TC       ACCEPTUP                              
004837,000091: 01,3247           37646        TSTUPLOK           CAF      BIT1                                  
004838,000092: 01,3250           70715                           MASK     UPLOCK                                
004839,000093: 01,3251           10000                           CCS      A                                     
004840,000094: 01,3252           04325                           TC       RESUME                                #  BIT1 OF UPLOCK = 1.
004841,000095: 01,3253           56624        ACCEPTUP           XCH      KEYTEMP1                              #  BIT1 OF UPLOCK = 0.
004842,000096: 01,3254           67641                           AD       BIT6                                  
004843,000097: 01,3255           03162                           TC       KEYCOM                                
004844,000098: 
004845,000099: 01,3256           03270        TMFAIL2            TC       RESTORSR                              #  CODE IS BAD
004846,000100: 01,3257           47646                           CS       BIT1                                  #  LOCK OUT FURTHER UPLINK ACTIVITY (BY
004847,000101: 01,3260           70715                           MASK     UPLOCK                                #  PUTTING 1 INTO BIT1 OF UPLOCK) UNTIL ELR
004848,000102: 01,3261           67646                           AD       BIT1                                  #  IS SENT UP UPLINK.
004849,000103: 01,3262           54715                           TS       UPLOCK                                
004850,000104: 01,3263           37636                           CAF      BIT9                                  #  SEND DOWN INDICATION THAT UPLINK HAS

Page 133

004852,000106: 01,3264           67634                           AD       BIT11                                 #  RECEIVED BAD CODE.
004853,000107: 01,3265           55024                           TS       TMKEYBUF                              
004854,000108: 01,3266           04325        TMFAIL1            TC       TMALM                                 
004855,000109: 01,3267           04325                           TC       RESUME                                
004856,000110: 
004857,000111: 01,3270           56636        RESTORSR           XCH      KEYTEMP2                              
004858,000112: 01,3271           60000                           DOUBLE                                         
004859,000113: 01,3272           54021                           TS       SR                                    
004860,000114: 01,3273           00002                           TC       Q                                     
004861,000115: 
004862,000116: 01,3274     4325               TMALM              =        RESUME                                #  FOR NOW
004863,000117: 
004864,000118: 01,3274           40021        SRGHT5             CS       SR                                    
004865,000119: 01,3275           40021                           CS       SR                                    
004866,000120: 01,3276           40021                           CS       SR                                    
004867,000121: 01,3277           40021                           CS       SR                                    
004868,000122: 01,3300           40021                           CS       SR                                    
004869,000123: 01,3301           40000                           CS       A                                     
004870,000124: 01,3302           00002                           TC       Q                                     #  DELIVERS WORD UNCOMPLEMENTED
004871,000125: 
004872,000126: 01,3303           60624        UPTEST             AD       KEYTEMP1                              
004873,000127: 01,3304           10000                           CCS      A                                     
004874,000128: 01,3305           03256                           TC       TMFAIL2                               
004875,000129: 01,3307                                           LOC      +1                                    
004876,000130: 01,3307           03256                           TC       TMFAIL2                               
004877,000131: 01,3310           00002                           TC       Q                                     
004878,000132: 
004879,000133: 01,3311           77740        HI10               OCT      77740                                 
004880,000134: 01,3312     4214               UPBANK             EQUALS   EXECBANK                              #  IN SAME BANK AS EXEC.
004881,000135: 
004882,000136: 01,3312           03777        B12-1              OCT      3777                                  
004883,000137: 
004884,000138:                                                                                                  #  UPACT IS TURNED OFF BY VBRELDSP, ALSO BY ERROR LIGHT RESET.       
004885,000139: 

Page 134

004887,000141:                                                                                                  #  THE RECEPTION OF A BAD CODE BY UPLINK LOCKS OUT FURTHER UPLINK ACTIVITY
004888,000142:                                                                                                  #  BY PLACING A 1 INTO BIT1 OF UPLOCK. BIT9 (ALONG WITH BIT11) OF TMKEYBUF
004889,000143:                                                                                                  #  IS SET TO 1 TO SEND AN INDICATION OF THIS SITUATION DOWN THE DOWNLINK.
004890,000144:                                                                                                  #  THE UPLINK INTERLOCK IS ALLOWED WHEN AN ERROR LIGHT RESET CODE IS SENT
004891,000145:                                                                                                  #  UP THE UPLINK, OR WHEN A FRESH START IS PERFORMED.

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