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 Linden Sims. 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:

	GAP:  ASSEMBLE REVISION 56 OF AGC PROGRAM ZERLINA BY ZOROASTER
	9:12 OCT. 21,1970
Note that the date is the date of the printout, not the date of the program revision.

056586,000002:                                                                                                  ## Copyright:   Public domain.
056587,000003:                                                                                                  ## Filename:    RESTARTS_ROUTINE.agc
056588,000004:                                                                                                  ## Purpose:     A log section of Zerlina 56, the final revision of
056589,000005:                                                                                                  ##              Don Eyles's offline development program for the variable 
056590,000006:                                                                                                  ##              guidance period servicer. It also includes a new P66 with LPD 
056591,000007:                                                                                                  ##              (Landing Point Designator) capability, based on an idea of John 
056592,000008:                                                                                                  ##              Young's. Neither of these advanced features were actually flown,
056593,000009:                                                                                                  ##              but Zerlina was also the birthplace of other big improvements to
056594,000010:                                                                                                  ##              Luminary including the terrain model and new (Luminary 1E)
056595,000011:                                                                                                  ##              analog display programs. Zerlina was branched off of Luminary 145,
056596,000012:                                                                                                  ##              and revision 56 includes all changes up to and including Luminary
056597,000013:                                                                                                  ##              183. It is therefore quite close to the Apollo 14 program,
056598,000014:                                                                                                  ##              Luminary 178, where not modified with new features.
056599,000015:                                                                                                  ## Reference:   pp. 1292-1297
056600,000016:                                                                                                  ## Assembler:   yaYUL
056601,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
056602,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
056603,000019:                                                                                                  ## Mod history: 2017-07-28 MAS  Created from Luminary 210.
056604,000020:                                                                                                  ##              2017-08-29 RSB  Transcribed.
056605,000021: 

Page 1292

056607,000023: 01,3530                                           BANK     01                                    
056608,000024: 01,2000                                           SETLOC   RESTART                               
056609,000025: 01,2000                                           BANK                                           
056610,000026: 
056611,000027: 01,3530  E3,1436                                  EBANK=   PHSNAME1                              #  GOPROG MUST SWITCH TO THIS EBANK
056612,000028: 
056613,000029: 01,3530                                           COUNT*   $$/RSROU                              
056614,000030: 01,3530           30161        RESTARTS           CA       MPAC       +5                         #  GET GROUP NUMBER -1
056615,000031: 01,3531           60000                           DOUBLE                                         #  SAVE FOR INDEXING
056616,000032: 01,3532           54155                           TS       TEMP2G                                
056617,000033: 
056618,000034: 01,3533           33772                           CA       PHS2CADR                              #  SET UP EXIT IN CASE IT IS AN EVEN
056619,000035: 01,3534           54157                           TS       TEMPSWCH                              #  TABLE PHASE
056620,000036: 
056621,000037: 01,3535           33567                           CA       RTRNCADR                              #  TO SAVE TIME ASSUME IT WILL GET NEXT
056622,000038: 01,3536           54707                           TS       GOLOC      +2                         #  GROUP AFTER THIS
056623,000039: 
056624,000040: 01,3537           30154                           CA       TEMPPHS                               
056625,000041: 01,3540           75007                           MASK     OCT1400                               
056626,000042: 01,3541           10000                           CCS      A                                     #  IS IT A VARIABLE OR TABLE RESTART
056627,000043: 01,3542           13553                           TCF      ITSAVAR                               #  IT:S A VARIABLE RESTART
056628,000044: 
056629,000045: 01,3543           10154        GETPART2           CCS      TEMPPHS                               #  IS IT AN X.1 RESTART
056630,000046: 01,3544           10000                           CCS      A                                     
056631,000047: 01,3545           13653                           TCF      ITSATBL                               #  NO, ITS A TABLE RESTART
056632,000048: 
056633,000049: 01,3546           35024                           CA       PRIO14                                #  IT IS AN X.1 RESTART, THEREFORE START
056634,000050: 01,3547           05105                           TC       FINDVAC                               #  THE DISPLAY RESTART JOB
056635,000051: 01,3550  E3,1400                                  EBANK=   LST1                                  
056636,000052: 01,3550           03040 20103                     2CADR    INITDSP                               
056637,000053: 
056638,000054: 01,3552           03567                           TC       RTRNCADR                              #  FINISHED WITH THIS GROUP, GET NEXT ONE
056639,000055: 
056640,000056: 01,3553           75007        ITSAVAR            MASK     OCT1400                               #  IS IT TYPE B ?
056641,000057: 01,3554           10000                           CCS      A                                     
056642,000058: 01,3555           13624                           TCF      ITSLIKEB                              #  YES,IT IS TYPE B
056643,000059: 
056644,000060: 01,3556           00006                           EXTEND                                         #  STORE THE JOB (OR TASK) 2CADR FOR EXIT
056645,000061: 01,3557           50155                           NDX      TEMP2G                                
056646,000062: 01,3560           31437                           DCA      PHSNAME1                              
056647,000063: 01,3561           52706                           DXCH     GOLOC                                 
056648,000064: 
056649,000065: 01,3562           30154                           CA       TEMPPHS                               #  SEE IF THIS IS A JOB, TASK, OR A LONGCAL
056650,000066: 01,3563           74757                           MASK     OCT7                                  
056651,000067: 01,3564           67760                           AD       MINUS2                                
056652,000068: 01,3565           10000                           CCS      A                                     
056653,000069: 01,3566           13736                           TCF      ITSLNGCL                              #  ITS A LONGCALL
056654,000070: 
056655,000071: 01,3567           04631        RTRNCADR           TC       SWRETURN                              #  CANT GET HERE
056656,000072: 

