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 Peter McDermott. 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:

	YUL SYSTEM FOR AGC: NEW PROGRAM SHEPATIN BY EYLES
	DEC 13, 1966

	THIS PROGRAM WAS ASSEMBLED AS A VERSION OF REVISION 37 
        OF PROGRAM SUNBURST BY LEM GROUP
Note that the date is the date of the printout, not the date of the program revision.

031879,000002:                                                                                                  ## Copyright:   Public domain.
031880,000003:                                                                                                  ## Filename:    MISSION_PHASE_13_-_APS2.agc
031881,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
031882,000005:                                                                                                  ##              It is part of an early development version of the software
031883,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
031884,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
031885,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
031886,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
031887,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
031888,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
031889,000012:                                                                                                  ##              that the code format has been changed to conform to the
031890,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
031891,000014:                                                                                                  ##              original YUL assembler.
031892,000015:                                                                                                  ## Reference:   pp. 704-710
031893,000016:                                                                                                  ## Assembler:   yaYUL
031894,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
031895,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
031896,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
031897,000020:                                                                                                  ##              2017-06-14 HG   Transcribed
031898,000021:                                                                                                  ##              2017-06-23 RSB  Proofed comment text with
031899,000022:                                                                                                  ##                              octopus/ProoferComments.
031900,000023: 

Page 704

031902,000025:                                                                                                  #  MISSION PHASE 13 EXERCISES THE ASCENT GUIDANCE EQUATIONS OF PROG 46
031903,000026:                                                                                                  #  THE PREREAD TASK IS SET TO OCCUR IN 140 SECS AT TIG-30 AND AVETOMID DONE
031904,000027:                                                                                                  #  THE PRE-APS2 PROG 34 IS EXECUTED AND KALCMANU JOB IS STARTED
031905,000028:                                                                                                  #  THE ENGINEON TASK IS STARTED AT TIG-30 AND IGN IS AT 170 SECS AFTER
031906,000029:                                                                                                  #  START OF MP13
031907,000030:                                                                                                  #  THE ASCENT GUIDANCE EQUATIONS START BETWEEN TIG+1 AND +2 SECS
031908,000031:                                                                                                  #  THE ASC FEED TEST STARTS AT TIG+9 AND TERMINATES 365 SECS LATER
031909,000032: 
031910,000033: 27,3071                                           BANK     27                                    
031911,000034: 27,3071  E4,1400                                  EBANK=   AMEMORY                               
031912,000035: 
031913,000036: 27,3071           00006        MP13JOB            EXTEND                                         
031914,000037: 27,3072           30025                           DCA      TIME2                                 #  PICK UP CURRENT TIME
031915,000038: 27,3073           53567                           DXCH     TDEC                                  
031916,000039: 27,3074           04105                           TC       NEWMODEX                              #  SET MODE
031917,000040: 27,3075           00034                           OCT      34                                    
031918,000041: 
031919,000042: 27,3076           22007                           ZL                                             #  SET TDEC TO TIME AT TIG-30
031920,000043: 27,3077           33253                           CAF      140SECS                               #  TIME TO TIGN-30
031921,000044: 27,3100           56001                           XCH      L                                     
031922,000045: 27,3101           21567                           DAS      TDEC                                  #  TDEC =TIGN-30 FOR MIDTOAVE
031923,000046: 
031924,000047: 27,3102           33253                           CAF      140SECS                               
031925,000048: 27,3103           00004                           INHINT                                         
031926,000049: 27,3104           05701                           TC       WAITLIST                              #  SET TASK FOR TIGN-30
031927,000050: 27,3105  E4,1566                                  EBANK=   TDEC                                  
031928,000051: 
031929,000052: 27,3105           03142 56004                     2CADR    TIG13-30                              
031930,000053: 
031931,000054: 27,3107           00003                           RELINT                                         
031932,000055: 
031933,000056: 27,3110           00006                           EXTEND                                         
031934,000057: 27,3111           32454                           DCA      MIDAVEAD                              #  DO MIDTOAVE COMPUTATION
031935,000058: 27,3112           52006                           DXCH     Z                                     
031936,000059: 
031937,000060: 27,3113           00006                           EXTEND                                         
031938,000061: 27,3114           33260                           DCA      PREAP2AD                              #  DO PRE-APS2 TO GET DESIRED ATTITUDE
031939,000062: 27,3115           52006                           DXCH     Z                                     #  STORES VECTORS POINTVSM AND SCAXIS
031940,000063: 
031941,000064: 27,3116           06103                           TC       INTPRET                               
031942,000065: 27,3117           43131                           SSP      SET                                   
031943,000066: 27,3120           01653                                    RATEINDX                              #  SET KALCMANU FOR ANGULAR RATE OF 5DEG/S
031944,000067: 27,3121           00004                                    4                                     
031945,000068: 27,3122           01063                                    33D                                   
031946,000069: 27,3123           77776                           EXIT                                           
031947,000070: 
031948,000071: 27,3124           35226                           CAF      PRIO30                                #  SET ATTITUDE MANEUVER JOB
031949,000072: 27,3125           00004                           INHINT                                         
031950,000073: 27,3126           05534                           TC       FINDVAC                               
031951,000074: 27,3127  E3,1535                                  EBANK=   MIS                                   
031952,000075: 27,3127           02001 70063                     2CADR    VECPOINT                              
031953,000076: 

