Source Code

This is the source-code for the Apollo 9 Command Module's Guidance Computer. These files were derived originally from the scan from MIT's Dibner Institute's now-discontinued website titled "History of Recent Science and Technology", which in turn was originally created by Gary Neff, though his high-quality scans were unfortunately reduced in legibility when presented online. The markings on the front of the printout imply that it was the original AGC developer Norm Brodeur's copy. A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original AGC developer Fred Martin. The source code was transcribed from those images by Ron Burkey. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

047402,000002:                                                                                                  ## Copyright:   Public domain.
047403,000003:                                                                                                  ## Filename:    DOWN_TELEMETRY_PROGRAM.agc
047404,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus, build 249.
047405,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
047406,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 9.
047407,000007:                                                                                                  ## Assembler:   yaYUL
047408,000008:                                                                                                  ## Reference:   Starts on p. 1063.
047409,000009:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047410,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo.
047411,000011:                                                                                                  ## Mod history: 08/28/04 RSB.   Adapted from corresponding Luminary 131 file.
047412,000012:                                                                                                  ##              2010-10-24 JL   Indentation fixes.
047413,000013:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
047414,000014:                                                                                                  ##                              original harcopy, as opposed to the PDF page
047415,000015:                                                                                                  ##                              numbers in 1701.pdf.
047416,000016:                                                                                                  ##              2017-01-07 RSB  Cross-diff'd comment text (not whitespace)
047417,000017:                                                                                                  ##                              vs the already-proofed corresponding Colossus
047418,000018:                                                                                                  ##                              237 and Comanche 55 source-code files
047419,000019:                                                                                                  ##                              and corrected errors found.
047420,000020:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
047421,000021:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
047422,000022: 
047423,000023:                                                                                                  ## The contents of the "Colossus249" files, in general, are transcribed 
047424,000024:                                                                                                  ## from a scanned copy of the program listing.  Notations on this
047425,000025:                                                                                                  ## document read, in part:
047426,000026:                                                                                                  ##
047427,000027:                                                                                                  ##      Assemble revision 249 of AGC program Colossus by NASA
047428,000028:                                                                                                  ##      2021111-041.  October 28, 1968.  
047429,000029:                                                                                                  ##
047430,000030:                                                                                                  ##      This AGC program shall also be referred to as
047431,000031:                                                                                                  ##                              Colossus 1A
047432,000032:                                                                                                  ##
047433,000033:                                                                                                  ##      Prepared by
047434,000034:                                                                                                  ##                      Massachusetts Institute of Technology
047435,000035:                                                                                                  ##                      75 Cambridge Parkway
047436,000036:                                                                                                  ##                      Cambridge, Massachusetts
047437,000037:                                                                                                  ##      under NASA contract NAS 9-4065.
047438,000038:                                                                                                  ##
047439,000039:                                                                                                  ## Refer directly to the online document mentioned above for further information.
047440,000040:                                                                                                  ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
047441,000041:                                                                                                  ##
047442,000042:                                                                                                  ## In some cases, where the source code for Luminary 131 overlaps that of 
047443,000043:                                                                                                  ## Colossus 249, this code is instead copied from the corresponding Luminary 131
047444,000044:                                                                                                  ## source file, and then is proofed to incorporate any changes.
047445,000045: 

Page 1063

