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.

059656,000002:                                                                                                  ## Copyright:   Public domain.
059657,000003:                                                                                                  ## Filename:    SERVICE_ROUTINES.agc
059658,000004:                                                                                                  ## Purpose:     A log section of Zerlina 56, the final revision of
059659,000005:                                                                                                  ##              Don Eyles's offline development program for the variable 
059660,000006:                                                                                                  ##              guidance period servicer. It also includes a new P66 with LPD 
059661,000007:                                                                                                  ##              (Landing Point Designator) capability, based on an idea of John 
059662,000008:                                                                                                  ##              Young's. Neither of these advanced features were actually flown,
059663,000009:                                                                                                  ##              but Zerlina was also the birthplace of other big improvements to
059664,000010:                                                                                                  ##              Luminary including the terrain model and new (Luminary 1E)
059665,000011:                                                                                                  ##              analog display programs. Zerlina was branched off of Luminary 145,
059666,000012:                                                                                                  ##              and revision 56 includes all changes up to and including Luminary
059667,000013:                                                                                                  ##              183. It is therefore quite close to the Apollo 14 program,
059668,000014:                                                                                                  ##              Luminary 178, where not modified with new features.
059669,000015:                                                                                                  ## Reference:   pp. 1362-1368
059670,000016:                                                                                                  ## Assembler:   yaYUL
059671,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059672,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
059673,000019:                                                                                                  ## Mod history: 2017-07-28 MAS  Created from Luminary 210.
059674,000020:                                                                                                  ##              2017-08-29 MAS  Updated for Zerlina 56.
059675,000021: 

Page 1362

059677,000023: 10,3526                                           BANK     10                                    
059678,000024: 10,2000                                           SETLOC   DISPLAYS                              
059679,000025: 10,2000                                           BANK                                           
059680,000026: 10,3526                                           COUNT*   $$/DSPLA                              
059681,000027: 
059682,000028: 10,3526           00004        UPENT2             INHINT                                         
059683,000029: 10,3527           75661                           MASK     OCT77770                              
059684,000030: 10,3530           54001                           TS       L                                     
059685,000031: 10,3531           40100                           CS       FLAGWRD4                              
059686,000032: 10,3532           70001                           MASK     L                                     
059687,000033: 10,3533           26100                           ADS      FLAGWRD4                              
059688,000034: 10,3534           00003        JOIN               RELINT                                         
059689,000035: 10,3535           16751                           TCF      Q+1                                   
059690,000036: 
059691,000037: 10,3536           00004        DOWNENT2           INHINT                                         
059692,000038: 10,3537           75661                           MASK     OCT77770                              
059693,000039: 10,3540           40000                           COM                                            
059694,000040: 10,3541           70100                           MASK     FLAGWRD4                              
059695,000041: 10,3542           54100                           TS       FLAGWRD4                              
059696,000042: 10,3543           13534                           TCF      JOIN                                  
059697,000043: 
059698,000044: 10,3544     4757               OCT7               EQUALS   SEVEN                                 
059699,000045: 

Page 1363

