Source Code

These source-code files are part of a reconstructed copy of Comanche 51, the initial release (though not the final mission release) of the Apollo 11 Command Module (CM) Apollo Guidance Computer (AGC) software. The flown, final release was Comanche 55. The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 51, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 55, whose original source code is available. Comanche 55 source code was then modified by undoing changes known to have been made between revisions 51 and 55. The most-significant steps involved reverting changes related to the R-2 lunar potential model, the details of which were known from the previous, separate, independent reconstruction of the Apollo 10 Lunar Module software Luminary 69/2. The now-reconstructed Comanche 51 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code match those on the Comanche 55 or Luminary 69 printouts, although the source code would likely have different page numbers in a contemporary Comanche 51 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 55. Here's a guide to some of the Apollo documentation relevant to those annotations:
Among documentation not actually referenced in the annotations, there is a short writeup about the reconstruction process in our software repository that may be helpful in understanding it from a different perspective. There's also a handy table that lists what the number of memory-words should be for each routine in Comanche 51, which could make a nice double-check; however, we've not performed that double-check ourselves.

Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository.

047412,000002:                                                                                                  ## Copyright:   Public domain.
047413,000003:                                                                                                  ## Filename:    DOWN-TELEMETRY_PROGRAM.agc
047414,000004:                                                                                                  ## Purpose:     A section of Comanche revision 051.
047415,000005:                                                                                                  ##              It is part of the reconstructed source code for the
047416,000006:                                                                                                  ##              original release of the flight software for the Command
047417,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 11.
047418,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
047419,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
047420,000010:                                                                                                  ##              exactly match those specified for Comanche 51 in NASA drawing
047421,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
047422,000012:                                                                                                  ##              reconstruction is correct.
047423,000013:                                                                                                  ## Reference:   pp. 1093-1102
047424,000014:                                                                                                  ## Assembler:   yaYUL
047425,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047426,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047427,000017:                                                                                                  ## Mod history: 2019-07-30 MAS  Created from Comanche 55.
047428,000018: 

Page 1093

047430,000020:                                                                                                  #  PROGRAM NAME - DOWN TELEMETRY PROGRAM
047431,000021:                                                                                                  #  MOD NO. - 0           TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
047432,000022:                                                                                                  #                        PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
047433,000023:                                                                                                  #                        THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.  REFER TO DOWNLINK
047434,000024:                                                                                                  #                        LISTS LOG SECTION FOR MORE DETAILS.  HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
047435,000025:                                                                                                  #                        OF DOWN TELEMETRY DATA.
047436,000026:                                                                                                  #  MOD BY - KILROY, SMITH, DEWITT
047437,000027:                                                                                                  #  DATE - 02 OCT 67
047438,000028:                                                                                                  #  AUTHORS - KILROY, SMITH, DEWITT, DEWOLF, FAGIN
047439,000029:                                                                                                  #  LOG SECTION - DOWN-TELEMETRY PROGRAM
047440,000030: 
047441,000031:                                                                                                  #  FUNCTIONAL DESCRIPTION - THIS ROUTINE IS INITIATED BY TELEMETRY END
047442,000032:                                                                                                  #        PULSE FROM THE DOWNLINK TELEMETRY CONVERTER.  THIS PULSE OCCURS
047443,000033:                                                                                                  #        AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
047444,000034:                                                                                                  #        EXECUTED AT THESE RATES.  THIS ROUTINE SELECTS THE APPROPRIATE
047445,000035:                                                                                                  #        AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
047446,000036:                                                                                                  #        CHANNELS 34 AND 35.  THE INFORMATION IS THEN GATED OUT FROM THE
047447,000037:                                                                                                  #        LGC IN SERIAL FASHION.
047448,000038: 
047449,000039:                                                                                                  #        THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST.  SINCE DOWNRUPTS
047450,000040:                                                                                                  #        OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
047451,000041:                                                                                                  #        CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
047452,000042:                                                                                                  #        OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
047453,000043: 
047454,000044:                                                                                                  #  CALLING SEQUENCE - NONE
047455,000045:                                                                                                  #        PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
047456,000046:                                                                                                  #        RESULT OF A DOWNRUPT.  CONTROL IS RETURNED VIA TCF RESUME WHICH
047457,000047:                                                                                                  #        IN EFFECT IS A RESUME.
047458,000048: 
047459,000049:                                                                                                  #  SUBROUTINES CALLED - NONE
047460,000050: 
047461,000051:                                                                                                  #  NORMAL EXIT MODE - TCF RESUME
047462,000052: 
047463,000053:                                                                                                  #  ALARM OR ABORT EXIT MODE - NONE
047464,000054: 
047465,000055:                                                                                                  #  RESTART PROTECTION:
047466,000056:                                                                                                  #        ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
047467,000057:                                                                                                  #        DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E. CURRENT CONTENTS OF DNLSTADR).  THIS HAS THE
047468,000058:                                                                                                  #        EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
047469,000059:                                                                                                  #        THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
047470,000060:                                                                                                  #        DOWNLIST.
047471,000061: 
047472,000062:                                                                                                  #        ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
047473,000063: 
047474,000064:                                                                                                  #  DOWNLINK LIST SELECTION:
047475,000065:                                                                                                  #        THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
047476,000066:                                                                                                  #        1.      FRESH START
047477,000067:                                                                                                  #        2.      V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
047478,000068:                                                                                                  #        3.      UPDATE PROGRAM (P27)
047479,000069:                                                                                                  #        4.      NON-V37 SELECTABLE TYPE PROGRAMS (E.G. AGS INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
047480,000070:                                                                                                  #                TRANSITION (COLOSSUS) ETC.).
047481,000071: 
047482,000072:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
047483,000073:                                                                                                  #        READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
047484,000074: 
047485,000075:                                                                                                  #  OUTPUT - EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E. 200 LGC
047486,000076:                                                                                                  #        COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
047487,000077: 
047488,000078:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED - NONE
047489,000079:                                                                                                  #        'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
047490,000080: 
047491,000081:                                                                                                  #  DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM) -
047492,000082:                                                                                                  #        LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.

