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.

022067,000002:                                                                                                  ## Copyright:   Public domain.
022068,000003:                                                                                                  ## Filename:    S-BAND_ANTENNA_FOR_LM.agc
022069,000004:                                                                                                  ## Purpose:     A log section of Zerlina 56, the final revision of
022070,000005:                                                                                                  ##              Don Eyles's offline development program for the variable 
022071,000006:                                                                                                  ##              guidance period servicer. It also includes a new P66 with LPD 
022072,000007:                                                                                                  ##              (Landing Point Designator) capability, based on an idea of John 
022073,000008:                                                                                                  ##              Young's. Neither of these advanced features were actually flown,
022074,000009:                                                                                                  ##              but Zerlina was also the birthplace of other big improvements to
022075,000010:                                                                                                  ##              Luminary including the terrain model and new (Luminary 1E)
022076,000011:                                                                                                  ##              analog display programs. Zerlina was branched off of Luminary 145,
022077,000012:                                                                                                  ##              and revision 56 includes all changes up to and including Luminary
022078,000013:                                                                                                  ##              183. It is therefore quite close to the Apollo 14 program,
022079,000014:                                                                                                  ##              Luminary 178, where not modified with new features.
022080,000015:                                                                                                  ## Reference:   pp. 494-497
022081,000016:                                                                                                  ## Assembler:   yaYUL
022082,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
022083,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
022084,000019:                                                                                                  ## Mod history: 2017-07-28 MAS  Created from Luminary 210.
022085,000020:                                                                                                  ##              2017-08-20 MAS  Updated for Zerlina 56.
022086,000021: 

Page 494

022088,000023:                                                                                                  #  SUBROUTINE NAME: R05 - S-BAND ANTENNA FOR LM
022089,000024: 
022090,000025:                                                                                                  #  MOD0 BY T. JAMES
022091,000026:                                                                                                  #  MOD1 BY P. SHAKIR
022092,000027: 
022093,000028:                                                                                                  #  FUNCTIONAL DESCRIPTION
022094,000029: 
022095,000030:                                                                                                  #      THE S-BAND ANTENNA ROUTINE, R05, COMPUTES AND DISPLAYS THE PITCH AND
022096,000031:                                                                                                  #  YAW ANTENNA GIMBAL ANGLES REQUIRED TO POINT THE LM STEERABLE ANTENNA
022097,000032:                                                                                                  #  TOWARD THE CENTER OF THE EARTH. THIS ROUTINE IS SELECTED BY THE ASTRO-
022098,000033:                                                                                                  #  NAUT VIA DSKY ENTRY DURING COASTING FLIGHT OR WHEN THE LM IS ON THE MOON
022099,000034:                                                                                                  #  SURFACE. THE EARTH OR MOON REFERENCE COORDINATE SYSTEM IS USED DEPENDING
022100,000035:                                                                                                  #  ON WHETHER THE LM IS ABOUT TO ENTER OR HAS ALREADY ENTERED THE MOON
022101,000036:                                                                                                  #  SPHERE OF INFLUENCE, RESPECTIVELY.  CAN BE CALLED ANY TIME EXCEPT WHEN
022102,000037:                                                                                                  #  ANOTHER EXTENDED VERB IS IN USE. DISPLAY IS MEANINGLESS WITH IMU OFF.
022103,000038: 
022104,000039:                                                                                                  #  TO CALL SUBROUTINE, ASTRONAUT KEYS IN V 64 E
022105,000040: 
022106,000041:                                                                                                  #  SUBROUTINES CALLED-
022107,000042: 
022108,000043:                                                                                                  #      INTPRET
022109,000044:                                                                                                  #      LOADTIME
022110,000045:                                                                                                  #      LEMCONIC
022111,000046:                                                                                                  #      LUNPOS
022112,000047:                                                                                                  #      CDUTRIG
022113,000048:                                                                                                  #      *SMNB*
022114,000049:                                                                                                  #      BANKCALL
022115,000050:                                                                                                  #      B5OFF
022116,000051:                                                                                                  #      ENDOFJOB
022117,000052:                                                                                                  #      BLANKET
022118,000053: 
022119,000054:                                                                                                  #  RETURNS WITH
022120,000055: 
022121,000056:                                                                                                  #      PITCH ANGLE IN PITCHANG  REV. B0
022122,000057:                                                                                                  #      YAW ANGLE IN YAWANG  REV. B0
022123,000058: 
022124,000059:                                                                                                  #  ERASABLES USED
022125,000060: 
022126,000061:                                                                                                  #      PITCHANG
022127,000062:                                                                                                  #      YAWANG
022128,000063:                                                                                                  #      RLM
022129,000064:                                                                                                  #      VAC AREA
022130,000065: 
022131,000066: 41,3775                                           BANK     41                                    
022132,000067: 42,2000                                           SETLOC   SBAND                                 
022133,000068: 42,2000                                           BANK                                           
022134,000069: 
022135,000070: 42,3614  E7,1471                                  EBANK=   WHOCARES                              
022136,000071: 42,3614                                           COUNT*   $$/R05                                
022137,000072: 42,3614           06051        SBANDANT           TC       INTPRET                               