Page 1293

056658,000074: 01,3570           13572                           TCF      ITSAWAIT                              
056659,000075: 
056660,000076: 01,3571           13637                           TCF      ITSAJOB                               #  ITS A JOB
056661,000077: 
056662,000078: 01,3572           34352        ITSAWAIT           CA       WTLTCADR                              #  SET UP WAITLIST CALL
056663,000079: 01,3573           54704                           TS       GOLOC      -1                         
056664,000080: 
056665,000081: 01,3574           50155                           NDX      TEMP2G                                #  DIRECTLY STORED
056666,000082: 01,3575           31053                           CA       PHSPRDT1                              
056667,000083: 01,3576           10000        TIMETEST           CCS      A                                     #  IS IT AN IMMEDIATE RESTART
056668,000084: 01,3577           24000                           INCR     A                                     #  NO,
056669,000085: 01,3600           13603                           TCF      FINDTIME                              #  FIND OUT WHEN IT SHOULD BEGIN
056670,000086: 
056671,000087: 01,3601           15447                           TCF      ITSINDIR                              #  STORED INDIRECTLY
056672,000088: 
056673,000089: 01,3602           13622                           TCF      IMEDIATE                              #  IT WANTS AN IMMEDIATE RESTART
056674,000090: 
056675,000091:                                                                                                  #  ***** THIS MUST BE IN FIXED FIXED *****
056676,000092: 
056677,000093:    5447                                           BLOCK    02                                    
056678,000094:    4000                                           SETLOC   FFTAG2                                
056679,000095:    4000                                           BANK                                           
056680,000096: 
056681,000097:    5447                                           COUNT*   $$/RSROU                              
056682,000098:    5447           22706        ITSINDIR           LXCH     GOLOC      +1                         #  GET THE CORRECT E BANK IN CASE THIS IS
056683,000099:    5450           22006                           LXCH     BB                                    #  SWITCHED ERRASIBLE
056684,000100: 
056685,000101:    5451           50000                           NDX      A                                     #  GET THE TIME INDIRECTLY
056686,000102:    5452           30001                           CA       1                                     
056687,000103: 
056688,000104:    5453           22006                           LXCH     BB                                    #  RESTORE THE BB AND GOLOC
056689,000105:    5454           22706                           LXCH     GOLOC      +1                         
056690,000106: 
056691,000107:    5455           13603                           TCF      FINDTIME                              #  FIND OUT WHEN IT SHOULD BEGIN
056692,000108: 
056693,000109:                                                                                                  #  ***** YOU  MAY RETURN TO  SWITCHED FIXED *****
056694,000110: 
056695,000111: 01,3603                                           BANK     01                                    
056696,000112: 01,2000                                           SETLOC   RESTART                               
056697,000113: 01,2000                                           BANK                                           
056698,000114: 
056699,000115: 01,3603                                           COUNT*   $$/RSROU                              
056700,000116: 01,3603           40000        FINDTIME           COM                                            #  MAKE NEGITIVE SINCE IT WILL BE SUBTRACTD
056701,000117: 01,3604           54001                           TS       L                                     #  AND SAVE
056702,000118: 01,3605           50155                           NDX      TEMP2G                                
056703,000119: 01,3606           41052                           CS       TBASE1                                
056704,000120: 01,3607           00006                           EXTEND                                         
056705,000121: 01,3610           60025                           SU       TIME1                                 
056706,000122: 01,3611           10000                           CCS      A                                     
056707,000123: 01,3612           40000                           COM                                            
056708,000124: 