Page 1094 No source on this page of the original assembly listing.

047495,000085: 

Page 1095

047497,000087:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
047498,000088:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
047499,000089: 
047500,000090:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
047501,000091:                                                                                                  #  1.    DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
047502,000092:                                                                                                  #        DOWN-TELEMETRY PROGRAM.  THIS IS DONE FOR EASE OF CODING, FASTER
047503,000093:                                                                                                  #        EXECUTION.
047504,000094:                                                                                                  #  2.    EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
047505,000095:                                                                                                  #        SUBLISTS.
047506,000096:                                                                                                  #  3.    A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
047507,000097:                                                                                                  #        DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
047508,000098:                                                                                                  #        CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
047509,000099:                                                                                                  #  4.    SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
047510,000100:                                                                                                  #        SAVED IN A BUFFER DURING ONE DOWNRUPT.
047511,000101:                                                                                                  #  5.    THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
047512,000102:                                                                                                  #        OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
047513,000103:                                                                                                  #        IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
047514,000104:                                                                                                  #  6.    ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
047515,000105:                                                                                                  #        CREATED FOR THE DOWNLIST PROGRAM.
047516,000106:                                                                                                  #        A.      1DNADR                  1-WORD DOWNLIST ADDRESS.
047517,000107:                                                                                                  #                SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
047518,000108:                                                                                                  #                HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
047519,000109:                                                                                                  #        B.      2DNADR - 6DNADR         N-WORD DOWNLIST ADDRESS, N = 2 - 6.
047520,000110:                                                                                                  #                SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
047521,000111:                                                                                                  #                FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
047522,000112:                                                                                                  #                PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
047523,000113:                                                                                                  #        C.      DNCHAN                  DOWNLIST CHANNEL ADDRESS.
047524,000114:                                                                                                  #                SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
047525,000115:                                                                                                  #                A PAIR OF CHANNELS FOR DOWN TELEMETRY.
047526,000116:                                                                                                  #        D.      DNPTR                   DOWN TELEMETRY SUBLIST POINTER.
047527,000117:                                                                                                  #                SAME AS CAF BUT TAGGED AS A CONSTANT.  USED IN CONTROL LIST TO POINT TO A SUBLIST.
047528,000118:                                                                                                  #                CAUTION --- A DNPTR CANNOT BE USED IN A SUBLIST.
047529,000119:                                                                                                  #  7.    THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
047530,000120:                                                                                                  #        A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
047531,000121:                                                                                                  #  8.    IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
047532,000122: 
047533,000123:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
047534,000124:                                                                                                  #  (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
047535,000125:                                                                                                  #  DONE)
047536,000126:                                                                                                  #  1.    SNAPSHOT DOWNLIST:
047537,000127:                                                                                                  #        (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
047538,000128:                                                                                                  #        (B) CAN CONTAIN ONLY 1DNADR'S
047539,000129:                                                                                                  #  2.    ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
047540,000130:                                                                                                  #        EQUIVALENT OF THE FOLLOWING ECADRS (I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
047541,000131:                                                                                                  #        (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
047542,000132:                                                                                                  #  3.    CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777

