Source Code

This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the second release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 97. A bug (which had been around since at least Apollo 10, Luminary 69) was discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute revision into Rev 1, which is what actually flew rather than the Rev 0 presented here. A hardcopy of Rev 0 is known to exist — it belonged to AGC developer Allan Klumpp for many years — but unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus the code you see here had been reconstructed (we believe accurately) rather than transcribed. The first step of the reconstruction of the Rev 0 source code was the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection. The process of reverting the active portion of the source code (i.e., other than program comments) from Rev 1 to Rev 0 was very minor, consisting only of moving the position of the STARTSB1 label in FRESH START AND RESTART. Allan had previously given us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read, in part:

	GAP:  ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051

A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here.

043840,000002:                                                                                                  ## Copyright:   Public domain.
043841,000003:                                                                                                  ## Filename:    DOWN-TELEMETRY_PROGRAM.agc
043842,000004:                                                                                                  ## Purpose:     Part of the reconstructed source code for LMY99 Rev 0,
043843,000005:                                                                                                  ##              otherwise known as Luminary Rev 99, the second release
043844,000006:                                                                                                  ##              of the Apollo Guidance Computer (AGC) software for Apollo 11.
043845,000007:                                                                                                  ##              It differs from LMY99 Rev 1 (the flown version) only in the
043846,000008:                                                                                                  ##              placement of a single label. The corrections shown here have
043847,000009:                                                                                                  ##              been verified to have the same bank checksums as AGC developer
043848,000010:                                                                                                  ##              Allan Klumpp's copy of Luminary Rev 99, and so are believed
043849,000011:                                                                                                  ##              to be accurate. This file is intended to be a faithful 
043850,000012:                                                                                                  ##              recreation, except that the code format has been changed to 
043851,000013:                                                                                                  ##              conform to the requirements of the yaYUL assembler rather than 
043852,000014:                                                                                                  ##              the original YUL assembler.
043853,000015:                                                                                                  ##
043854,000016:                                                                                                  ## Assembler:   yaYUL
043855,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
043856,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo.
043857,000019:                                                                                                  ## Pages:       988-997
043858,000020:                                                                                                  ## Mod history: 2009-05-24 RSB  Adapted from the corresponding 
043859,000021:                                                                                                  ##                              Luminary131 file, using page 
043860,000022:                                                                                                  ##                              images from Luminary 1A.
043861,000023:                                                                                                  ##              2011-01-06 JL   Fixed pseudo-label indentation.
043862,000024:                                                                                                  ##              2016-12-17 RSB  Proofed text comments with octopus/ProoferComments
043863,000025:                                                                                                  ##                              and corrected the errors found.
043864,000026:                                                                                                  ##              2017-01-28 RSB  Back-ported some comment-text fixes
043865,000027:                                                                                                  ##                              identified from Luminary 69.
043866,000028:                                                                                                  ##              2017-03-13 RSB  Comment-text fixes noted in proofing Luminary 116.
043867,000029:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
043868,000030:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
043869,000031:                                                                                                  ##              2017-08-01 MAS  Created from LMY99 Rev 1.
043870,000032: 
043871,000033:                                                                                                  ## This source code has been transcribed or otherwise adapted from
043872,000034:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
043873,000035:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
043874,000036:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
043875,000037:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
043876,000038:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
043877,000039:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
043878,000040:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
043879,000041:                                                                                                  ## actually created.
043880,000042:                                                                                                  ##
043881,000043:                                                                                                  ## The code has been modified to match LMY99 Revision 0, otherwise
043882,000044:                                                                                                  ## known as Luminary Revision 99, the Apollo 11 software release preceeding
043883,000045:                                                                                                  ## the listing from which it was transcribed. It has been verified to
043884,000046:                                                                                                  ## contain the same bank checksums as AGC developer Allan Klumpp's listing
043885,000047:                                                                                                  ## of Luminary Revision 99 (for which we do not have scans).
043886,000048:                                                                                                  ##
043887,000049:                                                                                                  ## Notations on Allan Klumpp's listing read, in part:
043888,000050:                                                                                                  ##
043889,000051:                                                                                                  ##      ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
043890,000052: 

