Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston facility, and the scanning was sponsored by Mike Stewart. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are in ALL-CAPS, whereas comments added later in transcription are in Mixed-Case. In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the BURST120 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 
	BY NASA 2021106-031 DEC 7, 1967

	THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED 
	FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE 
	UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.
Note that the date is the date of the printout, not the date of the program revision.

034124,000002:                                                                                                  ## Copyright:    Public domain.
034125,000003:                                                                                                  ## Filename:     LMP_COMMAND_ROUTINES.agc
034126,000004:                                                                                                  ## Purpose:      A module for revision 0 of BURST120 (Sunburst). It
034127,000005:                                                                                                  ##               is part of the source code for the Lunar Module's
034128,000006:                                                                                                  ##               (LM) Apollo Guidance Computer (AGC) for Apollo 5.
034129,000007:                                                                                                  ## Assembler:    yaYUL
034130,000008:                                                                                                  ## Contact:      Ron Burkey <info@sandroid.org>.
034131,000009:                                                                                                  ## Website:      www.ibiblio.org/apollo/index.html
034132,000010:                                                                                                  ## Mod history:  2016-09-30 RSB  Created draft version.
034133,000011:                                                                                                  ##               2016-10-28 HG   transcribed
034134,000012:                                                                                                  ##               2016-12-06 RSB  Comments proofed using octopus/ProoferComments,
034135,000013:                                                                                                  ##                               changes made.
034136,000014: 

Page 799

034138,000016:                                                                                                  #           THE FOLLOWING SUBROUTINES ALLOW MISSION PROGRAMS TO REQUEST LMP (LEM MISSION PROGRAMMER) OUTPUTS.
034139,000017:                                                                                                  #  THE PROPER DECIMAL CODE IS ENTERED INTO A TABLE AND FROM THENCE TO CHANNEL 10 VIA T4RUPT AND ARE INCLUDED IN
034140,000018:                                                                                                  #  THE DOWNLINK.
034141,000019: 
034142,000020:                                                                                                  #           FOUR ROUTINES ARE PROVIDED:
034143,000021: 
034144,000022:                                                                                                  #                                                   TC     1LMP            CALLED UNDER EXEC OR RUPT. DELIVERS CODE
034145,000023:                                                                                                  #                                                   DEC    LMPCODE         AND RETURNS IMMEDIATELY.
034146,000024: 
034147,000025:                                                                                                  #                                                   TC     2LMP            SAME AS 1LMP BUT TWO CODES ARE
034148,000026:                                                                                                  #                                                   DEC    LMPCODE1        SENT.
034149,000027:                                                                                                  #                                                   DEC    LMPCODE2
034150,000028: 
034151,000029:                                                                                                  #                                                   TC     1LMP+DT         ASSUMES CALLED AS PART OF WAITLIST TASK.
034152,000030:                                                                                                  #                                                   DEC    LMPCODE         DELIVERS LMP CODE, DOES A VARDELAY FOR
034153,000031:                                                                                                  #                                                   DEC    DT              DT, AND THEN RETURNS UNDER WL CONTROL.
034154,000032: 
034155,000033:                                                                                                  #                                                   TC     2LMP+DT         SAME AS 1LMP+DT BUT TWO CODES SENT.
034156,000034:                                                                                                  #                                                   DEC    LMPCODE1
034157,000035:                                                                                                  #                                                   DEC    LMPCODE2
034158,000036:                                                                                                  #                                                   DEC    DT
034159,000037: 
034160,000038:                                                                                                  #  WARNING  ***** PROGRAMS UNDER EXEC WHICH CALL 1LMP + 2LMP MUST FIRST
034161,000039:                                                                                                  #                 INHIBIT INTERRUPT....RETURNS STILL INHIBITED.
034162,000040: 
034163,000041: 
034164,000042: 
034165,000043:    5052                                           BLOCK    02                                    
034166,000044:    5052           50002        2LMP               INDEX    Q                                     #  PICK UP 1ST CODE
034167,000045:    5053           30000                           CA       0                                     
034168,000046:    5054           24002                           INCR     Q                                     
034169,000047:    5055           22002                           LXCH     Q                                     #  SAVE 2ND CODE ADDRESS IN L
034170,000048: 
034171,000049:    5056                        LMPGROUP           EQUALS   2                                     
034172,000050:    5056     1115               LMPTBASE           EQUALS   TBASE2                                
034173,000051:    5056     1102               LMPPHASE           EQUALS   PHASE2                                
034174,000052: 
034175,000053:    5056           05063                           TC       STORCOM    -1                         #  TO STORE IN BUFFER AND UPDATE POINTER
034176,000054: 
034177,000055:    5057           22002                           LXCH     Q                                     #  RETRIEVE 2ND CODE ADDRESS FROM L.
034178,000056: 
034179,000057:    5060           50002        1LMP               INDEX    Q                                     
034180,000058:    5061           30000                           CA       0                                     #  GET LMP CODE
034181,000059:    5062           24002                           INCR     Q                                     #  SET RETURN.
034182,000060:    5063           67745                           AD       BIT15                                 #  SET SIGN TO SHOW NEW COMMAND IN BUFFER
034183,000061:    5064           51143        STORCOM            INDEX    LMPIN                                 
034184,000062:    5065           55133                           TS       LMPCMD                                #  INSERT IN NEXT SLOT IN BUFFER
034185,000063: 
034186,000064:    5066           11143        UPLMPIN            CCS      LMPIN                                 #  UPDATE POINTER
034187,000065: 

