Source Code

This source code is very close to the Apollo Guidance Computer software for the Apollo 13 Lunar module. This revision of the Luminary 131 program is from December of 1969, whereas there was a later revision in January of 1970, and still another revision in February, which is the code that flew on the mission. As far as this transcription is concerned, it was originally from a copy made in 1991 of a printout from the collection of AGC developer Don Eyles for collector David Craig. It was subsequently scanned by Gary Neff, reprocessed for online presentation at the now-discontinued History of Recent Science and Technology (HRST) website of MIT's Dibner Institute (the full-quality scans being discarded in the process), and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a high-quality replacement scan for a completely illegible page was later provided by Gary Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many errors to be introduced into the transcription. Accordingly, a second scan of the same physical printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive, and used to correct the transcription errors. All of the scanned materials mentioned, as well as other Luminary 131 related material, are available online. Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017, so the two scans are not identical in that respect. The page-headings in the printout read, in part:
	GAP:  ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091
	17:53 DEC. 19, 1969
Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together.

042077,000002:                                                                                                  ## Copyright:   Public domain.
042078,000003:                                                                                                  ## Filename:    DOWN_TELEMETRY_PROGRAM.agc
042079,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
042080,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
042081,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
042082,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
042083,000008:                                                                                                  ##              that the code format has been changed to conform to the
042084,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
042085,000010:                                                                                                  ##              original YUL assembler.
042086,000011:                                                                                                  ## Reference:   pp. 982-991
042087,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042088,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042089,000014:                                                                                                  ## Mod history: 05/29/03 RSB.   Began transcribing.
042090,000015:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
042091,000016:                                                                                                  ##              2010-08-24 JL   Fixed page 995 number.
042092,000017:                                                                                                  ##              2010-10-25 JL   Indentation fixes.
042093,000018:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
042094,000019:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
042095,000020:                                                                                                  ##                              numbers in 1701.pdf.
042096,000021:                                                                                                  ##              2017-01-28 RSB  Back-ported some comment-text fixes
042097,000022:                                                                                                  ##                              identified from Luminary 69.
042098,000023:                                                                                                  ##              2017-02-26 RSB  Proofed comment text using octopus/ProoferComments.
042099,000024:                                                                                                  ##              2017-03-01 RSB  Fixed lingering typos.
042100,000025:                                                                                                  ##              2017-03-13 RSB  Comment-text fixes noted in proofing Luminary 116.
042101,000026:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
042102,000027:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
042103,000028: 

Page 982

