Source Code

These source code files are an attempted reconstruction of Sundance revision 306, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

038683,000002:                                                                                                  ## Copyright:   Public domain.
038684,000003:                                                                                                  ## Filename:    DOWN-TELEMETRY_PROGRAM.agc
038685,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
038686,000005:                                                                                                  ##              as closely as possible with available information. Sundance
038687,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
038688,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
038689,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
038690,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
038691,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
038692,000011:                                                                                                  ##              or the Sundance GSOPs.
038693,000012:                                                                                                  ## Assembler:   yaYUL
038694,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
038695,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
038696,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
038697,000016: 
038698,000017: 
038699,000018: 
038700,000019:                                                                                                  #  PROGRAM NAME - DOWN TELEMETRY PROGRAM
038701,000020:                                                                                                  #  MOD NO. - 0           TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
038702,000021:                                                                                                  #                        PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
038703,000022:                                                                                                  #                        THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.REFER TO DOWNLINK
038704,000023:                                                                                                  #                        LISTS LOG SECTION FOR MORE DETAILS. HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
038705,000024:                                                                                                  #                        OF DOWN TELEMETRY DATA.
038706,000025:                                                                                                  #  MOD BY - KILROY, SMITH, DEWITT
038707,000026:                                                                                                  #  DATE - 02OCT67
038708,000027:                                                                                                  #  AUTHORS - KILROY, SMITH, DEWITT, DEWOLF, FAGIN
038709,000028:                                                                                                  #  LOG SECTION - DOWN-TELEMETRY PROGRAM
038710,000029: 
038711,000030:                                                                                                  #  FUNCTIONAL DESCRIPTION - THIS ROUTINE IS INITIATED BY TELEMETRY END
038712,000031:                                                                                                  #        PULSE FROM THE DOWNLINK TELEMETRY CONVERTER. THIS PULSE OCCURS
038713,000032:                                                                                                  #        AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
038714,000033:                                                                                                  #        EXECUTED AT THESE RATES. THIS ROUTINE SELECTS THE APPROPRIATE
038715,000034:                                                                                                  #        AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
038716,000035:                                                                                                  #        CHANNELS 34 AND 35. THE INFORMATION IS THEN GATED OUT FROM THE
038717,000036:                                                                                                  #        LGC IN SERIAL FASHION.
038718,000037:                                                                                                  #        THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST. SINCE DOWNRUPTS
038719,000038:                                                                                                  #        OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
038720,000039:                                                                                                  #        CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
038721,000040:                                                                                                  #        OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
038722,000041:                                                                                                  #  CALLING SEQUENCE - NONE
038723,000042:                                                                                                  #        PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
038724,000043:                                                                                                  #        RESULT OF A DOWNRUPT. CONTROL IS RETURNED VIA TCF RESUME WHICH
038725,000044:                                                                                                  #        IN EFFECT IS A RESUME.
038726,000045:                                                                                                  #  SUBROUTINES CALLED - NONE
038727,000046:                                                                                                  #  NORMAL EXIT MODE - TCF RESUME
038728,000047:                                                                                                  #  ALARM OR ABORT EXIT MODE - NONE
038729,000048:                                                                                                  #  RESTART PROTECTION:
038730,000049:                                                                                                  #        ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
038731,000050:                                                                                                  #        DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E. CURRENT CONTENTS OF DNLSTADR). THIS HAS THE
038732,000051:                                                                                                  #        EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
038733,000052:                                                                                                  #        THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
038734,000053:                                                                                                  #        DOWNLIST.
038735,000054:                                                                                                  #        ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
038736,000055:                                                                                                  #  DOWNLINK LIST SELECTION:
038737,000056:                                                                                                  #        THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
038738,000057:                                                                                                  #        1.      FRESH START
038739,000058:                                                                                                  #        2.      V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
038740,000059:                                                                                                  #        3.      UPDATE PROGRAM (P27)
038741,000060:                                                                                                  #        4.      NON-V37 SELECTABLE TYPE PROGRAMS (E.G. AGS INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
038742,000061:                                                                                                  #                TRANSITION (COLOSSUS) ETC.).
038743,000062:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
038744,000063:                                                                                                  #        READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
038745,000064:                                                                                                  #  OUTPUT - EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E. 200 LGC
038746,000065:                                                                                                  #        COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
038747,000066:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED - NONE
038748,000067:                                                                                                  #        'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
038749,000068:                                                                                                  #  DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM) -
038750,000069:                                                                                                  #        LDATALST,DNTMBUFF TO DNTMBUFF +21D,TMINDEX,DNQ.
038751,000070: 


