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.

009493,000002:                                                                                                  ## Copyright:   Public domain.
009494,000003:                                                                                                  ## Filename:    AGS_INITIALIZATION.agc
009495,000004:                                                                                                  ## Purpose:     A log section of Zerlina 56, the final revision of
009496,000005:                                                                                                  ##              Don Eyles's offline development program for the variable 
009497,000006:                                                                                                  ##              guidance period servicer. It also includes a new P66 with LPD 
009498,000007:                                                                                                  ##              (Landing Point Designator) capability, based on an idea of John 
009499,000008:                                                                                                  ##              Young's. Neither of these advanced features were actually flown,
009500,000009:                                                                                                  ##              but Zerlina was also the birthplace of other big improvements to
009501,000010:                                                                                                  ##              Luminary including the terrain model and new (Luminary 1E)
009502,000011:                                                                                                  ##              analog display programs. Zerlina was branched off of Luminary 145,
009503,000012:                                                                                                  ##              and revision 56 includes all changes up to and including Luminary
009504,000013:                                                                                                  ##              183. It is therefore quite close to the Apollo 14 program,
009505,000014:                                                                                                  ##              Luminary 178, where not modified with new features.
009506,000015:                                                                                                  ## Reference:   pp. 213-217
009507,000016:                                                                                                  ## Assembler:   yaYUL
009508,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
009509,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
009510,000019:                                                                                                  ## Mod history: 2017-07-28 MAS  Created from Luminary 210.
009511,000020:                                                                                                  ##              2017-08-26 TVB  Updated for Zerlina 56.
009512,000021: 

Page 213

009514,000023:                                                                                                  #  PROGRAM NAME:   AGS INITIALIZATION (R47)
009515,000024: 
009516,000025:                                                                                                  #  WRITTEN BY  :   RHODE/KILROY/FOLLETT
009517,000026: 
009518,000027:                                                                                                  #  MOD NO. :       0
009519,000028:                                                                                                  #  DATE    :       23 MARCH 1967
009520,000029:                                                                                                  #  MOD BY  :       KILROY
009521,000030: 
009522,000031:                                                                                                  #  MOD NO. :       1
009523,000032:                                                                                                  #  DATE    :       28 OCTOBER 1967
009524,000033:                                                                                                  #  MOD BY  :       FOLLETT
009525,000034: 
009526,000035:                                                                                                  #  FUNCT. DESC.:   (1) TO PROVIDE THE AGS ABORT ELECTRONICS ASSEMBLY(AEA) WITH THE LEM AND CSM STATE VECTORS
009527,000036:                                                                                                  #                  (POSITION,VELOCITY,TIME) IN LEM IMU COORDINATES BY MEANS OF THE LGC DIGITAL DOWNLINK.
009528,000037: 
009529,000038:                                                                                                  #                  (2) TO ZERO THE ICDU, LGC AND AEA GIMBAL ANGLE COUNTERS SIMULTANEOUSLY IN ORDER TO ESTABLISH A
009530,000039:                                                                                                  #                  COMMON ZERO REFERENCE FOR THE MEASUREMENT OF GIMBAL(EULER) ANGLES WHICH DEFINE LEM ATTITUDE
009531,000040:                                                                                                  #                  (3) TO ESTABLISH THE GROUND ELAPSED TIME OF AEA CLOCK ZERO.(IF AN AEA CLOCK ZERO IS
009532,000041:                                                                                                  #                  REQUESTED DURING THIS PROGRAM
009533,000042: 
009534,000043:                                                                                                  #  LOG SECTION :   AGS INITIALIZATION
009535,000044: 
009536,000045:                                                                                                  #  CALLING SEQ :   PROGRAM IS ENTERED WHEN ASTRONAUT KEYS V47E ON DSKY.
009537,000046:                                                                                                  #                  R47 MAY BE CALLED AT ANY TIME EXCEPT WHEN ANOTHER EXTENDED VERB IS IN PROGRESS
009538,000047: 
009539,000048:                                                                                                  #  SUBROUTINES
009540,000049:                                                                                                  #  CALLED      :
009541,000050: 
009542,000051:                                                                                                  #  NORMAL EXIT :  ENDEXT
009543,000052: 
009544,000053:                                                                                                  #  ALARM/ABORT :  ALARM - BAD REFSMMAT - CODE:220
009545,000054:                                                                                                  #                 OPERATOR ERROR IF V47 SELECTED DURING ANOTHER EXTENDED VERB.
009546,000055: 
009547,000056:                                                                                                  #  ERASABLES
009548,000057:                                                                                                  #  USED        :  SAMPTIME    (2) TIME OF :ENTER: KEYSTROKE
009549,000058:                                                                                                  #                 AGSK        (2) GROUND ELAPSED TIME OF THE AEA CLOCK :ZERO:
009550,000059:                                                                                                  #                 AGSBUFF   (140) CONTAINS AGS INITIALIZATION DATA (SEE :OUTPUT: BELOW)
009551,000060:                                                                                                  #                 AGSWORD     (1) PREVIOUS DOWNLIST SAVED HERE
009552,000061: 
009553,000062: 05,2464  E6,1771                                  EBANK=   AGSK                                  
009554,000063: 40,2000                                           BANK     40                                    
009555,000064: 32,2000                                           SETLOC   R47                                   
009556,000065: 32,2000                                           BANK                                           
009557,000066: 
009558,000067: 32,2005                                           COUNT*   $$/R47                                
009559,000068: 
009560,000069: 32,2005           34737        AGSINIT            CAF      REFSMBIT                              
009561,000070: 32,2006           70077                           MASK     FLAGWRD3                              #  CHECK REFSMFLG.
009562,000071: 32,2007           10000                           CCS      A                                     
009563,000072: 32,2010           02017                           TC       REDSPTEM                              #  REFSMMAT IS OK

