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.

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

Page 746

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

Page 747

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

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