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.

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

Page 1063

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

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

047498,000112: 

Page 1065

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

Page 1066

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

Page 1067

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

Page 1068

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

Page 1069

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

Page 1070

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

Page 1071

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

Page 1072

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

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