Page 1294

056710,000126: 01,3613           67743                           AD       OCT37776                              
056711,000127: 01,3614           64753                           AD       ONE                                   
056712,000128: 01,3615           60001                           AD       L                                     
056713,000129: 01,3616           10000                           CCS      A                                     
056714,000130: 01,3617           34755                           CA       ZERO                                  
056715,000131: 01,3620           13622                           TCF      +2                                    
056716,000132: 01,3621           13622                           TCF      +1                                    
056717,000133: 01,3622           64753        IMEDIATE           AD       ONE                                   
056718,000134: 01,3623           00704                           TC       GOLOC      -1                         
056719,000135: 01,3624           33567        ITSLIKEB           CA       RTRNCADR                              #  TYPE B,             SO STORE RETURN IN
056720,000136: 01,3625           54157                           TS       TEMPSWCH                              #  TEMPSWCH IN CASE OF AN EVEN PHASE
056721,000137: 
056722,000138: 01,3626           33773                           CA       PRT2CADR                              #  SET UP EXIT TO GET TABLE PART OF THIS
056723,000139: 01,3627           54707                           TS       GOLOC      +2                         #  VARIABLE TYPE OF PHASE
056724,000140: 
056725,000141: 01,3630           30154                           CA       TEMPPHS                               #  MAKE THE PHASE LOOK RIGHT FOR THE TABLE
056726,000142: 01,3631           76106                           MASK     OCT177                                #  PART OF THIS VARIABLE PHASE
056727,000143: 01,3632           54154                           TS       TEMPPHS                               
056728,000144: 
056729,000145: 01,3633           00006                           EXTEND                                         
056730,000146: 01,3634           50155                           NDX      TEMP2G                                #  OBTAIN THE JOB:S 2CADR
056731,000147: 01,3635           31437                           DCA      PHSNAME1                              
056732,000148: 01,3636           52706                           DXCH     GOLOC                                 
056733,000149: 
056734,000150: 01,3637           50155        ITSAJOB            NDX      TEMP2G                                #  NOW ADD THE PRIORITY AND LET:S GO
056735,000151: 01,3640           31053                           CA       PHSPRDT1                              
056736,000152: 01,3641           54704        CHKNOVAC           TS       GOLOC      -1                         #  SAVE PRIO UNTIL WE SEE IF ITS
056737,000153: 01,3642           00006                           EXTEND                                         #  A FINDVAC OR A NOVAC
056738,000154: 01,3643           63647                           BZMF     ITSNOVAC                              
056739,000155: 
056740,000156: 01,3644           34354                           CAF      FVACCADR                              #  POSITIVE, SET UP FINDVAC CALL.
056741,000157: 01,3645           56704                           XCH      GOLOC      -1                         #  PICK UP PRIO,
056742,000158: 01,3646           00704                           TC       GOLOC      -1                         #  AND GO
056743,000159: 
056744,000160: 01,3647           34351        ITSNOVAC           CAF      NOVACADR                              #  NEGATIVE,
056745,000161: 01,3650           56704                           XCH      GOLOC      -1                         #  SET UP NOVAC CALL,
056746,000162: 01,3651           40000                           COM                                            #  CORRECT PRIO,
056747,000163: 01,3652           00704                           TC       GOLOC      -1                         #  AND GO
056748,000164: 
056749,000165: 01,3653           54020        ITSATBL            TS       CYR                                   #  FIND OUT IF THE PHASE IS ODD OR EVEN
056750,000166: 01,3654           10020                           CCS      CYR                                   
056751,000167: 01,3655           13656                           TCF      +1                                    #  IT:S EVEN
056752,000168: 01,3656           13754                           TCF      ITSEVEN                               
056753,000169: 
056754,000170: 01,3657           33567                           CA       RTRNCADR                              #  IN CASE THIS IS THE SECOND PART OF A
056755,000171: 01,3660           54707                           TS       GOLOC      +2                         #  TYPE B RESTART, WE NEED PROPER EXIT
056756,000172: 
056757,000173: 01,3661           30154                           CA       TEMPPHS                               #  SET UP POINTER FOR FINDING OUR PLACE IN
056758,000174: 01,3662           54021                           TS       SR                                    #  THE RESTART TABLES
056759,000175: 01,3663           60021                           AD       SR                                    
056760,000176: 