Page 1096

047544,000134:                                                                                                  #  4.    THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
047545,000135:                                                                                                  #        CONTROL SECTION OF THE DOWNLIST.
047546,000136:                                                                                                  #  5.    'DNCHAN 0' CANNOT BE USED.
047547,000137:                                                                                                  #  6.    'DNPTR 0' CANNOT BE USED.
047548,000138:                                                                                                  #  7.    DNPTR CANNOT APPEAR IN A SUBLIST.
047549,000139: 
047550,000140:                                                                                                  #  EBANK SETTINGS
047551,000141:                                                                                                  #        IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
047552,000142:                                                                                                  #        'GARBAGE' INTO BITS15-12 OF EBANK.  HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
047553,000143:                                                                                                  #        SIGNIFICANT SOMEDAY IN THE FUTURE.  IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
047554,000144:                                                                                                  #        THAT BITS 15-12 OF EBANK ARE ZERO.
047555,000145: 
047556,000146:                                                                                                  #  INITIALIZATION REQUIRED - TO INTERRUPT CURRENT LIST AND START A NEW ONE..
047557,000147:                                                                                                  #        1. ADRES OF DOWNLINK LIST INTO DNLSTADR
047558,000148:                                                                                                  #        2. NEGONE INTO SUBLIST
047559,000149:                                                                                                  #        3. NEGONE INTO DNECADR
047560,000150: 
047561,000151: 22,3510                                           BANK     22                                    
047562,000152: 05,2000                                           SETLOC   DOWNTELM                              
047563,000153: 05,2000                                           BANK                                           
047564,000154: 
047565,000155: 05,3521     0340                                  EBANK=   DNTMBUFF                              
047566,000156: 
047567,000157: 05,3521                                           COUNT    05/DPROG                              
047568,000158: 
047569,000159: 05,3521           54016        DODOWNTM           TS       BANKRUPT                              
047570,000160: 05,3522           00006                           EXTEND                                         
047571,000161: 05,3523           22012                           QXCH     QRUPT                                 #  SAVE Q
047572,000162: 05,3524           35011                           CA       BIT7                                  #  SET WORD ORDER CODE TO 1.  EXCEPTION- AT
047573,000163: 05,3525           00006                           EXTEND                                         #  THE BEGINNING OF EACH LIST THE WORD
047574,000164: 05,3526           05013                           WOR      CHAN13                                #  CODE WILL BE SET BACK TO 0.
047575,000165: 05,3527           00335                           TC       DNTMGOTO                              #  GOTO APPROPRIATE PHASE OF PROGRAM
047576,000166: 
047577,000167: 05,3530           37716        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
047578,000168: 05,3531           54337                           TS       SUBLIST                               #  WORDS TO MINUS ONE
047579,000169: 05,3532           54336                           TS       DNECADR                               
047580,000170: 05,3533           33653                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS
047581,000171: 05,3534           54335                           TS       DNTMGOTO                              #  GO TO DNPHASE2
047582,000172: 05,3535           13551                           TCF      NEWLIST                               
047583,000173: 05,3536           10336        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS
047584,000174: 05,3537           03666        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
047585,000175: 05,3540           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
047586,000176: 05,3541           13542                           TCF      +1                                    #  (ECADR OF 3776 + 74001 = 77777)
047587,000177: 
047588,000178: 05,3542           10337                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL

Page 1097

