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.

030701,000002:                                                                                                  ## Copyright:   Public domain.
030702,000003:                                                                                                  ## Filename:    R31.agc
030703,000004:                                                                                                  ## Purpose:     A log section of Zerlina 56, the final revision of
030704,000005:                                                                                                  ##              Don Eyles's offline development program for the variable 
030705,000006:                                                                                                  ##              guidance period servicer. It also includes a new P66 with LPD 
030706,000007:                                                                                                  ##              (Landing Point Designator) capability, based on an idea of John 
030707,000008:                                                                                                  ##              Young's. Neither of these advanced features were actually flown,
030708,000009:                                                                                                  ##              but Zerlina was also the birthplace of other big improvements to
030709,000010:                                                                                                  ##              Luminary including the terrain model and new (Luminary 1E)
030710,000011:                                                                                                  ##              analog display programs. Zerlina was branched off of Luminary 145,
030711,000012:                                                                                                  ##              and revision 56 includes all changes up to and including Luminary
030712,000013:                                                                                                  ##              183. It is therefore quite close to the Apollo 14 program,
030713,000014:                                                                                                  ##              Luminary 178, where not modified with new features.
030714,000015:                                                                                                  ## Reference:   pp. 698-702
030715,000016:                                                                                                  ## Assembler:   yaYUL
030716,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
030717,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
030718,000019:                                                                                                  ## Mod history: 2017-07-28 MAS  Created from Luminary 210.
030719,000020:                                                                                                  ##              2017-08-27 MAS  Updated for Zerlina 56.
030720,000021: 

Page 698

030722,000023: 40,3734                                           BANK     40                                    
030723,000024: 40,2000                                           SETLOC   R31LOC                                
030724,000025: 40,2000                                           BANK                                           
030725,000026: 
030726,000027: 40,3734                                           COUNT*   $$/R31                                
030727,000028: 
030728,000029: 40,3734           35015        R31CALL            CAF      PRIO3                                 
030729,000030: 40,3735           05105                           TC       FINDVAC                               
030730,000031: 40,3736  E7,1470                                  EBANK=   SUBEXIT                               
030731,000032: 40,3736           03262 76067                     2CADR    V83CALL                               
030732,000033: 
030733,000034: 40,3740           05232        DSPDELAY           TC       FIXDELAY                              
030734,000035: 40,3741           00144                           DEC      100        B-14                       
030735,000036: 40,3742           31043                           CA       EXTVBACT                              
030736,000037: 40,3743           74740                           MASK     BIT12                                 
030737,000038: 40,3744           00006                           EXTEND                                         
030738,000039: 40,3745           13740                           BZF      DSPDELAY                              
030739,000040: 
030740,000041: 40,3746           35017                           CAF      PRIO5                                 
030741,000042: 40,3747           05072                           TC       NOVAC                                 
030742,000043: 40,3750  E7,1611                                  EBANK=   TSTRT                                 
030743,000044: 40,3750           03754 60107                     2CADR    DISPN5X                               
030744,000045: 
030745,000046: 40,3752           15272                           TCF      TASKOVER                              
030746,000047: 
030747,000048: 40,3753           04066        V16N54             VN       1654                                  
030748,000049: 40,3754           33753        DISPN5X            CAF      V16N54                                
030749,000050: 40,3755           04616                           TC       BANKCALL                              
030750,000051: 40,3756           20334                           CADR     GOMARKF                               
030751,000052: 40,3757           05574                           TC       B5OFF                                 
030752,000053: 40,3760           05574                           TC       B5OFF                                 
030753,000054: 40,3761           13754                           TCF      DISPN5X                               
030754,000055: 
030755,000056: 37,3262                                           BANK     37                                    
030756,000057: 37,2000                                           SETLOC   R31                                   
030757,000058: 37,2000                                           BANK                                           
030758,000059: 
030759,000060: 37,3262           40103        V83CALL            CS       FLAGWRD7                              #  TEST AVERAGE G FLAG
030760,000061: 37,3263           74747                           MASK     AVEGFBIT                              
030761,000062: 37,3264           00006                           EXTEND                                         
030762,000063: 37,3265           13540                           BZF      MUNG?                                 #  ON - TEST MUNFLAG
030763,000064: 
030764,000065: 37,3266           40104                           CS       FLAGWRD8                              
030765,000066: 37,3267           74744                           MASK     SURFFBIT                              
030766,000067: 37,3270           00006                           EXTEND                                         
030767,000068: 37,3271           13544                           BZF      ONEBASE                               #  ON SURFACE - BYPASS LEMPREC
030768,000069: 
030769,000070: 37,3272           06051                           TC       INTPRET                               #  EXTRAPOLATE BOTH STATE VECTORS
030770,000071: 37,3273           77634                           RTB                                            

