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.

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

Page 1362

059691,000023: 10,3526                                           BANK     10                                    
059692,000024: 10,2000                                           SETLOC   DISPLAYS                              
059693,000025: 10,2000                                           BANK                                           
059694,000026: 10,3526                                           COUNT*   $$/DSPLA                              
059695,000027: 
059696,000028: 10,3526           00004        UPENT2             INHINT                                         
059697,000029: 10,3527           75661                           MASK     OCT77770                              
059698,000030: 10,3530           54001                           TS       L                                     
059699,000031: 10,3531           40100                           CS       FLAGWRD4                              
059700,000032: 10,3532           70001                           MASK     L                                     
059701,000033: 10,3533           26100                           ADS      FLAGWRD4                              
059702,000034: 10,3534           00003        JOIN               RELINT                                         
059703,000035: 10,3535           16751                           TCF      Q+1                                   
059704,000036: 
059705,000037: 10,3536           00004        DOWNENT2           INHINT                                         
059706,000038: 10,3537           75661                           MASK     OCT77770                              
059707,000039: 10,3540           40000                           COM                                            
059708,000040: 10,3541           70100                           MASK     FLAGWRD4                              
059709,000041: 10,3542           54100                           TS       FLAGWRD4                              
059710,000042: 10,3543           13534                           TCF      JOIN                                  
059711,000043: 
059712,000044: 10,3544     4757               OCT7               EQUALS   SEVEN                                 
059713,000045: 

Page 1363

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

Page 1364

059765,000097:    5544           00006                           EXTEND                                         
059766,000098:    5545           10061                           DV       ITEMP1                                #  A = FLAGWRD, L = (15 - BIT)
059767,000099:    5546           52062                           DXCH     ITEMP1                                
059768,000100:    5547           50061                           INDEX    ITEMP1                                
059769,000101:    5550           30074                           CA       FLAGWRD0                              
059770,000102:    5551           54001                           TS       L                                     #  CURRENT STATE
059771,000103:    5552           50062                           INDEX    ITEMP2                                
059772,000104:    5553           44735                           CS       BIT15                                 #  -(15 - BIT)
059773,000105:    5554           00002                           TC       Q                                     
059774,000106: 

Page 1365

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

Page 1366

059828,000160: 00,3770           57323                           XCH      DELAYLOC                              #  MAKE DELAYLOC AVAILABLE
059829,000161: 00,3771           05137                           TC       JOBWAKE                               
059830,000162: 
059831,000163: 00,3772           05272                           TC       TASKOVER                              
059832,000164: 
059833,000165: 00,3773           03760        TCSLEEP            GENADR   TCGETCAD   -2                         
059834,000166: 00,3774           03766        WAKECAD            GENADR   WAKER                                 
059835,000167: 

Page 1367

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

Page 1368

059884,000216:                                                                                                  #  B5OFF   ZERO BIT 5 OF EXTVBACT, WHICH IS SET BY TESTXACT.
059885,000217: 
059886,000218:                                                                                                  #           MAY BE USED AS NEEDED BY ANY EXTENDED VERB WHICH HAS DONE TESTXACT
059887,000219: 
059888,000220:    5574                                           COUNT*   $$/EXTVB                              
059889,000221: 
059890,000222:    5574           44747        B5OFF              CS       BIT5                                  
059891,000223:    5575           71043                           MASK     EXTVBACT                              
059892,000224:    5576           55043                           TS       EXTVBACT                              
059893,000225:    5577           05155                           TC       ENDOFJOB                              

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