047590,000180: 05,3543           13701                           TCF      NEXTINSL                              #  YES
047591,000181: 05,3544           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
047592,000182: 
047593,000183: 05,3545           30334        CHKLIST            CA       CTLIST                                
047594,000184: 05,3546           00006                           EXTEND                                         
047595,000185: 05,3547           63551                           BZMF     NEWLIST                               #  IT WILL BE NEGATIVE AT END OF LIST
047596,000186: 05,3550           13556                           TCF      NEXTINCL                              
047597,000187: 05,3551           50332        NEWLIST            INDEX    DNLSTCOD                              
047598,000188: 05,3552           32335                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
047599,000189: 05,3553           54334                           TS       CTLIST                                #        STARTING ADDRESS OF NEW LIST
047600,000190: 05,3554           40332                           CS       DNLSTCOD                              
047601,000191: 05,3555           13771                           TCF      SENDID     +3                         
047602,000192: 05,3556           50334        NEXTINCL           INDEX    CTLIST                                
047603,000193: 05,3557           30000                           CA       0                                     
047604,000194: 05,3560           10000                           CCS      A                                     
047605,000195: 05,3561           24334                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
047606,000196: 05,3562           13566                           TCF      +4                                    #  ON NEXT ENTRY TO PROG.  (A SHOULD NOT =0)
047607,000197: 05,3563           56334                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
047608,000198: 05,3564           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
047609,000199: 05,3565           56334                           XCH      CTLIST                                #                                  (ST IN )
047610,000200: 05,3566           24000                 +4        INCR     A                                     #                                  (CTLIST)
047611,000201: 05,3567           54336                           TS       DNECADR                               #  SAVE DNADR
047612,000202: 05,3570           63540                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
047613,000203: 05,3571           10000                           CCS      A                                     
047614,000204: 05,3572           13576                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
047615,000205: 05,3573           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14 (CAN'T GET HERE)
047616,000206: 05,3574           13576                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
047617,000207: 05,3575           03620        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
047618,000208: 05,3576           30336                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
047619,000209: 05,3577           63573                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
047620,000210: 05,3600           00006                           EXTEND                                         
047621,000211: 05,3601           63666                           BZMF     FETCH2WD                              #  YES.  (A MUST NEVER BE ZERO)
047622,000212: 05,3602           67710                           AD       MINB12                                #  NO-  IS IT A POINTER (DNPTR) OR A
047623,000213: 05,3603           00006                           EXTEND                                         #        CHANNEL(DNCHAN)
047624,000214: 05,3604           63624                           BZMF     DODNPTR                               #  IT'S A POINTER.  (A MUST NEVER BE ZERO)
047625,000215: 
047626,000216: 05,3605           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND)  IT S A CHANNEL
047627,000217: 05,3606           50336                           INDEX    DNECADR                               
047628,000218: 05,3607           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
047629,000219: 05,3610           54001                           TS       L                                     
047630,000220: 05,3611           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
047631,000221: 05,3612           50336                           INDEX    DNECADR                               
047632,000222: 05,3613           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
047633,000223: 05,3614           54336                           TS       DNECADR                               #  SET DNECADR
047634,000224: 05,3615           37716                           CA       NEGONE                                #        TO MINUS
047635,000225: 05,3616           56336                           XCH      DNECADR                               #                WHILE PRESERVING A.
047636,000226: 05,3617           13714                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
047637,000227: 
047638,000228: 05,3620           45011        WOZERO             CS       BIT7                                  
047639,000229: 05,3621           00006                           EXTEND                                         

Page 1098