Page 699

030772,000073: 37,3274           21555                                    LOADTIME                              
030773,000074: 37,3275           34041                           STCALL   TDEC1                                 
030774,000075: 37,3276           27056                                    LEMPREC                               #  PRECISION BASE VECTOR FOR LM
030775,000076: 37,3277           77775                           VLOAD                                          
030776,000077: 37,3300           00017                                    RATT1                                 
030777,000078: 37,3301           26161                           STOVL    BASETHP                               
030778,000079: 37,3302           00025                                    VATT1                                 
030779,000080: 37,3303           16104                           STODL    BASETHV                               
030780,000081: 37,3304           00015                                    TAT                                   
030781,000082: 37,3305           02113        DOCMBASE           STORE    BASETIME                              #  PRECISION BASE VECTOR FOR CM
030782,000083: 37,3306           34041                           STCALL   TDEC1                                 
030783,000084: 37,3307           27042                                    CSMPREC                               
030784,000085: 37,3310           77775                           VLOAD                                          
030785,000086: 37,3311           00017                                    RATT1                                 
030786,000087: 37,3312           26131                           STOVL    BASEOTP                               
030787,000088: 37,3313           00025                                    VATT1                                 
030788,000089: 37,3314           02172                           STORE    BASEOTV                               
030789,000090: 37,3315           77776                           EXIT                                           
030790,000091: 
030791,000092: 37,3316           40103        REV83              CS       FLAGWRD7                              
030792,000093: 37,3317           74747                           MASK     AVEGFBIT                              
030793,000094: 37,3320           00006                           EXTEND                                         
030794,000095: 37,3321           13467                           BZF      GETRVN                                #  IF AVEGFLAG SET, USE RN,VN
030795,000096: 
030796,000097: 37,3322           40104                           CS       FLAGWRD8                              
030797,000098: 37,3323           74744                           MASK     SURFFBIT                              
030798,000099: 37,3324           00006                           EXTEND                                         
030799,000100: 37,3325           13531                           BZF      R31SURF                               #  IF ON SURFACE,USE LEMAREC
030800,000101: 
030801,000102: 37,3326           06051                           TC       INTPRET                               #  DO CONIC EXTRAPOLATION FOR BOTH VEHICLES
030802,000103: 37,3327           77634                           RTB                                            
030803,000104: 37,3330           21555                                    LOADTIME                              
030804,000105: 37,3331           34041                           STCALL   TDEC1                                 
030805,000106: 37,3332           27410                                    INTSTALL                              
030806,000107: 37,3333           43175                           VLOAD    CLEAR                                 
030807,000108: 37,3334           02161                                    BASETHP                               
030808,000109: 37,3335           00263                                    MOONFLAG                              
030809,000110: 37,3336           25535                           STOVL    RCV                                   
030810,000111: 37,3337           02104                                    BASETHV                               
030811,000112: 37,3340           15543                           STODL    VCV                                   
030812,000113: 37,3341           02113                                    BASETIME                              
030813,000114: 37,3342           43014                           BOF      SET                                   #  GET APPROPRIATE MOONFLAG SETTING
030814,000115: 37,3343           04344                                    MOONTHIS                              
030815,000116: 37,3344           77346                                    +2                                    
030816,000117: 37,3345           00063                                    MOONFLAG                              
030817,000118: 37,3346           77614                           SET                                            
030818,000119: 37,3347           01473                                    INTYPFLG                              #  CONIC EXTRAP.
030819,000120: 37,3350           35517                           STCALL   TET                                   
030820,000121: 37,3351           27106                                    INTEGRVS                              #  INTEGRATION --- AT LAST---
030821,000122: 37,3352           77775        OTHCONIC           VLOAD                                          

Page 700