Page 214

009565,000074: 32,2011           05600                           TC       ALARM                                 #  REFSMMAT IS BAD
009566,000075: 32,2012           00220                           OCT      220                                   
009567,000076: 32,2013           05503                           TC       ENDEXT                                
009568,000077: 
009569,000078: 32,2014           00006        NEWAGS             EXTEND                                         
009570,000079: 32,2015           30014                           DCA      SAMPTIME                              #  TIME OF THE :ENTER: KEYSTROKE
009571,000080: 32,2016           53772                           DXCH     AGSK                                  #  BECOMES NEW AEA CLOCK :ZERO:
009572,000081: 
009573,000082: 32,2017           00006        REDSPTEM           EXTEND                                         
009574,000083: 32,2020           31772                           DCA      AGSK                                  
009575,000084: 32,2021           53051                           DXCH     DSPTEMX                               
009576,000085: 32,2022           32172        AGSDISPK           CAF      V06N16                                
009577,000086: 32,2023           04616                           TC       BANKCALL                              #  R1 = 00XXX. HRS., R2 = 000XX MIN.,
009578,000087: 32,2024           20334                           CADR     GOMARKF                               #  R3 = 0XX.XX SEC.
009579,000088: 32,2025           05503                           TC       ENDEXT                                #  TERMINATE RETURN
009580,000089: 32,2026           02036                           TC       AGSVCALC                              #  PROCEED RETURN
009581,000090: 32,2027           44746                           CS       BIT6                                  #  IS ENTER VIA A V32
009582,000091: 32,2030           60154                           AD       MPAC                                  
009583,000092: 32,2031           00006                           EXTEND                                         
009584,000093: 32,2032           12014                           BZF      NEWAGS                                #  YES, USE KEYSTROKE TIME FOR NEW AGSK
009585,000094: 
009586,000095: 32,2033           00006                           EXTEND                                         #  NO, NEW AGSK LOADED VIA V25
009587,000096: 32,2034           31051                           DCA      DSPTEMX                               #  LOADED INTO DSPTEMX BY KEYING
009588,000097: 32,2035           02016                           TC       REDSPTEM   -1                         #  V25E FOLLOWED BY HRS.,MINS.,SECS.
009589,000098:                                                                                                  #  DISPLAY THE NEW K
009590,000099: 
009591,000100: 32,2036           06051        AGSVCALC           TC       INTPRET                               
009592,000101: 32,2037           77614                           SET                                            
009593,000102: 32,2040           01076                                    NODOFLAG                              #  DONT ALLOW V37
009594,000103: 32,2041           77414                           SET      EXIT                                  
009595,000104: 32,2042           02076                                    XDSPFLAG                              
009596,000105: 
009597,000106: 32,2043           32172                           CAF      V06N16                                
009598,000107: 32,2044           04616                           TC       BANKCALL                              
009599,000108: 32,2045           20621                           CADR     EXDSPRET                              
009600,000109: 
009601,000110: 32,2046           06051                           TC       INTPRET                               #  EXTRAPOLATE LEM AND CSM STATE VECTORS
009602,000111: 32,2047           77634                           RTB                                            #  TO THE PRESENT TIME
009603,000112: 32,2050           21555                                    LOADTIME                              #  LOAD MPAC WITH TIME2,TIME1
009604,000113: 32,2051           34041                           STCALL   TDEC1                                 #  CALCULATE LEM STATE VECTOR
009605,000114: 32,2052           27056                                    LEMPREC                               
009606,000115: 32,2053           77624                           CALL                                           #  CALL ROUTINE TO CONVERT TO SM COORDS AND
009607,000116: 32,2054           64132                                    SCALEVEC                              #  PROVIDE PROPER SCALING
009608,000117: 32,2055           16172                           STODL    AGSBUFF                               #  (LEMPREC AND CSMPREC LEAVE TDEC1 IN TAT)
009609,000118: 32,2056           00015                                    TAT                                   #  TAT = TIME TO WHICH RATT1 AND VATT1 ARE
009610,000119: 32,2057           34041                           STCALL   TDEC1                                 #  COMPUTED(CSEC SINCE CLOCK START B-28).
009611,000120: 32,2060           27042                                    CSMPREC                               #  CALCULATE CSM STATE VECTOR FOR SAME TIME
009612,000121: 32,2061           77624                           CALL                                           
009613,000122: 32,2062           64132                                    SCALEVEC                              
009614,000123: 32,2063           16200                           STODL    AGSBUFF    +6                         