Page 705

031955,000078: 27,3131           37755                           CAF      BIT1                                  
031956,000079: 27,3132           00004                           INHINT                                         
031957,000080: 27,3133           05701                           TC       WAITLIST                              #  SET UP DFI T/M CALIBRATE TASK
031958,000081: 27,3134  E4,1566                                  EBANK=   TDEC                                  
031959,000082: 27,3134           03274 56004                     2CADR    DFICAL                                #  DFICAL REQUIRES 14 SECS AND ENDS ITSELF
031960,000083: 
031961,000084: 27,3136           05224                           TC       BANKCALL                              #  PUT MP13 TO SLEEP-KALCMANU WILL WAKE
031962,000085: 27,3137           26754                           CADR     ATTSTALL                              
031963,000086: 27,3140           04732                           TC       CURTAINS                              #  BAD END RETURN FROM KALCMANU
031964,000087: 
031965,000088: 27,3141           05605                           TC       ENDOFJOB                              #  WAIT FOR TIG-30 TASK TO INTERUPT
031966,000089: 
031967,000090: 27,3142           37755        TIG13-30           CAF      BIT1                                  #  SET PREREAD FOR NOW
031968,000091: 27,3143           05701                           TC       WAITLIST                              
031969,000092: 27,3144  E5,1506                                  EBANK=   DVTOTAL                               
031970,000093: 27,3144           02000 60065                     2CADR    PREREAD                               
031971,000094: 
031972,000095: 27,3146           37743                           CAF      BIT11                                 #  SEE IF ATTITUDE MANEUVER DONE
031973,000096: 27,3147           70076                           MASK     FLAGWRD2                              
031974,000097: 27,3150           10000                           CCS      A                                     
031975,000098: 27,3151           13267                           TCF      CURTJOB                               #  NO-SET UP CURTAINS JOB
031976,000099: 
031977,000100: 27,3152           04105                           TC       NEWMODEX                              
031978,000101: 27,3153           00046                           OCT      46                                    #  SET MODE TO PROG46
031979,000102: 
031980,000103: 27,3154           33256                           CAF      AVEG13AD                              #  GENADR OF AVEG IN DVSELECT
031981,000104: 27,3155           55322                           TS       DVSELECT                              
031982,000105: 
031983,000106: 27,3156           00006                           EXTEND                                         
031984,000107: 27,3157           33266                           DCA      SVEX13AD                              #  2CADR SERVEXIT IN AVEGEXIT
031985,000108: 27,3160           53073                           DXCH     AVGEXIT                               
031986,000109: 
031987,000110: 27,3161           00006                           EXTEND                                         
031988,000111: 27,3162           33262                           DCA      MP13TMAD                              
031989,000112: 27,3163           53075                           DXCH     DVMNEXIT                              #  SET MP RETURN FOR ENGINE SHUT DOWN
031990,000113: 
031991,000114: 27,3164           06074                           TC       ENGINOF1                              #  JUST TO ENSURE ENGINE OFF
031992,000115: 
031993,000116: 27,3165           05114                           TC       1LMP+DT                               
031994,000117: 27,3166           00206                           DEC      134        B-14                       #  ENGINE SELECT-APS ARM
031995,000118: 27,3167           03326                           DEC      1750       B-14                       #  DELAY 17.5 SECS
031996,000119: 
031997,000120: 27,3170           05307                           TC       IBNKCALL                              
031998,000121: 27,3171           34024                           CADR     ULLAGE                                #  COMMAND 4 JET ULLAGE-ON
031999,000122: 
032000,000123: 27,3172           05717                           TC       FIXDELAY                              
032001,000124: 27,3173           02342                           DEC      1250       B-14                       #  DELAY 12.5 SECS TO IGNITION
032002,000125: 
032003,000126: 27,3174           06054        TIG13              TC       ENGINEON                              #  FIRE UP APS ENGINE
032004,000127: 