030823,000124: 37,3353           00001                                    RATT                                  
030824,000125: 37,3354           26200                           STOVL    RONE                                  
030825,000126: 37,3355           00007                                    VATT                                  
030826,000127: 37,3356           36206                           STCALL   VONE                                  #  GET SET FOR CONIC EXTRAP.,OTHER.
030827,000128: 37,3357           27410                                    INTSTALL                              
030828,000129: 37,3360           71214                           SET      DLOAD                                 
030829,000130: 37,3361           01473                                    INTYPFLG                              
030830,000131: 37,3362           00015                                    TAT                                   
030831,000132: 37,3363           00041        OTHINT             STORE    TDEC1                                 
030832,000133: 37,3364           43175                           VLOAD    CLEAR                                 
030833,000134: 37,3365           02131                                    BASEOTP                               
030834,000135: 37,3366           00263                                    MOONFLAG                              
030835,000136: 37,3367           25535                           STOVL    RCV                                   
030836,000137: 37,3370           02172                                    BASEOTV                               
030837,000138: 37,3371           15543                           STODL    VCV                                   
030838,000139: 37,3372           02113                                    BASETIME                              
030839,000140: 37,3373           43014                           BOF      SET                                   
030840,000141: 37,3374           04344                                    MOONTHIS                              
030841,000142: 37,3375           77377                                    +2                                    
030842,000143: 37,3376           00063                                    MOONFLAG                              
030843,000144: 37,3377           35517                           STCALL   TET                                   
030844,000145: 37,3400           27106                                    INTEGRVS                              
030845,000146: 37,3401           52375        COMPDISP           VLOAD    VSU                                   
030846,000147: 37,3402           00001                                    RATT                                  
030847,000148: 37,3403           02200                                    RONE                                  
030848,000149: 37,3404           65234                           RTB      PDDL                                  
030849,000150: 37,3405           21706                                    NORMUNX1                              #  UNIT(RANGE) TO PD 0-5
030850,000151: 37,3406           00045                                    36D                                   
030851,000152: 37,3407           77657                           SL*                                            #  RESCALE AFTER NORMUNIT
030852,000153: 37,3410           20201                                    0,1                                   
030853,000154: 37,3411           26214                           STOVL    RANGE                                 #  SCALED 2(29)M
030854,000155: 37,3412           00007                                    VATT                                  
030855,000156: 37,3413           50251                           VSU      DOT                                   #  (VCM- VLM).UNIT(LOS), PD=0
030856,000157: 37,3414           02206                                    VONE                                  
030857,000158: 37,3415           77752                           SL1                                            #  SCALED 2(7)M/CS
030858,000159: 37,3416           26216                           STOVL    RRATE                                 
030859,000160: 37,3417           02200                                    RONE                                  
030860,000161: 37,3420           63256                           UNIT     PDVL                                  #  UNIT(R) TO PD 0-5
030861,000162: 37,3421           06512                                    UNITZ                                 
030862,000163: 37,3422           77624                           CALL                                           
030863,000164: 37,3423           47666                                    CDU*NBSM                              
030864,000165: 37,3424           41505                           VXM      PUSH                                  #  UNIT (Z)/4 TO PD 6-11
030865,000166: 37,3425           01732                                    REFSMMAT                              
030866,000167: 37,3426           72431                           VPROJ    VSL2                                  #  UNIT(P)=UNIT(UZ -(UZ)PROJ(UR))
030867,000168: 37,3427           00001                                    0D                                    
030868,000169: 37,3430           53445                           BVSU     UNIT                                  
030869,000170: 37,3431           00007                                    6D                                    
030870,000171: 37,3432           47315                           PDVL     VXV                                   #  UNIT(P) TO PD 12-17
030871,000172: 37,3433           00001                                    0D                                    #  UNIT(RL)
030872,000173: 37,3434           02206                                    VONE                                  

Page 701