This page is empty

038753,000072: 
038754,000073:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
038755,000074:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
038756,000075: 
038757,000076:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
038758,000077:                                                                                                  #  1.    DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
038759,000078:                                                                                                  #        DOWN-TELEMETRY PROGRAM. THIS IS DONE FOR EASE OF CODING, FASTER
038760,000079:                                                                                                  #        EXECUTION.
038761,000080:                                                                                                  #  2.    EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
038762,000081:                                                                                                  #        SUBLISTS.
038763,000082:                                                                                                  #  3.    A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
038764,000083:                                                                                                  #        DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
038765,000084:                                                                                                  #        CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
038766,000085:                                                                                                  #  4.    SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
038767,000086:                                                                                                  #        SAVED IN A BUFFER DURING ONE DOWNRUPT.
038768,000087:                                                                                                  #  5.    THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
038769,000088:                                                                                                  #        OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
038770,000089:                                                                                                  #        IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
038771,000090:                                                                                                  #  6.    ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
038772,000091:                                                                                                  #        CREATED FOR THE DOWNLIST PROGRAM.
038773,000092:                                                                                                  #        A.      1DNADR                  1-WORD DOWNLIST ADDRESS.
038774,000093:                                                                                                  #                SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
038775,000094:                                                                                                  #                HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
038776,000095:                                                                                                  #        B.      2DNADR - 6DNADR         N-WORD DOWNLIST ADDRESS, N = 2 - 6.
038777,000096:                                                                                                  #                SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
038778,000097:                                                                                                  #                FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
038779,000098:                                                                                                  #                PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
038780,000099:                                                                                                  #        C.      DNCHAN                  DOWNLIST CHANNEL ADDRESS.
038781,000100:                                                                                                  #                SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
038782,000101:                                                                                                  #                A PAIR OF CHANNELS FOR DOWN TELEMETRY.
038783,000102:                                                                                                  #        D.      DNPTR                   DOWN TELEMETRY SUBLIST POINTER.
038784,000103:                                                                                                  #                SAME AS CAF BUT TAGGED AS A CONSTANT. USED IN CONTROL LIST TO POINT TO A SUBLIST.
038785,000104:                                                                                                  #                CAUTION--- A DNPTR CANNOT BE USED IN A SUBLIST.
038786,000105:                                                                                                  #  7.    THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
038787,000106:                                                                                                  #        A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
038788,000107:                                                                                                  #  8.    IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
038789,000108: 
038790,000109:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
038791,000110:                                                                                                  #    (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
038792,000111:                                                                                                  #    DONE)
038793,000112:                                                                                                  #  1.    SNAPSHOT DOWNLIST:
038794,000113:                                                                                                  #        (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
038795,000114:                                                                                                  #        (B) CAN CONTAIN ONLY 1DNADR'S
038796,000115:                                                                                                  #  2.    ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
038797,000116:                                                                                                  #        EQUIVALENT OF THE FOLLOWING ECADRS (I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
038798,000117:                                                                                                  #        (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
038799,000118:                                                                                                  #  3.    CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777
038800,000119:                                                                                                  #  4.    THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
038801,000120:                                                                                                  #        CONTROL SECTION OF THE DOWNLIST.
038802,000121: 
038803,000122:                                                                                                  #  5.    'DNCHAN 0' CANNOT BE USED.
038804,000123: 
038805,000124:                                                                                                  #  6.    'DNPTR 0' CANNOT BE USED.
038806,000125: 
038807,000126:                                                                                                  #  7.    DNPTR CANNOT APPEAR IN A SUBLIST.
038808,000127: 
038809,000128:                                                                                                  #  EBANK SETTINGS
038810,000129:                                                                                                  #        IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
038811,000130:                                                                                                  #        'GARBAGE' INTO BITS15-12 OF EBANK. HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
038812,000131:                                                                                                  #        SIGNIFICANT SOMEDAY IN THE FUTURE. IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
038813,000132:                                                                                                  #        THAT BITS15-12 OF EBANK ARE ZERO.
038814,000133: 
038815,000134:                                                                                                  #  INITIALIZATION REQUIRED - TO INTERRUPT CURRENT LIST AND START A NEW ONE..
038816,000135:                                                                                                  #        1. ADRES OF DOWNLINK LIST INTO DNLSTADR
038817,000136:                                                                                                  #        2. NEGONE INTO SUBLIST
038818,000137:                                                                                                  #        3. NEGONE INTO DNECADR
038819,000138: 
038820,000139: 22,3644                                           BANK     22                                    
038821,000140: 05,2000                                           SETLOC   DOWNTELM                              
038822,000141: 05,2000                                           BANK                                           
038823,000142: 
038824,000143: 05,3153     0340                                  EBANK=   DNTMBUFF                              
038825,000144: 
038826,000145: 05,3153                                           COUNT*   $$/DPROG                              
038827,000146: 05,3153           54016        DODOWNTM           TS       BANKRUPT                              
038828,000147: 05,3154           00006                           EXTEND                                         
038829,000148: 05,3155           22012                           QXCH     QRUPT                                 #  SAVE Q
038830,000149: 05,3156           35020                           CA       BIT7                                  #  SET WORD ORDER CODE TO 1. EXCEPTION- AT
038831,000150: 05,3157           00006        WO1                EXTEND                                         #  THE BEGINNING OF EACH LIST THE WORD
038832,000151: 05,3160           05013                           WOR      CHAN13                                #  CODE WILL BE SET BACK TO 0.
038833,000152: 05,3161           00335                           TC       DNTMGOTO                              #  GO TO APPROPRIATE PHASE OF PROGRAM
038834,000153: 
038835,000154: 05,3162           37721        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
038836,000155: 05,3163           54337                           TS       SUBLIST                               #  WORDS TO MINUS ONE
038837,000156: 05,3164           54336                           TS       DNECADR                               
038838,000157: 05,3165           33306                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS
038839,000158: 05,3166           54335                           TS       DNTMGOTO                              #  GO TO DNPHASE2
038840,000159: 05,3167           13202                           TCF      1STLIST                               
038841,000160: 05,3170           10336        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS
038842,000161: 05,3171           03321        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
038843,000162: 05,3172           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
038844,000163: 05,3173           13174                           TCF      +1                                    #  (ECADR OF 3776 + 74001 = 77777)
038845,000164: 
038846,000165: 05,3174           10337                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL
038847,000166: 05,3175           13334                           TCF      NEXTINSL                              #  YES
038848,000167: 05,3176           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
038849,000168: 
038850,000169: 05,3177           10334        CHKLIST            CCS      CTLIST                                #  IT WILL BE NEGATIVE AT END OF LIST
038851,000170: 05,3200           13211                           TCF      NEXTINCL                              
038852,000171: 05,3201           13206                           TCF      NEWLIST                               
038853,000172: 05,3202           35030        1STLIST            CAF      ZERO                                  
038854,000173: 05,3203           54334                           TS       CTLIST                                
038855,000174: 05,3204           40332                           CS       DNLSTCOD                              
038856,000175: 05,3205           13424                           TCF      SENDID     +3                         
038857,000176: 05,3206           50332        NEWLIST            INDEX    DNLSTCOD                              
038858,000177: 05,3207           32260                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
038859,000178: 05,3210           54334                           TS       CTLIST                                #    STARTING ADDRESS OF NEW LIST
038860,000179: 05,3211           50334        NEXTINCL           INDEX    CTLIST                                
038861,000180: 05,3212           30000                           CA       0                                     
038862,000181: 05,3213           10000                           CCS      A                                     
038863,000182: 05,3214           24334                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
038864,000183: 05,3215           13221                           TCF      +4                                    #  ON NEXT ENTRY TO PROG.  (A SHOULD NOT =0)
038865,000184: 05,3216           56334                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
038866,000185: 05,3217           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
038867,000186: 05,3220           56334                           XCH      CTLIST                                #                                  (ST IN )
038868,000187: 05,3221           24000                 +4        INCR     A                                     #                                  (CTLIST)
038869,000188: 05,3222           54336                           TS       DNECADR                               #  SAVE DNADR
038870,000189: 05,3223           63172                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
038871,000190: 05,3224           10000                           CCS      A                                     
038872,000191: 05,3225           13231                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
038873,000192: 05,3226           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14 (CAN'T GET HERE)
038874,000193: 05,3227           13231                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
038875,000194: 05,3230           03253        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
038876,000195: 05,3231           30336                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
038877,000196: 05,3232           63226                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
038878,000197: 05,3233           00006                           EXTEND                                         
038879,000198: 05,3234           63321                           BZMF     FETCH2WD                              #  YES.  (A MUST NEVER BE ZERO)
038880,000199: 05,3235           67712                           AD       MINB12                                #  NO- IS IT A POINTER (DNPTR) OR A
038881,000200: 05,3236           00006                           EXTEND                                         #      CHANNEL(DNCHAN)
038882,000201: 05,3237           63257                           BZMF     DODNPTR                               #  IT'S A POINTER.  (A MUST NEVER BE ZERO)
038883,000202: 
038884,000203: 05,3240           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND)  IT S A CHANNEL
038885,000204: 05,3241           50336                           INDEX    DNECADR                               
038886,000205: 05,3242           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
038887,000206: 05,3243           54001                           TS       L                                     
038888,000207: 05,3244           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
038889,000208: 05,3245           50336                           INDEX    DNECADR                               
038890,000209: 05,3246           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
038891,000210: 05,3247           56336                           XCH      DNECADR                               #  SET DNECADR
038892,000211: 05,3250           40000                           COM                                            #        TO MINUS
038893,000212: 05,3251           56336                           XCH      DNECADR                               #                WHILE PRESERVING A.
038894,000213: 05,3252           13347                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
038895,000214: 
038896,000215: 05,3253           45020        WOZERO             CS       BIT7                                  
038897,000216: 05,3254           00006                           EXTEND                                         
038898,000217: 05,3255           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO
038899,000218: 05,3256           00002                           TC       Q                                     #  RETURN TO CALLER
038900,000219: 
038901,000220: 05,3257           50336        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
038902,000221: 05,3260           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
038903,000222: 05,3261           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
038904,000223: 05,3262           30336                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
038905,000224: 05,3263           13333                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
038906,000225: 
038907,000226: 05,3264           56336                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
038908,000227: 05,3265           54337                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
038909,000228: 05,3266           35030                           CAF      ZERO                                  #        A    INTO     A
038910,000229: 05,3267           56336                           XCH      TMINDEX                               #  (NOTE..  TMINDEX = DNECADR)
038911,000230: 
038912,000231:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
038913,000232:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
038914,000233:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
038915,000234:                                                                                                  #  TO MINIMIZE TIME. THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
038916,000235:                                                                                                  #  THESE RULES ARE......
038917,000236:                                                                                                  #        1.      ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
038918,000237:                                                                                                  #        2.      THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
038919,000238: 
038920,000239: 05,3270           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
038921,000240: 05,3271           74371                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
038922,000241: 05,3272           00006                           EXTEND                                         
038923,000242: 05,3273           50000                           INDEX    A                                     
038924,000243: 05,3274  E3,1401                                  EBANK=   1401                                  
038925,000244: 05,3274           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
038926,000245: 05,3275     0340                                  EBANK=   DNTMBUFF                              
038927,000246: 05,3275           50336                           INDEX    TMINDEX                               
038928,000247: 05,3276           52341                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
038929,000248: 05,3277           24336                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
038930,000249: 05,3300           24336                           INCR     TMINDEX                               
038931,000250: 05,3301           24337        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
038932,000251: 05,3302           50337                           INDEX    SUBLIST                               
038933,000252: 05,3303           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
038934,000253: 05,3304           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.
038935,000254: 05,3305           13270                           TCF      SNAPLOOP                              #  NOT LAST TWO.
038936,000255: 05,3306           03170        LDNPHAS2           GENADR   DNPHASE2                              
038937,000256: 05,3307           56337                           XCH      SUBLIST                               #  YES, LAST.  SAVE A.
038938,000257: 05,3310           40000                           COM                                            #  SET DNECADR AND
038939,000258: 05,3311           54336                           TS       DNECADR                               #        SUBLIST POINTERS
038940,000259: 05,3312           56337                           XCH      SUBLIST                               #                TO NEGATIVE VALUES.
038941,000260: 05,3313           54003                           TS       EBANK                                 
038942,000261: 05,3314           74371                           MASK     LOW8                                  
038943,000262: 05,3315           00006                           EXTEND                                         
038944,000263: 05,3316           50000                           INDEX    A                                     
038945,000264: 05,3317  E3,1401                                  EBANK=   1401                                  
038946,000265: 05,3317           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.
038947,000266: 05,3320     0340                                  EBANK=   DNTMBUFF                              
038948,000267: 05,3320           13347        SNAPEND            TCF      DNTMEXIT                              #  NOW GO SEND THEM.
038949,000268: 
038950,000269: 05,3321           30336        FETCH2WD           CA       DNECADR                               
038951,000270: 05,3322           54003                           TS       EBANK                                 #  SET EBANK
038952,000271: 05,3323           74371                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
038953,000272: 05,3324           54001                           TS       L                                     
038954,000273: 05,3325           33176                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
038955,000274: 05,3326           26336                           ADS      DNECADR                               
038956,000275: 05,3327           00006                           EXTEND                                         
038957,000276: 05,3330           50001                           INDEX    L                                     
038958,000277: 05,3331  E3,1400                                  EBANK=   1400                                  
038959,000278: 05,3331           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
038960,000279: 05,3332     0340                                  EBANK=   DNTMBUFF                              
038961,000280: 05,3332           13347                           TCF      DNTMEXIT                              #  NOW GO SEND THEM.
038962,000281: 
038963,000282: 05,3333           54337        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
038964,000283: 05,3334           50337        NEXTINSL           INDEX    SUBLIST                               
038965,000284: 05,3335           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
038966,000285: 05,3336           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
038967,000286: 05,3337           24337                           INCR     SUBLIST                               #  NO -
038968,000287: 05,3340           13344                           TCF      +4                                    
038969,000288: 05,3341           56337                           XCH      SUBLIST                               #  SAVE A.
038970,000289: 05,3342           40000                           COM                                            #  SET SUBLIST TO MINUS
038971,000290: 05,3343           56337                           XCH      SUBLIST                               #  RETRIEVE A.
038972,000291: 05,3344           24000                 +4        INCR     A                                     
038973,000292: 05,3345           54336                           TS       DNECADR                               #  SAVE DNADR
038974,000293: 05,3346           13232                           TCF      SETWO      +2                         #  GO USE COMMON CODING (PROBLEMS WOULD
038975,000294:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
038976,000295:                                                                                                  #  DNPTR NOW)
038977,000296: 
038978,000297: 05,3347           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
038979,000298: 05,3350           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
038980,000299: 05,3351           30001                           CA       L                                     #  RESPECTIVELY
038981,000300: 05,3352           00006        TMEXITL            EXTEND                                         
038982,000301: 05,3353           01035                           WRITE    DNTM2                                 
038983,000302: 05,3354           15340        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.
038984,000303: 
038985,000304: 05,3355     7712               MINB12             EQUALS   -1/8                                  
038986,000305: 05,3355     0336               DNECADR            EQUALS   TMINDEX                               
038987,000306: 05,3355     0334               CTLIST             EQUALS   LDATALST                              
038988,000307: 05,3355     0337               SUBLIST            EQUALS   DNQ                                   
038989,000308: 
038990,000309:                                                                                                  #  SUBROUTINE NAME- DNDUMP
038991,000310:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND (DUMP) ALL ERASABLE STORAGE 'N' TIMES.(N=1 TO 4). BANKS ARE SENT ONE AT A TIME
038992,000311:                                                                                                  #        EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
038993,000312:                                                                                                  #        EBANK. EBANKS ARE DUMPED IN ORDER (I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
038994,000313:                                                                                                  #  CALLING SEQUENCE- THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
038995,000314:                                                                                                  #        AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
038996,000315:                                                                                                  #        WILL BEGIN.
038997,000316:                                                                                                  #        ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
038998,000317:                                                                                                  #        BY THE FOLLOWING:
038999,000318:                                                                                                  #        1.      A FRESH START
039000,000319:                                                                                                  #        2.      COMPLETION OF ALL DOWNLINK DUMPS REQUESTED (ACCORDING TO BITS SET IN DUMPCNT). NOTE THAT DUMPCNT
039001,000320:                                                                                                  #                CAN BE ALTERED BY A V21N01.
039002,000321:                                                                                                  #        3.      AND INVOLUNTARILY BY A RESTART.
039003,000322:                                                                                                  #  NORMAL EXIT MODE - TCF DNPHASE1
039004,000323:                                                                                                  #  ALARM OR ABORT MODE - NONE
039005,000324:                                                                                                  #  *SUBROUTINES CALLED - NONE.
039006,000325:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
039007,000326:                                                                                                  #        DUMPCNT         OCT 20000       IF 4 COMPLETE ERASABLE DUMPS ARE DESIRED
039008,000327:                                                                                                  #        DUMPCNT         OCT 10000       IF 2 COMPLETE ERASABLE DUMPS ARE DESIRED
039009,000328:                                                                                                  #        DUMPCNT         OCT 04000       IF 1 COMPLETE ERASABLE DUMP  IS  DESIRED
039010,000329:                                                                                                  #  DEBRIS - DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
039011,000330:                                                                                                  #  TIMING -      TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
039012,000331:                                                                                                  #                TIME (IN SECS) =  (   4    )*(    8    )*(    256     +     4   )  /     100
039013,000332:                                                                                                  #                THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
039014,000333: 
039015,000334:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM -
039016,000335:                                                                                                  #        (REMINDER - THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
039017,000336:                                                                                                  #        DOWNLIST                                W
039018,000337:                                                                                                  #          WORD  TAKEN FROM CONTENTS OF  EXAMPLE O       COMMENTS
039019,000338:                                                                                                  #            1   ERASID                   0177X  0       DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
039020,000339:                                                                                                  #            2   LOWIDCOD                 77340  1       DOWNLINK SYNCH BITS.  (SAME ONE USED IN ALL OTHER DOWNLISTS)
039021,000340:                                                                                                  #            3   DUMPLOC                  13400  1       (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
039022,000341:                                                                                                  #            4   TIME1                    14120  1       TIME IN CENTISECONDS
039023,000342:                                                                                                  #            5   FIRST WORD OF EBANK X    03400  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
039024,000343:                                                                                                  #            6   2ND   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
039025,000344:                                                                                                  #            7   3RD   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
039026,000345:                                                                                                  #            .                                   1
039027,000346:                                                                                                  #            .                                   1
039028,000347:                                                                                                  #            .                                   1
039029,000348:                                                                                                  #         260D   256TH WORD OF EBANK X    03777  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
039030,000349: 
039031,000350:                                                                                                  #  NOTE- DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
039032,000351:                                                                                                  #                THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
039033,000352:                                                                                                  #                                                X = NOT USED
039034,000353:                                                                                                  #                X ABC EEE RRRRRRRR            ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
039035,000354:                                                                                                  #                                                    COMPLETE ERASABLE DUMP NUMBER 1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
039036,000355:                                                                                                  #                                              EEE = EBANK BITS
039037,000356:                                                                                                  #                                         RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
039038,000357: 
039039,000358: 05,3355           35030        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
039040,000359: 05,3356           54336                           TS       DUMPLOC                               #  ERASABLE DUMP
039041,000360: 05,3357           03421                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS
039042,000361: 05,3360           33367                           CA       LDNDUMP1                              #  SET DNTMGOTO
039043,000362: 05,3361           54335                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
039044,000363: 05,3362           30025                           CA       TIME1                                 #  PLACE TIME1
039045,000364: 05,3363           56001                           XCH      L                                     #  INTO L
039046,000365: 05,3364           30336                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
039047,000366: 05,3365           13347                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
039048,000367: 
039049,000368: 05,3366           03370        LDNDUMP            ADRES    DNDUMP                                
039050,000369: 05,3367           03403        LDNDUMP1           ADRES    DNDUMP1                               
039051,000370: 
039052,000371: 05,3370           35025        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
039053,000372: 05,3371           26336                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
039054,000373: 05,3372           74371                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
039055,000374: 05,3373           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
039056,000375: 05,3374           13405                           TCF      DNDUMP2                               #  NO- THEN CONTINUE DUMPING
039057,000376: 05,3375           30336                           CA       DUMPLOC                               #  YES- IS THIS THE END OF THE
039058,000377: 05,3376           70333                           MASK     DUMPCNT                               #  N TH (N = 1 TO 4) COMPLETE ERASABLE
039059,000378: 05,3377           77674                           MASK     PRIO34                                #  DUMP (BIT14 FOR 4, BIT13 FOR 2 OR BIT12
039060,000379: 05,3400           10000                           CCS      A                                     #  FOR 1 COMPLETE ERASABLE DUMP(S)).
039061,000380: 05,3401           13162                           TCF      DNPHASE1                              #  YES- START SENDING INTERRUPTED DOWNLIST
039062,000381:                                                                                                  #  AGAIN
039063,000382: 05,3402           13357                           TCF      DNDUMPI    +2                         #  NO- GO BACK AND INITIALIZE NEXT BANK
039064,000383: 
039065,000384: 05,3403           33366        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
039066,000385: 05,3404           54335                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
039067,000386: 
039068,000387: 05,3405           30336        DNDUMP2            CA       DUMPLOC                               
039069,000388: 05,3406           54003                           TS       EBANK                                 #  SET EBANK
039070,000389: 05,3407           74371                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
039071,000390: 05,3410           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
039072,000391: 05,3411           35027                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
039073,000392: 05,3412           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
039074,000393: 05,3413           50002                           INDEX    Q                                     
039075,000394: 05,3414  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
039076,000395: 05,3414           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
039077,000396: 05,3415           56001                           XCH      L                                     
039078,000397: 05,3416           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
039079,000398: 05,3417           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
039080,000399: 05,3420     0340                                  EBANK=   DNTMBUFF                              
039081,000400: 05,3420           13347                           TCF      DNTMEXIT                              #  GO SEND THEM
039082,000401: 
039083,000402: 05,3421           00006        SENDID             EXTEND                                         #  **ENTRANCE USED BY ERASABLE DUMP PROG.**
039084,000403: 05,3422           22335                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
039085,000404: 05,3423           35061                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
039086,000405: 
039087,000406: 05,3424           54001                           TS       L                                     #  **ENTRANCE USED BY REGULAR DOWNLINK PG**
039088,000407: 05,3425           03253                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
039089,000408: 05,3426           32000                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
039090,000409: 05,3427           56001                           XCH      L                                     #  AND ID BACK INTO A
039091,000410: 05,3430           13347                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).
039092,000411: 

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