Page 706

032006,000129: 27,3175           05717                           TC       FIXDELAY                              
032007,000130: 27,3176           00062                           DEC      50         B-14                       #  DELAY .5 SECS
032008,000131: 
032009,000132: 27,3177           05307                           TC       IBNKCALL                              
032010,000133: 27,3200           34030                           CADR     NOULLAGE                              #  ULLAGE JETS OFF AT TIG + .5
032011,000134: 
032012,000135: 27,3201           05717                           TC       FIXDELAY                              
032013,000136: 27,3202           00062                           DEC      50         B-14                       #  DELAY .5 SEC AND START ASCENT GUIDANCE
032014,000137: 27,3203           00006                           EXTEND                                         
032015,000138: 27,3204           33264                           DCA      ATMAGAD                               
032016,000139: 27,3205           53073                           DXCH     AVGEXIT                               #  SET AVEG LOOP TO THRUST MAGNITUDE FILTER
032017,000140: 
032018,000141: 27,3206           05717                           TC       FIXDELAY                              
032019,000142: 27,3207           01440                           DEC      800        B-14                       #  DELAY 8 SECS AND DO FEED TEST
032020,000143: 27,3210           03306                           TC       FEEDTEST                              #  START FEED TEST ROUTINE
032021,000144: 
032022,000145: 27,3211           00006                           EXTEND                                         
032023,000146: 27,3212           33255                           DCA      342SECS                               
032024,000147: 27,3213           05757                           TC       LONGCALL                              
032025,000148: 27,3214  E4,1566                                  EBANK=   TDEC                                  
032026,000149: 27,3214           03217 56004                     2CADR    MP13+544                              
032027,000150: 
032028,000151: 27,3216           05745                           TC       TASKOVER                              
032029,000152: 
032030,000153: 27,3217           03343        MP13+544           TC       FEEDREST                              #  DO FEED TEST RESET ROUTINE
032031,000154: 
032032,000155: 27,3220           05745                           TC       TASKOVER                              #  WAIT FOR GUIDANCE TO DO ENGINE OFF
032033,000156: 
032034,000157: 27,3221           37755        MP13TERM           CAF      BIT1                                  #  SET MP13 TERMINAL TASKS
032035,000158: 27,3222           00004                           INHINT                                         
032036,000159: 27,3223           05701                           TC       WAITLIST                              
032037,000160: 27,3224  E4,1566                                  EBANK=   TDEC                                  
032038,000161: 27,3224           03227 56004                     2CADR    MP13OUT                               
032039,000162: 
032040,000163: 27,3226           05605                           TC       ENDOFJOB                              #  KILL JOB SET BY DVMON
032041,000164: 
032042,000165: 27,3227           00006        MP13OUT            EXTEND                                         #  APS ENGINE OFF-TERMINATE MP13
032043,000166: 27,3230           32456                           DCA      SVEXITAD                              #  REMOVE ASCENT PROG FROM SERVICER
032044,000167: 27,3231           53073                           DXCH     AVGEXIT                               
032045,000168: 
032046,000169: 27,3232           05307                           TC       IBNKCALL                              #  DEADBAND SELECT-MAX
032047,000170: 27,3233           34012                           CADR     SETMAXDB                              
032048,000171: 
032049,000172: 27,3234           05307                           TC       IBNKCALL                              #  SET ATTITUDE HOLD
032050,000173: 27,3235           34057                           CADR     STOPRATE                              
032051,000174: 
032052,000175: 27,3236           03343                           TC       FEEDREST                              #  DO THIS IN CASE OF EARLY ENG SHUT DOWN
032053,000176: 
032054,000177: 27,3237           05717                           TC       FIXDELAY                              
032055,000178: 27,3240           00144                           DEC      100        B-14                       #  DELAY 1 SEC
032056,000179: 