059701,000047:                                                                                                  #      UPFLAG AND DOWNFLAG ARE ENTIRELY GENERAL FLAG SETTING AND CLEARING SUBROUTINES.   USING THEM, WHETHER OR
059702,000048:                                                                                                  #  NOT IN INTERRUPT, ONE MAY SET OR CLEAR ANY SINGLE, NAMED BIT IN ANY ERASABLE REGISTER, SUBJECT OF COURSE TO
059703,000049:                                                                                                  #  EBANK SETTING.   A "NAMED" BIT, AS THE WORD IS USED HERE, IS ANY BIT WITH A NAME FORMALLY ASSIGNED BY THE YUL
059704,000050:                                                                                                  #  ASSEMBLER.
059705,000051: 
059706,000052:                                                                                                  #      AT PRESENT THE ONLY NAMED BITS ARE THOSE IN THE FLAGWORDS.   ASSEMBLER CHANGES WILL MAKE IT POSSIBLE TO
059707,000053:                                                                                                  #  NAME ANY BIT IN ERASABLE MEMORY.
059708,000054: 
059709,000055:                                                                                                  #      CALLING SEQUENCES ARE AS FOLLOWS:-
059710,000056: 
059711,000057:                                                                                                  #                      TC     UPFLAG                    TC     DOWNFLAG
059712,000058:                                                                                                  #                      ADRES  NAME OF FLAG              ADRES  NAME OF FLAG
059713,000059: 
059714,000060:                                                                                                  #      RETURN IS TO THE LOCATION FOLLOWING THE "ADRES" ABOUT .58 MS AFTER THE "TC".
059715,000061: 
059716,000062:                                                                                                  #      UPON RETURN A CONTAINS THE CURRENT FLAGWRD SETTING.
059717,000063: 
059718,000064:    5515                                           BLOCK    02                                    
059719,000065:    4000                                           SETLOC   FFTAG1                                
059720,000066:    4000                                           BANK                                           
059721,000067:    5515                                           COUNT*   $$/FLAG                               
059722,000068: 
059723,000069:    5515           30002        UPFLAG             CA       Q                                     
059724,000070:    5516           05533                           TC       DEBIT                                 
059725,000071:    5517           40000                           COM                                            #  +(15 - BIT)
059726,000072:    5520           00006                           EXTEND                                         
059727,000073:    5521           04001                           ROR      LCHAN                                 #  SET BIT
059728,000074:    5522           50061        COMFLAG            INDEX    ITEMP1                                
059729,000075:    5523           54074                           TS       FLAGWRD0                              
059730,000076:    5524           22063                           LXCH     ITEMP3                                
059731,000077:    5525           00003                           RELINT                                         
059732,000078:    5526           00001                           TC       L                                     
059733,000079: 
059734,000080: 
059735,000081:    5527           30002        DOWNFLAG           CA       Q                                     
059736,000082:    5530           05533                           TC       DEBIT                                 
059737,000083:    5531           70001                           MASK     L                                     #  RESET BIT
059738,000084:    5532           15522                           TCF      COMFLAG                               
059739,000085: 
059740,000086: 
059741,000087:    5533           64753        DEBIT              AD       ONE                                   #  GET DE BITS
059742,000088:    5534           00004                           INHINT                                         
059743,000089:    5535           54063                           TS       ITEMP3                                
059744,000090:    5536           34762                           CA       LOW4                                  #  DEC15
059745,000091:    5537           54061                           TS       ITEMP1                                
059746,000092:    5540           50063                           INDEX    ITEMP3                                
059747,000093:    5541           27777                           CA       0          -1                         #  ADRES
059748,000094:    5542           54001                           TS       L                                     
059749,000095:    5543           34755                           CA       ZERO                                  

Page 1364

059751,000097:    5544           00006                           EXTEND                                         
059752,000098:    5545           10061                           DV       ITEMP1                                #  A = FLAGWRD, L = (15 - BIT)
059753,000099:    5546           52062                           DXCH     ITEMP1                                
059754,000100:    5547           50061                           INDEX    ITEMP1                                
059755,000101:    5550           30074                           CA       FLAGWRD0                              
059756,000102:    5551           54001                           TS       L                                     #  CURRENT STATE
059757,000103:    5552           50062                           INDEX    ITEMP2                                
059758,000104:    5553           44735                           CS       BIT15                                 #  -(15 - BIT)
059759,000105:    5554           00002                           TC       Q                                     
059760,000106: 

Page 1365