Page 1295

056762,000178: 01,3664           50155                           NDX      TEMP2G                                
056763,000179: 01,3665           62003                           AD       SIZETAB    +1                         
056764,000180: 01,3666           54156                           TS       POINTER                               
056765,000181: 
056766,000182: 01,3667           00006        CONTBL2            EXTEND                                         #  FIND OUT WHAT:S IN THE TABLE
056767,000183: 01,3670           50156                           NDX      POINTER                               
056768,000184: 01,3671           32002                           DCA      CADRTAB                               #  GET THE 2CADR
056769,000185: 
056770,000186: 01,3672           22706                           LXCH     GOLOC      +1                         #  STORE THE BB INFORMATION
056771,000187: 
056772,000188: 01,3673           10000                           CCS      A                                     #  IS IT A JOB OR IS IT  TIMED
056773,000189: 01,3674           24000                           INCR     A                                     #  POSITIVE, MUST BE A JOB
056774,000190: 01,3675           13750                           TCF      ITSAJOB2                              
056775,000191: 
056776,000192: 01,3676           24000                           INCR     A                                     #  MUST BE EITHER A WAITLIST OR LONGCALL
056777,000193: 01,3677           54705                           TS       GOLOC                                 #  LET-S STORE THE CORRECT CADR
056778,000194: 
056779,000195: 01,3700           34352                           CA       WTLTCADR                              #  SET UP OUR EXIT TO WAITLIST
056780,000196: 01,3701           54704                           TS       GOLOC      -1                         
056781,000197: 
056782,000198: 01,3702           30706                           CA       GOLOC      +1                         #  NOW FIND OUT IF IT IS A WAITLIST CALL
056783,000199: 01,3703           74742                           MASK     BIT10                                 #  THIS SHOULD BE ONE IF WE HAVE -BB
056784,000200: 01,3704           10000                           CCS      A                                     #  FOR THAT MATTER SO SHOULD BE BITS 9,8,7,
056785,000201:                                                                                                  #  6,5, AND LAST BUT NOT LEAST (PERHAPS NOT
056786,000202:                                                                                                  #  IN IMPORTANCE ANYWAY. BIT 4
056787,000203: 01,3705           13743                           TCF      ITSWTLST                              #  IT IS A WAITLIST CALL
056788,000204: 
056789,000205: 01,3706           50156                           NDX      POINTER                               #  OBTAIN THE ORIGINAL DELTA T
056790,000206: 01,3707           32000                           CA       PRDTTAB                               #  ADDRESS FOR THIS LONGCALL
056791,000207: 
056792,000208: 01,3710           15456                           TCF      ITSLGCL1                              #  NOW GO GET THE DELTA TIME
056793,000209: 
056794,000210:                                                                                                  #  ***** THIS MUST BE IN FIXED FIXED *****
056795,000211: 
056796,000212:    5456                                           BLOCK    02                                    
056797,000213:    4000                                           SETLOC   FFTAG2                                
056798,000214:    4000                                           BANK                                           
056799,000215: 
056800,000216:    5456                                           COUNT*   $$/RSROU                              
056801,000217:    5456           22706        ITSLGCL1           LXCH     GOLOC      +1                         #  OBTAIN THE CORRECT E BANK
056802,000218:    5457           22006                           LXCH     BB                                    
056803,000219:    5460           22706                           LXCH     GOLOC      +1                         #  AND PRESERVE OUR E AND F BANKS
056804,000220: 
056805,000221:    5461           00006                           EXTEND                                         #  GET THE DELTA TIME
056806,000222:    5462           50000                           NDX      A                                     
056807,000223:    5463           30001                           DCA      0                                     
056808,000224: 
056809,000225:    5464           22706                           LXCH     GOLOC      +1                         #  RESTORE OUR E AND F BANK
056810,000226:    5465           22006                           LXCH     BB                                    #  RESTORE THE TASKS E AND F BANKS
056811,000227:    5466           22706                           LXCH     GOLOC      +1                         #  AND PRESERVE OUR L
056812,000228: 