047447,000047:                                                                                                  #  PROGRAM NAME- DOWN TELEMETRY PROGRAM
047448,000048:                                                                                                  #  MOD NO.- 0    TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
047449,000049:                                                                                                  #                PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
047450,000050:                                                                                                  #                THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.  REFER TO DOWNLINK
047451,000051:                                                                                                  #                LISTS LOG SECTION FOR MORE DETAILS.  HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
047452,000052:                                                                                                  #                OF DOWN TELEMETRY DATA.
047453,000053:                                                                                                  #  MOD BY-       KILROY, SMITH, DEWITT
047454,000054:                                                                                                  #  DATE-         02 OCT 67
047455,000055:                                                                                                  #  AUTHORS-      KILROY, SMITH, DEWITT, DEWOLF, FAGIN
047456,000056:                                                                                                  #  LOG SECTION-  DOWN-TELEMETRY PROGRAM
047457,000057: 
047458,000058:                                                                                                  #  FUNCTIONAL DESCRIPTION- THIS ROUTINE IS INITIATED BY TELEMETRY END
047459,000059:                                                                                                  #        PULSE FROM THE DOWNLINK TELEMETRY CONVERTER.  THIS PULSE OCCURS
047460,000060:                                                                                                  #        AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
047461,000061:                                                                                                  #        EXECUTED AT THESE RATES.  THIS ROUTINE SELECTS THE APPROPRIATE
047462,000062:                                                                                                  #        AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
047463,000063:                                                                                                  #        CHANNELS 34 AND 35.  THE INFORMATION IS THEN GATED OUT FROM THE
047464,000064:                                                                                                  #        LGC IN SERIAL FASHION.
047465,000065: 
047466,000066:                                                                                                  #        THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST.  SINCE DOWNRUPTS
047467,000067:                                                                                                  #        OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
047468,000068:                                                                                                  #        CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
047469,000069:                                                                                                  #        OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
047470,000070: 
047471,000071:                                                                                                  #  CALLING SEQUENCE- NONE
047472,000072:                                                                                                  #        PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
047473,000073:                                                                                                  #        RESULT OF A DOWNRUPT.  CONTROL IS RETURNED VIA TCF RESUME WHICH
047474,000074:                                                                                                  #        IN EFFECT IS A RESUME.
047475,000075: 
047476,000076:                                                                                                  #  SUBROUTINES CALLED- NONE
047477,000077: 
047478,000078:                                                                                                  #  NORMAL EXIT MODE- TCF RESUME
047479,000079: 
047480,000080:                                                                                                  #  ALARM OR ABORT EXIT MODE- NONE
047481,000081: 
047482,000082:                                                                                                  #  RESTART PROTECTION:
047483,000083:                                                                                                  #        ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
047484,000084:                                                                                                  #        DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E. CURRENT CONTENTS OF DNLSTADR).  THIS HAS THE
047485,000085:                                                                                                  #        EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
047486,000086:                                                                                                  #        THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
047487,000087:                                                                                                  #        DOWNLIST.
047488,000088: 
047489,000089:                                                                                                  #        ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
047490,000090: 
047491,000091:                                                                                                  #  DOWNLINK LIST SELECTION:
047492,000092:                                                                                                  #        THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
047493,000093:                                                                                                  #        1.      FRESH START
047494,000094:                                                                                                  #        2.      V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
047495,000095:                                                                                                  #        3.      UPDATE PROGRAM (P27)
047496,000096:                                                                                                  #        4.      NON-V37 SELECTABLE TYPE PROGRAMS (E.G. AGS INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
047497,000097:                                                                                                  #                TRANSITION (COLOSSUS) ETC.).
047498,000098: 
047499,000099:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
047500,000100:                                                                                                  #        READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
047501,000101: 
047502,000102:                                                                                                  #  OUTPUT- EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E. 200 LGC
047503,000103:                                                                                                  #        COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
047504,000104: 
047505,000105:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED- NONE
047506,000106:                                                                                                  #        'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
047507,000107: 
047508,000108:                                                                                                  #  DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM)-
047509,000109:                                                                                                  #        LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.

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

047512,000112: 

Page 1065

