Source Code

These source-code files are part of a reconstructed copy of Comanche 67, the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 12.

They have been adapted from sources files for Comanche 55, and updated via disassembly of binary dumps of original core rope memory modules, part numbers 2003972-1081, 2003972-1091, 2003972-1111, 2003972-1121, 2003972-1131, and 2003972-1141.

Since only binary dumps (rather than listings) of Comanche 67 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.

046284,000002:                                                                                                  ## Copyright:   Public domain.
046285,000003:                                                                                                  ## Filename:    DOWN-TELEMETRY_PROGRAM.agc
046286,000004:                                                                                                  ## Purpose:     A section of Comanche revision 067.
046287,000005:                                                                                                  ##              It is part of the reconstructed source code for the flight
046288,000006:                                                                                                  ##              software for the Command Module's (CM) Apollo Guidance Computer
046289,000007:                                                                                                  ##              (AGC) for Apollo 12. No original listings of this program are
046290,000008:                                                                                                  ##              available; instead, this file was created via dissassembly of
046291,000009:                                                                                                  ##              dumps of Comanche 067 core rope modules and comparison with
046292,000010:                                                                                                  ##              other AGC programs.
046293,000011:                                                                                                  ## Assembler:   yaYUL
046294,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
046295,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
046296,000014:                                                                                                  ## Mod history: 2023-08-16 MAS  Created from Comanche 055.
046297,000015:                                                                                                  ##              2024-05-13 MAS  Updated for Comanche 067.
046298,000016: 
046299,000017:                                                                                                  #  PROGRAM NAME - DOWN TELEMETRY PROGRAM
046300,000018:                                                                                                  #  MOD NO. - 0           TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
046301,000019:                                                                                                  #                        PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
046302,000020:                                                                                                  #                        THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.  REFER TO DOWNLINK
046303,000021:                                                                                                  #                        LISTS LOG SECTION FOR MORE DETAILS.  HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
046304,000022:                                                                                                  #                        OF DOWN TELEMETRY DATA.
046305,000023:                                                                                                  #  MOD BY - KILROY, SMITH, DEWITT
046306,000024:                                                                                                  #  MOD BY - DENSMORE - JUNE 1969 - ELIMINATE ERASABLE DUMP COUNT
046307,000025:                                                                                                  #  DATE - 02 OCT 67
046308,000026:                                                                                                  #  AUTHORS - KILROY, SMITH, DEWITT, DEWOLF, FAGIN
046309,000027:                                                                                                  #  LOG SECTION - DOWN-TELEMETRY PROGRAM
046310,000028: 
046311,000029:                                                                                                  #  FUNCTIONAL DESCRIPTION - THIS ROUTINE IS INITIATED BY TELEMETRY END
046312,000030:                                                                                                  #        PULSE FROM THE DOWNLINK TELEMETRY CONVERTER.  THIS PULSE OCCURS
046313,000031:                                                                                                  #        AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
046314,000032:                                                                                                  #        EXECUTED AT THESE RATES.  THIS ROUTINE SELECTS THE APPROPRIATE
046315,000033:                                                                                                  #        AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
046316,000034:                                                                                                  #        CHANNELS 34 AND 35.  THE INFORMATION IS THEN GATED OUT FROM THE
046317,000035:                                                                                                  #        LGC IN SERIAL FASHION.
046318,000036: 
046319,000037:                                                                                                  #        THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST.  SINCE DOWNRUPTS
046320,000038:                                                                                                  #        OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
046321,000039:                                                                                                  #        CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
046322,000040:                                                                                                  #        OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
046323,000041: 
046324,000042:                                                                                                  #  CALLING SEQUENCE - NONE
046325,000043:                                                                                                  #        PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
046326,000044:                                                                                                  #        RESULT OF A DOWNRUPT.  CONTROL IS RETURNED VIA TCF RESUME WHICH
046327,000045:                                                                                                  #        IN EFFECT IS A RESUME.
046328,000046: 
046329,000047:                                                                                                  #  SUBROUTINES CALLED - NONE
046330,000048: 
046331,000049:                                                                                                  #  NORMAL EXIT MODE - TCF RESUME
046332,000050: 
046333,000051:                                                                                                  #  ALARM OR ABORT EXIT MODE - NONE
046334,000052: 
046335,000053:                                                                                                  #  RESTART PROTECTION:
046336,000054:                                                                                                  #        ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
046337,000055:                                                                                                  #        DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E. CURRENT CONTENTS OF DNLSTADR).  THIS HAS THE
046338,000056:                                                                                                  #        EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
046339,000057:                                                                                                  #        THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
046340,000058:                                                                                                  #        DOWNLIST.
046341,000059: 
046342,000060:                                                                                                  #        ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
046343,000061: 
046344,000062:                                                                                                  #  DOWNLINK LIST SELECTION:
046345,000063:                                                                                                  #        THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
046346,000064:                                                                                                  #        1.      FRESH START
046347,000065:                                                                                                  #        2.      V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
046348,000066:                                                                                                  #        3.      UPDATE PROGRAM (P27)
046349,000067:                                                                                                  #        4.      NON-V37 SELECTABLE TYPE PROGRAMS (E.G. AGS INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
046350,000068:                                                                                                  #                TRANSITION (COLOSSUS) ETC.).
046351,000069: 
046352,000070:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
046353,000071:                                                                                                  #        READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
046354,000072: 
046355,000073:                                                                                                  #  OUTPUT - EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E. 200 LGC
046356,000074:                                                                                                  #        COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
046357,000075: 
046358,000076:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED - NONE
046359,000077:                                                                                                  #        'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
046360,000078: 
046361,000079:                                                                                                  #  DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM) -
046362,000080:                                                                                                  #        LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.
046363,000081: 
046364,000082:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
046365,000083:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
046366,000084: 
046367,000085:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
046368,000086:                                                                                                  #  1.    DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
046369,000087:                                                                                                  #        DOWN-TELEMETRY PROGRAM.  THIS IS DONE FOR EASE OF CODING, FASTER
046370,000088:                                                                                                  #        EXECUTION.
046371,000089:                                                                                                  #  2.    EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
046372,000090:                                                                                                  #        SUBLISTS.
046373,000091:                                                                                                  #  3.    A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
046374,000092:                                                                                                  #        DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
046375,000093:                                                                                                  #        CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
046376,000094:                                                                                                  #  4.    SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
046377,000095:                                                                                                  #        SAVED IN A BUFFER DURING ONE DOWNRUPT.
046378,000096:                                                                                                  #  5.    THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
046379,000097:                                                                                                  #        OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
046380,000098:                                                                                                  #        IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
046381,000099:                                                                                                  #  6.    ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
046382,000100:                                                                                                  #        CREATED FOR THE DOWNLIST PROGRAM.
046383,000101:                                                                                                  #        A.      1DNADR                  1-WORD DOWNLIST ADDRESS.
046384,000102:                                                                                                  #                SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
046385,000103:                                                                                                  #                HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
046386,000104:                                                                                                  #        B.      2DNADR - 6DNADR         N-WORD DOWNLIST ADDRESS, N = 2 - 6.
046387,000105:                                                                                                  #                SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
046388,000106:                                                                                                  #                FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
046389,000107:                                                                                                  #                PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
046390,000108:                                                                                                  #        C.      DNCHAN                  DOWNLIST CHANNEL ADDRESS.
046391,000109:                                                                                                  #                SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
046392,000110:                                                                                                  #                A PAIR OF CHANNELS FOR DOWN TELEMETRY.
046393,000111:                                                                                                  #        D.      DNPTR                   DOWN TELEMETRY SUBLIST POINTER.
046394,000112:                                                                                                  #                SAME AS CAF BUT TAGGED AS A CONSTANT.  USED IN CONTROL LIST TO POINT TO A SUBLIST.
046395,000113:                                                                                                  #                CAUTION --- A DNPTR CANNOT BE USED IN A SUBLIST.
046396,000114:                                                                                                  #  7.    THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
046397,000115:                                                                                                  #        A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
046398,000116:                                                                                                  #  8.    IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
046399,000117: 
046400,000118:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
046401,000119:                                                                                                  #  (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
046402,000120:                                                                                                  #  DONE)
046403,000121:                                                                                                  #  1.    SNAPSHOT DOWNLIST:
046404,000122:                                                                                                  #        (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
046405,000123:                                                                                                  #        (B) CAN CONTAIN ONLY 1DNADR'S
046406,000124:                                                                                                  #  2.    ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
046407,000125:                                                                                                  #        EQUIVALENT OF THE FOLLOWING ECADRS (I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
046408,000126:                                                                                                  #        (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
046409,000127:                                                                                                  #  3.    CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777
046410,000128:                                                                                                  #  4.    THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
046411,000129:                                                                                                  #        CONTROL SECTION OF THE DOWNLIST.
046412,000130:                                                                                                  #  5.    'DNCHAN 0' CANNOT BE USED.
046413,000131:                                                                                                  #  6.    'DNPTR 0' CANNOT BE USED.
046414,000132:                                                                                                  #  7.    DNPTR CANNOT APPEAR IN A SUBLIST.
046415,000133: 
046416,000134:                                                                                                  #  EBANK SETTINGS
046417,000135:                                                                                                  #        IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
046418,000136:                                                                                                  #        'GARBAGE' INTO BITS15-12 OF EBANK.  HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
046419,000137:                                                                                                  #        SIGNIFICANT SOMEDAY IN THE FUTURE.  IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
046420,000138:                                                                                                  #        THAT BITS 15-12 OF EBANK ARE ZERO.
046421,000139: 
046422,000140:                                                                                                  #  INITIALIZATION REQUIRED - TO INTERRUPT CURRENT LIST AND START A NEW ONE..
046423,000141:                                                                                                  #        1. ADRES OF DOWNLINK LIST INTO DNLSTADR
046424,000142:                                                                                                  #        2. NEGONE INTO SUBLIST
046425,000143:                                                                                                  #        3. NEGONE INTO DNECADR
046426,000144: 
046427,000145:    4000                                           SETLOC   FFTAG12                               
046428,000146:    4000                                           BANK                                           
046429,000147: 
046430,000148:    4662     0337                                  EBANK=   DNTMBUFF                              
046431,000149: 
046432,000150:    4662                                           COUNT    $$/DPROG                              
046433,000151:    4662           54016        DODOWNTM           TS       BANKRUPT                              
046434,000152:    4663           00006                           EXTEND                                         
046435,000153:    4664           22012                           QXCH     QRUPT                                 #  SAVE Q
046436,000154:    4665           35025                           CA       BIT7                                  #  SET WORD ORDER CODE TO 1.  EXCEPTION- AT
046437,000155:    4666           00006                           EXTEND                                         
046438,000156:    4667           02013                           RAND     CHAN13                                
046439,000157:    4670           10000                           CCS      A                                     
046440,000158:    4671           00334                           TC       DNTMGOTO                              
046441,000159:    4672           35025                           CA       BIT7                                  
046442,000160:    4673           00006                           EXTEND                                         #  THE BEGINNING OF EACH LIST THE WORD
046443,000161:    4674           05013                           WOR      CHAN13                                #  CODE WILL BE SET BACK TO 0.
046444,000162:    4675           00334                           TC       DNTMGOTO                              #  GOTO APPROPRIATE PHASE OF PROGRAM
046445,000163: 
046446,000164: 05,2000                                           SETLOC   DOWNTELM                              
046447,000165: 05,2000                                           BANK                                           
046448,000166: 
046449,000167: 05,3523                                           COUNT*   $$/DPROG                              
046450,000168: 05,3523           37716        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
046451,000169: 05,3524           54336                           TS       SUBLIST                               #  WORDS TO MINUS ONE
046452,000170: 05,3525           54335                           TS       DNECADR                               
046453,000171: 05,3526           33646                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS
046454,000172: 05,3527           54334                           TS       DNTMGOTO                              #  GO TO DNPHASE2
046455,000173: 05,3530           13544                           TCF      NEWLIST                               
046456,000174: 05,3531           10335        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS
046457,000175: 05,3532           03661        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
046458,000176: 05,3533           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
046459,000177: 05,3534           13535                           TCF      +1                                    #  (ECADR OF 3776 + 74001 = 77777)
046460,000178: 
046461,000179: 05,3535           10336                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL
046462,000180: 05,3536           13674                           TCF      NEXTINSL                              #  YES
046463,000181: 05,3537           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
046464,000182: 
046465,000183: 05,3540           30333        CHKLIST            CA       CTLIST                                
046466,000184: 05,3541           00006                           EXTEND                                         
046467,000185: 05,3542           63544                           BZMF     NEWLIST                               #  IT WILL BE NEGATIVE AT END OF LIST
046468,000186: 05,3543           13551                           TCF      NEXTINCL                              
046469,000187: 05,3544           50332        NEWLIST            INDEX    DNLSTCOD                              
046470,000188: 05,3545           32335                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
046471,000189: 05,3546           54333                           TS       CTLIST                                #        STARTING ADDRESS OF NEW LIST
046472,000190: 05,3547           40332                           CS       DNLSTCOD                              
046473,000191: 05,3550           13763                           TCF      SENDID     +3                         
046474,000192: 05,3551           50333        NEXTINCL           INDEX    CTLIST                                
046475,000193: 05,3552           30000                           CA       0                                     
046476,000194: 05,3553           10000                           CCS      A                                     
046477,000195: 05,3554           24333                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
046478,000196: 05,3555           13561                           TCF      +4                                    #  ON NEXT ENTRY TO PROG.  (A SHOULD NOT =0)
046479,000197: 05,3556           56333                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
046480,000198: 05,3557           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
046481,000199: 05,3560           56333                           XCH      CTLIST                                #                                  (ST IN )
046482,000200: 05,3561           24000                 +4        INCR     A                                     #                                  (CTLIST)
046483,000201: 05,3562           54335                           TS       DNECADR                               #  SAVE DNADR
046484,000202: 05,3563           63533                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
046485,000203: 05,3564           10000                           CCS      A                                     
046486,000204: 05,3565           13571                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
046487,000205: 05,3566           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14 (CAN'T GET HERE)
046488,000206: 05,3567           13571                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
046489,000207: 05,3570           03613        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
046490,000208: 05,3571           30335                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
046491,000209: 05,3572           63566                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
046492,000210: 05,3573           00006                           EXTEND                                         
046493,000211: 05,3574           63661                           BZMF     FETCH2WD                              #  YES.  (A MUST NEVER BE ZERO)
046494,000212: 05,3575           67710                           AD       MINB12                                #  NO-  IS IT A POINTER (DNPTR) OR A
046495,000213: 05,3576           00006                           EXTEND                                         #        CHANNEL(DNCHAN)
046496,000214: 05,3577           63617                           BZMF     DODNPTR                               #  IT'S A POINTER.  (A MUST NEVER BE ZERO)
046497,000215: 
046498,000216: 05,3600           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND)  IT S A CHANNEL
046499,000217: 05,3601           50335                           INDEX    DNECADR                               
046500,000218: 05,3602           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
046501,000219: 05,3603           54001                           TS       L                                     
046502,000220: 05,3604           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
046503,000221: 05,3605           50335                           INDEX    DNECADR                               
046504,000222: 05,3606           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
046505,000223: 05,3607           54335                           TS       DNECADR                               #  SET DNECADR
046506,000224: 05,3610           37716                           CA       NEGONE                                #        TO MINUS
046507,000225: 05,3611           56335                           XCH      DNECADR                               #                WHILE PRESERVING A.
046508,000226: 05,3612           13707                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
046509,000227: 
046510,000228: 05,3613           45025        WOZERO             CS       BIT7                                  
046511,000229: 05,3614           00006                           EXTEND                                         
046512,000230: 05,3615           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO
046513,000231: 05,3616           00002                           TC       Q                                     #  RETURN TO CALLER
046514,000232: 
046515,000233: 05,3617           50335        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
046516,000234: 05,3620           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
046517,000235: 05,3621           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
046518,000236: 05,3622           30335                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
046519,000237: 05,3623           13673                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
046520,000238: 
046521,000239: 05,3624           56335                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
046522,000240: 05,3625           54336                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
046523,000241: 05,3626           35035                           CAF      ZERO                                  #        A    INTO     A
046524,000242: 05,3627           56335                           XCH      TMINDEX                               #  (NOTE.. TMINDEX = DNECADR)
046525,000243: 
046526,000244:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
046527,000245:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
046528,000246:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
046529,000247:                                                                                                  #  TO MINIMIZE TIME.  THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
046530,000248:                                                                                                  #  THESE RULES ARE ......
046531,000249:                                                                                                  #        1.      ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
046532,000250:                                                                                                  #        2.      THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
046533,000251: 
046534,000252: 05,3630           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
046535,000253: 05,3631           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
046536,000254: 05,3632           00006                           EXTEND                                         
046537,000255: 05,3633           50000                           INDEX    A                                     
046538,000256: 05,3634  E3,1401                                  EBANK=   1401                                  
046539,000257: 05,3634           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
046540,000258: 05,3635     0337                                  EBANK=   DNTMBUFF                              
046541,000259: 05,3635           50335                           INDEX    TMINDEX                               
046542,000260: 05,3636           52340                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
046543,000261: 05,3637           24335                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
046544,000262: 05,3640           24335                           INCR     TMINDEX                               
046545,000263: 05,3641           24336        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
046546,000264: 05,3642           50336                           INDEX    SUBLIST                               
046547,000265: 05,3643           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
046548,000266: 05,3644           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.
046549,000267: 05,3645           13630                           TCF      SNAPLOOP                              #  NOT LAST TWO.
046550,000268: 05,3646           03531        LDNPHAS2           GENADR   DNPHASE2                              
046551,000269: 05,3647           54336                           TS       SUBLIST                               #  YES, LAST.  SAVE A.
046552,000270: 05,3650           37716                           CA       NEGONE                                #  SET DNECADR AND
046553,000271: 05,3651           54335                           TS       DNECADR                               #        SUBLIST POINTERS
046554,000272: 05,3652           56336                           XCH      SUBLIST                               #                TO NEGATIVE VALUES.
046555,000273: 05,3653           54003                           TS       EBANK                                 
046556,000274: 05,3654           74373                           MASK     LOW8                                  
046557,000275: 05,3655           00006                           EXTEND                                         
046558,000276: 05,3656           50000                           INDEX    A                                     
046559,000277: 05,3657  E3,1401                                  EBANK=   1401                                  
046560,000278: 05,3657           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.
046561,000279: 05,3660     0337                                  EBANK=   DNTMBUFF                              
046562,000280: 05,3660           13707        SNAPEND            TCF      DNTMEXIT                              #  NOW GO SEND THEM.
046563,000281: 
046564,000282: 05,3661           30335        FETCH2WD           CA       DNECADR                               
046565,000283: 05,3662           54003                           TS       EBANK                                 #  SET EBANK
046566,000284: 05,3663           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
046567,000285: 05,3664           54001                           TS       L                                     
046568,000286: 05,3665           33537                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
046569,000287: 05,3666           26335                           ADS      DNECADR                               
046570,000288: 05,3667           00006                           EXTEND                                         
046571,000289: 05,3670           50001                           INDEX    L                                     
046572,000290: 05,3671  E3,1400                                  EBANK=   1400                                  
046573,000291: 05,3671           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
046574,000292: 05,3672     0337                                  EBANK=   DNTMBUFF                              
046575,000293: 05,3672           13707                           TCF      DNTMEXIT                              #  NOW GO SEND THEM.
046576,000294: 
046577,000295: 05,3673           54336        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
046578,000296: 05,3674           50336        NEXTINSL           INDEX    SUBLIST                               
046579,000297: 05,3675           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
046580,000298: 05,3676           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
046581,000299: 05,3677           24336                           INCR     SUBLIST                               #  NO-
046582,000300: 05,3700           13704                           TCF      +4                                    
046583,000301: 05,3701           54336                           TS       SUBLIST                               #  SAVE A.
046584,000302: 05,3702           37716                           CA       NEGONE                                #  SET SUBLIST TO MINUS
046585,000303: 05,3703           56336                           XCH      SUBLIST                               #  RETRIEVE A.
046586,000304: 05,3704           24000                 +4        INCR     A                                     
046587,000305: 05,3705           54335                           TS       DNECADR                               #  SAVE DNADR
046588,000306: 05,3706           13572                           TCF      SETWO      +2                         #  GO USE COMMON CODING (PROBLEMS WOULD
046589,000307:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
046590,000308:                                                                                                  #  DNPTR NOW)
046591,000309: 
046592,000310: 05,3707           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
046593,000311: 05,3710           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
046594,000312: 05,3711           30001                           CA       L                                     #  RESPECTIVELY
046595,000313: 05,3712           00006        TMEXITL            EXTEND                                         
046596,000314: 05,3713           01035                           WRITE    DNTM2                                 
046597,000315: 05,3714           15347        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.
046598,000316: 
046599,000317: 05,3715     7710               MINB12             EQUALS   -1/8                                  
046600,000318: 05,3715     0335               DNECADR            EQUALS   TMINDEX                               
046601,000319: 05,3715     0333               CTLIST             EQUALS   LDATALST                              
046602,000320: 05,3715     0336               SUBLIST            EQUALS   DNQ                                   
046603,000321: 
046604,000322:                                                                                                  #  SUBROUTINE NAME - DNDUMP
046605,000323: 
046606,000324:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND (DUMP) ALL 8 BANKS OF ERASABLE STORAGE TWICE.  BANKS ARE SENT ONE AT A TIME
046607,000325:                                                                                                  #        EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
046608,000326:                                                                                                  #        EBANK.  EBANKS ARE DUMPED IN ORDER (I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
046609,000327: 
046610,000328:                                                                                                  #  CALLING SEQUENCE- THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
046611,000329:                                                                                                  #        AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
046612,000330:                                                                                                  #        WILL BEGIN.
046613,000331: 
046614,000332:                                                                                                  #        ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
046615,000333:                                                                                                  #        BY THE FOLLOWING:
046616,000334:                                                                                                  #        1. A FRESH START
046617,000335:                                                                                                  #        2. COMPLETION OF BOTH COMPLETE DUMPS
046618,000336:                                                                                                  #        3. AND INVOLUNTARILY BY A RESTART.
046619,000337:                                                                                                  #  NORMAL EXIT MODE- TCF DNPHASE1
046620,000338: 
046621,000339:                                                                                                  #  ALARM OR ABORT MODE- NONE
046622,000340: 
046623,000341:                                                                                                  #  *SUBROUTINES CALLED- NONE.
046624,000342: 
046625,000343:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
046626,000344:                                                                                                  #        NONE
046627,000345:                                                                                                  #  DEBRIS- DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
046628,000346: 
046629,000347:                                                                                                  #  TIMING-       TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
046630,000348:                                                                                                  #                TIME (IN SECS) =  (   4    )*(    8    )*(    256     +     4   )  /     100
046631,000349:                                                                                                  #           THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
046632,000350: 
046633,000351:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM-
046634,000352:                                                                                                  #        (REMINDER-THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
046635,000353: 
046636,000354:                                                                                                  #        DOWNLIST                                W
046637,000355:                                                                                                  #          WORD  TAKEN FROM CONTENTS OF  EXAMPLE O       COMMENTS
046638,000356:                                                                                                  #            1   ERASID                   0177X  0       DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
046639,000357:                                                                                                  #            2   LOWIDCOD                 77340  1       DOWNLINK SYNCH BITS.  (SAME ONE USED IN ALL OTHER DOWNLISTS)
046640,000358:                                                                                                  #            3   DUMPLOC                  13400  1       (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
046641,000359:                                                                                                  #            4   TIME1                    14120  1       TIME IN CENTISECONDS
046642,000360:                                                                                                  #            5   FIRST WORD OF EBANK X    03400  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
046643,000361:                                                                                                  #            6   2ND   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
046644,000362:                                                                                                  #            7   3RD   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
046645,000363:                                                                                                  #            .                                   1
046646,000364:                                                                                                  #            .                                   1
046647,000365:                                                                                                  #            .                                   1
046648,000366:                                                                                                  #         260D   256TH WORD OF EBANK X    03777  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
046649,000367: 
046650,000368:                                                                                                  #  NOTE-         DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
046651,000369:                                                                                                  #                THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
046652,000370:                                                                                                  #                                                X = NOT USED
046653,000371:                                                                                                  #                X ABC EEE RRRRRRRR            ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
046654,000372:                                                                                                  #                                                    COMPLETE ERASABLE DUMP NUMBER 1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
046655,000373:                                                                                                  #                                              EEE = EBANK BITS
046656,000374:                                                                                                  #                                         RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
046657,000375: 
046658,000376: 05,3715           35035        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
046659,000377: 05,3716           54335                           TS       DUMPLOC                               #  ERASABLE DUMP
046660,000378: 05,3717           03760                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS
046661,000379: 05,3720           33727                           CA       LDNDUMP1                              #  SET DNTMGOTO
046662,000380: 05,3721           54334                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
046663,000381: 05,3722           30025                           CA       TIME1                                 #  PLACE TIME1
046664,000382: 05,3723           56001                           XCH      L                                     #  INTO L
046665,000383: 05,3724           30335                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
046666,000384: 05,3725           13707                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
046667,000385: 
046668,000386: 05,3726           03730        LDNDUMP            ADRES    DNDUMP                                
046669,000387: 05,3727           03742        LDNDUMP1           ADRES    DNDUMP1                               
046670,000388: 
046671,000389: 05,3730           35032        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
046672,000390: 05,3731           26335                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
046673,000391: 05,3732           74373                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
046674,000392: 05,3733           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
046675,000393: 05,3734           13744                           TCF      DNDUMP2                               #  NO- THEN CONTINUE DUMPING
046676,000394: 05,3735           30335                           CA       DUMPLOC                               #  YES- IS THIS THE END OF THE
046677,000395: 05,3736           75017                           MASK     BIT13                                 #  SECOND COMPLETE ERASABLE DUMP?
046678,000396: 05,3737           00006                           EXTEND                                         
046679,000397: 05,3740           13717                           BZF      DNDUMPI    +2                         #  NO - GO BACK AND INITIALIZE NEXT BANK
046680,000398: 05,3741           13523                           TCF      DNPHASE1                              #  YES - SEND DOWNLIST AGAIN
046681,000399: 05,3742           33726        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
046682,000400: 05,3743           54334                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
046683,000401: 
046684,000402: 05,3744           30335        DNDUMP2            CA       DUMPLOC                               
046685,000403: 05,3745           54003                           TS       EBANK                                 #  SET EBANK
046686,000404: 05,3746           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
046687,000405: 05,3747           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
046688,000406: 05,3750           35034                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
046689,000407: 05,3751           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
046690,000408: 05,3752           50002                           INDEX    Q                                     
046691,000409: 05,3753  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
046692,000410: 05,3753           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
046693,000411: 05,3754           56001                           XCH      L                                     
046694,000412: 05,3755           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
046695,000413: 05,3756           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
046696,000414: 05,3757     0337                                  EBANK=   DNTMBUFF                              
046697,000415: 05,3757           13707                           TCF      DNTMEXIT                              #  GO SEND THEM
046698,000416: 
046699,000417: 05,3760           00006        SENDID             EXTEND                                         #  ** ENTRANCE USED BY ERASABLE DUMP PROG. **
046700,000418: 05,3761           22334                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
046701,000419: 05,3762           35070                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
046702,000420: 
046703,000421: 05,3763           54001                           TS       L                                     #  ** ENTRANCE USED BY REGULAR DOWNLINK PG **
046704,000422: 05,3764           03613                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
046705,000423: 05,3765           32000                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
046706,000424: 05,3766           56001                           XCH      L                                     #  AND ID BACK INTO A
046707,000425: 05,3767           13707                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).

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