047641,000231: 05,3622           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO
047642,000232: 05,3623           00002                           TC       Q                                     #  RETURN TO CALLER
047643,000233: 
047644,000234: 05,3624           50336        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
047645,000235: 05,3625           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
047646,000236: 05,3626           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
047647,000237: 05,3627           30336                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
047648,000238: 05,3630           13700                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
047649,000239: 
047650,000240: 05,3631           56336                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
047651,000241: 05,3632           54337                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
047652,000242: 05,3633           35021                           CAF      ZERO                                  #        A    INTO     A
047653,000243: 05,3634           56336                           XCH      TMINDEX                               #  (NOTE.. TMINDEX = DNECADR)
047654,000244: 
047655,000245:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
047656,000246:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
047657,000247:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
047658,000248:                                                                                                  #  TO MINIMIZE TIME.  THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
047659,000249:                                                                                                  #  THESE RULES ARE ......
047660,000250:                                                                                                  #        1.      ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
047661,000251:                                                                                                  #        2.      THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
047662,000252: 
047663,000253: 05,3635           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
047664,000254: 05,3636           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
047665,000255: 05,3637           00006                           EXTEND                                         
047666,000256: 05,3640           50000                           INDEX    A                                     
047667,000257: 05,3641  E3,1401                                  EBANK=   1401                                  
047668,000258: 05,3641           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
047669,000259: 05,3642     0340                                  EBANK=   DNTMBUFF                              
047670,000260: 05,3642           50336                           INDEX    TMINDEX                               
047671,000261: 05,3643           52341                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
047672,000262: 05,3644           24336                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
047673,000263: 05,3645           24336                           INCR     TMINDEX                               
047674,000264: 05,3646           24337        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
047675,000265: 05,3647           50337                           INDEX    SUBLIST                               
047676,000266: 05,3650           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
047677,000267: 05,3651           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.
047678,000268: 05,3652           13635                           TCF      SNAPLOOP                              #  NOT LAST TWO.
047679,000269: 05,3653           03536        LDNPHAS2           GENADR   DNPHASE2                              
047680,000270: 05,3654           54337                           TS       SUBLIST                               #  YES, LAST.  SAVE A.
047681,000271: 05,3655           37716                           CA       NEGONE                                #  SET DNECADR AND
047682,000272: 05,3656           54336                           TS       DNECADR                               #        SUBLIST POINTERS
047683,000273: 05,3657           56337                           XCH      SUBLIST                               #                TO NEGATIVE VALUES.
047684,000274: 05,3660           54003                           TS       EBANK                                 
047685,000275: 05,3661           74373                           MASK     LOW8                                  
047686,000276: 05,3662           00006                           EXTEND                                         
047687,000277: 05,3663           50000                           INDEX    A                                     
047688,000278: 05,3664  E3,1401                                  EBANK=   1401                                  

Page 1099

047690,000280: 05,3664           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.
047691,000281: 05,3665     0340                                  EBANK=   DNTMBUFF                              
047692,000282: 05,3665           13714        SNAPEND            TCF      DNTMEXIT                              #  NOW GO SEND THEM.
047693,000283: 
047694,000284: 05,3666           30336        FETCH2WD           CA       DNECADR                               
047695,000285: 05,3667           54003                           TS       EBANK                                 #  SET EBANK
047696,000286: 05,3670           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
047697,000287: 05,3671           54001                           TS       L                                     
047698,000288: 05,3672           33544                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
047699,000289: 05,3673           26336                           ADS      DNECADR                               
047700,000290: 05,3674           00006                           EXTEND                                         
047701,000291: 05,3675           50001                           INDEX    L                                     
047702,000292: 05,3676  E3,1400                                  EBANK=   1400                                  
047703,000293: 05,3676           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
047704,000294: 05,3677     0340                                  EBANK=   DNTMBUFF                              
047705,000295: 05,3677           13714                           TCF      DNTMEXIT                              #  NOW GO SEND THEM.
047706,000296: 
047707,000297: 05,3700           54337        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
047708,000298: 05,3701           50337        NEXTINSL           INDEX    SUBLIST                               
047709,000299: 05,3702           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
047710,000300: 05,3703           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
047711,000301: 05,3704           24337                           INCR     SUBLIST                               #  NO-
047712,000302: 05,3705           13711                           TCF      +4                                    
047713,000303: 05,3706           54337                           TS       SUBLIST                               #  SAVE A.
047714,000304: 05,3707           37716                           CA       NEGONE                                #  SET SUBLIST TO MINUS
047715,000305: 05,3710           56337                           XCH      SUBLIST                               #  RETRIEVE A.
047716,000306: 05,3711           24000                 +4        INCR     A                                     
047717,000307: 05,3712           54336                           TS       DNECADR                               #  SAVE DNADR
047718,000308: 05,3713           13577                           TCF      SETWO      +2                         #  GO USE COMMON CODING (PROBLEMS WOULD
047719,000309:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
047720,000310:                                                                                                  #  DNPTR NOW)
047721,000311: 
047722,000312: 05,3714           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
047723,000313: 05,3715           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
047724,000314: 05,3716           30001                           CA       L                                     #  RESPECTIVELY
047725,000315: 05,3717           00006        TMEXITL            EXTEND                                         
047726,000316: 05,3720           01035                           WRITE    DNTM2                                 
047727,000317: 05,3721           15333        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.
047728,000318: 
047729,000319: 05,3722     7710               MINB12             EQUALS   -1/8                                  
047730,000320: 05,3722     0336               DNECADR            EQUALS   TMINDEX                               
047731,000321: 05,3722     0334               CTLIST             EQUALS   LDATALST                              
047732,000322: 05,3722     0337               SUBLIST            EQUALS   DNQ                                   
047733,000323: 