Page 988

043892,000054:                                                                                                  #  PROGRAM NAME - DOWN TELEMETRY PROGRAM
043893,000055:                                                                                                  #  MOD NO. - 0           TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
043894,000056:                                                                                                  #                        PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
043895,000057:                                                                                                  #                        THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.  REFER TO DOWNLINK
043896,000058:                                                                                                  #                        LISTS LOG SECTION FOR MORE DETAILS.  HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
043897,000059:                                                                                                  #                        OF DOWN TELEMETRY DATA.
043898,000060:                                                                                                  #  MOD BY - KILROY, SMITH, DEWITT
043899,000061:                                                                                                  #  DATE - 02 OCT 67
043900,000062:                                                                                                  #  AUTHORS - KILROY, SMITH, DEWITT, DEWOLF, FAGIN
043901,000063:                                                                                                  #  LOG SECTION - DOWN-TELEMETRY PROGRAM
043902,000064: 
043903,000065:                                                                                                  #  FUNCTIONAL DESCRIPTION - THIS ROUTINE IS INITIATED BY TELEMETRY END
043904,000066:                                                                                                  #        PULSE FROM THE DOWNLINK TELEMETRY CONVERTER.  THIS PULSE OCCURS
043905,000067:                                                                                                  #        AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
043906,000068:                                                                                                  #        EXECUTED AT THESE RATES.  THIS ROUTINE SELECTS THE APPROPRIATE
043907,000069:                                                                                                  #        AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
043908,000070:                                                                                                  #        CHANNELS 34 AND 35.  THE INFORMATION IS THEN GATED OUT FROM THE
043909,000071:                                                                                                  #        LGC IN SERIAL FASHION.
043910,000072: 
043911,000073:                                                                                                  #        THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST.  SINCE DOWNRUPTS
043912,000074:                                                                                                  #        OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
043913,000075:                                                                                                  #        CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
043914,000076:                                                                                                  #        OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
043915,000077: 
043916,000078:                                                                                                  #  CALLING SEQUENCE - NONE
043917,000079:                                                                                                  #        PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
043918,000080:                                                                                                  #        RESULT OF A DOWNRUPT.  CONTROL IS RETURNED VIA TCF RESUME WHICH
043919,000081:                                                                                                  #        IN EFFECT IS A RESUME.
043920,000082: 
043921,000083:                                                                                                  #  SUBROUTINES CALLED - NONE
043922,000084: 
043923,000085:                                                                                                  #  NORMAL EXIT MODE - TCF RESUME
043924,000086: 
043925,000087:                                                                                                  #  ALARM OR ABORT EXIT MODE - NONE
043926,000088: 
043927,000089:                                                                                                  #  RESTART PROTECTION:
043928,000090:                                                                                                  #        ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
043929,000091:                                                                                                  #        DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E. CURRENT CONTENTS OF DNLSTADR).  THIS HAS THE
043930,000092:                                                                                                  #        EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
043931,000093:                                                                                                  #        THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
043932,000094:                                                                                                  #        DOWNLIST.
043933,000095: 
043934,000096:                                                                                                  #        ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
043935,000097: 
043936,000098:                                                                                                  #  DOWNLINK LIST SELECTION:
043937,000099:                                                                                                  #        THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
043938,000100:                                                                                                  #        1.      FRESH START
043939,000101:                                                                                                  #        2.      V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
043940,000102:                                                                                                  #        3.      UPDATE PROGRAM (P27)
043941,000103:                                                                                                  #        4.      NON-V37 SELECTABLE TYPE PROGRAMS (E.G. AGS INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
043942,000104:                                                                                                  #                TRANSITION (COLOSSUS) ETC.).
043943,000105: 
043944,000106:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
043945,000107:                                                                                                  #        READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
043946,000108: 
043947,000109:                                                                                                  #  OUTPUT - EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E. 200 LGC
043948,000110:                                                                                                  #        COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
043949,000111: 
043950,000112:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED - NONE
043951,000113:                                                                                                  #        'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
043952,000114: 
043953,000115:                                                                                                  #  DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM) -
043954,000116:                                                                                                  #        LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.
043955,000117: 