Page 495

022139,000074: 42,3615           47001                           SETPD    RTB                                   
022140,000075: 42,3616           00001                                    0D                                    
022141,000076: 42,3617           21555                                    LOADTIME                              #  PICK UP CURRENT TIME
022142,000077: 42,3620           34041                           STCALL   TDEC1                                 #  ADVANCE INTEGRATION TO TIME IN TDEC1
022143,000078: 42,3621           27077                                    LEMCONIC                              #  USING CONIC INTEGRATION
022144,000079: 42,3622           46135                           SLOAD    BHIZ                                  
022145,000080: 42,3623           00050                                    X2                                    #  X2 =0 EARTH SPHERE, X2 =2 MOON SPHERE
022146,000081: 42,3624           65642                                    CONV4                                 
022147,000082: 42,3625           77775                           VLOAD                                          
022148,000083: 42,3626           00001                                    RATT                                  
022149,000084: 42,3627           16176                           STODL    RLM                                   
022150,000085: 42,3630           00015                                    TAT                                   
022151,000086: 42,3631           77624        CONV3              CALL                                           
022152,000087: 42,3632           33660                                    LUNPOS                                #  UNIT POSITION VECTOR FROM EARTH TO MOON
022153,000088: 42,3633           74375                           VLOAD    VXSC                                  
022154,000089: 42,3634           02723                                    VMOON                                 
022155,000090: 42,3635           24001                                    REMDIST                               #  MEAN DISTANCE FROM EARTH TO MOON
022156,000091: 42,3636           53372                           VSL1     VAD                                   
022157,000092: 42,3637           02176                                    RLM                                   
022158,000093: 42,3640           77650                           GOTO                                           
022159,000094: 42,3641           65644                                    CONV5                                 
022160,000095: 42,3642           77775        CONV4              VLOAD                                          
022161,000096: 42,3643           00001                                    RATT                                  #  UE = -UNIT(RATT)  EARTH SPHERE
022162,000097: 42,3644           53401        CONV5              SETPD    UNIT                                  #  UE = -UNIT((REM)(UEM) + RL)  MOON SPHERE
022163,000098: 42,3645           00001                                    0D                                    #  SET PL POINTER TO 0
022164,000099: 42,3646           45076                           VCOMP    CALL                                  
022165,000100: 42,3647           47535                                    CDUTRIG                               #  COMPUTE SINES AND COSINES OF CDU ANGLES
022166,000101: 42,3650           76521                           MXV      VSL1                                  #  TRANSFORM REF. COORDINATE SYSTEM TO
022167,000102: 42,3651           01732                                    REFSMMAT                              #  STABLE MEMBER  B-1 X B-1 X B+1 = B-1
022168,000103: 42,3652           71206                           PUSH     DLOAD                                 #  8D
022169,000104: 42,3653           06520                                    HI6ZEROS                              
022170,000105: 42,3654           02172                           STORE    PITCHANG                              
022171,000106: 42,3655           26174                           STOVL    YAWANG                                #  ZERO OUT ANGLES
022172,000107: 42,3656           77624                           CALL                                           
022173,000108: 42,3657           47676                                    *SMNB*                                
022174,000109: 42,3660           16176                           STODL    RLM                                   #  PRE-MULTIPLY RLM BY (NBSA) MATRIX(B0)
022175,000110: 42,3661           02200                                    RLM        +2                         
022176,000111: 42,3662           45206                           PUSH     DSU                                   
022177,000112: 42,3663           02176                                    RLM                                   
022178,000113: 42,3664           77605                           DMP                                            
022179,000114: 42,3665           25775                                    1OVSQRT2                              
022180,000115: 42,3666           16200                           STODL    RLM        +2                         
022181,000116: 42,3667           41215                           DAD      DMP                                   
022182,000117: 42,3670           02176                                    RLM                                   
022183,000118: 42,3671           25775                                    1OVSQRT2                              
022184,000119: 42,3672           26176                           STOVL    RLM                                   #  R  B-1
022185,000120: 42,3673           02176                                    RLM                                   
022186,000121: 42,3674           63256                           UNIT     PDVL                                  
022187,000122: 42,3675           02176                                    RLM                                   
022188,000123: 42,3676           72431                           VPROJ    VSL2                                  #  PROJECTION OF R ONTO LM XZ PLANE

Page 496