Page 1100

047735,000325:                                                                                                  #  SUBROUTINE NAME - DNDUMP
047736,000326: 
047737,000327:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND (DUMP) ALL ERASABLE STORAGE 'N' TIMES.(N = 1 TO 4). BANKS ARE SENT ONE AT A TIME
047738,000328:                                                                                                  #        EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
047739,000329:                                                                                                  #        EBANK.  EBANKS ARE DUMPED IN ORDER (I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
047740,000330: 
047741,000331:                                                                                                  #  CALLING SEQUENCE- THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
047742,000332:                                                                                                  #        AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
047743,000333:                                                                                                  #        WILL BEGIN.
047744,000334: 
047745,000335:                                                                                                  #        ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
047746,000336:                                                                                                  #        BY THE FOLLOWING:
047747,000337: 
047748,000338:                                                                                                  #        1.      A FRESH START
047749,000339:                                                                                                  #        2.      COMPLETION OF ALL DOWNLINK DUMPS REQUESTED (ACCORDING TO BITS SET IN DUMPCNT).  NOTE THAT DUMPCNT
047750,000340:                                                                                                  #                CAN BE ALTERED BY A V21N01.
047751,000341:                                                                                                  #        3.      AND INVOLUNTARILY BY A RESTART.
047752,000342: 
047753,000343:                                                                                                  #  NORMAL EXIT MODE- TCF DNPHASE1
047754,000344: 
047755,000345:                                                                                                  #  ALARM OR ABORT MODE- NONE
047756,000346: 
047757,000347:                                                                                                  #  *SUBROUTINES CALLED- NONE.
047758,000348: 
047759,000349:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
047760,000350:                                                                                                  #        DUMPCNT OCT 20000       IF 4 COMPLETE ERASABLE DUMPS ARE DESIRED
047761,000351:                                                                                                  #        DUMPCNT OCT 10000       IF 2 COMPLETE ERASABLE DUMPS ARE DESIRED
047762,000352:                                                                                                  #        DUMPCNT OCT 04000       IF 1 COMPLETE ERASABLE DUMP  IS  DESIRED
047763,000353: 
047764,000354:                                                                                                  #  DEBRIS- DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
047765,000355: 
047766,000356:                                                                                                  #  TIMING-       TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
047767,000357:                                                                                                  #                TIME (IN SECS) =  (   4    )*(    8    )*(    256     +     4   )  /     100
047768,000358:                                                                                                  #           THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
047769,000359: 
047770,000360:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM-
047771,000361:                                                                                                  #        (REMINDER-THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
047772,000362: 
047773,000363:                                                                                                  #        DOWNLIST                                W
047774,000364:                                                                                                  #          WORD  TAKEN FROM CONTENTS OF  EXAMPLE O       COMMENTS
047775,000365:                                                                                                  #            1   ERASID                   0177X  0       DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
047776,000366:                                                                                                  #            2   LOWIDCOD                 77340  1       DOWNLINK SYNCH BITS.  (SAME ONE USED IN ALL OTHER DOWNLISTS)
047777,000367:                                                                                                  #            3   DUMPLOC                  13400  1       (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
047778,000368:                                                                                                  #            4   TIME1                    14120  1       TIME IN CENTISECONDS
047779,000369:                                                                                                  #            5   FIRST WORD OF EBANK X    03400  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
047780,000370:                                                                                                  #            6   2ND   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
047781,000371:                                                                                                  #            7   3RD   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
047782,000372:                                                                                                  #            .                                   1
047783,000373:                                                                                                  #            .                                   1
047784,000374:                                                                                                  #            .                                   1
047785,000375:                                                                                                  #         260D   256TH WORD OF EBANK X    03777  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
047786,000376: 
047787,000377:                                                                                                  #  NOTE-         DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
047788,000378:                                                                                                  #                THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
047789,000379:                                                                                                  #                                                X = NOT USED
047790,000380:                                                                                                  #                X ABC EEE RRRRRRRR            ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
047791,000381:                                                                                                  #                                                    COMPLETE ERASABLE DUMP NUMBER 1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
047792,000382:                                                                                                  #                                              EEE = EBANK BITS
047793,000383:                                                                                                  #                                         RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
047794,000384: 

