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.

033584,000002:                                                                                                  ## Copyright:   Public domain.
033585,000003:                                                                                                  ## Filename:    LMP_COMMAND_ROUTINES.agc
033586,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
033587,000005:                                                                                                  ##              It is part of an early development version of the software
033588,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
033589,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
033590,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
033591,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
033592,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
033593,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
033594,000012:                                                                                                  ##              that the code format has been changed to conform to the
033595,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
033596,000014:                                                                                                  ##              original YUL assembler.
033597,000015:                                                                                                  ## Reference:   pp. 746-747
033598,000016:                                                                                                  ## Assembler:   yaYUL
033599,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
033600,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
033601,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
033602,000020:                                                                                                  ##              2017-06-08 HG   Transcribed
033603,000021:                                                                                                  ##              2017-06-23 RSB  Proofed comment text with
033604,000022:                                                                                                  ##                              octopus/ProoferComments.
033605,000023: 

Page 746

033607,000025:                                                                                                  #           THE FOLLOWING SUBROUTINES ALLOW MISSION PROGRAMS TO REQUEST LMP (LEM MISSION PROGRAMMER) OUTPUTS.
033608,000026: 
033609,000027:                                                                                                  #  THE PROPER DECIMAL CODE IS ENTERED INTO A TABLE AND FROM THENCE TO CHANNEL 10 VIA T4RUPT AND ARE INCLUDED IN
033610,000028:                                                                                                  #  THE DOWNLINK.
033611,000029: 
033612,000030:                                                                                                  #           FOUR ROUTINES ARE PROVIDED:
033613,000031: 
033614,000032:                                                                                                  #                                                   TC     1LMP            CALLED UNDER EXEC OR RUPT. DELIVERS CODE
033615,000033:                                                                                                  #                                                   DEC    LMPCODE         AND RETURNS IMMEDIATELY.
033616,000034: 
033617,000035:                                                                                                  #                                                   TC     2LMP            SAME AS 1LMP BUT TWO CODES ARE
033618,000036:                                                                                                  #                                                   DEC    LMPCODE1        SENT.
033619,000037:                                                                                                  #                                                   DEC    LMPCODE2
033620,000038: 
033621,000039:                                                                                                  #                                                   TC     1LMP+DT         ASSUMES CALLED AS PART OF WAITLIST TASK.
033622,000040:                                                                                                  #                                                   DEC    LMPCODE         DELIVERS LMP CODE, DOES A VARDELAY FOR
033623,000041:                                                                                                  #                                                   DEC    DT              DT, AND THEN RETURNS UNDER WL CONTROL.
033624,000042: 
033625,000043:                                                                                                  #                                                   TC     2LMP+DT         SAME AS 1LMP+DT BUT TWO CODES SENT.
033626,000044:                                                                                                  #                                                   DEC    LMPCODE1
033627,000045:                                                                                                  #                                                   DEC    LMPCODE2
033628,000046:                                                                                                  #                                                   DEC    DT
033629,000047: 
033630,000048:                                                                                                  #  WARNING  ***** PROGRAMS UNDER EXEC WHICH CALL 1LMP + 2LMP MUST FIRST
033631,000049: 
033632,000050:                                                                                                  #                 INHIBIT INTERRUPT....RETURNS STILL INHIBITED.
033633,000051: 
033634,000052: 
033635,000053: 
033636,000054:    5065                                           BLOCK    02                                    
033637,000055:    5065           50002        2LMP               INDEX    Q                                     #  PICK UP 1ST CODE
033638,000056:    5066           30000                           CA       0                                     
033639,000057:    5067           24002                           INCR     Q                                     
033640,000058:    5070           22002                           LXCH     Q                                     #  SAVE 2ND CODE ADDRESS IN L
033641,000059: 
033642,000060:    5071                        LMPGROUP           EQUALS   2                                     
033643,000061:    5071     1115               LMPTBASE           EQUALS   TBASE2                                
033644,000062: 
033645,000063:    5071     1102               LMPPHASE           EQUALS   PHASE2                                
033646,000064: 
033647,000065:    5071           05076                           TC       STORCOM    -1                         #  TO STORE IN BUFFER AND UPDATE POINTER
033648,000066: 
033649,000067:    5072           22002                           LXCH     Q                                     #  RETREIVE 2ND CODE ADDRESS FROM L.
033650,000068: 
033651,000069:    5073           50002        1LMP               INDEX    Q                                     
033652,000070:    5074           30000                           CA       0                                     #  GET LMP CODE
033653,000071:    5075           24002                           INCR     Q                                     #  SET RETURN.
033654,000072:    5076           67737                           AD       BIT15                                 #  SET SIGN TO SHOW NEW COMMAND IN BUFFER
033655,000073: 
033656,000074:    5077           51142        STORCOM            INDEX    LMPIN                                 
033657,000075:    5100           55132                           TS       LMPCMD                                #  INSERT IN NEXT SLOT IN BUFFER
033658,000076: 
033659,000077:    5101           11142        UPLMPIN            CCS      LMPIN                                 #  UPDATE POINTER
033660,000078: 