047514,000114:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
047515,000115:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
047516,000116: 
047517,000117:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
047518,000118:                                                                                                  #  1.    DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
047519,000119:                                                                                                  #        DOWN-TELEMETRY PROGRAM.  THIS IS DONE FOR EASE OF CODING, FASTER
047520,000120:                                                                                                  #        EXECUTION.
047521,000121:                                                                                                  #  2.    EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
047522,000122:                                                                                                  #        SUBLISTS.
047523,000123:                                                                                                  #  3.    A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
047524,000124:                                                                                                  #        DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
047525,000125:                                                                                                  #        CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
047526,000126:                                                                                                  #  4.    SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
047527,000127:                                                                                                  #        SAVED IN A BUFFER DURING ONE DOWNRUPT.
047528,000128:                                                                                                  #  5.    THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
047529,000129:                                                                                                  #        OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
047530,000130:                                                                                                  #        IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
047531,000131:                                                                                                  #  6.    ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
047532,000132:                                                                                                  #        CREATED FOR THE DOWNLIST PROGRAM.
047533,000133:                                                                                                  #        A.      1DNADR                  1-WORD DOWNLIST ADDRESS.
047534,000134:                                                                                                  #                SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
047535,000135:                                                                                                  #                HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
047536,000136:                                                                                                  #        B.      2DNADR - 6DNADR         N-WORD DOWNLIST ADDRESS, N = 2 - 6.
047537,000137:                                                                                                  #                SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
047538,000138:                                                                                                  #                FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
047539,000139:                                                                                                  #                PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
047540,000140:                                                                                                  #        C.      DNCHAN                  DOWNLIST CHANNEL ADDRESS.
047541,000141:                                                                                                  #                SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
047542,000142:                                                                                                  #                A PAIR OF CHANNELS FOR DOWN TELEMETRY.
047543,000143:                                                                                                  #        D.      DNPTR                   DOWN TELEMETRY SUBLIST POINTER.
047544,000144:                                                                                                  #                SAME AS CAF BUT TAGGED AS A CONSTANT.  USED IN CONTROL LIST TO POINT TO A SUBLIST.
047545,000145:                                                                                                  #                CAUTION --- A DNPTR CANNOT BE USED IN A SUBLIST.
047546,000146:                                                                                                  #  7.    THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
047547,000147:                                                                                                  #        A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
047548,000148:                                                                                                  #  8.    IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
047549,000149: 
047550,000150:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
047551,000151:                                                                                                  #  (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
047552,000152:                                                                                                  #  DONE)
047553,000153:                                                                                                  #  1.    SNAPSHOT DOWNLIST:
047554,000154:                                                                                                  #        (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
047555,000155:                                                                                                  #        (B) CAN CONTAIN ONLY 1DNADR'S
047556,000156:                                                                                                  #  2.    ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
047557,000157:                                                                                                  #        EQUIVALENT OF THE FOLLOWING ECADRS (I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
047558,000158:                                                                                                  #        (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
047559,000159:                                                                                                  #  3.    CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777

Page 1066