042105,000030:                                                                                                  #  PROGRAM NAME - DOWN TELEMETRY PROGRAM
042106,000031:                                                                                                  #  MOD NO. - 0           TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
042107,000032:                                                                                                  #                        PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
042108,000033:                                                                                                  #                        THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.  REFER TO DOWNLINK
042109,000034:                                                                                                  #                        LISTS LOG SECTION FOR MORE DETAILS.  HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
042110,000035:                                                                                                  #                        OF DOWN TELEMETRY DATA.
042111,000036:                                                                                                  #  MOD BY - KILROY, SMITH, DEWITT
042112,000037:                                                                                                  #  DATE - 02 OCT 67
042113,000038:                                                                                                  #  AUTHORS - KILROY, SMITH, DEWITT, DEWOLF, FAGIN
042114,000039:                                                                                                  #  LOG SECTION - DOWN-TELEMETRY PROGRAM
042115,000040: 
042116,000041:                                                                                                  #  FUNCTIONAL DESCRIPTION - THIS ROUTINE IS INITIATED BY TELEMETRY END
042117,000042:                                                                                                  #        PULSE FROM THE DOWNLINK TELEMETRY CONVERTER.  THIS PULSE OCCURS
042118,000043:                                                                                                  #        AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
042119,000044:                                                                                                  #        EXECUTED AT THESE RATES.  THIS ROUTINE SELECTS THE APPROPRIATE
042120,000045:                                                                                                  #        AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
042121,000046:                                                                                                  #        CHANNELS 34 AND 35.  THE INFORMATION IS THEN GATED OUT FROM THE
042122,000047:                                                                                                  #        LGC IN SERIAL FASHION.
042123,000048: 
042124,000049:                                                                                                  #        THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST.  SINCE DOWNRUPTS
042125,000050:                                                                                                  #        OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
042126,000051:                                                                                                  #        CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
042127,000052:                                                                                                  #        OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
042128,000053: 
042129,000054:                                                                                                  #  CALLING SEQUENCE - NONE
042130,000055:                                                                                                  #        PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
042131,000056:                                                                                                  #        RESULT OF A DOWNRUPT.  CONTROL IS RETURNED VIA TCF RESUME WHICH
042132,000057:                                                                                                  #        IN EFFECT IS A RESUME.
042133,000058: 
042134,000059:                                                                                                  #  SUBROUTINES CALLED - NONE
042135,000060: 
042136,000061:                                                                                                  #  NORMAL EXIT MODE - TCF RESUME
042137,000062: 
042138,000063:                                                                                                  #  ALARM OR ABORT EXIT MODE - NONE
042139,000064: 
042140,000065:                                                                                                  #  RESTART PROTECTION:
042141,000066:                                                                                                  #        ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
042142,000067:                                                                                                  #        DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E. CURRENT CONTENTS OF DNLSTADR).  THIS HAS THE
042143,000068:                                                                                                  #        EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
042144,000069:                                                                                                  #        THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
042145,000070:                                                                                                  #        DOWNLIST.
042146,000071: 
042147,000072:                                                                                                  #        ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
042148,000073: 
042149,000074:                                                                                                  #  DOWNLINK LIST SELECTION:
042150,000075:                                                                                                  #        THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
042151,000076:                                                                                                  #        1.      FRESH START
042152,000077:                                                                                                  #        2.      V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
042153,000078:                                                                                                  #        3.      UPDATE PROGRAM (P27)
042154,000079:                                                                                                  #        4.      NON-V37 SELECTABLE TYPE PROGRAMS (E.G. AGS  INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
042155,000080:                                                                                                  #                TRANSITION(COLOSSUS) ETC.).
042156,000081: 
042157,000082:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
042158,000083:                                                                                                  #        READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
042159,000084: 
042160,000085:                                                                                                  #  OUTPUT - EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E. 200 LGC
042161,000086:                                                                                                  #        COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
042162,000087: 
042163,000088:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED - NONE
042164,000089:                                                                                                  #        'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
042165,000090: 
042166,000091:                                                                                                  #  DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM) -
042167,000092:                                                                                                  #        LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.

Page 983
This page is empty

042170,000095: 

Page 984

042172,000097:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
042173,000098:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
042174,000099: 
042175,000100:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
042176,000101:                                                                                                  #  1.    DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
042177,000102:                                                                                                  #        DOWN-TELEMETRY PROGRAM.  THIS IS DONE FOR EASE OF CODING, FASTER
042178,000103:                                                                                                  #        EXECUTION.
042179,000104:                                                                                                  #  2.    EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
042180,000105:                                                                                                  #        SUBLISTS.
042181,000106:                                                                                                  #  3.    A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
042182,000107:                                                                                                  #        DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
042183,000108:                                                                                                  #        CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
042184,000109:                                                                                                  #  4.    SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
042185,000110:                                                                                                  #        SAVED IN A BUFFER DURING ONE DOWNRUPT.
042186,000111:                                                                                                  #  5.    THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
042187,000112:                                                                                                  #        OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
042188,000113:                                                                                                  #        IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
042189,000114:                                                                                                  #  6.    ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
042190,000115:                                                                                                  #        CREATED FOR THE DOWNLIST PROGRAM.
042191,000116:                                                                                                  #        A.      1DNADR                  1-WORD DOWNLIST ADDRESS.
042192,000117:                                                                                                  #                SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
042193,000118:                                                                                                  #                HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
042194,000119:                                                                                                  #        B.      2DNADR - 6DNADR         N-WORD DOWNLIST ADDRESS, N = 2 - 6.
042195,000120:                                                                                                  #                SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
042196,000121:                                                                                                  #                FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
042197,000122:                                                                                                  #                PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
042198,000123:                                                                                                  #        C.      DNCHAN                  DOWNLIST CHANNEL ADDRESS.
042199,000124:                                                                                                  #                SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
042200,000125:                                                                                                  #                A PAIR OF CHANNELS FOR DOWN TELEMETRY.
042201,000126:                                                                                                  #        D.      DNPTR                   DOWN TELEMETRY SUBLIST POINTER.
042202,000127:                                                                                                  #                SAME AS CAF BUT TAGGED AS A CONSTANT.  USED IN CONTROL LIST TO POINT TO A SUBLIST.
042203,000128:                                                                                                  #                CAUTION--- A DNPTR CANNOT BE USED IN A SUBLIST.
042204,000129:                                                                                                  #  7.    THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
042205,000130:                                                                                                  #        A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
042206,000131:                                                                                                  #  8.    IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
042207,000132: 
042208,000133:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
042209,000134:                                                                                                  #  (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
042210,000135:                                                                                                  #  DONE)
042211,000136:                                                                                                  #  1.    SNAPSHOT DOWNLIST:
042212,000137:                                                                                                  #        (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
042213,000138:                                                                                                  #        (B) CAN CONTAIN ONLY 1DNADR'S
042214,000139:                                                                                                  #  2.    ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
042215,000140:                                                                                                  #        EQUIVALENT OF THE FOLLOWING ECADRS (I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
042216,000141:                                                                                                  #        (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
042217,000142:                                                                                                  #  3.    CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777