Page 989
This page is empty

043958,000120: 

Page 990

043960,000122:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
043961,000123:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
043962,000124: 
043963,000125:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
043964,000126:                                                                                                  #  1.    DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
043965,000127:                                                                                                  #        DOWN-TELEMETRY PROGRAM.  THIS IS DONE FOR EASE OF CODING, FASTER
043966,000128:                                                                                                  #        EXECUTION.
043967,000129:                                                                                                  #  2.    EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
043968,000130:                                                                                                  #        SUBLISTS.
043969,000131:                                                                                                  #  3.    A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
043970,000132:                                                                                                  #        DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
043971,000133:                                                                                                  #        CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
043972,000134:                                                                                                  #  4.    SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
043973,000135:                                                                                                  #        SAVED IN A BUFFER DURING ONE DOWNRUPT.
043974,000136:                                                                                                  #  5.    THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
043975,000137:                                                                                                  #        OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
043976,000138:                                                                                                  #        IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
043977,000139:                                                                                                  #  6.    ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
043978,000140:                                                                                                  #        CREATED FOR THE DOWNLIST PROGRAM.
043979,000141:                                                                                                  #        A.      1DNADR                  1-WORD DOWNLIST ADDRESS.
043980,000142:                                                                                                  #                SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
043981,000143:                                                                                                  #                HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
043982,000144:                                                                                                  #        B.      2DNADR - 6DNADR         N-WORD DOWNLIST ADDRESS, N = 2 - 6.
043983,000145:                                                                                                  #                SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
043984,000146:                                                                                                  #                FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
043985,000147:                                                                                                  #                PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
043986,000148:                                                                                                  #        C.      DNCHAN                  DOWNLIST CHANNEL ADDRESS.
043987,000149:                                                                                                  #                SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
043988,000150:                                                                                                  #                A PAIR OF CHANNELS FOR DOWN TELEMETRY.
043989,000151:                                                                                                  #        D.      DNPTR                   DOWN TELEMETRY SUBLIST POINTER.
043990,000152:                                                                                                  #                SAME AS CAF BUT TAGGED AS A CONSTANT.  USED IN CONTROL LIST TO POINT TO A SUBLIST.
043991,000153:                                                                                                  #                CAUTION --- A DNPTR CANNOT BE USED IN A SUBLIST.
043992,000154:                                                                                                  #  7.    THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
043993,000155:                                                                                                  #        A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
043994,000156:                                                                                                  #  8.    IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
043995,000157: 
043996,000158:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
043997,000159:                                                                                                  #  (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
043998,000160:                                                                                                  #  DONE)
043999,000161:                                                                                                  #  1.    SNAPSHOT DOWNLIST:
044000,000162:                                                                                                  #        (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
044001,000163:                                                                                                  #        (B) CAN CONTAIN ONLY 1DNADR'S
044002,000164:                                                                                                  #  2.    ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
044003,000165:                                                                                                  #        EQUIVALENT OF THE FOLLOWING ECADRS (I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
044004,000166:                                                                                                  #        (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
044005,000167:                                                                                                  #  3.    CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777

Page 991

