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.

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

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

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

Page 132

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

Page 133

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

Page 134

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

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