030874,000175: 37,3435           50235                           VXV      DOT                                   #  (UR * VL)*UR . U(P)
030875,000176: 37,3436           00001                                    0D                                    
030876,000177: 37,3437           00015                                    12D                                   
030877,000178: 37,3440           77715                           PDVL                                           #  SIGN TO 12-13 , LOAD U(P)
030878,000179: 37,3441           75241                           DOT      SIGN                                  
030879,000180: 37,3442           00007                                    6D                                    
030880,000181: 37,3443           00015                                    12D                                   
030881,000182: 37,3444           65512                           SL2      ACOS                                  #  ARCCOS(UP.UZ(SIGN))
030882,000183: 37,3445           26220                           STOVL    RTHETA                                
030883,000184: 37,3446           00001                                    0D                                    
030884,000185: 37,3447           51041                           DOT      BPL                                   #  IF UR.UZ NEG,
030885,000186: 37,3450           00007                                    6D                                    #    RTHETA = 1 - RTHETA
030886,000187: 37,3451           77456                                    +5                                    
030887,000188: 37,3452           45345                           DLOAD    DSU                                   
030888,000189: 37,3453           06526                                    DPPOSMAX                              
030889,000190: 37,3454           02220                                    RTHETA                                
030890,000191: 37,3455           02220                           STORE    RTHETA                                
030891,000192: 37,3456           77776                           EXIT                                           
030892,000193: 
030893,000194: 37,3457           34747                           CA       BIT5                                  
030894,000195: 37,3460           71043                           MASK     EXTVBACT                              
030895,000196: 37,3461           00006                           EXTEND                                         #  IF ANSWERED,
030896,000197: 37,3462           15503                           BZF      ENDEXT                                #         TERMINATE
030897,000198: 
030898,000199: 37,3463           41043                           CS       EXTVBACT                              
030899,000200: 37,3464           74740                           MASK     BIT12                                 
030900,000201: 37,3465           27043                           ADS      EXTVBACT                              #  SET BIT 12
030901,000202: 37,3466           13316                           TCF      REV83                                 #  AND START AGAIN.
030902,000203: 
030903,000204: 37,3467           37722        GETRVN             CA       PRIO22                                #  INHIBIT SERVICER
030904,000205: 37,3470           05146                           TC       PRIOCHNG                              
030905,000206: 37,3471           06051                           TC       INTPRET                               
030906,000207: 37,3472           40375                           VLOAD    SETPD                                 
030907,000208: 37,3473           01220                                    RN                                    #  LM STATE VECTOR IN RN,VN
030908,000209: 37,3474           00001                                    0                                     
030909,000210: 37,3475           26200                           STOVL    RONE                                  
030910,000211: 37,3476           01226                                    VN                                    
030911,000212: 37,3477           26206                           STOVL    VONE                                  #  LOAD R(CSM),V(CSM) IN CASE MUNFLAG SET
030912,000213: 37,3500           01724                                    V(CSM)                                #  (TO INSURE TIME COMPATABILITY)
030913,000214: 37,3501           65315                           PDVL     PDDL                                  
030914,000215: 37,3502           01716                                    R(CSM)                                
030915,000216: 37,3503           01234                                    PIPTIME                               
030916,000217: 37,3504           77776                           EXIT                                           
030917,000218: 37,3505           35015                           CA       PRIO3                                 
030918,000219: 37,3506           05146                           TC       PRIOCHNG                              
030919,000220: 37,3507           06051                           TC       INTPRET                               
030920,000221: 37,3510           77214                           BOFF     VLOAD                                 
030921,000222: 37,3511           03347                                    MUNFLAG                               
030922,000223: 37,3512           77524                                    GETRVN2                               #  IF MUNFLAG RESET, DO CM DELTA PRECISION

Page 702

030924,000225: 37,3513           60505                           VXM      VSR4                                  #  CHANGE TO REFERENCE SYSTEM AND RESCALE
030925,000226: 37,3514           01732                                    REFSMMAT                              
030926,000227: 37,3515           77715                           PDVL                                           #  R TO PD 0-5
030927,000228: 37,3516           76505                           VXM      VSL1                                  
030928,000229: 37,3517           01732                                    REFSMMAT                              
030929,000230: 37,3520           40206                           PUSH     SETPD                                 #  V TO PD 5-11
030930,000231: 37,3521           00001                                    0                                     
030931,000232: 37,3522           77650                           GOTO                                           
030932,000233: 37,3523           77401                                    COMPDISP                              
030933,000234: 
030934,000235: 37,3524           77624        GETRVN2            CALL                                           
030935,000236: 37,3525           27410                                    INTSTALL                              
030936,000237: 37,3526           52014                           CLEAR    GOTO                                  
030937,000238: 37,3527           01673                                    INTYPFLG                              #  PREC EXTRAP FOR OTHER
030938,000239: 37,3530           77363                                    OTHINT                                
030939,000240: 37,3531           06051        R31SURF            TC       INTPRET                               
030940,000241: 37,3532           77634                           RTB                                            #  LM IS ON SURFACE, SO PRECISION
030941,000242: 37,3533           21555                                    LOADTIME                              #  INTEGRATION USES PLANETARY INERTIAL
030942,000243: 37,3534           34041                           STCALL   TDEC1                                 #  ORIENTATION SUBROUTINE
030943,000244: 37,3535           27056                                    LEMPREC                               
030944,000245: 37,3536           77650                           GOTO                                           #  DO CSM CONIC
030945,000246: 37,3537           77352                                    OTHCONIC                              
030946,000247: 37,3540           40102        MUNG?              CS       FLAGWRD6                              
030947,000248: 37,3541           74744                           MASK     MUNFLBIT                              
030948,000249: 37,3542           00006                           EXTEND                                         
030949,000250: 37,3543           13467                           BZF      GETRVN                                #  IF MUNFLAG SET, CSM BASE NOT NEEDED
030950,000251: 
030951,000252: 37,3544           06051        ONEBASE            TC       INTPRET                               #  GET CSM BASE VECTOR
030952,000253: 37,3545           52034                           RTB      GOTO                                  
030953,000254: 37,3546           21555                                    LOADTIME                              
030954,000255: 37,3547           77305                                    DOCMBASE                              

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