022190,000125: 42,3677           06514                                    HIUNITY                               
022191,000126: 42,3700           40045                           BVSU     BOV                                   #  CLEAR OVERFLOW INDICATOR IF ON
022192,000127: 42,3701           02176                                    RLM                                   
022193,000128: 42,3702           65703                                    COVCNV                                
022194,000129: 42,3703           40056        COVCNV             UNIT     BOV                                   #  EXIT ON OVERFLOW
022195,000130: 42,3704           65751                                    SBANDEX                               
022196,000131: 42,3705           47206                           PUSH     VXV                                   #  URP VECTOR  B-1
022197,000132: 42,3706           06512                                    HIUNITZ                               
022198,000133: 42,3707           57572                           VSL1     VCOMP                                 #  UZ X URP = -(URP X UZ)
022199,000134: 42,3710           02176                           STORE    RLM                                   #  X VEC  B-1
022200,000135: 42,3711           63241                           DOT      PDVL                                  #  SGN(X.UY) UNSCALED
022201,000136: 42,3712           06514                                    HIUNITY                               
022202,000137: 42,3713           02176                                    RLM                                   
022203,000138: 42,3714           75246                           ABVAL    SIGN                                  
022204,000139: 42,3715           77736                           ASIN                                           #  ASIN((SGN(X.UY))ABV(X)) REV B0
022205,000140: 42,3716           26172                           STOVL    PITCHANG                              
022206,000141: 42,3717           00007                                    URP                                   
022207,000142: 42,3720           51041                           DOT      BPL                                   
022208,000143: 42,3721           06512                                    HIUNITZ                               
022209,000144: 42,3722           65727                                    NOADJUST                              #  YES, -90 TO +90
022210,000145: 42,3723           45345                           DLOAD    DSU                                   
022211,000146: 42,3724           06516                                    HIDPHALF                              
022212,000147: 42,3725           02172                                    PITCHANG                              
022213,000148: 42,3726           02172                           STORE    PITCHANG                              
022214,000149: 42,3727           47375        NOADJUST           VLOAD    VXV                                   
022215,000150: 42,3730           00001                                    UR                                    #  Z = (UR X URP)
022216,000151: 42,3731           00007                                    URP                                   
022217,000152: 42,3732           77772                           VSL1                                           
022218,000153: 42,3733           16176                           STODL    RLM                                   #  Z VEC  B-1
022219,000154: 42,3734           02172                                    PITCHANG                              
022220,000155: 42,3735           74356                           SIN      VXSC                                  
022221,000156: 42,3736           06512                                    HIUNITZ                               
022222,000157: 42,3737           71525                           PDDL     COS                                   
022223,000158: 42,3740           02172                                    PITCHANG                              
022224,000159: 42,3741           52361                           VXSC     VSU                                   
022225,000160: 42,3742           06516                                    HIUNITX                               #  (UX COS ALPHA) - (UZ SIN ALPHA)
022226,000161: 42,3743           63241                           DOT      PDVL                                  #  YAW.Z
022227,000162: 42,3744           02176                                    RLM                                   
022228,000163: 42,3745           02176                                    RLM                                   
022229,000164: 42,3746           75246                           ABVAL    SIGN                                  
022230,000165: 42,3747           77736                           ASIN                                           
022231,000166: 42,3750           02174                           STORE    YAWANG                                
022232,000167: 42,3751           77776        SBANDEX            EXIT                                           
022233,000168: 42,3752           31043                           CA       EXTVBACT                              
022234,000169: 42,3753           74747                           MASK     BIT5                                  #  IS BIT5 STILL ON
022235,000170: 42,3754           00006                           EXTEND                                         
022236,000171: 42,3755           15503                           BZF      ENDEXT                                #  NO
022237,000172: 42,3756           35017                           CAF      PRIO5                                 
022238,000173: 42,3757           05146                           TC       PRIOCHNG                              
022239,000174: 42,3760           33773                           CAF      V06N51                                #  DISPLAY ANGLES
022240,000175: 

Page 497

022242,000177: 42,3761           04616                           TC       BANKCALL                              
022243,000178: 42,3762           20353                           CADR     GOMARKFR                              
022244,000179: 42,3763           05574                           TC       B5OFF                                 #  TERMINATE
022245,000180: 42,3764           05574                           TC       B5OFF                                 #  PROCEED
022246,000181: 42,3765           05155                           TC       ENDOFJOB                              #  RECYCLE
022247,000182: 42,3766           34751                           CAF      BIT3                                  #  IMMEDIATE RETURN
022248,000183: 42,3767           05475                           TC       BLANKET                               #  BLANK R3
022249,000184: 42,3770           34740                           CAF      PRIO4                                 
022250,000185: 42,3771           05146                           TC       PRIOCHNG                              
022251,000186: 42,3772           03614                           TC       SBANDANT                              #  YES, CONTINUE DISPLAYING ANGLES.
022252,000187: 42,3773           01463        V06N51             VN       0651                                  
022253,000188: 42,3774           26501 07463  1OVSQRT2           2DEC     .7071067815                            #  1/SQRT(2)
022254,000189: 
022255,000190: 42,3776                        UR                 EQUALS   0D                                    
022256,000191: 42,3776                        URP                EQUALS   6D                                    
022257,000192: 42,3776  30,2000                                  SBANK=   LOWSUPER                              

End of include-file S-BAND_ANTENNA_FOR_LM.agc.  Parent file is MAIN.agc