044007,000169:                                                                                                  #  4.    THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
044008,000170:                                                                                                  #        CONTROL SECTION OF THE DOWNLIST.
044009,000171:                                                                                                  #  5.    'DNCHAN 0' CANNOT BE USED.
044010,000172:                                                                                                  #  6.    'DNPTR 0' CANNOT BE USED.
044011,000173:                                                                                                  #  7.    DNPTR CANNOT APPEAR IN A SUBLIST.
044012,000174: 
044013,000175:                                                                                                  #  EBANK SETTINGS
044014,000176:                                                                                                  #        IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
044015,000177:                                                                                                  #        'GARBAGE' INTO BITS15-12 OF EBANK.  HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
044016,000178:                                                                                                  #        SIGNIFICANT SOMEDAY IN THE FUTURE.  IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
044017,000179:                                                                                                  #        THAT BITS 15-12 OF EBANK ARE ZERO.
044018,000180: 
044019,000181:                                                                                                  #  INITIALIZATION REQUIRED - TO INTERRUPT CURRENT LIST AND START A NEW ONE..
044020,000182:                                                                                                  #        1. ADRES OF DOWNLINK LIST INTO DNLSTADR
044021,000183:                                                                                                  #        2. NEGONE INTO SUBLIST
044022,000184:                                                                                                  #        3. NEGONE INTO DNECADR
044023,000185: 
044024,000186: 22,3711                                           BANK     22                                    
044025,000187: 05,2000                                           SETLOC   DOWNTELM                              
044026,000188: 05,2000                                           BANK                                           
044027,000189: 
044028,000190: 05,3506     0340                                  EBANK=   DNTMBUFF                              
044029,000191: 
044030,000192: 05,3506                                           COUNT*   $$/DPROG                              
044031,000193: 05,3506           54016        DODOWNTM           TS       BANKRUPT                              
044032,000194: 05,3507           00006                           EXTEND                                         
044033,000195: 05,3510           22012                           QXCH     QRUPT                                 #  SAVE Q
044034,000196: 05,3511           13763                           TCF      WOTEST                                
044035,000197: 05,3512           00006        WO1                EXTEND                                         #  SET WORD ORDER BIT TO 1 ONLY IF IT
044036,000198: 05,3513           05013                           WOR      CHAN13                                #  ALREADY ISN'T.
044037,000199: 05,3514           00335                           TC       DNTMGOTO                              #  GOTO APPROPRIATE PHASE OF PROGRAM
044038,000200: 
044039,000201: 05,3515           37747        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
044040,000202: 05,3516           54337                           TS       SUBLIST                               #  WORDS TO MINUS ONE
044041,000203: 05,3517           54336                           TS       DNECADR                               
044042,000204: 05,3520           33640                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS
044043,000205: 05,3521           54335                           TS       DNTMGOTO                              #  GO TO DNPHASE2
044044,000206: 05,3522           13536                           TCF      NEWLIST                               
044045,000207: 05,3523           10336        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS
044046,000208: 05,3524           03653        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
044047,000209: 05,3525           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
044048,000210: 05,3526           13527                           TCF      +1                                    #  (ECADR OF 3776 + 74001 = 77777)
044049,000211: 
044050,000212: 05,3527           10337                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL
044051,000213: 05,3530           13666                           TCF      NEXTINSL                              #  YES

Page 992

