Source Code

These source-code files are part of a reconstructed copy of Comanche 72/3 (AKA Manche72 revision 3), the final, flown mission release of the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 13.

The starting point was the source code of Comanche 72 (itself previously reconstructed). Comanche 72 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 72 and 72/3. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments.

Since no contemporary listings of Comanche 72/3 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.

046592,000002:                                                                                                  ## Copyright:   Public domain.
046593,000003:                                                                                                  ## Filename:    DOWN-TELEMETRY_PROGRAM.agc
046594,000004:                                                                                                  ## Purpose:     A section of Manche72 revision 3.
046595,000005:                                                                                                  ##              It is part of the reconstructed source code for the final, flown
046596,000006:                                                                                                  ##              release of the software for the Command Module's (CM) Apollo
046597,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 13. No original listings
046598,000008:                                                                                                  ##              of this program are available; instead, this file was recreated
046599,000009:                                                                                                  ##              from a reconstructed copy of Comanche 072. It has been adapted
046600,000010:                                                                                                  ##              such that the resulting bugger words exactly match those
046601,000011:                                                                                                  ##              specified for Manche72 revision 3 in NASA drawing 2021153G,
046602,000012:                                                                                                  ##              which gives relatively high confidence that the reconstruction
046603,000013:                                                                                                  ##              is correct.
046604,000014:                                                                                                  ## Assembler:   yaYUL
046605,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
046606,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
046607,000017:                                                                                                  ## Mod history: 2024-05-19 MAS  Created from Comanche 072.
046608,000018: 
046609,000019:                                                                                                  #  PROGRAM NAME - DOWN TELEMETRY PROGRAM
046610,000020:                                                                                                  #  MOD NO. - 0           TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
046611,000021:                                                                                                  #                        PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
046612,000022:                                                                                                  #                        THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.  REFER TO DOWNLINK
046613,000023:                                                                                                  #                        LISTS LOG SECTION FOR MORE DETAILS.  HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
046614,000024:                                                                                                  #                        OF DOWN TELEMETRY DATA.
046615,000025:                                                                                                  #  MOD BY - KILROY, SMITH, DEWITT
046616,000026:                                                                                                  #  MOD BY - DENSMORE - JUNE 1969 - ELIMINATE ERASABLE DUMP COUNT
046617,000027:                                                                                                  #  DATE - 02 OCT 67
046618,000028:                                                                                                  #  AUTHORS - KILROY, SMITH, DEWITT, DEWOLF, FAGIN
046619,000029:                                                                                                  #  LOG SECTION - DOWN-TELEMETRY PROGRAM
046620,000030: 
046621,000031:                                                                                                  #  FUNCTIONAL DESCRIPTION - THIS ROUTINE IS INITIATED BY TELEMETRY END
046622,000032:                                                                                                  #        PULSE FROM THE DOWNLINK TELEMETRY CONVERTER.  THIS PULSE OCCURS
046623,000033:                                                                                                  #        AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
046624,000034:                                                                                                  #        EXECUTED AT THESE RATES.  THIS ROUTINE SELECTS THE APPROPRIATE
046625,000035:                                                                                                  #        AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
046626,000036:                                                                                                  #        CHANNELS 34 AND 35.  THE INFORMATION IS THEN GATED OUT FROM THE
046627,000037:                                                                                                  #        LGC IN SERIAL FASHION.
046628,000038: 
046629,000039:                                                                                                  #        THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST.  SINCE DOWNRUPTS
046630,000040:                                                                                                  #        OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
046631,000041:                                                                                                  #        CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
046632,000042:                                                                                                  #        OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
046633,000043: 
046634,000044:                                                                                                  #  CALLING SEQUENCE - NONE
046635,000045:                                                                                                  #        PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
046636,000046:                                                                                                  #        RESULT OF A DOWNRUPT.  CONTROL IS RETURNED VIA TCF RESUME WHICH
046637,000047:                                                                                                  #        IN EFFECT IS A RESUME.
046638,000048: 
046639,000049:                                                                                                  #  SUBROUTINES CALLED - NONE
046640,000050: 
046641,000051:                                                                                                  #  NORMAL EXIT MODE - TCF RESUME
046642,000052: 
046643,000053:                                                                                                  #  ALARM OR ABORT EXIT MODE - NONE
046644,000054: 
046645,000055:                                                                                                  #  RESTART PROTECTION:
046646,000056:                                                                                                  #        ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
046647,000057:                                                                                                  #        DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E. CURRENT CONTENTS OF DNLSTADR).  THIS HAS THE
046648,000058:                                                                                                  #        EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
046649,000059:                                                                                                  #        THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
046650,000060:                                                                                                  #        DOWNLIST.
046651,000061: 
046652,000062:                                                                                                  #        ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
046653,000063: 
046654,000064:                                                                                                  #  DOWNLINK LIST SELECTION:
046655,000065:                                                                                                  #        THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
046656,000066:                                                                                                  #        1.      FRESH START
046657,000067:                                                                                                  #        2.      V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
046658,000068:                                                                                                  #        3.      UPDATE PROGRAM (P27)
046659,000069:                                                                                                  #        4.      NON-V37 SELECTABLE TYPE PROGRAMS (E.G. AGS INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
046660,000070:                                                                                                  #                TRANSITION (COLOSSUS) ETC.).
046661,000071: 
046662,000072:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
046663,000073:                                                                                                  #        READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
046664,000074: 
046665,000075:                                                                                                  #  OUTPUT - EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E. 200 LGC
046666,000076:                                                                                                  #        COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
046667,000077: 
046668,000078:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED - NONE
046669,000079:                                                                                                  #        'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
046670,000080: 
046671,000081:                                                                                                  #  DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM) -
046672,000082:                                                                                                  #        LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.
046673,000083: 
046674,000084:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
046675,000085:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
046676,000086: 
046677,000087:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
046678,000088:                                                                                                  #  1.    DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
046679,000089:                                                                                                  #        DOWN-TELEMETRY PROGRAM.  THIS IS DONE FOR EASE OF CODING, FASTER
046680,000090:                                                                                                  #        EXECUTION.
046681,000091:                                                                                                  #  2.    EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
046682,000092:                                                                                                  #        SUBLISTS.
046683,000093:                                                                                                  #  3.    A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
046684,000094:                                                                                                  #        DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
046685,000095:                                                                                                  #        CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
046686,000096:                                                                                                  #  4.    SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
046687,000097:                                                                                                  #        SAVED IN A BUFFER DURING ONE DOWNRUPT.
046688,000098:                                                                                                  #  5.    THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
046689,000099:                                                                                                  #        OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
046690,000100:                                                                                                  #        IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
046691,000101:                                                                                                  #  6.    ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
046692,000102:                                                                                                  #        CREATED FOR THE DOWNLIST PROGRAM.
046693,000103:                                                                                                  #        A.      1DNADR                  1-WORD DOWNLIST ADDRESS.
046694,000104:                                                                                                  #                SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
046695,000105:                                                                                                  #                HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
046696,000106:                                                                                                  #        B.      2DNADR - 6DNADR         N-WORD DOWNLIST ADDRESS, N = 2 - 6.
046697,000107:                                                                                                  #                SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
046698,000108:                                                                                                  #                FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
046699,000109:                                                                                                  #                PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
046700,000110:                                                                                                  #        C.      DNCHAN                  DOWNLIST CHANNEL ADDRESS.
046701,000111:                                                                                                  #                SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
046702,000112:                                                                                                  #                A PAIR OF CHANNELS FOR DOWN TELEMETRY.
046703,000113:                                                                                                  #        D.      DNPTR                   DOWN TELEMETRY SUBLIST POINTER.
046704,000114:                                                                                                  #                SAME AS CAF BUT TAGGED AS A CONSTANT.  USED IN CONTROL LIST TO POINT TO A SUBLIST.
046705,000115:                                                                                                  #                CAUTION --- A DNPTR CANNOT BE USED IN A SUBLIST.
046706,000116:                                                                                                  #  7.    THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
046707,000117:                                                                                                  #        A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
046708,000118:                                                                                                  #  8.    IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
046709,000119: 
046710,000120:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
046711,000121:                                                                                                  #  (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
046712,000122:                                                                                                  #  DONE)
046713,000123:                                                                                                  #  1.    SNAPSHOT DOWNLIST:
046714,000124:                                                                                                  #        (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
046715,000125:                                                                                                  #        (B) CAN CONTAIN ONLY 1DNADR'S
046716,000126:                                                                                                  #  2.    ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
046717,000127:                                                                                                  #        EQUIVALENT OF THE FOLLOWING ECADRS (I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
046718,000128:                                                                                                  #        (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
046719,000129:                                                                                                  #  3.    CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777
046720,000130:                                                                                                  #  4.    THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
046721,000131:                                                                                                  #        CONTROL SECTION OF THE DOWNLIST.
046722,000132:                                                                                                  #  5.    'DNCHAN 0' CANNOT BE USED.
046723,000133:                                                                                                  #  6.    'DNPTR 0' CANNOT BE USED.
046724,000134:                                                                                                  #  7.    DNPTR CANNOT APPEAR IN A SUBLIST.
046725,000135: 
046726,000136:                                                                                                  #  EBANK SETTINGS
046727,000137:                                                                                                  #        IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
046728,000138:                                                                                                  #        'GARBAGE' INTO BITS15-12 OF EBANK.  HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
046729,000139:                                                                                                  #        SIGNIFICANT SOMEDAY IN THE FUTURE.  IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
046730,000140:                                                                                                  #        THAT BITS 15-12 OF EBANK ARE ZERO.
046731,000141: 
046732,000142:                                                                                                  #  INITIALIZATION REQUIRED - TO INTERRUPT CURRENT LIST AND START A NEW ONE..
046733,000143:                                                                                                  #        1. ADRES OF DOWNLINK LIST INTO DNLSTADR
046734,000144:                                                                                                  #        2. NEGONE INTO SUBLIST
046735,000145:                                                                                                  #        3. NEGONE INTO DNECADR
046736,000146: 
046737,000147:    4000                                           SETLOC   FFTAG12                               
046738,000148:    4000                                           BANK                                           
046739,000149: 
046740,000150:    4662     0337                                  EBANK=   DNTMBUFF                              
046741,000151: 
046742,000152:    4662                                           COUNT    $$/DPROG                              
046743,000153:    4662           54016        DODOWNTM           TS       BANKRUPT                              
046744,000154:    4663           00006                           EXTEND                                         
046745,000155:    4664           22012                           QXCH     QRUPT                                 #  SAVE Q
046746,000156:    4665           35025                           CA       BIT7                                  #  SET WORD ORDER CODE TO 1.  EXCEPTION- AT
046747,000157:    4666           00006                           EXTEND                                         
046748,000158:    4667           02013                           RAND     CHAN13                                
046749,000159:    4670           10000                           CCS      A                                     
046750,000160:    4671           00334                           TC       DNTMGOTO                              
046751,000161:    4672           35025                           CA       BIT7                                  
046752,000162:    4673           00006                           EXTEND                                         #  THE BEGINNING OF EACH LIST THE WORD
046753,000163:    4674           05013                           WOR      CHAN13                                #  CODE WILL BE SET BACK TO 0.
046754,000164:    4675           00334                           TC       DNTMGOTO                              #  GOTO APPROPRIATE PHASE OF PROGRAM
046755,000165: 
046756,000166: 05,2000                                           SETLOC   DOWNTELM                              
046757,000167: 05,2000                                           BANK                                           
046758,000168: 
046759,000169: 05,3523                                           COUNT*   $$/DPROG                              
046760,000170: 05,3523           37716        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
046761,000171: 05,3524           54336                           TS       SUBLIST                               #  WORDS TO MINUS ONE
046762,000172: 05,3525           54335                           TS       DNECADR                               
046763,000173: 05,3526           33646                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS
046764,000174: 05,3527           54334                           TS       DNTMGOTO                              #  GO TO DNPHASE2
046765,000175: 05,3530           13544                           TCF      NEWLIST                               
046766,000176: 05,3531           10335        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS
046767,000177: 05,3532           03661        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
046768,000178: 05,3533           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
046769,000179: 05,3534           13535                           TCF      +1                                    #  (ECADR OF 3776 + 74001 = 77777)
046770,000180: 
046771,000181: 05,3535           10336                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL
046772,000182: 05,3536           13674                           TCF      NEXTINSL                              #  YES
046773,000183: 05,3537           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
046774,000184: 
046775,000185: 05,3540           30333        CHKLIST            CA       CTLIST                                
046776,000186: 05,3541           00006                           EXTEND                                         
046777,000187: 05,3542           63544                           BZMF     NEWLIST                               #  IT WILL BE NEGATIVE AT END OF LIST
046778,000188: 05,3543           13551                           TCF      NEXTINCL                              
046779,000189: 05,3544           50332        NEWLIST            INDEX    DNLSTCOD                              
046780,000190: 05,3545           32335                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
046781,000191: 05,3546           54333                           TS       CTLIST                                #        STARTING ADDRESS OF NEW LIST
046782,000192: 05,3547           40332                           CS       DNLSTCOD                              
046783,000193: 05,3550           13763                           TCF      SENDID     +3                         
046784,000194: 05,3551           50333        NEXTINCL           INDEX    CTLIST                                
046785,000195: 05,3552           30000                           CA       0                                     
046786,000196: 05,3553           10000                           CCS      A                                     
046787,000197: 05,3554           24333                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
046788,000198: 05,3555           13561                           TCF      +4                                    #  ON NEXT ENTRY TO PROG.  (A SHOULD NOT =0)
046789,000199: 05,3556           56333                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
046790,000200: 05,3557           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
046791,000201: 05,3560           56333                           XCH      CTLIST                                #                                  (ST IN )
046792,000202: 05,3561           24000                 +4        INCR     A                                     #                                  (CTLIST)
046793,000203: 05,3562           54335                           TS       DNECADR                               #  SAVE DNADR
046794,000204: 05,3563           63533                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
046795,000205: 05,3564           10000                           CCS      A                                     
046796,000206: 05,3565           13571                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
046797,000207: 05,3566           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14 (CAN'T GET HERE)
046798,000208: 05,3567           13571                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
046799,000209: 05,3570           03613        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
046800,000210: 05,3571           30335                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
046801,000211: 05,3572           63566                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
046802,000212: 05,3573           00006                           EXTEND                                         
046803,000213: 05,3574           63661                           BZMF     FETCH2WD                              #  YES.  (A MUST NEVER BE ZERO)
046804,000214: 05,3575           67710                           AD       MINB12                                #  NO-  IS IT A POINTER (DNPTR) OR A
046805,000215: 05,3576           00006                           EXTEND                                         #        CHANNEL(DNCHAN)
046806,000216: 05,3577           63617                           BZMF     DODNPTR                               #  IT'S A POINTER.  (A MUST NEVER BE ZERO)
046807,000217: 
046808,000218: 05,3600           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND)  IT S A CHANNEL
046809,000219: 05,3601           50335                           INDEX    DNECADR                               
046810,000220: 05,3602           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
046811,000221: 05,3603           54001                           TS       L                                     
046812,000222: 05,3604           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
046813,000223: 05,3605           50335                           INDEX    DNECADR                               
046814,000224: 05,3606           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
046815,000225: 05,3607           54335                           TS       DNECADR                               #  SET DNECADR
046816,000226: 05,3610           37716                           CA       NEGONE                                #        TO MINUS
046817,000227: 05,3611           56335                           XCH      DNECADR                               #                WHILE PRESERVING A.
046818,000228: 05,3612           13707                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
046819,000229: 
046820,000230: 05,3613           45025        WOZERO             CS       BIT7                                  
046821,000231: 05,3614           00006                           EXTEND                                         
046822,000232: 05,3615           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO
046823,000233: 05,3616           00002                           TC       Q                                     #  RETURN TO CALLER
046824,000234: 
046825,000235: 05,3617           50335        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
046826,000236: 05,3620           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
046827,000237: 05,3621           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
046828,000238: 05,3622           30335                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
046829,000239: 05,3623           13673                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
046830,000240: 
046831,000241: 05,3624           56335                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
046832,000242: 05,3625           54336                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
046833,000243: 05,3626           35035                           CAF      ZERO                                  #        A    INTO     A
046834,000244: 05,3627           56335                           XCH      TMINDEX                               #  (NOTE.. TMINDEX = DNECADR)
046835,000245: 
046836,000246:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
046837,000247:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
046838,000248:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
046839,000249:                                                                                                  #  TO MINIMIZE TIME.  THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
046840,000250:                                                                                                  #  THESE RULES ARE ......
046841,000251:                                                                                                  #        1.      ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
046842,000252:                                                                                                  #        2.      THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
046843,000253: 
046844,000254: 05,3630           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
046845,000255: 05,3631           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
046846,000256: 05,3632           00006                           EXTEND                                         
046847,000257: 05,3633           50000                           INDEX    A                                     
046848,000258: 05,3634  E3,1401                                  EBANK=   1401                                  
046849,000259: 05,3634           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
046850,000260: 05,3635     0337                                  EBANK=   DNTMBUFF                              
046851,000261: 05,3635           50335                           INDEX    TMINDEX                               
046852,000262: 05,3636           52340                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
046853,000263: 05,3637           24335                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
046854,000264: 05,3640           24335                           INCR     TMINDEX                               
046855,000265: 05,3641           24336        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
046856,000266: 05,3642           50336                           INDEX    SUBLIST                               
046857,000267: 05,3643           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
046858,000268: 05,3644           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.
046859,000269: 05,3645           13630                           TCF      SNAPLOOP                              #  NOT LAST TWO.
046860,000270: 05,3646           03531        LDNPHAS2           GENADR   DNPHASE2                              
046861,000271: 05,3647           54336                           TS       SUBLIST                               #  YES, LAST.  SAVE A.
046862,000272: 05,3650           37716                           CA       NEGONE                                #  SET DNECADR AND
046863,000273: 05,3651           54335                           TS       DNECADR                               #        SUBLIST POINTERS
046864,000274: 05,3652           56336                           XCH      SUBLIST                               #                TO NEGATIVE VALUES.
046865,000275: 05,3653           54003                           TS       EBANK                                 
046866,000276: 05,3654           74373                           MASK     LOW8                                  
046867,000277: 05,3655           00006                           EXTEND                                         
046868,000278: 05,3656           50000                           INDEX    A                                     
046869,000279: 05,3657  E3,1401                                  EBANK=   1401                                  
046870,000280: 05,3657           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.
046871,000281: 05,3660     0337                                  EBANK=   DNTMBUFF                              
046872,000282: 05,3660           13707        SNAPEND            TCF      DNTMEXIT                              #  NOW GO SEND THEM.
046873,000283: 
046874,000284: 05,3661           30335        FETCH2WD           CA       DNECADR                               
046875,000285: 05,3662           54003                           TS       EBANK                                 #  SET EBANK
046876,000286: 05,3663           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
046877,000287: 05,3664           54001                           TS       L                                     
046878,000288: 05,3665           33537                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
046879,000289: 05,3666           26335                           ADS      DNECADR                               
046880,000290: 05,3667           00006                           EXTEND                                         
046881,000291: 05,3670           50001                           INDEX    L                                     
046882,000292: 05,3671  E3,1400                                  EBANK=   1400                                  
046883,000293: 05,3671           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
046884,000294: 05,3672     0337                                  EBANK=   DNTMBUFF                              
046885,000295: 05,3672           13707                           TCF      DNTMEXIT                              #  NOW GO SEND THEM.
046886,000296: 
046887,000297: 05,3673           54336        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
046888,000298: 05,3674           50336        NEXTINSL           INDEX    SUBLIST                               
046889,000299: 05,3675           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
046890,000300: 05,3676           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
046891,000301: 05,3677           24336                           INCR     SUBLIST                               #  NO-
046892,000302: 05,3700           13704                           TCF      +4                                    
046893,000303: 05,3701           54336                           TS       SUBLIST                               #  SAVE A.
046894,000304: 05,3702           37716                           CA       NEGONE                                #  SET SUBLIST TO MINUS
046895,000305: 05,3703           56336                           XCH      SUBLIST                               #  RETRIEVE A.
046896,000306: 05,3704           24000                 +4        INCR     A                                     
046897,000307: 05,3705           54335                           TS       DNECADR                               #  SAVE DNADR
046898,000308: 05,3706           13572                           TCF      SETWO      +2                         #  GO USE COMMON CODING (PROBLEMS WOULD
046899,000309:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
046900,000310:                                                                                                  #  DNPTR NOW)
046901,000311: 
046902,000312: 05,3707           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
046903,000313: 05,3710           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
046904,000314: 05,3711           30001                           CA       L                                     #  RESPECTIVELY
046905,000315: 05,3712           00006        TMEXITL            EXTEND                                         
046906,000316: 05,3713           01035                           WRITE    DNTM2                                 
046907,000317: 05,3714           15347        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.
046908,000318: 
046909,000319: 05,3715     7710               MINB12             EQUALS   -1/8                                  
046910,000320: 05,3715     0335               DNECADR            EQUALS   TMINDEX                               
046911,000321: 05,3715     0333               CTLIST             EQUALS   LDATALST                              
046912,000322: 05,3715     0336               SUBLIST            EQUALS   DNQ                                   
046913,000323: 
046914,000324:                                                                                                  #  SUBROUTINE NAME - DNDUMP
046915,000325: 
046916,000326:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND (DUMP) ALL 8 BANKS OF ERASABLE STORAGE TWICE.  BANKS ARE SENT ONE AT A TIME
046917,000327:                                                                                                  #        EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
046918,000328:                                                                                                  #        EBANK.  EBANKS ARE DUMPED IN ORDER (I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
046919,000329: 
046920,000330:                                                                                                  #  CALLING SEQUENCE- THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
046921,000331:                                                                                                  #        AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
046922,000332:                                                                                                  #        WILL BEGIN.
046923,000333: 
046924,000334:                                                                                                  #        ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
046925,000335:                                                                                                  #        BY THE FOLLOWING:
046926,000336:                                                                                                  #        1. A FRESH START
046927,000337:                                                                                                  #        2. COMPLETION OF BOTH COMPLETE DUMPS
046928,000338:                                                                                                  #        3. AND INVOLUNTARILY BY A RESTART.
046929,000339:                                                                                                  #  NORMAL EXIT MODE- TCF DNPHASE1
046930,000340: 
046931,000341:                                                                                                  #  ALARM OR ABORT MODE- NONE
046932,000342: 
046933,000343:                                                                                                  #  *SUBROUTINES CALLED- NONE.
046934,000344: 
046935,000345:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
046936,000346:                                                                                                  #        NONE
046937,000347:                                                                                                  #  DEBRIS- DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
046938,000348: 
046939,000349:                                                                                                  #  TIMING-       TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
046940,000350:                                                                                                  #                TIME (IN SECS) =  (   4    )*(    8    )*(    256     +     4   )  /     100
046941,000351:                                                                                                  #           THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
046942,000352: 
046943,000353:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM-
046944,000354:                                                                                                  #        (REMINDER-THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
046945,000355: 
046946,000356:                                                                                                  #        DOWNLIST                                W
046947,000357:                                                                                                  #          WORD  TAKEN FROM CONTENTS OF  EXAMPLE O       COMMENTS
046948,000358:                                                                                                  #            1   ERASID                   0177X  0       DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
046949,000359:                                                                                                  #            2   LOWIDCOD                 77340  1       DOWNLINK SYNCH BITS.  (SAME ONE USED IN ALL OTHER DOWNLISTS)
046950,000360:                                                                                                  #            3   DUMPLOC                  13400  1       (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
046951,000361:                                                                                                  #            4   TIME1                    14120  1       TIME IN CENTISECONDS
046952,000362:                                                                                                  #            5   FIRST WORD OF EBANK X    03400  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
046953,000363:                                                                                                  #            6   2ND   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
046954,000364:                                                                                                  #            7   3RD   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
046955,000365:                                                                                                  #            .                                   1
046956,000366:                                                                                                  #            .                                   1
046957,000367:                                                                                                  #            .                                   1
046958,000368:                                                                                                  #         260D   256TH WORD OF EBANK X    03777  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
046959,000369: 
046960,000370:                                                                                                  #  NOTE-         DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
046961,000371:                                                                                                  #                THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
046962,000372:                                                                                                  #                                                X = NOT USED
046963,000373:                                                                                                  #                X ABC EEE RRRRRRRR            ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
046964,000374:                                                                                                  #                                                    COMPLETE ERASABLE DUMP NUMBER 1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
046965,000375:                                                                                                  #                                              EEE = EBANK BITS
046966,000376:                                                                                                  #                                         RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
046967,000377: 
046968,000378: 05,3715           35035        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
046969,000379: 05,3716           54335                           TS       DUMPLOC                               #  ERASABLE DUMP
046970,000380: 05,3717           03760                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS
046971,000381: 05,3720           33727                           CA       LDNDUMP1                              #  SET DNTMGOTO
046972,000382: 05,3721           54334                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
046973,000383: 05,3722           30025                           CA       TIME1                                 #  PLACE TIME1
046974,000384: 05,3723           56001                           XCH      L                                     #  INTO L
046975,000385: 05,3724           30335                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
046976,000386: 05,3725           13707                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
046977,000387: 
046978,000388: 05,3726           03730        LDNDUMP            ADRES    DNDUMP                                
046979,000389: 05,3727           03742        LDNDUMP1           ADRES    DNDUMP1                               
046980,000390: 
046981,000391: 05,3730           35032        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
046982,000392: 05,3731           26335                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
046983,000393: 05,3732           74373                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
046984,000394: 05,3733           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
046985,000395: 05,3734           13744                           TCF      DNDUMP2                               #  NO- THEN CONTINUE DUMPING
046986,000396: 05,3735           30335                           CA       DUMPLOC                               #  YES- IS THIS THE END OF THE
046987,000397: 05,3736           75017                           MASK     BIT13                                 #  SECOND COMPLETE ERASABLE DUMP?
046988,000398: 05,3737           00006                           EXTEND                                         
046989,000399: 05,3740           13717                           BZF      DNDUMPI    +2                         #  NO - GO BACK AND INITIALIZE NEXT BANK
046990,000400: 05,3741           13523                           TCF      DNPHASE1                              #  YES - SEND DOWNLIST AGAIN
046991,000401: 05,3742           33726        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
046992,000402: 05,3743           54334                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
046993,000403: 
046994,000404: 05,3744           30335        DNDUMP2            CA       DUMPLOC                               
046995,000405: 05,3745           54003                           TS       EBANK                                 #  SET EBANK
046996,000406: 05,3746           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
046997,000407: 05,3747           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
046998,000408: 05,3750           35034                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
046999,000409: 05,3751           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
047000,000410: 05,3752           50002                           INDEX    Q                                     
047001,000411: 05,3753  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
047002,000412: 05,3753           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
047003,000413: 05,3754           56001                           XCH      L                                     
047004,000414: 05,3755           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
047005,000415: 05,3756           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
047006,000416: 05,3757     0337                                  EBANK=   DNTMBUFF                              
047007,000417: 05,3757           13707                           TCF      DNTMEXIT                              #  GO SEND THEM
047008,000418: 
047009,000419: 05,3760           00006        SENDID             EXTEND                                         #  ** ENTRANCE USED BY ERASABLE DUMP PROG. **
047010,000420: 05,3761           22334                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
047011,000421: 05,3762           35070                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
047012,000422: 
047013,000423: 05,3763           54001                           TS       L                                     #  ** ENTRANCE USED BY REGULAR DOWNLINK PG **
047014,000424: 05,3764           03613                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
047015,000425: 05,3765           32000                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
047016,000426: 05,3766           56001                           XCH      L                                     #  AND ID BACK INTO A
047017,000427: 05,3767           13707                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).

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