Page 707

032058,000181: 27,3241           05073                           TC       1LMP                                  
032059,000182: 27,3242           00207                           DEC      135        B-14                       #  APS ARM OFF
032060,000183: 
032061,000184: 27,3243           05717                           TC       FIXDELAY                              
032062,000185: 27,3244           05524                           DEC      2900       B-14                       #  DELAY 29 SECS TO KILL AVEG
032063,000186: 
032064,000187: 27,3245           06036                           TC       FLAG1DWN                              #  KILL AVE G
032065,000188: 27,3246           00001                           OCT      1                                     
032066,000189: 
032067,000190: 27,3247           05745                           TC       TASKOVER                              #  MISSION PHASE 13 COMPLETE
032068,000191: 
032069,000192: 27,3250           00144        1SEC13             DEC      100        B-14                       
032070,000193: 27,3251           00310        2SECS13            DEC      200        B-14                       
032071,000194: 27,3252           02260        12SECS13           DEC      1200       B-14                       
032072,000195: 27,3253           33260        140SECS            DEC      14000      B-14                       
032073,000196: 27,3254           00002 02630  342SECS            2DEC     34200      B-28                       #  342 SECONDS
032074,000197: 
032075,000198: 27,3256           02233        AVEG13AD           GENADR   AVERAGEG                              
032076,000199: 27,3257  E4,1566                                  EBANK=   TDEC                                  
032077,000200: 27,3257           02000 64064  PREAP2AD           2CADR    PREAPS2                               
032078,000201: 
032079,000202: 27,3261  E4,1566                                  EBANK=   TDEC                                  
032080,000203: 27,3261           03221 56004  MP13TMAD           2CADR    MP13TERM                              
032081,000204: 
032082,000205: 27,3263  E4,1566                                  EBANK=   TDEC                                  
032083,000206: 27,3263           02713 64064  ATMAGAD            2CADR    ATMAG                                 
032084,000207: 
032085,000208: 27,3265  E5,1506                                  EBANK=   DVTOTAL                               
032086,000209: 27,3265           02312 60065  SVEX13AD           2CADR    SERVEXIT                              
032087,000210: 

Page 708

032089,000212: 27,3267           35676        CURTJOB            CAF      PRIO37                                #  SET UP JOB TO GO TO CURTAINS
032090,000213: 27,3270           05523                           TC       NOVAC                                 
032091,000214: 27,3271     1361                                  EBANK=   SFAIL                                 
032092,000215: 27,3271           04732 04002                     2CADR    CURTAINS                              
032093,000216: 
032094,000217: 27,3273           05745                           TC       TASKOVER                              
032095,000218: 
032096,000219: 27,3274           05114        DFICAL             TC       1LMP+DT                               #  LMP COMMAND
032097,000220: 27,3275           00354                           DEC      236        B-14                       #  DFI T/M CALIBRATE - ON
032098,000221: 27,3276           02260                           DEC      1200       B-14                       #  DELAY 12 SECS
032099,000222: 
032100,000223: 27,3277           05106                           TC       2LMP+DT                               #  LMP COMMANDS
032101,000224: 27,3300           00355                           DEC      237        B-14                       #  DFI T/M CALIBRATE - OFF
032102,000225: 27,3301           00306                           DEC      198        B-14                       #  MASTER C+W ALARM RESET - COMMAND
032103,000226: 27,3302           00310                           DEC      200        B-14                       #  DELAY 2.0 SECONDS
032104,000227: 
032105,000228: 27,3303           05073                           TC       1LMP                                  #  LMP COMMAND
032106,000229: 27,3304           00307                           DEC      199        B-14                       #  MASTER C+W ALARM RESET - COMMAND RESET
032107,000230: 27,3305           05745                           TC       TASKOVER                              #  TERMINATE DFI CALIBRATE TASK
032108,000231: 