044053,000215: 05,3531           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
044054,000216: 
044055,000217: 05,3532           30334        CHKLIST            CA       CTLIST                                
044056,000218: 05,3533           00006                           EXTEND                                         
044057,000219: 05,3534           63536                           BZMF     NEWLIST                               #  IT WILL BE NEGATIVE AT END OF LIST
044058,000220: 05,3535           13543                           TCF      NEXTINCL                              
044059,000221: 05,3536           50332        NEWLIST            INDEX    DNLSTCOD                              
044060,000222: 05,3537           32441                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
044061,000223: 05,3540           54334                           TS       CTLIST                                #        STARTING ADDRESS OF NEW LIST
044062,000224: 05,3541           40332                           CS       DNLSTCOD                              
044063,000225: 05,3542           13756                           TCF      SENDID     +3                         
044064,000226: 05,3543           50334        NEXTINCL           INDEX    CTLIST                                
044065,000227: 05,3544           30000                           CA       0                                     
044066,000228: 05,3545           10000                           CCS      A                                     
044067,000229: 05,3546           24334                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
044068,000230: 05,3547           13553                           TCF      +4                                    #  ON NEXT ENTRY TO PROG.  (A SHOULD NOT =0)
044069,000231: 05,3550           56334                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
044070,000232: 05,3551           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
044071,000233: 05,3552           56334                           XCH      CTLIST                                #                                  (ST IN )
044072,000234: 05,3553           24000                 +4        INCR     A                                     #                                  (CTLIST)
044073,000235: 05,3554           54336                           TS       DNECADR                               #  SAVE DNADR
044074,000236: 05,3555           63525                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
044075,000237: 05,3556           10000                           CCS      A                                     
044076,000238: 05,3557           13563                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
044077,000239: 05,3560           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14 (CAN'T GET HERE)
044078,000240: 05,3561           13563                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
044079,000241: 05,3562           03605        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
044080,000242: 05,3563           30336                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
044081,000243: 05,3564           63560                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
044082,000244: 05,3565           00006                           EXTEND                                         
044083,000245: 05,3566           63653                           BZMF     FETCH2WD                              #  YES.  (A MUST NEVER BE ZERO)
044084,000246: 05,3567           67741                           AD       MINB12                                #  NO- IS IT A POINTER (DNPTR) OR A
044085,000247: 05,3570           00006                           EXTEND                                         #      CHANNEL(DNCHAN)
044086,000248: 05,3571           63611                           BZMF     DODNPTR                               #  IT'S A POINTER.  (A MUST NEVER BE ZERO)
044087,000249: 
044088,000250: 05,3572           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND)  IT S A CHANNEL
044089,000251: 05,3573           50336                           INDEX    DNECADR                               
044090,000252: 05,3574           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
044091,000253: 05,3575           54001                           TS       L                                     
044092,000254: 05,3576           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
044093,000255: 05,3577           50336                           INDEX    DNECADR                               
044094,000256: 05,3600           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
044095,000257: 05,3601           54336                           TS       DNECADR                               #  SET DNECADR
044096,000258: 05,3602           37747                           CA       NEGONE                                #        TO MINUS
044097,000259: 05,3603           56336                           XCH      DNECADR                               #                WHILE PRESERVING A.
044098,000260: 05,3604           13701                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
044099,000261: 
044100,000262: 05,3605           44745        WOZERO             CS       BIT7                                  
044101,000263: 05,3606           00006                           EXTEND                                         
044102,000264: 05,3607           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO

Page 993

044104,000266: 05,3610           00002                           TC       Q                                     #  RETURN TO CALLER
044105,000267: 
044106,000268: 05,3611           50336        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
044107,000269: 05,3612           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
044108,000270: 05,3613           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
044109,000271: 05,3614           30336                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
044110,000272: 05,3615           13665                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
044111,000273: 
044112,000274: 05,3616           56336                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
044113,000275: 05,3617           54337                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
044114,000276: 05,3620           34755                           CAF      ZERO                                  #        A    INTO     A
044115,000277: 05,3621           56336                           XCH      TMINDEX                               #  (NOTE..  TMINDEX = DNECADR)
044116,000278: 
044117,000279:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
044118,000280:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
044119,000281:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
044120,000282:                                                                                                  #  TO MINIMIZE TIME.  THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
044121,000283:                                                                                                  #  THESE RULES ARE ......
044122,000284:                                                                                                  #        1.      ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
044123,000285:                                                                                                  #        2.      THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
044124,000286: 
044125,000287: 05,3622           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
044126,000288: 05,3623           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
044127,000289: 05,3624           00006                           EXTEND                                         
044128,000290: 05,3625           50000                           INDEX    A                                     
044129,000291: 05,3626  E3,1401                                  EBANK=   1401                                  
044130,000292: 05,3626           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
044131,000293: 05,3627     0340                                  EBANK=   DNTMBUFF                              
044132,000294: 05,3627           50336                           INDEX    TMINDEX                               
044133,000295: 05,3630           52341                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
044134,000296: 05,3631           24336                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
044135,000297: 05,3632           24336                           INCR     TMINDEX                               
044136,000298: 05,3633           24337        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
044137,000299: 05,3634           50337                           INDEX    SUBLIST                               
044138,000300: 05,3635           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
044139,000301: 05,3636           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.
044140,000302: 05,3637           13622                           TCF      SNAPLOOP                              #  NOT LAST TWO.
044141,000303: 05,3640           03523        LDNPHAS2           GENADR   DNPHASE2                              
044142,000304: 05,3641           54337                           TS       SUBLIST                               #  YES, LAST.  SAVE A.
044143,000305: 05,3642           37747                           CA       NEGONE                                #  SET DNECADR AND
044144,000306: 05,3643           54336                           TS       DNECADR                               #        SUBLIST POINTERS
044145,000307: 05,3644           56337                           XCH      SUBLIST                               #                TO NEGATIVE VALUES.
044146,000308: 05,3645           54003                           TS       EBANK                                 
044147,000309: 05,3646           74357                           MASK     LOW8                                  
044148,000310: 05,3647           00006                           EXTEND                                         
044149,000311: 05,3650           50000                           INDEX    A                                     
044150,000312: 05,3651  E3,1401                                  EBANK=   1401                                  
044151,000313: 05,3651           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.