Page 985

042219,000144:                                                                                                  #  4.    THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
042220,000145:                                                                                                  #        CONTROL SECTION OF THE DOWNLIST.
042221,000146:                                                                                                  #  5.    'DNCHAN 0' CANNOT BE USED.
042222,000147:                                                                                                  #  6.    'DNPTR 0' CANNOT BE USED.
042223,000148:                                                                                                  #  7.    DNPTR CANNOT APPEAR IN A SUBLIST.
042224,000149: 
042225,000150:                                                                                                  #  EBANK SETTINGS
042226,000151:                                                                                                  #        IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
042227,000152:                                                                                                  #        'GARBAGE' INTO BITS15-12 OF EBANK.  HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
042228,000153:                                                                                                  #        SIGNIFICANT SOMEDAY IN THE FUTURE.  IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
042229,000154:                                                                                                  #        THAT BITS 15-12 OF EBANK ARE ZERO.
042230,000155: 
042231,000156:                                                                                                  #  INITIALIZATION REQUIRED - TO INTERRUPT CURRENT LIST AND START A NEW ONE..
042232,000157:                                                                                                  #        1. ADRES OF DOWNLINK LIST INTO DNLSTADR
042233,000158:                                                                                                  #        2. NEGONE INTO SUBLIST
042234,000159:                                                                                                  #        3. NEGONE INTO DNECADR
042235,000160: 
042236,000161: 22,3711                                           BANK     22                                    
042237,000162: 05,2000                                           SETLOC   DOWNTELM                              
042238,000163: 05,2000                                           BANK                                           
042239,000164: 
042240,000165: 05,3505     0340                                  EBANK=   DNTMBUFF                              
042241,000166: 05,3505                                           COUNT*   $$/DPROG                              
042242,000167: 05,3505           54016        DODOWNTM           TS       BANKRUPT                              
042243,000168: 05,3506           00006                           EXTEND                                         
042244,000169: 05,3507           22012                           QXCH     QRUPT                                 #  SAVE Q
042245,000170: 05,3510           34745                           CA       BIT7                                  #  AT THE BEGINNING OF THE LIST THE WORD
042246,000171: 05,3511           00006                           EXTEND                                         #  ORDER BIT WILL BE SET BACK TO ZERO.
042247,000172: 05,3512           02013                           RAND     CHAN13                                
042248,000173: 05,3513           10000                           CCS      A                                     
042249,000174: 05,3514           00335                           TC       DNTMGOTO                              
042250,000175: 05,3515           06022                           TC       C13STALL                              
042251,000176: 05,3516           34745                           CA       BIT7                                  
042252,000177: 05,3517           00006                           EXTEND                                         #  SET WORD ORDER BIT TO 1 ONLY IF IT
042253,000178: 05,3520           05013                           WOR      CHAN13                                #  ALREADY ISN'T.
042254,000179: 05,3521           00335                           TC       DNTMGOTO                              #  GOTO APPROPRIATE PHASE OF PROGRAM
042255,000180: 
042256,000181: 05,2000                                           SETLOC   DOWNTELM                              
042257,000182: 05,2000                                           BANK                                           
042258,000183: 
042259,000184: 05,3522           37752        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
042260,000185: 05,3523           54337                           TS       SUBLIST                               #  WORDS TO MINUS ONE
042261,000186: 05,3524           54336                           TS       DNECADR                               
042262,000187: 05,3525           33652                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS

Page 986

042264,000189: 05,3526           54335                           TS       DNTMGOTO                              #  GO TO DNPHASE2
042265,000190: 05,3527           13543                           TCF      NEWLIST                               
042266,000191: 05,3530           10336        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS
042267,000192: 05,3531           03665        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
042268,000193: 05,3532           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
042269,000194: 05,3533           13534                           TCF      +1                                    #  (ECADR OF 3776 + 74001 = 77777)
042270,000195: 
042271,000196: 05,3534           10337                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL
042272,000197: 05,3535           13700                           TCF      NEXTINSL                              #  YES
042273,000198: 05,3536           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
042274,000199: 
042275,000200: 05,3537           30334        CHKLIST            CA       CTLIST                                
042276,000201: 05,3540           00006                           EXTEND                                         
042277,000202: 05,3541           63543                           BZMF     NEWLIST                               #  IT WILL BE NEGATIVE AT END OF LIST
042278,000203: 05,3542           13550                           TCF      NEXTINCL                              
042279,000204: 05,3543           50333        NEWLIST            INDEX    DNLSTCOD                              
042280,000205: 05,3544           32441                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
042281,000206: 05,3545           54334                           TS       CTLIST                                #        STARTING ADDRESS OF NEW LIST
042282,000207: 05,3546           40333                           CS       DNLSTCOD                              
042283,000208: 05,3547           13767                           TCF      SENDID     +3                         
042284,000209: 05,3550           50334        NEXTINCL           INDEX    CTLIST                                
042285,000210: 05,3551           30000                           CA       0                                     
042286,000211: 05,3552           10000                           CCS      A                                     
042287,000212: 05,3553           24334                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
042288,000213: 05,3554           13560                           TCF      +4                                    #  ON NEXT ENTRY TO PROG. (A SHOULD NOT =0)
042289,000214: 05,3555           56334                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
042290,000215: 05,3556           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
042291,000216: 05,3557           56334                           XCH      CTLIST                                #                                  (ST IN )
042292,000217: 05,3560           24000                 +4        INCR     A                                     #                                  (CTLIST)
042293,000218: 05,3561           54336                           TS       DNECADR                               #  SAVE DNADR
042294,000219: 05,3562           63532                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
042295,000220: 05,3563           10000                           CCS      A                                     
042296,000221: 05,3564           13570                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
042297,000222: 05,3565           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14 (CAN'T GET HERE)
042298,000223: 05,3566           13570                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
042299,000224: 05,3567           03612        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
042300,000225: 05,3570           30336                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
042301,000226: 05,3571           63565                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
042302,000227: 05,3572           00006                           EXTEND                                         
042303,000228: 05,3573           63665                           BZMF     FETCH2WD                              #  YES.  (A MUST NEVER BE ZERO)
042304,000229: 05,3574           67744                           AD       MINB12                                #  NO- IS IT A POINTER (DNPTR) OR A
042305,000230: 05,3575           00006                           EXTEND                                         #      CHANNEL(DNCHAN)
042306,000231: 05,3576           63623                           BZMF     DODNPTR                               #  IT'S A POINTER.  (A MUST NEVER BE ZERO)
042307,000232: 
042308,000233: 05,3577           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND)  IT S A CHANNEL
042309,000234: 05,3600           50336                           INDEX    DNECADR                               
042310,000235: 05,3601           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
042311,000236: 05,3602           54001                           TS       L                                     
042312,000237: 05,3603           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
042313,000238: 05,3604           50336                           INDEX    DNECADR                               

Page 987