047561,000161:                                                                                                  #  4.    THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
047562,000162:                                                                                                  #        CONTROL SECTION OF THE DOWNLIST.
047563,000163:                                                                                                  #  5.    'DNCHAN 0' CANNOT BE USED.
047564,000164:                                                                                                  #  6.    'DNPTR 0' CANNOT BE USED.
047565,000165:                                                                                                  #  7.    DNPTR CANNOT APPEAR IN A SUBLIST.
047566,000166: 
047567,000167:                                                                                                  #  EBANK SETTINGS
047568,000168:                                                                                                  #        IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
047569,000169:                                                                                                  #        'GARBAGE' INTO BITS15-12 OF EBANK.  HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
047570,000170:                                                                                                  #        SIGNIFICANT SOMEDAY IN THE FUTURE.  IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
047571,000171:                                                                                                  #        THAT BITS 15-12 OF EBANK ARE ZERO.
047572,000172: 
047573,000173:                                                                                                  #  INITIALIZATION REQUIRED- TO INTERRUPT CURRENT LIST AND START A NEW ONE..
047574,000174:                                                                                                  #        1. ADRES OF DOWNLINK LIST INTO DNLSTADR
047575,000175:                                                                                                  #        2. NEGONE INTO SUBLIST
047576,000176:                                                                                                  #        3. NEGONE INTO DNECADR
047577,000177: 
047578,000178: 22,3505                                           BANK     22                                    
047579,000179: 05,2000                                           SETLOC   DOWNTELM                              
047580,000180: 05,2000                                           BANK                                           
047581,000181: 
047582,000182: 05,3342     0340                                  EBANK=   DNTMBUFF                              
047583,000183: 
047584,000184: 05,3342                                           COUNT    05/DPROG                              
047585,000185: 
047586,000186: 05,3342           54016        DODOWNTM           TS       BANKRUPT                              
047587,000187: 05,3343           00006                           EXTEND                                         
047588,000188: 05,3344           22012                           QXCH     QRUPT                                 #  SAVE Q
047589,000189: 05,3345           34704                           CA       BIT7                                  #  SET WORD ORDER CODE TO 1.  EXCEPTION- AT
047590,000190: 05,3346           00006                           EXTEND                                         #  THE BEGINNING OF EACH LIST THE WORD
047591,000191: 05,3347           05013                           WOR      CHAN13                                #  CODE WILL BE SET BACK TO 0.
047592,000192: 05,3350           00335                           TC       DNTMGOTO                              #  GOTO APPROPRIATE PHASE OF PROGRAM
047593,000193: 
047594,000194: 05,3351           37716        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
047595,000195: 05,3352           54337                           TS       SUBLIST                               #  WORDS TO MINUS ONE
047596,000196: 05,3353           54336                           TS       DNECADR                               
047597,000197: 05,3354           33474                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS
047598,000198: 05,3355           54335                           TS       DNTMGOTO                              #  GO TO DNPHASE2
047599,000199: 05,3356           13372                           TCF      NEWLIST                               
047600,000200: 05,3357           10336        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS
047601,000201: 05,3360           03507        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
047602,000202: 05,3361           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
047603,000203: 05,3362           13363                           TCF      +1                                    #  (ECADR OF 3776 + 74001 = 77777)
047604,000204: 
047605,000205: 05,3363           10337                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL

Page 1067