Page 215

009616,000125: 32,2064           00015                                    TAT                                   
009617,000126: 32,2065           56225                           DSU      DDV                                   #  CALCULATE AND STORE THE TIME
009618,000127: 
009619,000128: 32,2066           03372                                    AGSK                                  
009620,000129: 32,2067           24175                                    TSCALE                                
009621,000130: 32,2070           02206                           STORE    AGSBUFF    +12D                       
009622,000131: 32,2071           77776                           EXIT                                           
009623,000132: 
009624,000133: 32,2072           34753                           CAF      LAGSLIST                              
009625,000134: 32,2073           54333                           TS       DNLSTCOD                              
009626,000135: 
009627,000136: 32,2074           32176                           CAF      20SEC                                 #  DELAY FOR 20 SEC WHILE THE AGS
009628,000137: 32,2075           04616                           TC       BANKCALL                              #  DOWNLIST IS TRANSMITTED
009629,000138: 32,2076           01736                           CADR     DELAYJOB                              
009630,000139: 
009631,000140: 32,2077           31321                           CA       AGSWORD                               
009632,000141: 32,2100           54333                           TS       DNLSTCOD                              #  RETURN TO THE OLD DOWNLIST
009633,000142: 32,2101           34744                           CAF      IMUSEBIT                              
009634,000143: 32,2102           70074                           MASK     FLAGWRD0                              #  CHECK IMUSE FLAG.
009635,000144: 32,2103           10000                           CCS      A                                     
009636,000145: 32,2104           02122                           TC       AGSEND                                #  IMU IS BEING USED - DO NOT ZERO
009637,000146: 32,2105           11301        CKSTALL            CCS      IMUCADR                               #  CHECK FOR IMU USAGE WHICH AVOIDS THE
009638,000147: 32,2106           12111                           TCF      +3                                    #  IMUSE BIT:  I.E., IMU COMPENSATION.
009639,000148: 32,2107           12115                           TCF      +6                                    #  FREE.  GO AHEAD WITH THE IMU ZERO.
009640,000149: 32,2110           12111                           TCF      +1                                    
009641,000150: 32,2111           34363                 +3        CAF      TEN                                   #  WAIT .1 SEC AND TRY AGAIN.
009642,000151: 32,2112           04616                           TC       BANKCALL                              
009643,000152: 32,2113           01736                           CADR     DELAYJOB                              
009644,000153: 32,2114           12105                           TCF      CKSTALL                               
009645,000154: 
009646,000155: 32,2115           04616                 +6        TC       BANKCALL                              #  IMU IS NOT IN USE
009647,000156: 32,2116           16661                           CADR     IMUZERO                               #  SET IMU ZERO DISCRETE FOR 320 MSECS
009648,000157: 32,2117           04616                           TC       BANKCALL                              #  WAIT 3 SEC FOR COUNTERS TO INCREMENT
009649,000158: 32,2120           17715                           CADR     IMUSTALL                              
009650,000159: 32,2121           02122                           TC       AGSEND                                
009651,000160: 32,2122           05527        AGSEND             TC       DOWNFLAG                              #  ALLOW V37
009652,000161: 32,2123           00054                           ADRES    NODOFLAG                              
009653,000162: 32,2124           32173                           CAF      V50N16                                
009654,000163: 32,2125           04616                           TC       BANKCALL                              
009655,000164: 32,2126           20342                           CADR     GOMARK3                               
009656,000165: 32,2127           15503                           TCF      ENDEXT                                
009657,000166: 32,2130           15503                           TCF      ENDEXT                                
009658,000167: 32,2131           05503                           TC       ENDEXT                                
009659,000168: 
009660,000169: 32,2132           64375        SCALEVEC           VLOAD    MXV                                   
009661,000170: 32,2133           00025                                    VATT1                                 
009662,000171: 32,2134           01732                                    REFSMMAT                              
009663,000172: 32,2135           72561                           VXSC     VSL2                                  
009664,000173: 32,2136           24202                                    VSCALE                                
009665,000174: 32,2137           53255                           VAD      VAD                                   #  THIS SECTION ROUNDS THE VECTOR, AND