Page 709

032110,000233: 27,3306           00006        FEEDTEST           EXTEND                                         
032111,000234: 27,3307           23662                           QXCH     MPRETRN                               
032112,000235: 27,3310           06027                           TC       FLAG2UP                               #  SET ASC FEED TEST FLAG
032113,000236: 27,3311           00200                           OCT      200                                   
032114,000237: 
032115,000238: 27,3312           05114                           TC       1LMP+DT                               #  TIME T
032116,000239: 27,3313           00176                           DEC      126        B-14                       #  RCS ASCENT FEED VALVE - ARM
032117,000240: 27,3314           00144                           DEC      100        B-14                       #  DELAY 1 SEC
032118,000241: 
032119,000242: 27,3315           05106                           TC       2LMP+DT                               #  T+1
032120,000243: 27,3316           00074                           DEC      60         B-14                       #  RCS ASCENT FEED VALVES8 SYS A-OPEN
032121,000244: 27,3317           00254                           DEC      172        B-14                       #  RCS MAIN S/O VALVES SYS A-CLOSE
032122,000245: 27,3320           00310                           DEC      200        B-14                       #  DELAY FOR 2 SECS
032123,000246: 
032124,000247: 27,3321           05106                           TC       2LMP+DT                               #  T+3
032125,000248: 27,3322           00075                           DEC      61         B-14                       #  RCS ASCENT FEED VALVES SYS A-OPEN RESET
032126,000249: 27,3323           00255                           DEC      173        B-14                       #  RCS MAIN S/O VALVES SYS A-CLOSE RESET
032127,000250: 27,3324           01440                           DEC      800        B-14                       #  DELAY FOR 8 SECS
032128,000251: 
032129,000252: 27,3325           05106                           TC       2LMP+DT                               #  T+11
032130,000253: 27,3326           00076                           DEC      62         B-14                       #  RCS ASCENT FEED VALVES SYS B-OPEN
032131,000254: 27,3327           00256                           DEC      174        B-14                       #  RCS MAIN S/O VALVES SYS B -CLOSE
032132,000255: 27,3330           00310                           DEC      200        B-14                       #  DELAY FOR 2 SECS
032133,000256: 
032134,000257: 27,3331           05106                           TC       2LMP+DT                               #  T+13
032135,000258: 27,3332           00077                           DEC      63         B-14                       #  RCS ASCENT FEED VALVES SYS B-OPEN RESET
032136,000259: 27,3333           00257                           DEC      175        B-14                       #  RCS MAIN S/O VALVES SYS B-CLOSE RESET
032137,000260: 27,3334           01440                           DEC      800        B-14                       #  DELAY 8 SECS
032138,000261: 
032139,000262: 27,3335           05114                           TC       1LMP+DT                               #  T+21
032140,000263: 27,3336           00374                           DEC      252        B-14                       #  RCS MANIFOLD CROSSFEED VALVES-OPEN
032141,000264: 27,3337           00310                           DEC      200        B-14                       #  DELAY FOR 2 SECS
032142,000265: 
032143,000266: 27,3340           05073                           TC       1LMP                                  #  T+23
032144,000267: 27,3341           00375                           DEC      253        B-14                       #  RCS MANIFOLD CROSSFEED VALVES-OPEN RESET
032145,000268: 
032146,000269: 27,3342           01662                           TC       MPRETRN                               
032147,000270: 