042315,000240: 05,3605           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
042316,000241: 05,3606           54336                           TS       DNECADR                               #  SET DNECADR
042317,000242: 05,3607           37752                           CA       NEGONE                                #        TO MINUS
042318,000243: 05,3610           56336                           XCH      DNECADR                               #                WHILE PRESERVING A.
042319,000244: 05,3611           13713                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
042320,000245: 
042321,000246: 05,3612           00006        WOZERO             EXTEND                                         
042322,000247: 05,3613           23265                           QXCH     C13QSAV                               
042323,000248: 05,3614           22070                           LXCH     RUPTREG1                              
042324,000249: 05,3615           06022                           TC       C13STALL                              
042325,000250: 
042326,000251: 05,3616           22070                           LXCH     RUPTREG1                              
042327,000252: 05,3617           44745                           CS       BIT7                                  
042328,000253: 05,3620           00006                           EXTEND                                         
042329,000254: 05,3621           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO
042330,000255: 05,3622           01265                           TC       C13QSAV                               
042331,000256: 
042332,000257: 05,3623           50336        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
042333,000258: 05,3624           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
042334,000259: 05,3625           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
042335,000260: 05,3626           30336                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
042336,000261: 05,3627           13677                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
042337,000262: 
042338,000263: 05,3630           56336                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
042339,000264: 05,3631           54337                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
042340,000265: 05,3632           34755                           CAF      ZERO                                  #        A    INTO     A
042341,000266: 05,3633           56336                           XCH      TMINDEX                               #  (NOTE.. TMINDEX = DNECADR)
042342,000267: 
042343,000268:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
042344,000269:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
042345,000270:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
042346,000271:                                                                                                  #  TO MINIMIZE TIME.  THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
042347,000272:                                                                                                  #  THESE RULES ARE ......
042348,000273:                                                                                                  #        1.      ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
042349,000274:                                                                                                  #        2.      THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
042350,000275: 
042351,000276: 05,3634           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
042352,000277: 05,3635           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
042353,000278: 05,3636           00006                           EXTEND                                         
042354,000279: 05,3637           50000                           INDEX    A                                     
042355,000280: 05,3640  E3,1401                                  EBANK=   1401                                  
042356,000281: 05,3640           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
042357,000282: 05,3641     0340                                  EBANK=   DNTMBUFF                              
042358,000283: 05,3641           50336                           INDEX    TMINDEX                               
042359,000284: 05,3642           52341                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
042360,000285: 05,3643           24336                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
042361,000286: 05,3644           24336                           INCR     TMINDEX                               
042362,000287: 05,3645           24337        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT

Page 988

042364,000289: 05,3646           50337                           INDEX    SUBLIST                               
042365,000290: 05,3647           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
042366,000291: 05,3650           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.
042367,000292: 05,3651           13634                           TCF      SNAPLOOP                              #  NOT LAST TWO.
042368,000293: 05,3652           03530        LDNPHAS2           GENADR   DNPHASE2                              
042369,000294: 05,3653           54337                           TS       SUBLIST                               #  YES, LAST.  SAVE A.
042370,000295: 05,3654           37752                           CA       NEGONE                                #  SET DNECADR AND
042371,000296: 05,3655           54336                           TS       DNECADR                               #        SUBLIST POINTERS
042372,000297: 05,3656           56337                           XCH      SUBLIST                               #                TO NEGATIVE VALUES.
042373,000298: 05,3657           54003                           TS       EBANK                                 
042374,000299: 05,3660           74357                           MASK     LOW8                                  
042375,000300: 05,3661           00006                           EXTEND                                         
042376,000301: 05,3662           50000                           INDEX    A                                     
042377,000302: 05,3663  E3,1401                                  EBANK=   1401                                  
042378,000303: 05,3663           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.
042379,000304: 05,3664     0340                                  EBANK=   DNTMBUFF                              
042380,000305: 05,3664           13713        SNAPEND            TCF      DNTMEXIT                              #  NOW GO SEND THEM.
042381,000306: 
042382,000307: 05,3665           30336        FETCH2WD           CA       DNECADR                               
042383,000308: 05,3666           54003                           TS       EBANK                                 #  SET EBANK
042384,000309: 05,3667           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
042385,000310: 05,3670           54001                           TS       L                                     
042386,000311: 05,3671           33536                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
042387,000312: 05,3672           26336                           ADS      DNECADR                               
042388,000313: 05,3673           00006                           EXTEND                                         
042389,000314: 05,3674           50001                           INDEX    L                                     
042390,000315: 05,3675  E3,1400                                  EBANK=   1400                                  
042391,000316: 05,3675           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
042392,000317: 05,3676     0340                                  EBANK=   DNTMBUFF                              
042393,000318: 05,3676           13713                           TCF      DNTMEXIT                              #  NOW GO SEND THEM.
042394,000319: 
042395,000320: 05,3677           54337        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
042396,000321: 05,3700           50337        NEXTINSL           INDEX    SUBLIST                               
042397,000322: 05,3701           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
042398,000323: 05,3702           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
042399,000324: 05,3703           24337                           INCR     SUBLIST                               #  NO -
042400,000325: 05,3704           13710                           TCF      +4                                    
042401,000326: 05,3705           54337                           TS       SUBLIST                               #  SAVE A.
042402,000327: 05,3706           37752                           CA       NEGONE                                #  SET SUBLIST TO MINUS
042403,000328: 05,3707           56337                           XCH      SUBLIST                               #  RETRIEVE A.
042404,000329: 05,3710           24000                 +4        INCR     A                                     
042405,000330: 05,3711           54336                           TS       DNECADR                               #  SAVE DNADR
042406,000331: 05,3712           13571                           TCF      SETWO      +2                         #  GO USE COMMON CODING (PROBLEMS WOULD
042407,000332:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
042408,000333:                                                                                                  #  DNPTR NOW)
042409,000334: 
042410,000335: 05,3713           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
042411,000336: 05,3714           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
042412,000337: 05,3715           30001                           CA       L                                     #  RESPECTIVELY
042413,000338: 05,3716           00006        TMEXITL            EXTEND                                         