047607,000207: 05,3364           13522                           TCF      NEXTINSL                              #  YES
047608,000208: 05,3365           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
047609,000209: 
047610,000210: 05,3366           30334        CHKLIST            CA       CTLIST                                
047611,000211: 05,3367           00006                           EXTEND                                         
047612,000212: 05,3370           63372                           BZMF     NEWLIST                               #  IT WILL BE NEGATIVE AT END OF LIST
047613,000213: 05,3371           13377                           TCF      NEXTINCL                              
047614,000214: 05,3372           50332        NEWLIST            INDEX    DNLSTCOD                              
047615,000215: 05,3373           32342                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
047616,000216: 05,3374           54334                           TS       CTLIST                                #        STARTING ADDRESS OF NEW LIST
047617,000217: 05,3375           40332                           CS       DNLSTCOD                              
047618,000218: 05,3376           13612                           TCF      SENDID     +3                         
047619,000219: 05,3377           50334        NEXTINCL           INDEX    CTLIST                                
047620,000220: 05,3400           30000                           CA       0                                     
047621,000221: 05,3401           10000                           CCS      A                                     
047622,000222: 05,3402           24334                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
047623,000223: 05,3403           13407                           TCF      +4                                    #  ON NEXT ENTRY TO PROG.  (A SHOULD NOT =0)
047624,000224: 05,3404           56334                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
047625,000225: 05,3405           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
047626,000226: 05,3406           56334                           XCH      CTLIST                                #                                  (ST IN )
047627,000227: 05,3407           24000                 +4        INCR     A                                     #                                  (CTLIST)
047628,000228: 05,3410           54336                           TS       DNECADR                               #  SAVE DNADR
047629,000229: 05,3411           63361                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
047630,000230: 05,3412           10000                           CCS      A                                     
047631,000231: 05,3413           13417                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
047632,000232: 05,3414           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14 (CAN'T GET HERE)
047633,000233: 05,3415           13417                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
047634,000234: 05,3416           03441        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
047635,000235: 05,3417           30336                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
047636,000236: 05,3420           63414                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
047637,000237: 05,3421           00006                           EXTEND                                         
047638,000238: 05,3422           63507                           BZMF     FETCH2WD                              #  YES.  (A MUST NEVER BE ZERO)
047639,000239: 05,3423           67710                           AD       MINB12                                #  NO-  IS IT A POINTER (DNPTR) OR A
047640,000240: 05,3424           00006                           EXTEND                                         #        CHANNEL(DNCHAN)
047641,000241: 05,3425           63445                           BZMF     DODNPTR                               #  IT'S A POINTER.  (A MUST NEVER BE ZERO)
047642,000242: 
047643,000243: 05,3426           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND)  IT S A CHANNEL
047644,000244: 05,3427           50336                           INDEX    DNECADR                               
047645,000245: 05,3430           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
047646,000246: 05,3431           54001                           TS       L                                     
047647,000247: 05,3432           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
047648,000248: 05,3433           50336                           INDEX    DNECADR                               
047649,000249: 05,3434           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
047650,000250: 05,3435           54336                           TS       DNECADR                               #  SET DNECADR
047651,000251: 05,3436           37716                           CA       NEGONE                                #        TO MINUS
047652,000252: 05,3437           56336                           XCH      DNECADR                               #                WHILE PRESERVING A.
047653,000253: 05,3440           13535                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
047654,000254: 
047655,000255: 05,3441           44704        WOZERO             CS       BIT7                                  
047656,000256: 05,3442           00006                           EXTEND                                         

Page 1068

047658,000258: 05,3443           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO
047659,000259: 05,3444           00002                           TC       Q                                     #  RETURN TO CALLER
047660,000260: 
047661,000261: 05,3445           50336        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
047662,000262: 05,3446           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
047663,000263: 05,3447           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
047664,000264: 05,3450           30336                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
047665,000265: 05,3451           13521                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
047666,000266: 
047667,000267: 05,3452           56336                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
047668,000268: 05,3453           54337                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
047669,000269: 05,3454           34714                           CAF      ZERO                                  #        A    INTO     A
047670,000270: 05,3455           56336                           XCH      TMINDEX                               #  (NOTE.. TMINDEX = DNECADR)
047671,000271: 
047672,000272:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
047673,000273:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
047674,000274:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
047675,000275:                                                                                                  #  TO MINIMIZE TIME.  THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
047676,000276:                                                                                                  #  THESE RULES ARE ......
047677,000277:                                                                                                  #        1.      ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
047678,000278:                                                                                                  #        2.      THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
047679,000279: 
047680,000280: 05,3456           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
047681,000281: 05,3457           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
047682,000282: 05,3460           00006                           EXTEND                                         
047683,000283: 05,3461           50000                           INDEX    A                                     
047684,000284: 05,3462  E3,1401                                  EBANK=   1401                                  
047685,000285: 05,3462           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
047686,000286: 05,3463     0340                                  EBANK=   DNTMBUFF                              
047687,000287: 05,3463           50336                           INDEX    TMINDEX                               
047688,000288: 05,3464           52341                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
047689,000289: 05,3465           24336                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
047690,000290: 05,3466           24336                           INCR     TMINDEX                               
047691,000291: 05,3467           24337        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
047692,000292: 05,3470           50337                           INDEX    SUBLIST                               
047693,000293: 05,3471           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
047694,000294: 05,3472           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.
047695,000295: 05,3473           13456                           TCF      SNAPLOOP                              #  NOT LAST TWO.
047696,000296: 05,3474           03357        LDNPHAS2           GENADR   DNPHASE2                              
047697,000297: 05,3475           54337                           TS       SUBLIST                               #  YES, LAST.  SAVE A.
047698,000298: 05,3476           37716                           CA       NEGONE                                #  SET DNECADR AND
047699,000299: 05,3477           54336                           TS       DNECADR                               #        SUBLIST POINTERS
047700,000300: 05,3500           56337                           XCH      SUBLIST                               #                TO NEGATIVE VALUES.
047701,000301: 05,3501           54003                           TS       EBANK                                 
047702,000302: 05,3502           74373                           MASK     LOW8                                  
047703,000303: 05,3503           00006                           EXTEND                                         
047704,000304: 05,3504           50000                           INDEX    A                                     
047705,000305: 05,3505  E3,1401                                  EBANK=   1401                                  