Page 747

033662,000080:    5102           15104                           TCF      +2                                    
033663,000081:    5103           37757                           CAF      SEVEN                                 
033664,000082:    5104           55142                           TS       LMPIN                                 
033665,000083:    5105           00002                           TC       Q                                     
033666,000084: 
033667,000085:    5106           50002        2LMP+DT            INDEX    Q                                     
033668,000086:    5107           30000                           CA       0                                     #  PICK UP 1ST CODE
033669,000087:    5110           24002                           INCR     Q                                     
033670,000088:    5111           22002                           LXCH     Q                                     #  2ND CODE ADDRESS IN L.
033671,000089: 
033672,000090:    5112           05076                           TC       STORCOM    -1                         #  STORE IN BUFFER AND UPDATE POINTER
033673,000091: 
033674,000092:    5113           15115                           TCF      +2                                    
033675,000093: 
033676,000094:    5114           00006        1LMP+DT            EXTEND                                         #  SAVE RETURN FOR RESTARTS
033677,000095:    5115           23145                           QXCH     LMPRET                                #  IS LXCH IF FROM ABOVE
033678,000096:    5116           30006                           CA       BBANK                                 
033679,000097:    5117           55146                           TS       LMPBBANK                              
033680,000098: 
033681,000099:    5120           00006                           EXTEND                                         
033682,000100:    5121           51145                           INDEX    LMPRET                                
033683,000101:    5122           30001                           DCA      0                                     #  PICK UP CODE AND DT
033684,000102:    5123           05076                           TC       STORCOM    -1                         #  GO TO STORE CODE AND UPDATE POINTER
033685,000103: 
033686,000104:    5124           23147                           LXCH     SAVDT                                 #  SAVE FOR RESTART
033687,000105:    5125           04147                           TC       PHASCHNG                              #  RESTART PROTECT DELAY
033688,000106:    5126           47012                           OCT      47012                                 
033689,000107:    5127           76630                           -GENADR  SAVDT                                 
033690,000108:    5130     1115                                  EBANK=   TBASE2                                
033691,000109:    5130           05136 04002                     2CADR    LMPRST                                
033692,000110: 
033693,000111:    5132           31147                           CA       SAVDT                                 #  WAIT DT SECONDS
033694,000112:    5133           05722                           TC       VARDELAY                              
033695,000113: 
033696,000114:    5134           51145        LMPEXIT            INDEX    LMPRET                                
033697,000115:    5135           00002                           TC       2                                     
033698,000116: 
033699,000117:    5136           31146        LMPRST             CA       LMPBBANK                              #  LMP+DT RESTARTS COME HERE
033700,000118:    5137           54006                           TS       BBANK                                 #  AFTER DELAY.
033701,000119:    5140           05134                           TC       LMPEXIT                               

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