Page 1296

056814,000230:    5467           13711                           TCF      ITSLGCL2                              #  NOW LET:S PROCESS THIS LONGCALL
056815,000231: 
056816,000232:                                                                                                  #  ***** YOU  MAY RETURN  TO SWITCHED FIXED *****
056817,000233: 
056818,000234: 01,3711                                           BANK     01                                    
056819,000235: 01,2000                                           SETLOC   RESTART                               
056820,000236: 01,2000                                           BANK                                           
056821,000237: 
056822,000238: 01,3711                                           COUNT*   $$/RSROU                              
056823,000239: 01,3711           53153        ITSLGCL2           DXCH     LONGTIME                              
056824,000240: 
056825,000241: 01,3712           00006                           EXTEND                                         #  CALCULATE TIME LEFT
056826,000242: 01,3713           40025                           DCS      TIME2                                 
056827,000243: 01,3714           21153                           DAS      LONGTIME                              
056828,000244: 01,3715           00006                           EXTEND                                         
056829,000245: 01,3716           31151                           DCA      LONGBASE                              
056830,000246: 01,3717           21153                           DAS      LONGTIME                              
056831,000247: 
056832,000248: 01,3720           11152                           CCS      LONGTIME                              #  FIND OUT HOW THIS SHOULD BE RESTARTED
056833,000249: 01,3721           13731                           TCF      LONGCLCL                              
056834,000250: 01,3722           13724                           TCF      +2                                    
056835,000251: 01,3723           13617                           TCF      IMEDIATE   -3                         
056836,000252: 01,3724           11153                           CCS      LONGTIME   +1                         
056837,000253: 01,3725           13731                           TCF      LONGCLCL                              
056838,000254: 01,3726           13727                           NOOP                                           #  CAN:T GET HERE    *********
056839,000255: 01,3727           13617                           TCF      IMEDIATE   -3                         
056840,000256: 01,3730           13622                           TCF      IMEDIATE                              
056841,000257: 
056842,000258: 01,3731           33774        LONGCLCL           CA       LGCLCADR                              #  WE WILL GO TO LONGCALL
056843,000259: 01,3732           54704                           TS       GOLOC      -1                         
056844,000260: 
056845,000261: 01,3733           00006                           EXTEND                                         #  PREPARE OUR ENTRY TO LONGCALL
056846,000262: 01,3734           31153                           DCA      LONGTIME                              
056847,000263: 01,3735           00704                           TC       GOLOC      -1                         
056848,000264: 
056849,000265: 01,3736           34352        ITSLNGCL           CA       WTLTCADR                              #  ASSUME IT WILL GO TO WAITLIST
056850,000266: 01,3737           54704                           TS       GOLOC      -1                         
056851,000267: 
056852,000268: 01,3740           50155                           NDX      TEMP2G                                
056853,000269: 01,3741           41053                           CS       PHSPRDT1                              #  GET THE DELTA T ADDRESS
056854,000270: 
056855,000271: 01,3742           15456                           TCF      ITSLGCL1                              #  NOW GET THE DELTA TIME
056856,000272: 
056857,000273: 01,3743           40706        ITSWTLST           CS       GOLOC      +1                         #  CORRECT THE BBCON INFORMATION
056858,000274: 01,3744           54706                           TS       GOLOC      +1                         
056859,000275: 
056860,000276: 01,3745           50156                           NDX      POINTER                               #  GET THE DT AND FIND OUT IF IT WAS STORED
056861,000277: 01,3746           32000                           CA       PRDTTAB                               #  DIRECTLY OR INDIRECTLY
056862,000278: 
056863,000279: 01,3747           13576                           TCF      TIMETEST                              #  FIND OUT HOW THE TIME IS STORED
056864,000280: 