Page 800

034189,000067:    5067           15071                           TCF      +2                                    
034190,000068:    5070           37765                           CAF      SEVEN                                 
034191,000069:    5071           55143                           TS       LMPIN                                 
034192,000070:    5072           00002                           TC       Q                                     
034193,000071: 
034194,000072:    5073           50002        2LMP+DT            INDEX    Q                                     
034195,000073:    5074           30000                           CA       0                                     #  PICK UP 1ST CODE
034196,000074:    5075           24002                           INCR     Q                                     
034197,000075:    5076           22002                           LXCH     Q                                     #  2ND CODE ADDRESS IN L.
034198,000076: 
034199,000077:    5077           05063                           TC       STORCOM    -1                         #  STORE IN BUFFER AND UPDATE POINTER
034200,000078: 
034201,000079:    5100           15102                           TCF      +2                                    
034202,000080: 
034203,000081:    5101           00006        1LMP+DT            EXTEND                                         #  SAVE RETURN FOR RESTARTS
034204,000082:    5102           23146                           QXCH     LMPRET                                #  IS LXCH IF FROM ABOVE
034205,000083:    5103           30006                           CA       BBANK                                 
034206,000084:    5104           55147                           TS       LMPBBANK                              
034207,000085: 
034208,000086:    5105           00006                           EXTEND                                         
034209,000087:    5106           51146                           INDEX    LMPRET                                
034210,000088:    5107           30001                           DCA      0                                     #  PICK UP CODE AND DT
034211,000089:    5110           05063                           TC       STORCOM    -1                         #  GO TO STORE CODE AND UPDATE POINTER
034212,000090: 
034213,000091:    5111           23150                           LXCH     SAVDT                                 #  SAVE FOR RESTART
034214,000092:    5112           04161                           TC       PHASCHNG                              #  RESTART PROTECT DELAY
034215,000093:    5113           47012                           OCT      47012                                 
034216,000094:    5114           76627                           -GENADR  SAVDT                                 
034217,000095:    5115     1115                                  EBANK=   TBASE2                                
034218,000096:    5115           05123 04062                     2CADR    LMPRST                                
034219,000097: 
034220,000098:    5117           31150                           CA       SAVDT                                 #  WAIT DT SECONDS
034221,000099:    5120           05704                           TC       VARDELAY                              
034222,000100: 
034223,000101:    5121           51146        LMPEXIT            INDEX    LMPRET                                
034224,000102:    5122           00002                           TC       2                                     
034225,000103: 
034226,000104:    5123           31147        LMPRST             CA       LMPBBANK                              #  LMP+DT RESTARTS COME HERE
034227,000105:    5124           54006                           TS       BBANK                                 #  AFTER DELAY.
034228,000106:    5125           05121                           TC       LMPEXIT                               

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