Page 989

042415,000340: 05,3717           01035                           WRITE    DNTM2                                 
042416,000341: 05,3720           15270        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.
042417,000342: 
042418,000343: 05,3721     7744               MINB12             EQUALS   -1/8                                  
042419,000344: 05,3721     0336               DNECADR            EQUALS   TMINDEX                               
042420,000345: 05,3721     0334               CTLIST             EQUALS   LDATALST                              
042421,000346: 05,3721     0337               SUBLIST            EQUALS   DNQ                                   
042422,000347: 
042423,000348:                                                                                                  #  MOD BY - DENSMORE - JUNE 1969 - ELIMINATE ERASABLE DUMP COUNT
042424,000349: 

Page 990

042426,000351:                                                                                                  #  SUBROUTINE NAME - DNDUMP
042427,000352: 
042428,000353:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND (DUMP) ALL 8 BANKS OF ERASABLE STORAGE TWICE.  BANKS ARE SENT ONE AT A TIME
042429,000354:                                                                                                  #        EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
042430,000355:                                                                                                  #        EBANK.  EBANKS ARE DUMPED IN ORDER (I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
042431,000356: 
042432,000357:                                                                                                  #  CALLING SEQUENCE - THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
042433,000358:                                                                                                  #        AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
042434,000359:                                                                                                  #        WILL BEGIN.
042435,000360: 
042436,000361:                                                                                                  #        ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
042437,000362:                                                                                                  #        BY THE FOLLOWING:
042438,000363: 
042439,000364:                                                                                                  #        1.      A FRESH START
042440,000365:                                                                                                  #        2.      COMPLETION OF BOTH COMPLETE DUMPS
042441,000366:                                                                                                  #        3.      AND INVOLUNTARILY BY A RESTART.
042442,000367: 
042443,000368:                                                                                                  #  NORMAL EXIT MODE - TCF DNPHASE1
042444,000369: 
042445,000370:                                                                                                  #  ALARM OR ABORT MODE - NONE
042446,000371: 
042447,000372:                                                                                                  #  *SUBROUTINES CALLED - NONE.
042448,000373: 
042449,000374:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
042450,000375:                                                                                                  #        NONE
042451,000376: 
042452,000377:                                                                                                  #  DEBRIS - DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
042453,000378: 
042454,000379:                                                                                                  #  TIMING -      TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
042455,000380:                                                                                                  #                TIME (IN SECS) =  (   4    )*(    8    )*(    256     +     4   )  /     100
042456,000381:                                                                                                  #                THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
042457,000382: 
042458,000383:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM -
042459,000384:                                                                                                  #        (REMINDER - THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
042460,000385: 
042461,000386:                                                                                                  #        DOWNLIST                                W
042462,000387:                                                                                                  #          WORD  TAKEN FROM CONTENTS OF  EXAMPLE O       COMMENTS
042463,000388:                                                                                                  #            1   ERASID                   0177X  0       DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
042464,000389:                                                                                                  #            2   LOWIDCOD                 77340  1       DOWNLINK SYNCH BITS.  (SAME ONE USED IN ALL OTHER DOWNLISTS)
042465,000390:                                                                                                  #            3   DUMPLOC                  13400  1       (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
042466,000391:                                                                                                  #            4   TIME1                    14120  1       TIME IN CENTISECONDS
042467,000392:                                                                                                  #            5   FIRST WORD OF EBANK X    03400  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
042468,000393:                                                                                                  #            6   2ND   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
042469,000394:                                                                                                  #            7   3RD   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
042470,000395:                                                                                                  #            .                                   1
042471,000396:                                                                                                  #            .                                   1
042472,000397:                                                                                                  #            .                                   1
042473,000398:                                                                                                  #         260D   256TH WORD OF EBANK X    03777  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
042474,000399: 
042475,000400:                                                                                                  #  NOTE -        DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
042476,000401:                                                                                                  #                THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
042477,000402:                                                                                                  #                                                X = NOT USED
042478,000403:                                                                                                  #                X ABC EEE RRRRRRRR            ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
042479,000404:                                                                                                  #                                                    COMPLETE ERASABLE DUMP NUMBER 1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
042480,000405:                                                                                                  #                                              EEE = EBANK BITS
042481,000406:                                                                                                  #                                         RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
042482,000407: 
042483,000408: 05,3721           34755        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
042484,000409: 05,3722           54336                           TS       DUMPLOC                               #  ERASABLE DUMP
042485,000410: 05,3723           03764                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS
042486,000411: 