Page 1297

056866,000282: 01,3750           56705        ITSAJOB2           XCH      GOLOC                                 #  STORE THE CADR
056867,000283: 
056868,000284: 01,3751           50156                           NDX      POINTER                               #  ADD THE PRIORITY AND LET:S GO
056869,000285: 01,3752           32000                           CA       PRDTTAB                               
056870,000286: 
056871,000287: 01,3753           13641                           TCF      CHKNOVAC                              
056872,000288: 
056873,000289: 01,3754           30157        ITSEVEN            CA       TEMPSWCH                              #  SET UP FOR EITHER THE SECOND PART OF THE
056874,000290: 01,3755           54707                           TS       GOLOC      +2                         #  TABLE, OR A RETURN FOR THE NEXT GROUP
056875,000291: 
056876,000292: 01,3756           50155                           NDX      TEMP2G                                #  SET UP POINTER FOR OUR LOCATION WITHIN
056877,000293: 01,3757           32002                           CA       SIZETAB                               #  THE TABLE
056878,000294: 01,3760           60154                           AD       TEMPPHS                               #  THIS MAY LOOK BAD BUT LET:S SEE YOU DO
056879,000295: 01,3761           60154                           AD       TEMPPHS                               #  BETTER IN TIME OR NUMBERR OF LOCATIONS
056880,000296: 01,3762           60154                           AD       TEMPPHS                               
056881,000297: 01,3763           54156                           TS       POINTER                               
056882,000298: 
056883,000299: 01,3764           13667                           TCF      CONTBL2                               #  NOW PROCESS WHAT IS IN THE TABLE
056884,000300: 
056885,000301: 01,3765           36257        PHSPART2           CA       THREE                                 #  SET THE POINTER FOR THE SECOND HALF OF
056886,000302: 01,3766           26156                           ADS      POINTER                               #  THE TABLE
056887,000303: 
056888,000304: 01,3767           33567                           CA       RTRNCADR                              #  THIS WILL BE OUR LAST TIME THROUGH THE
056889,000305: 01,3770           54707                           TS       GOLOC      +2                         #  EVEN TABLE , SO AFTER IT  GET THE NEXT
056890,000306:                                                                                                  #  GROUP
056891,000307: 01,3771           13667                           TCF      CONTBL2                               #  SO LET:S GET THE SECOND ENTRY IN THE TBL
056892,000308: 
056893,000309: 01,3772     0154               TEMPPHS            EQUALS   MPAC                                  
056894,000310: 01,3772     0155               TEMP2G             EQUALS   MPAC       +1                         
056895,000311: 01,3772     0156               POINTER            EQUALS   MPAC       +2                         
056896,000312: 01,3772     0157               TEMPSWCH           EQUALS   MPAC       +3                         
056897,000313: 01,3772     7760               MINUS2             EQUALS   NEG2                                  
056898,000314: 01,3772     6106               OCT177             EQUALS   LOW7                                  
056899,000315: 
056900,000316: 01,3772           03765        PHS2CADR           GENADR   PHSPART2                              
056901,000317: 01,3773           03543        PRT2CADR           GENADR   GETPART2                              
056902,000318: 01,3774           05310        LGCLCADR           GENADR   LONGCALL                              
056903,000319: 01,3775     4354               FVACCADR           =        TCFINDVC                              
056904,000320: 01,3775     4352               WTLTCADR           =        TCWAIT                                
056905,000321: 01,3775     4351               NOVACADR           =        TCNOVAC                               
056906,000322: 
056907,000323: 

End of include-file RESTARTS_ROUTINE.agc.  Parent file is MAIN.agc