Page 994

044153,000315: 05,3652     0340                                  EBANK=   DNTMBUFF                              
044154,000316: 05,3652           13701        SNAPEND            TCF      DNTMEXIT                              #  NOW GO SEND THEM.
044155,000317: 
044156,000318: 05,3653           30336        FETCH2WD           CA       DNECADR                               
044157,000319: 05,3654           54003                           TS       EBANK                                 #  SET EBANK
044158,000320: 05,3655           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
044159,000321: 05,3656           54001                           TS       L                                     
044160,000322: 05,3657           33531                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
044161,000323: 05,3660           26336                           ADS      DNECADR                               
044162,000324: 05,3661           00006                           EXTEND                                         
044163,000325: 05,3662           50001                           INDEX    L                                     
044164,000326: 05,3663  E3,1400                                  EBANK=   1400                                  
044165,000327: 05,3663           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
044166,000328: 05,3664     0340                                  EBANK=   DNTMBUFF                              
044167,000329: 05,3664           13701                           TCF      DNTMEXIT                              #  NOW GO SEND THEM.
044168,000330: 
044169,000331: 05,3665           54337        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
044170,000332: 05,3666           50337        NEXTINSL           INDEX    SUBLIST                               
044171,000333: 05,3667           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
044172,000334: 05,3670           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
044173,000335: 05,3671           24337                           INCR     SUBLIST                               #  NO -
044174,000336: 05,3672           13676                           TCF      +4                                    
044175,000337: 05,3673           54337                           TS       SUBLIST                               #  SAVE A.
044176,000338: 05,3674           37747                           CA       NEGONE                                #  SET SUBLIST TO MINUS
044177,000339: 05,3675           56337                           XCH      SUBLIST                               #  RETRIEVE A.
044178,000340: 05,3676           24000                 +4        INCR     A                                     
044179,000341: 05,3677           54336                           TS       DNECADR                               #  SAVE DNADR
044180,000342: 05,3700           13564                           TCF      SETWO      +2                         #  GO USE COMMON CODING (PROBLEMS WOULD
044181,000343:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
044182,000344:                                                                                                  #  DNPTR NOW)
044183,000345: 
044184,000346: 05,3701           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
044185,000347: 05,3702           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
044186,000348: 05,3703           30001                           CA       L                                     #  RESPECTIVELY
044187,000349: 05,3704           00006        TMEXITL            EXTEND                                         
044188,000350: 05,3705           01035                           WRITE    DNTM2                                 
044189,000351: 05,3706           15270        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.
044190,000352: 
044191,000353: 05,3707     7741               MINB12             EQUALS   -1/8                                  
044192,000354: 05,3707     0336               DNECADR            EQUALS   TMINDEX                               
044193,000355: 05,3707     0334               CTLIST             EQUALS   LDATALST                              
044194,000356: 05,3707     0337               SUBLIST            EQUALS   DNQ                                   
044195,000357: 

Page 995