Page 991

042488,000413: 05,3724           33733                           CA       LDNDUMP1                              #  SET DNTMGOTO
042489,000414: 05,3725           54335                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
042490,000415: 05,3726           30025                           CA       TIME1                                 #  PLACE TIME1
042491,000416: 05,3727           56001                           XCH      L                                     #  INTO L
042492,000417: 05,3730           30336                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
042493,000418: 05,3731           13713                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
042494,000419: 
042495,000420: 05,3732           03734        LDNDUMP            ADRES    DNDUMP                                
042496,000421: 05,3733           03746        LDNDUMP1           ADRES    DNDUMP1                               
042497,000422: 
042498,000423: 05,3734           34752        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
042499,000424: 05,3735           26336                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
042500,000425: 05,3736           74357                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
042501,000426: 05,3737           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
042502,000427: 05,3740           13750                           TCF      DNDUMP2                               #  NO - THEN CONTINUE DUMPING
042503,000428: 05,3741           30336                           CA       DUMPLOC                               #  YES - IS THIS THE END OF THE
042504,000429: 05,3742           74737                           MASK     BIT13                                 #  SECOND COMPLETE ERASABLE DUMP?
042505,000430: 05,3743           00006                           EXTEND                                         
042506,000431: 05,3744           13723                           BZF      DNDUMPI    +2                         #  NO - GO BACK AND INITIALIZE NEXT BANK
042507,000432: 05,3745           13522                           TCF      DNPHASE1                              #  YES - SEND DOWNLIST AGAIN
042508,000433: 05,3746           33732        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
042509,000434: 05,3747           54335                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
042510,000435: 
042511,000436: 05,3750           30336        DNDUMP2            CA       DUMPLOC                               
042512,000437: 05,3751           54003                           TS       EBANK                                 #  SET EBANK
042513,000438: 05,3752           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
042514,000439: 05,3753           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
042515,000440: 05,3754           34754                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
042516,000441: 05,3755           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
042517,000442: 05,3756           50002                           INDEX    Q                                     
042518,000443: 05,3757  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
042519,000444: 05,3757           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
042520,000445: 05,3760           56001                           XCH      L                                     
042521,000446: 05,3761           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
042522,000447: 05,3762           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
042523,000448: 05,3763     0340                                  EBANK=   DNTMBUFF                              
042524,000449: 05,3763           13713                           TCF      DNTMEXIT                              #  GO SEND THEM
042525,000450: 
042526,000451: 05,3764           00006        SENDID             EXTEND                                         #  ** ENTRANCE USED BY ERASABLE DUMP PROG. **
042527,000452: 05,3765           22335                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
042528,000453: 05,3766           35011                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
042529,000454: 
042530,000455: 05,3767           54001                           TS       L                                     #  ** ENTRANCE USED BY REGULAR DOWNLINK PG **
042531,000456: 05,3770           03612                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
042532,000457: 05,3771           32065                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
042533,000458: 05,3772           56001                           XCH      L                                     #  AND ID BACK INTO A
042534,000459: 05,3773           13713                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).
042535,000460: 

End of include-file DOWN-TELEMETRY_PROGRAM.agc.  Parent file is MAIN.agc