Page 710

032149,000272: 27,3343           40076        FEEDREST           CS       FLAGWRD2                              #  CHECK FEED TEST FLAG
032150,000273: 27,3344           77746                           MASK     BIT8                                  
032151,000274: 27,3345           10000                           CCS      A                                     
032152,000275: 27,3346           00002                           TC       Q                                     #  FLAG DOWN-NO RESET
032153,000276: 
032154,000277: 27,3347           00006                           EXTEND                                         #  FLAG UP - DO FEED TEST RESET
032155,000278: 27,3350           23662                           QXCH     MPRETRN                               
032156,000279: 
032157,000280: 27,3351           06045                           TC       FLAG2DWN                              #  FEED TEST FLAG DOWN
032158,000281: 27,3352           00200                           OCT      200                                   
032159,000282: 
032160,000283: 27,3353           05114                           TC       1LMP+DT                               #  TIME T
032161,000284: 27,3354           00376                           DEC      254        B-14                       #  RCS MANIFOLD CROSSFEED VALVES -CLOSE
032162,000285: 27,3355           00144                           DEC      100        B-14                       #  DELAY 1 SEC
032163,000286: 
032164,000287: 27,3356           05106                           TC       2LMP+DT                               #  T+1
032165,000288: 27,3357           00274                           DEC      188        B-14                       #  RCS MAIN S/O VALVES SYS A-OPEN
032166,000289: 27,3360           00114                           DEC      76         B-14                       #  RCS ASCENT FEED VALVES SYS A-CLOSE
032167,000290: 27,3361           00144                           DEC      100        B-14                       #  DELAY 1 SECS
032168,000291: 
032169,000292: 27,3362           05114                           TC       1LMP+DT                               #  T+2
032170,000293: 27,3363           00377                           DEC      255        B-14                       #  RCS MANIFOLD CROSSFEED VALVES-CLOSE RESE
032171,000294: 27,3364           00144                           DEC      100        B-14                       #  DELAY 1 SEC
032172,000295: 
032173,000296: 27,3365           05106                           TC       2LMP+DT                               #  T+3
032174,000297: 27,3366           00275                           DEC      189        B-14                       #  RCS MAIN S/O VALVES SYS A-OPEN RESET
032175,000298: 27,3367           00115                           DEC      77         B-14                       #  RCS ASCENT FEED VALVES SYS A-CLOSE RESET
032176,000299: 27,3370           01440                           DEC      800        B-14                       #  DELAY 8 SECS
032177,000300: 
032178,000301: 27,3371           05106                           TC       2LMP+DT                               #  T+11
032179,000302: 27,3372           00276                           DEC      190        B-14                       #  RCS MAIN S/O VALVES SYS B-OPEN
032180,000303: 27,3373           00116                           DEC      78         B-14                       #  RCS ASCENT FEED VALVES SYS B-CLOSE
032181,000304: 27,3374           00144                           DEC      100        B-14                       #  DELAY 1 SEC
032182,000305: 
032183,000306: 27,3375           05114                           TC       1LMP+DT                               #  T+12
032184,000307: 27,3376           00177                           DEC      127        B-14                       #  RCS ASCENT FEED VALVE-SAFE
032185,000308: 27,3377           00144                           DEC      100        B-14                       #  DELAY 1 SEC
032186,000309: 
032187,000310: 27,3400           05065                           TC       2LMP                                  #  T+13
032188,000311: 27,3401           00277                           DEC      191        B-14                       #  RCS MAIN S/O VALVES SYS B-OPEN RESET
032189,000312: 27,3402           00117                           DEC      79         B-14                       #  RCS ASCENT FEED VALVES SYS B-CLOSE RESET
032190,000313: 
032191,000314: 27,3403           01662                           TC       MPRETRN                               #  RETURN TO MISSION PROGRAM
032192,000315: 

End of include-file MISSION_PHASE_13_-_APS2.agc.  Parent file is MAIN.agc