044197,000359:                                                                                                  #  SUBROUTINE NAME - DNDUMP
044198,000360: 
044199,000361:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND (DUMP) ALL ERASABLE STORAGE 'N' TIMES. (N=1 TO 4).  BANKS ARE SENT ONE AT A TIME
044200,000362:                                                                                                  #        EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
044201,000363:                                                                                                  #        EBANK.  EBANKS ARE DUMPED IN ORDER (I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
044202,000364: 
044203,000365:                                                                                                  #  CALLING SEQUENCE - THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
044204,000366:                                                                                                  #        AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
044205,000367:                                                                                                  #        WILL BEGIN.
044206,000368: 
044207,000369:                                                                                                  #        ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
044208,000370:                                                                                                  #        BY THE FOLLOWING:
044209,000371: 
044210,000372:                                                                                                  #        1.      A FRESH START
044211,000373:                                                                                                  #        2.      COMPLETION OF ALL DOWNLINK DUMPS REQUESTED (ACCORDING TO BITS SET IN DUMPCNT).  NOTE THAT DUMPCNT
044212,000374:                                                                                                  #                CAN BE ALTERED BY A V21N01.
044213,000375:                                                                                                  #        3.      AND INVOLUNTARILY BY A RESTART.
044214,000376: 
044215,000377:                                                                                                  #  NORMAL EXIT MODE - TCF DNPHASE1
044216,000378: 
044217,000379:                                                                                                  #  ALARM OR ABORT MODE - NONE
044218,000380: 
044219,000381:                                                                                                  #  *SUBROUTINES CALLED - NONE.
044220,000382: 
044221,000383:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
044222,000384:                                                                                                  #        DUMPCNT         OCT 20000       IF 4 COMPLETE ERASABLE DUMPS ARE DESIRED
044223,000385:                                                                                                  #        DUMPCNT         OCT 10000       IF 2 COMPLETE ERASABLE DUMPS ARE DESIRED
044224,000386:                                                                                                  #        DUMPCNT         OCT 04000       IF 1 COMPLETE ERASABLE DUMP  IS  DESIRED
044225,000387: 
044226,000388:                                                                                                  #  DEBRIS - DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
044227,000389: 
044228,000390:                                                                                                  #  TIMING -      TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
044229,000391:                                                                                                  #                TIME (IN SECS) =  (   4    )*(    8    )*(    256     +     4   )  /     100
044230,000392:                                                                                                  #                THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
044231,000393: 
044232,000394:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM -
044233,000395:                                                                                                  #        (REMINDER - THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
044234,000396:                                                                                                  #        DOWNLIST                                W
044235,000397:                                                                                                  #          WORD  TAKEN FROM CONTENTS OF  EXAMPLE O       COMMENTS
044236,000398:                                                                                                  #            1   ERASID                   0177X  0       DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
044237,000399:                                                                                                  #            2   LOWIDCOD                 77340  1       DOWNLINK SYNCH BITS.  (SAME ONE USED IN ALL OTHER DOWNLISTS)
044238,000400:                                                                                                  #            3   DUMPLOC                  13400  1       (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
044239,000401:                                                                                                  #            4   TIME1                    14120  1       TIME IN CENTISECONDS
044240,000402:                                                                                                  #            5   FIRST WORD OF EBANK X    03400  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
044241,000403:                                                                                                  #            6   2ND   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
044242,000404:                                                                                                  #            7   3RD   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
044243,000405:                                                                                                  #            .                                   1
044244,000406:                                                                                                  #            .                                   1
044245,000407:                                                                                                  #            .                                   1
044246,000408:                                                                                                  #         260D   256TH WORD OF EBANK X    03777  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
044247,000409: 
044248,000410:                                                                                                  #  NOTE -        DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
044249,000411:                                                                                                  #                THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
044250,000412:                                                                                                  #                                                X = NOT USED
044251,000413:                                                                                                  #                X ABC EEE RRRRRRRR            ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
044252,000414:                                                                                                  #                                                    COMPLETE ERASABLE DUMP NUMBER 1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
044253,000415:                                                                                                  #                                              EEE = EBANK BITS
044254,000416:                                                                                                  #                                         RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
044255,000417: 

Page 996