059762,000108:                                                                                                  #  DELAYJOB- A GENERAL ROUTINE TO DELAY A JOB A SPECIFIC AMOUNT OF TIME BEFORE PICKING UP AGAIN.
059763,000109: 
059764,000110:                                                                                                  #  ENTRANCE REQUIREMENTS...
059765,000111:                                                                                                  #                                                   CAF    DT              DELAY JOB FOR DT CENTISECS
059766,000112:                                                                                                  #                                                   TC     BANKCALL
059767,000113:                                                                                                  #                                                   CADR   DELAYJOB
059768,000114: 
059769,000115: 06,3772                                           BANK     06                                    
059770,000116: 00,2000                                           SETLOC   DLAYJOB                               
059771,000117: 00,2000                                           BANK                                           
059772,000118: 
059773,000119:                                                                                                  #  THIS MUST REMAIN IN BANK 0 *****************************************
059774,000120: 00,3735                                           COUNT*   $$/DELAY                              
059775,000121: 00,3735           35000        2SECDELY           CAF      2SECS                                 
059776,000122: 00,3736           00004        DELAYJOB           INHINT                                         
059777,000123: 00,3737           54002                           TS       Q                                     #  STORE DELAY DT IN Q FOR DLY -1 IN
059778,000124: 
059779,000125: 00,3740           34752                           CAF      DELAYNUM                              #  WAITLIST
059780,000126: 00,3741           54070        DELLOOP            TS       RUPTREG1                              
059781,000127: 00,3742           50000                           INDEX    A                                     
059782,000128: 00,3743           31323                           CA       DELAYLOC                              #  IS THIS DELAYLOC AVAILABLE
059783,000129: 00,3744           00006                           EXTEND                                         
059784,000130: 00,3745           13753                           BZF      OK2DELAY                              #  YES
059785,000131: 
059786,000132: 00,3746           10070                           CCS      RUPTREG1                              #  NO, TRY NEXT DELAYLOC
059787,000133: 00,3747           13741                           TCF      DELLOOP                               
059788,000134: 
059789,000135: 00,3750           52134                           DXCH     BUF2                                  
059790,000136: 00,3751           05717                           TC       BAILOUT1                              #  NO AVAILABLE LOCS.
059791,000137: 00,3752           31104                           OCT      31104                                 
059792,000138: 
059793,000139: 00,3753           33773        OK2DELAY           CA       TCSLEEP                               #  SET WAITLIST IMMEDIATE RETURN
059794,000140: 00,3754           54061                           TS       WAITEXIT                              
059795,000141: 
059796,000142: 00,3755           30004                           CA       FBANK                                 
059797,000143: 00,3756           60070                           AD       RUPTREG1                              #  STORE BBANK FOR TASK CALL
059798,000144: 00,3757           54001                           TS       L                                     
059799,000145: 
059800,000146: 00,3760           33774                           CAF      WAKECAD                               #  STORE CADR FOR TASK CALL
059801,000147: 00,3761           15222                           TCF      DLY2       -1                         #  DLY IS IN WAITLIST ROUTINE
059802,000148: 
059803,000149: 00,3762           04645        TCGETCAD           TC       MAKECADR                              #  GET CALLERS FCADR
059804,000150: 
059805,000151: 00,3763           50070                           INDEX    RUPTREG1                              
059806,000152: 00,3764           55323                           TS       DELAYLOC                              #  SAVE DELAY CADRS
059807,000153: 
059808,000154: 00,3765           05133                           TC       JOBSLEEP                              
059809,000155: 
059810,000156: 00,3766           34755        WAKER              CAF      ZERO                                  
059811,000157: 00,3767           50006                           INDEX    BBANK                                 
059812,000158: 

Page 1366

059814,000160: 00,3770           57323                           XCH      DELAYLOC                              #  MAKE DELAYLOC AVAILABLE
059815,000161: 00,3771           05137                           TC       JOBWAKE                               
059816,000162: 
059817,000163: 00,3772           05272                           TC       TASKOVER                              
059818,000164: 
059819,000165: 00,3773           03760        TCSLEEP            GENADR   TCGETCAD   -2                         
059820,000166: 00,3774           03766        WAKECAD            GENADR   WAKER                                 
059821,000167: 

Page 1367