Page 1101

047796,000386: 05,3722           35021        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
047797,000387: 05,3723           54336                           TS       DUMPLOC                               #  ERASABLE DUMP
047798,000388: 05,3724           03766                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS
047799,000389: 05,3725           33734                           CA       LDNDUMP1                              #  SET DNTMGOTO
047800,000390: 05,3726           54335                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
047801,000391: 05,3727           30025                           CA       TIME1                                 #  PLACE TIME1
047802,000392: 05,3730           56001                           XCH      L                                     #  INTO L
047803,000393: 05,3731           30336                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
047804,000394: 05,3732           13714                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
047805,000395: 
047806,000396: 05,3733           03735        LDNDUMP            ADRES    DNDUMP                                
047807,000397: 05,3734           03750        LDNDUMP1           ADRES    DNDUMP1                               
047808,000398: 
047809,000399: 05,3735           35016        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
047810,000400: 05,3736           26336                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
047811,000401: 05,3737           74373                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
047812,000402: 05,3740           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
047813,000403: 05,3741           13752                           TCF      DNDUMP2                               #  NO- THEN CONTINUE DUMPING
047814,000404: 05,3742           30336                           CA       DUMPLOC                               #  YES- IS THIS THE END OF THE
047815,000405: 05,3743           70333                           MASK     DUMPCNT                               #  N TH(N = 1 TO 4) COMPLETE ERASABLE
047816,000406: 05,3744           77671                           MASK     PRIO34                                #  DUMP(BIT14 FOR 4, BIT13 FOR 2 OR BIT12
047817,000407: 05,3745           10000                           CCS      A                                     #  FOR 1 COMPLETE ERASABLE DUMP(S)).
047818,000408: 05,3746           13530                           TCF      DNPHASE1                              #  YES- START SENDING INTERRUPTED DOWNLIST
047819,000409:                                                                                                  #  AGAIN
047820,000410: 05,3747           13724                           TCF      DNDUMPI    +2                         #  NO- GO BACK AND INITIALIZE NEXT BANK
047821,000411: 
047822,000412: 05,3750           33733        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
047823,000413: 05,3751           54335                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
047824,000414: 
047825,000415: 05,3752           30336        DNDUMP2            CA       DUMPLOC                               
047826,000416: 05,3753           54003                           TS       EBANK                                 #  SET EBANK
047827,000417: 05,3754           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
047828,000418: 05,3755           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
047829,000419: 05,3756           35020                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
047830,000420: 05,3757           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
047831,000421: 05,3760           50002                           INDEX    Q                                     
047832,000422: 05,3761  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
047833,000423: 05,3761           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
047834,000424: 05,3762           56001                           XCH      L                                     
047835,000425: 05,3763           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
047836,000426: 05,3764           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
047837,000427: 05,3765     0340                                  EBANK=   DNTMBUFF                              
047838,000428: 05,3765           13714                           TCF      DNTMEXIT                              #  GO SEND THEM
047839,000429: 
047840,000430: 05,3766           00006        SENDID             EXTEND                                         #  ** ENTRANCE USED BY ERASABLE DUMP PROG. **
047841,000431: 05,3767           22335                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
047842,000432: 05,3770           35054                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
047843,000433: 
047844,000434: 05,3771           54001                           TS       L                                     #  ** ENTRANCE USED BY REGULAR DOWNLINK PG **

Page 1102

047846,000436: 05,3772           03620                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
047847,000437: 05,3773           32000                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
047848,000438: 05,3774           56001                           XCH      L                                     #  AND ID BACK INTO A
047849,000439: 05,3775           13714                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).

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