Page 1069

047707,000307: 05,3505           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.
047708,000308: 05,3506     0340                                  EBANK=   DNTMBUFF                              
047709,000309: 05,3506           13535        SNAPEND            TCF      DNTMEXIT                              #  NOW GO SEND THEM.
047710,000310: 
047711,000311: 05,3507           30336        FETCH2WD           CA       DNECADR                               
047712,000312: 05,3510           54003                           TS       EBANK                                 #  SET EBANK
047713,000313: 05,3511           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
047714,000314: 05,3512           54001                           TS       L                                     
047715,000315: 05,3513           33365                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
047716,000316: 05,3514           26336                           ADS      DNECADR                               
047717,000317: 05,3515           00006                           EXTEND                                         
047718,000318: 05,3516           50001                           INDEX    L                                     
047719,000319: 05,3517  E3,1400                                  EBANK=   1400                                  
047720,000320: 05,3517           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
047721,000321: 05,3520     0340                                  EBANK=   DNTMBUFF                              
047722,000322: 05,3520           13535                           TCF      DNTMEXIT                              #  NOW GO SEND THEM.
047723,000323: 
047724,000324: 05,3521           54337        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
047725,000325: 05,3522           50337        NEXTINSL           INDEX    SUBLIST                               
047726,000326: 05,3523           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
047727,000327: 05,3524           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
047728,000328: 05,3525           24337                           INCR     SUBLIST                               #  NO-
047729,000329: 05,3526           13532                           TCF      +4                                    
047730,000330: 05,3527           54337                           TS       SUBLIST                               #  SAVE A.
047731,000331: 05,3530           37716                           CA       NEGONE                                #  SET SUBLIST TO MINUS
047732,000332: 05,3531           56337                           XCH      SUBLIST                               #  RETRIEVE A.
047733,000333: 05,3532           24000                 +4        INCR     A                                     
047734,000334: 05,3533           54336                           TS       DNECADR                               #  SAVE DNADR
047735,000335: 05,3534           13420                           TCF      SETWO      +2                         #  GO USE COMMON CODING (PROBLEMS WOULD
047736,000336:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
047737,000337:                                                                                                  #  DNPTR NOW)
047738,000338: 
047739,000339: 05,3535           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
047740,000340: 05,3536           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
047741,000341: 05,3537           30001                           CA       L                                     #  RESPECTIVELY
047742,000342: 05,3540           00006        TMEXITL            EXTEND                                         
047743,000343: 05,3541           01035                           WRITE    DNTM2                                 
047744,000344: 05,3542           15222        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.
047745,000345: 
047746,000346: 05,3543     7710               MINB12             EQUALS   -1/8                                  
047747,000347: 05,3543     0336               DNECADR            EQUALS   TMINDEX                               
047748,000348: 05,3543     0334               CTLIST             EQUALS   LDATALST                              
047749,000349: 05,3543     0337               SUBLIST            EQUALS   DNQ                                   
047750,000350: 

Page 1070