059823,000169:                                                                                                  #  GENTRAN, A BLOCK TRANSFER ROUTINE.
059824,000170: 
059825,000171:                                                                                                  #  WRITTEN BY D. EYLES
059826,000172:                                                                                                  #  MOD 1 BY KERNAN                                                         UTILITYM REV 17 11/18/67
059827,000173: 
059828,000174:                                                                                                  #  MOD 2 BY SCHULENBERG  (REMOVE RELINT)   SKIPPER REV 4 2/28/68
059829,000175: 
059830,000176:                                                                                                  #           THIS ROUTINE IS USEFULL FOR TRANSFERING N CONSECUTIVE ERASABLE OR FIXED QUANTITIES TO SOME OTHER N
059831,000177:                                                                                                  #  CONSECUTIVE ERASABLE LOCATIONS.  IF BOTH BLOCKS OF DATA ARE IN SWITCHABLE EBANKS, THEY MUST BE IN THE SAME ONE.
059832,000178: 
059833,000179:                                                                                                  #           GENTRAN IS CALLABLE IN A JOB AS WELL AS A RUPT.  THE CALLING SEQUENCE IS:
059834,000180: 
059835,000181:                                                                                                  #                                          I        CA     N-1             # OF QUANTITIES MINUS ONE.
059836,000182:                                                                                                  #                                          I +1     TC     GENTRAN         IN FIXED-FIXED.
059837,000183:                                                                                                  #                                          I +2     ADRES  L               STARTING ADRES OF DATA TO BE MOVED.
059838,000184:                                                                                                  #                                          I +3     ADRES  M               STARTING ADRES OF DUPLICATION BLOCK.
059839,000185:                                                                                                  #                                          I +4                            RETURNS HERE.
059840,000186: 
059841,000187:                                                                                                  #           GENTRAN TAKES 25 MCT'S (300 MICROSECONDS) PER ITEM + 5 MCT'S (60 MICS) FOR ENTERING AND EXITING.
059842,000188: 
059843,000189:                                                                                                  #           A, L AND ITEMP1 ARE NOT PRESERVED.
059844,000190: 
059845,000191:    5555                                           BLOCK    02                                    
059846,000192:    4000                                           SETLOC   FFTAG4                                
059847,000193:    4000                                           BANK                                           
059848,000194: 
059849,000195:    5555     0061                                  EBANK=   ITEMP1                                
059850,000196: 
059851,000197:    5555                                           COUNT*   $$/TRAN                               
059852,000198: 
059853,000199:    5555           00004        GENTRAN            INHINT                                         
059854,000200:    5556           54061                           TS       ITEMP1                                #  SAVE N-1.
059855,000201:    5557           50002                           INDEX    Q                                     #  C(Q) = ADRES L.
059856,000202:    5560           60000                           AD       0                                     #  ADRES (L + N - 1).
059857,000203:    5561           50000                           INDEX    A                                     
059858,000204:    5562           30000                           CA       0                                     #  C(ABOVE).
059859,000205:    5563           54001                           TS       L                                     #  SAVE DATA.
059860,000206:    5564           30061                           CA       ITEMP1                                
059861,000207:    5565           50002                           INDEX    Q                                     
059862,000208:    5566           60001                           AD       1                                     #  ADRES (M + N - 1).
059863,000209:    5567           50000                           INDEX    A                                     
059864,000210:    5570           22000                           LXCH     0                                     #  STUFF IT.
059865,000211:    5571           10061                           CCS      ITEMP1                                #  LOOP UNTIL N-1 = 0.
059866,000212:    5572           15556                           TCF      GENTRAN    +1                         
059867,000213:    5573           16753                           TCF      Q+2                                   #  RETURN TO CALLER.
059868,000214: 

Page 1368

059870,000216:                                                                                                  #  B5OFF   ZERO BIT 5 OF EXTVBACT, WHICH IS SET BY TESTXACT.
059871,000217: 
059872,000218:                                                                                                  #           MAY BE USED AS NEEDED BY ANY EXTENDED VERB WHICH HAS DONE TESTXACT
059873,000219: 
059874,000220:    5574                                           COUNT*   $$/EXTVB                              
059875,000221: 
059876,000222:    5574           44747        B5OFF              CS       BIT5                                  
059877,000223:    5575           71043                           MASK     EXTVBACT                              
059878,000224:    5576           55043                           TS       EXTVBACT                              
059879,000225:    5577           05155                           TC       ENDOFJOB                              

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