044257,000419: 05,3707           34755        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
044258,000420: 05,3710           54336                           TS       DUMPLOC                               #  ERASABLE DUMP
044259,000421: 05,3711           03753                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS
044260,000422: 05,3712           33721                           CA       LDNDUMP1                              #  SET DNTMGOTO
044261,000423: 05,3713           54335                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
044262,000424: 05,3714           30025                           CA       TIME1                                 #  PLACE TIME1
044263,000425: 05,3715           56001                           XCH      L                                     #  INTO L
044264,000426: 05,3716           30336                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
044265,000427: 05,3717           13701                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
044266,000428: 
044267,000429: 05,3720           03722        LDNDUMP            ADRES    DNDUMP                                
044268,000430: 05,3721           03735        LDNDUMP1           ADRES    DNDUMP1                               
044269,000431: 
044270,000432: 05,3722           34752        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
044271,000433: 05,3723           26336                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
044272,000434: 05,3724           74357                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
044273,000435: 05,3725           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
044274,000436: 05,3726           13737                           TCF      DNDUMP2                               #  NO - THEN CONTINUE DUMPING
044275,000437: 05,3727           30336                           CA       DUMPLOC                               #  YES - IS THIS THE END OF THE
044276,000438: 05,3730           70333                           MASK     DUMPCNT                               #  N TH (N = 1 TO 4) COMPLETE ERASABLE
044277,000439: 05,3731           77722                           MASK     PRIO34                                #  DUMP (BIT14 FOR 4, BIT13 FOR 2 OR BIT12
044278,000440: 05,3732           10000                           CCS      A                                     #  FOR 1 COMPLETE ERASABLE DUMP(S)).
044279,000441: 05,3733           13515                           TCF      DNPHASE1                              #  YES - START SENDING INTERRUPTED DOWNLIST
044280,000442:                                                                                                  #  AGAIN
044281,000443: 05,3734           13711                           TCF      DNDUMPI    +2                         #  NO - GO BACK AND INITIALIZE NEXT BANK
044282,000444: 
044283,000445: 05,3735           33720        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
044284,000446: 05,3736           54335                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
044285,000447: 
044286,000448: 05,3737           30336        DNDUMP2            CA       DUMPLOC                               
044287,000449: 05,3740           54003                           TS       EBANK                                 #  SET EBANK
044288,000450: 05,3741           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
044289,000451: 05,3742           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
044290,000452: 05,3743           34754                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
044291,000453: 05,3744           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
044292,000454: 05,3745           50002                           INDEX    Q                                     
044293,000455: 05,3746  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
044294,000456: 05,3746           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
044295,000457: 05,3747           56001                           XCH      L                                     
044296,000458: 05,3750           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
044297,000459: 05,3751           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
044298,000460: 05,3752     0340                                  EBANK=   DNTMBUFF                              
044299,000461: 05,3752           13701                           TCF      DNTMEXIT                              #  GO SEND THEM
044300,000462: 
044301,000463: 05,3753           00006        SENDID             EXTEND                                         #  ** ENTRANCE USED BY ERASABLE DUMP PROG.**
044302,000464: 05,3754           22335                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
044303,000465: 05,3755           35011                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
044304,000466: 
044305,000467: 05,3756           54001                           TS       L                                     #  ** ENTRANCE USED BY REGULAR DOWNLINK PG **

Page 997

044307,000469: 05,3757           03605                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
044308,000470: 05,3760           32065                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
044309,000471: 05,3761           56001                           XCH      L                                     #  AND ID BACK INTO A
044310,000472: 05,3762           13701                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).
044311,000473: 
044312,000474: 05,3763           34745        WOTEST             CA       BIT7                                  #  AT THE BEGINNING OF THE LIST THE WORD
044313,000475: 05,3764           00006                           EXTEND                                         #  ORDER BIT WILL BE SET BACK TO ZERO
044314,000476: 05,3765           02013                           RAND     CHAN13                                
044315,000477: 05,3766           10000                           CCS      A                                     
044316,000478: 05,3767           00335                           TC       DNTMGOTO                              
044317,000479: 05,3770           34745                           CA       BIT7                                  
044318,000480: 05,3771           13512                           TCF      WO1                                   
044319,000481: 

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