047752,000352:                                                                                                  #  SUBROUTINE NAME- DNDUMP
047753,000353: 
047754,000354:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND(DUMP) ALL ERASABLE STORAGE 'N' TIMES.(N = 1 TO 4).  BANKS ARE SENT ONE AT A TIME
047755,000355:                                                                                                  #        EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
047756,000356:                                                                                                  #        EBANK.  EBANKS ARE DUMPED IN ORDER(I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
047757,000357: 
047758,000358:                                                                                                  #  CALLING SEQUENCE- THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
047759,000359:                                                                                                  #        AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
047760,000360:                                                                                                  #        WILL BEGIN.
047761,000361: 
047762,000362:                                                                                                  #        ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
047763,000363:                                                                                                  #        BY THE FOLLOWING:
047764,000364: 
047765,000365:                                                                                                  #        1.      A FRESH START
047766,000366:                                                                                                  #        2.      COMPLETION OF ALL DOWNLINK DUMPS REQUESTED (ACCORDING TO BITS SET IN DUMPCNT).  NOTE THAT DUMPCNT
047767,000367:                                                                                                  #                CAN BE ALTERED BY A V21N01.
047768,000368:                                                                                                  #        3.      AND INVOLUNTARILY BY A RESTART.
047769,000369: 
047770,000370:                                                                                                  #  NORMAL EXIT MODE- TCF DNPHASE1
047771,000371: 
047772,000372:                                                                                                  #  ALARM OR ABORT MODE- NONE
047773,000373: 
047774,000374:                                                                                                  #  *SUBROUTINES CALLED- NONE.
047775,000375: 
047776,000376:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
047777,000377:                                                                                                  #        DUMPCNT OCT 20000       IF 4 COMPLETE ERASABLE DUMPS ARE DESIRED
047778,000378:                                                                                                  #        DUMPCNT OCT 10000       IF 2 COMPLETE ERASABLE DUMPS ARE DESIRED
047779,000379:                                                                                                  #        DUMPCNT OCT 04000       IF 1 COMPLETE ERASABLE DUMP  IS  DESIRED
047780,000380: 
047781,000381:                                                                                                  #  DEBRIS- DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
047782,000382: 
047783,000383:                                                                                                  #  TIMING-       TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
047784,000384:                                                                                                  #                TIME (IN SECS) =  (   4    )*(    8    )*(    256     +     4   )  /     100
047785,000385:                                                                                                  #           THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
047786,000386: 
047787,000387:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM-
047788,000388:                                                                                                  #        (REMINDER- THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
047789,000389: 
047790,000390:                                                                                                  #        DOWNLIST                                W
047791,000391:                                                                                                  #          WORD  TAKEN FROM CONTENTS OF  EXAMPLE O       COMMENTS
047792,000392:                                                                                                  #            1   ERASID                   0177X  0       DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
047793,000393:                                                                                                  #            2   LOWIDCOD                 77340  1       DOWNLINK SYNCH BITS.  (SAME ONE USED IN ALL OTHER DOWNLISTS)
047794,000394:                                                                                                  #            3   DUMPLOC                  13400  1       (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
047795,000395:                                                                                                  #            4   TIME1                    14120  1       TIME IN CENTISECONDS
047796,000396:                                                                                                  #            5   FIRST WORD OF EBANK X    03400  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
047797,000397:                                                                                                  #            6   2ND   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
047798,000398:                                                                                                  #            7   3RD   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
047799,000399:                                                                                                  #            .                                   1
047800,000400:                                                                                                  #            .                                   1
047801,000401:                                                                                                  #            .                                   1
047802,000402:                                                                                                  #         260D   256TH WORD OF EBANK X    03777  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
047803,000403: 
047804,000404:                                                                                                  #  NOTE-         DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
047805,000405:                                                                                                  #                THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
047806,000406:                                                                                                  #                                                X = NOT USED
047807,000407:                                                                                                  #                X ABC EEE RRRRRRRR            ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
047808,000408:                                                                                                  #                                                    COMPLETE ERASABLE DUMP NUMBER 1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
047809,000409:                                                                                                  #                                              EEE = EBANK BITS
047810,000410:                                                                                                  #                                         RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
047811,000411: 