Page 216

009667,000176: 32,2140           24204                                    AGSRND1                               #  CORRECTS FOR THE FACT THAT THE AGS
009668,000177: 32,2141           24212                                    AGSRND2                               #  IS A 2 S COMPLIMENT MACHINE WHILE THE
009669,000178: 32,2142           77634                           RTB                                            #  LGC IS A 1 S COMPLIMENT MACHINE.
009670,000179: 32,2143           21754                                    VECSGNAG                              
009671,000180: 32,2144           24025                           STOVL    VATT1                                 
009672,000181: 32,2145           00017                                    RATT1                                 
009673,000182: 32,2146           74321                           MXV      VXSC                                  
009674,000183: 32,2147           01732                                    REFSMMAT                              
009675,000184: 32,2150           24200                                    RSCALE                                
009676,000185: 32,2151           53212                           VSL8     VAD                                   #  AGAIN THIS SECTION ROUNDS.  TWO VECTORS
009677,000186: 32,2152           24204                                    AGSRND1                               #  ARE ADDED TO DEFEAT ALSIGNAG IN THE
009678,000187: 32,2153           47055                           VAD      RTB                                   #  CASE OF A HIGH-ORDER ZERO COUPLED WITH
009679,000188: 32,2154           24212                                    AGSRND2                               #  A LOW ORDER NEGATIVE PART.
009680,000189: 32,2155           21754                                    VECSGNAG                              
009681,000190: 32,2156           77750                           LXA,1                                          
009682,000191: 32,2157           00024                                    VATT1                                 
009683,000192: 32,2160           72130                           SXA,1    LXA,1                                 
009684,000193: 32,2161           00155                                    MPAC       +1                         
009685,000194: 32,2162           00026                                    VATT1      +2                         
009686,000195: 32,2163           72130                           SXA,1    LXA,1                                 
009687,000196: 32,2164           00160                                    MPAC       +4                         
009688,000197: 32,2165           00030                                    VATT1      +4                         
009689,000198: 32,2166           43530                           SXA,1    RVQ                                   
009690,000199: 32,2167           00162                                    MPAC       +6                         
009691,000200: 
009692,000201: 32,2170     4753               LAGSLIST           =        ONE                                   
009693,000202: 32,2170           00216        V01N14             VN       0114                                  
009694,000203: 32,2171           14400        V50N00A            VN       5000                                  
009695,000204: 32,2172     6010               V00N25             EQUALS   OCT31                                 
009696,000205: 32,2172           01420        V06N16             VN       0616                                  
009697,000206: 32,2173     4242               V00N34             EQUALS   34DEC                                 
009698,000207: 32,2173           14420        V50N16             VN       5016                                  
009699,000208: 32,2174           03100 00000  TSCALE             2DEC     100        B-10                       #  CSEC TO SEC SCALE FACTOR
009700,000209: 32,2176           03720        20SEC              DEC      2000       B-14                       
009701,000210: 32,2177           15077 05041  RSCALE             2DEC     3.280839   B-3                        #  METERS TO FEET SCALE FACTOR
009702,000211: 32,2201           24402 25724  VSCALE             2DEC     3.280839   E2         B-9             #  METERS/CS TO FEET/SEC SCALE FACTOR
009703,000212: 32,2203           00000 60000  AGSRND1            2OCT     0000060000                            
009704,000213: 32,2205           00000 60000                     2OCT     0000060000                            
009705,000214: 32,2207           00000 60000                     2OCT     0000060000                            
009706,000215: 32,2211           00000 37777  AGSRND2            2OCT     0000037777                            
009707,000216: 32,2213           00000 37777                     2OCT     0000037777                            
009708,000217: 32,2215           00000 37777                     2OCT     0000037777                            

Page 217

009710,000219: 32,2217  30,2000                                  SBANK=   LOWSUPER                              #  FOR SUBSEQUENT LOW 2CADRS.

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