Page 1071

047813,000413: 05,3543           34714        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
047814,000414: 05,3544           54336                           TS       DUMPLOC                               #  ERASABLE DUMP
047815,000415: 05,3545           03607                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS
047816,000416: 05,3546           33555                           CA       LDNDUMP1                              #  SET DNTMGOTO
047817,000417: 05,3547           54335                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
047818,000418: 05,3550           30025                           CA       TIME1                                 #  PLACE TIME1
047819,000419: 05,3551           56001                           XCH      L                                     #  INTO L
047820,000420: 05,3552           30336                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
047821,000421: 05,3553           13535                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
047822,000422: 
047823,000423: 05,3554           03556        LDNDUMP            ADRES    DNDUMP                                
047824,000424: 05,3555           03571        LDNDUMP1           ADRES    DNDUMP1                               
047825,000425: 
047826,000426: 05,3556           34711        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
047827,000427: 05,3557           26336                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
047828,000428: 05,3560           74373                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
047829,000429: 05,3561           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
047830,000430: 05,3562           13573                           TCF      DNDUMP2                               #  NO- THEN CONTINUE DUMPING
047831,000431: 05,3563           30336                           CA       DUMPLOC                               #  YES- IS THIS THE END OF THE
047832,000432: 05,3564           70333                           MASK     DUMPCNT                               #  N TH(N = 1 TO 4) COMPLETE ERASABLE
047833,000433: 05,3565           77671                           MASK     PRIO34                                #  DUMP(BIT14 FOR 4, BIT13 FOR 2 OR BIT12
047834,000434: 05,3566           10000                           CCS      A                                     #  FOR 1 COMPLETE ERASABLE DUMP(S)).
047835,000435: 05,3567           13351                           TCF      DNPHASE1                              #  YES- START SENDING INTERRUPTED DOWNLIST
047836,000436:                                                                                                  #  AGAIN
047837,000437: 05,3570           13545                           TCF      DNDUMPI    +2                         #  NO- GO BACK AND INITIALIZE NEXT BANK
047838,000438: 
047839,000439: 05,3571           33554        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
047840,000440: 05,3572           54335                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
047841,000441: 
047842,000442: 05,3573           30336        DNDUMP2            CA       DUMPLOC                               
047843,000443: 05,3574           54003                           TS       EBANK                                 #  SET EBANK
047844,000444: 05,3575           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
047845,000445: 05,3576           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
047846,000446: 05,3577           34713                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
047847,000447: 05,3600           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
047848,000448: 05,3601           50002                           INDEX    Q                                     
047849,000449: 05,3602  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
047850,000450: 05,3602           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
047851,000451: 05,3603           56001                           XCH      L                                     
047852,000452: 05,3604           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
047853,000453: 05,3605           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
047854,000454: 05,3606     0340                                  EBANK=   DNTMBUFF                              
047855,000455: 05,3606           13535                           TCF      DNTMEXIT                              #  GO SEND THEM
047856,000456: 
047857,000457: 05,3607           00006        SENDID             EXTEND                                         #  ** ENTRANCE USED BY ERASABLE DUMP PROG. **
047858,000458: 05,3610           22335                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
047859,000459: 05,3611           34747                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
047860,000460: 
047861,000461: 05,3612           54001                           TS       L                                     #  ** ENTRANCE USED BY REGULAR DOWNLINK PG **

Page 1072

047863,000463: 05,3613           03441                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
047864,000464: 05,3614           32000                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
047865,000465: 05,3615           56001                           XCH      L                                     #  AND ID BACK INTO A
047866,000466: 05,3616           13535                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).

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