Source Code

These source-code files derive from a printout of Luminary 116 (the Apollo 12 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Ron Burkey, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071
	19:09 AUG. 11,1969
Note that the date is the date of the printout, not the date of the program revision.

042288,000002:                                                                                                  ## Copyright:   Public domain.
042289,000003:                                                                                                  ## Filename:    DOWN-TELEMETRY_PROGRAM.agc
042290,000004:                                                                                                  ## Purpose:     A section of Luminary revision 116.
042291,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
042292,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 12.
042293,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
042294,000008:                                                                                                  ##              that the code format has been changed to conform to the
042295,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
042296,000010:                                                                                                  ##              original YUL assembler.
042297,000011:                                                                                                  ## Reference:   pp. 980-989
042298,000012:                                                                                                  ## Assembler:   yaYUL
042299,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042300,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042301,000015:                                                                                                  ## Mod history: 2017-01-22 MAS  Created from Luminary 99.
042302,000016:                                                                                                  ##              2017-01-31 RRB  Updated for Luminary 116.
042303,000017:                                                                                                  ##              2017-03-07 HG   Fix operand O13QSAV  --> C13QSAV
042304,000018:                                                                                                  ##                                          C13QSAV  --> C13STALL
042305,000019:                                                                                                  ##              2017-03-13 RSB  Proofed comment text via 3-way diff vs
042306,000020:                                                                                                  ##                              Luminary 99 and 132.
042307,000021:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
042308,000022:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
042309,000023:                                                                                                  ##              2017-03-19 HG   Fix operand DNTMGCTC --> DNTMGOTO
042310,000024: 

Page 980

042312,000026:                                                                                                  #  PROGRAM NAME- DOWN TELEMETRY PROGRAM
042313,000027:                                                                                                  #  MOD NO.- 0      TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
042314,000028:                                                                                                  #                  PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
042315,000029:                                                                                                  #                  THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.REFER TO DOWNLINK
042316,000030:                                                                                                  #                  LISTS LOG SECTION FOR MORE DETAILS. HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
042317,000031:                                                                                                  #                  OF DOWN TELEMETRY DATA.
042318,000032:                                                                                                  #  MOD BY-  KILROY, SMITH, DEWITT
042319,000033:                                                                                                  #  DATE-    02 OCT 67
042320,000034:                                                                                                  #  AUTHORS- KILROY, SMITH, DEWITT, DEWOLF, FAGIN
042321,000035:                                                                                                  #  LOG SECTION- DOWN-TELEMETRY PROGRAM
042322,000036:                                                                                                  #  FUNCTIONAL DESCRIPTION- THIS ROUTINE IS INITIATED BY TELEMETRY END
042323,000037:                                                                                                  #           PULSE FROM THE DOWNLINK TELEMETRY CONVERTER. THIS PULSE OCCURS
042324,000038:                                                                                                  #           AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
042325,000039:                                                                                                  #           EXECUTED AT THESE RATES.  THIS ROUTINE SELECTS THE APPROPRIATE
042326,000040:                                                                                                  #           AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
042327,000041:                                                                                                  #           CHANNELS 34 AND 35. THE INFORMATION IS THEN GATED OUT FROM THE
042328,000042:                                                                                                  #           LGC IN SERIAL FASHION.
042329,000043:                                                                                                  #           THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST. SINCE DOWNRUPTS
042330,000044:                                                                                                  #           OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
042331,000045:                                                                                                  #           CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
042332,000046:                                                                                                  #           OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
042333,000047:                                                                                                  #  CALLING SEQUENCE- NONE
042334,000048:                                                                                                  #           PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
042335,000049:                                                                                                  #           RESULT OF A DOWNRUPT. CONTROL IS RETURNED VIA TCF RESUME WHICH
042336,000050:                                                                                                  #           IN EFFECT IS A RESUME.
042337,000051:                                                                                                  #  SUBROUTINES CALLED- NONE
042338,000052:                                                                                                  #  NORMAL EXIT MODE- TCF RESUME
042339,000053:                                                                                                  #  ALARM OR ABORT EXIT MODE - NONE
042340,000054:                                                                                                  #  RESTART PROTECTION:
042341,000055:                                                                                                  #           ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
042342,000056:                                                                                                  #           DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST(I.E. CURRENT CONTENTS OF DNLSTADR). THIS HAS THE
042343,000057:                                                                                                  #           EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
042344,000058:                                                                                                  #           THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
042345,000059:                                                                                                  #           DOWNLIST.
042346,000060:                                                                                                  #           ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
042347,000061:                                                                                                  #  DOWNLINK LIST SELECTION:
042348,000062:                                                                                                  #           THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
042349,000063:                                                                                                  #           1.  FRESH START
042350,000064:                                                                                                  #           2.  V37EXXE  WHERE XX = THE MAJOR MODE BEING SELECTED.
042351,000065:                                                                                                  #           3.  UPDATE PROGRAM (P27)
042352,000066:                                                                                                  #           4.      NON-V37 SELECTABLE TYPE PROGRAMS (E.G. AGS INITIALIZATION(SUNDANCE, LUMINARY) AND P61-P62
042353,000067:                                                                                                  #                   TRANSITION(COLOSSUS) ETC.).
042354,000068: 
042355,000069:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
042356,000070:                                                                                                  #           READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
042357,000071: 
042358,000072:                                                                                                  #  OUTPUT-  EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E. 200 LGC
042359,000073:                                                                                                  #           COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
042360,000074: 
042361,000075:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED- NONE
042362,000076:                                                                                                  #           'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
042363,000077: 
042364,000078:                                                                                                  #  DEBRIS(ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM)-
042365,000079:                                                                                                  #        LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.
042366,000080: 

Page 981
This page is empty

042369,000083: 

Page 982

042371,000085:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
042372,000086:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
042373,000087: 
042374,000088:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
042375,000089:                                                                                                  #  1. DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
042376,000090:                                                                                                  #     DOWN-TELEMETRY PROGRAM. THIS IS DONE FOR EASE OF CODING, FASTER
042377,000091:                                                                                                  #     EXECUTION.
042378,000092:                                                                                                  #  2. EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
042379,000093:                                                                                                  #     SUBLISTS.
042380,000094:                                                                                                  #  3. A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
042381,000095:                                                                                                  #     DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
042382,000096:                                                                                                  #     CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
042383,000097:                                                                                                  #  4. SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
042384,000098:                                                                                                  #     SAVED IN A BUFFER DURING ONE DOWNRUPT.
042385,000099:                                                                                                  #  5. THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
042386,000100:                                                                                                  #     OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
042387,000101:                                                                                                  #     IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
042388,000102:                                                                                                  #  6. ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
042389,000103:                                                                                                  #     CREATED FOR THE DOWNLIST PROGRAM.
042390,000104:                                                                                                  #     A. 1DNADR              1-WORD DOWNLIST ADDRESS.
042391,000105:                                                                                                  #         SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
042392,000106:                                                                                                  #         HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
042393,000107:                                                                                                  #     B. 2DNADR - 6DNADR     N-WORD DOWNLIST ADDRESS, N = 2 - 6.
042394,000108:                                                                                                  #         SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
042395,000109:                                                                                                  #         FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
042396,000110:                                                                                                  #         PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
042397,000111:                                                                                                  #     C. DNCHAN              DOWNLIST CHANNEL ADDRESS.
042398,000112:                                                                                                  #         SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
042399,000113:                                                                                                  #         A PAIR OF CHANNELS FOR DOWN TELEMETRY.
042400,000114:                                                                                                  #     D. DNPTR               DOWN TELEMETRY SUBLIST POINTER.
042401,000115:                                                                                                  #         SAME AS CAF BUT TAGGED AS A CONSTANT. USED IN CONTROL LIST TO POINT TO A SUBLIST.
042402,000116:                                                                                                  #         CAUTION--- A DNPTR CANNOT BE USED IN A SUBLIST.
042403,000117:                                                                                                  #  7. THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
042404,000118:                                                                                                  #     A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
042405,000119:                                                                                                  #  8. IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
042406,000120: 
042407,000121:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
042408,000122:                                                                                                  #    (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
042409,000123:                                                                                                  #    DONE)
042410,000124: 
042411,000125:                                                                                                  #  1. SNAPSHOT DOWNLIST:
042412,000126:                                                                                                  #    (A) CANNOT CONTAIN THE FOLLOWING ECADRS(I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
042413,000127:                                                                                                  #    (B) CAN CONTAIN ONLY 1DNADR'S
042414,000128: 
042415,000129:                                                                                                  #  2. ALL DOWNLINKED DATA(EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
042416,000130:                                                                                                  #     EQUIVALENT OF THE FOLLOWING ECADRS(I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
042417,000131: 
042418,000132:                                                                                                  #     (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR TO 6DNADR  WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
042419,000133: 
042420,000134:                                                                                                  #  3.  CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777

Page 983

042422,000136:                                                                                                  #  4. THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
042423,000137:                                                                                                  #     CONTROL SECTION OF THE DOWNLIST.
042424,000138: 
042425,000139:                                                                                                  #  5. 'DNCHAN 0' CANNOT BE USED.
042426,000140: 
042427,000141:                                                                                                  #  6. 'DNPTR 0' CANNOT BE USED.
042428,000142: 
042429,000143:                                                                                                  #  7. DNPTR CANNOT APPEAR IN A SUBLIST.
042430,000144: 
042431,000145:                                                                                                  #  EBANK SETTINGS
042432,000146:                                                                                                  #           IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
042433,000147:                                                                                                  #           'GARBAGE' INTO BITS15-12 OF EBANK. HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
042434,000148:                                                                                                  #           SIGNIFICANT SOMEDAY IN THE FUTURE. IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE(BY MASKING ETC.)
042435,000149:                                                                                                  #           THAT BITS 15-12 OF EBANK ARE ZERO.
042436,000150: 
042437,000151:                                                                                                  #  INITIALIZATION REQUIRED - TO INTERRUPT CURRENT LIST AND START A NEW ONE..
042438,000152:                                                                                                  #      1.   ADRES OF DOWNLINK LIST INTO DNLSTADR
042439,000153:                                                                                                  #      2.   NEGONE INTO SUBLIST
042440,000154:                                                                                                  #      3.   NEGONE INTO DNECADR
042441,000155: 
042442,000156: 22,3711                                           BANK     22                                    
042443,000157: 05,2000                                           SETLOC   DOWNTELM                              
042444,000158: 05,2000                                           BANK                                           
042445,000159: 
042446,000160: 05,3472     0340                                  EBANK=   DNTMBUFF                              
042447,000161: 
042448,000162: 05,3472                                           COUNT*   $$/DPROG                              
042449,000163: 05,3472           54016        DODOWNTM           TS       BANKRUPT                              
042450,000164: 05,3473           00006                           EXTEND                                         
042451,000165: 05,3474           22012                           QXCH     QRUPT                                 #  SAVE Q
042452,000166: 05,3475           34745                           CA       BIT7                                  #  AT THE BEGINNING OF THE LIST THE WORD
042453,000167: 05,3476           00006                           EXTEND                                         #  ORDER BIT WILL BE SET BACK TO ZERO.
042454,000168: 05,3477           02013                           RAND     CHAN13                                
042455,000169: 05,3500           10000                           CCS      A                                     
042456,000170: 05,3501           00335                           TC       DNTMGOTO                              
042457,000171: 05,3502           06022                           TC       C13STALL                              
042458,000172: 05,3503           34745                           CA       BIT7                                  
042459,000173: 05,3504           00006                           EXTEND                                         #  SET WORD ORDER BIT TO 1 ONLY IF IT
042460,000174: 05,3505           05013                           WOR      CHAN13                                #  ALREADY ISN'T.
042461,000175: 05,3506           00335                           TC       DNTMGOTO                              #  GOTO APPROPRIATE PHASE OF PROGRAM
042462,000176: 
042463,000177: 05,3507           37752        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
042464,000178: 05,3510           54337                           TS       SUBLIST                               #  WORDS TO MINUS ONE
042465,000179: 05,3511           54336                           TS       DNECADR                               
042466,000180: 05,3512           33637                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS
042467,000181: 05,3513           54335                           TS       DNTMGOTO                              #  GO TO DNPHASE2
042468,000182: 05,3514           13530                           TCF      NEWLIST                               
042469,000183: 05,3515           10336        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS

Page 984

042471,000185: 05,3516           03652        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
042472,000186: 05,3517           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
042473,000187: 05,3520           13521                           TCF      +1                                    #  (ECADR OF 3776 + 74001 = 77777)
042474,000188: 
042475,000189: 05,3521           10337                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL
042476,000190: 05,3522           13665                           TCF      NEXTINSL                              #  YES
042477,000191: 05,3523           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
042478,000192: 
042479,000193: 05,3524           30334        CHKLIST            CA       CTLIST                                
042480,000194: 05,3525           00006                           EXTEND                                         
042481,000195: 05,3526           63530                           BZMF     NEWLIST                               #  IT WILL BE NEGATIVE AT END OF LIST
042482,000196: 05,3527           13535                           TCF      NEXTINCL                              
042483,000197: 05,3530           50333        NEWLIST            INDEX    DNLSTCOD                              
042484,000198: 05,3531           32441                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
042485,000199: 05,3532           54334                           TS       CTLIST                                #    STARTING ADDRESS OF NEW LIST
042486,000200: 05,3533           40333                           CS       DNLSTCOD                              
042487,000201: 05,3534           13754                           TCF      SENDID     +3                         
042488,000202: 05,3535           50334        NEXTINCL           INDEX    CTLIST                                
042489,000203: 05,3536           30000                           CA       0                                     
042490,000204: 05,3537           10000                           CCS      A                                     
042491,000205: 05,3540           24334                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
042492,000206: 05,3541           13545                           TCF      +4                                    #  ON NEXT ENTRY TO PROG. (A SHOULD NOT =0)
042493,000207: 05,3542           56334                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
042494,000208: 05,3543           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
042495,000209: 05,3544           56334                           XCH      CTLIST                                #                                  (ST IN )
042496,000210: 05,3545           24000                 +4        INCR     A                                     #                                  (CTLIST)
042497,000211: 05,3546           54336                           TS       DNECADR                               #  SAVE DNADR
042498,000212: 05,3547           63517                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
042499,000213: 05,3550           10000                           CCS      A                                     
042500,000214: 05,3551           13555                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
042501,000215: 05,3552           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14 (CAN'T GET HERE)
042502,000216: 05,3553           13555                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
042503,000217: 05,3554           03577        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
042504,000218: 05,3555           30336                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
042505,000219: 05,3556           63552                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
042506,000220: 05,3557           00006                           EXTEND                                         
042507,000221: 05,3560           63652                           BZMF     FETCH2WD                              #  YES. (A MUST NEVER BE ZERO)
042508,000222: 05,3561           67744                           AD       MINB12                                #  NO- IS IT A POINTER (DNPTR) OR A
042509,000223: 05,3562           00006                           EXTEND                                         #      CHANNEL(DNCHAN)
042510,000224: 05,3563           63610                           BZMF     DODNPTR                               #  IT'S A POINTER. (A MUST NEVER BE ZERO)
042511,000225: 
042512,000226: 05,3564           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND)  IT S A CHANNEL
042513,000227: 05,3565           50336                           INDEX    DNECADR                               
042514,000228: 05,3566           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
042515,000229: 05,3567           54001                           TS       L                                     
042516,000230: 05,3570           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
042517,000231: 05,3571           50336                           INDEX    DNECADR                               
042518,000232: 05,3572           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
042519,000233: 05,3573           54336                           TS       DNECADR                               #  SET DNECADR
042520,000234: 05,3574           37752                           CA       NEGONE                                #      TO MINUS

Page 985

042522,000236: 05,3575           56336                           XCH      DNECADR                               #          WHILE PRESERVING A.
042523,000237: 05,3576           13700                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
042524,000238: 
042525,000239: 05,3577           00006        WOZERO             EXTEND                                         
042526,000240: 05,3600           23265                           QXCH     C13QSAV                               
042527,000241: 05,3601           22070                           LXCH     RUPTREG1                              
042528,000242: 05,3602           06022                           TC       C13STALL                              
042529,000243: 
042530,000244: 05,3603           22070                           LXCH     RUPTREG1                              
042531,000245: 05,3604           44745                           CS       BIT7                                  
042532,000246: 05,3605           00006                           EXTEND                                         
042533,000247: 05,3606           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO
042534,000248: 05,3607           01265                           TC       C13QSAV                               
042535,000249: 
042536,000250: 05,3610           50336        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
042537,000251: 05,3611           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
042538,000252: 05,3612           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
042539,000253: 05,3613           30336                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
042540,000254: 05,3614           13664                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
042541,000255: 
042542,000256: 05,3615           56336                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
042543,000257: 05,3616           54337                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
042544,000258: 05,3617           34755                           CAF      ZERO                                  #        A    INTO     A
042545,000259: 05,3620           56336                           XCH      TMINDEX                               #  (NOTE..  TMINDEX = DNECADR)
042546,000260: 
042547,000261:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND)IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
042548,000262:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
042549,000263:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
042550,000264:                                                                                                  #  TO MINIMIZE TIME. THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
042551,000265:                                                                                                  #  THESE RULES ARE ......
042552,000266:                                                                                                  #            1.     ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
042553,000267:                                                                                                  #            2.     THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
042554,000268: 
042555,000269: 05,3621           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
042556,000270: 05,3622           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
042557,000271: 05,3623           00006                           EXTEND                                         
042558,000272: 05,3624           50000                           INDEX    A                                     
042559,000273: 05,3625  E3,1401                                  EBANK=   1401                                  
042560,000274: 05,3625           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
042561,000275: 05,3626     0340                                  EBANK=   DNTMBUFF                              
042562,000276: 05,3626           50336                           INDEX    TMINDEX                               
042563,000277: 05,3627           52341                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
042564,000278: 05,3630           24336                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
042565,000279: 05,3631           24336                           INCR     TMINDEX                               
042566,000280: 05,3632           24337        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
042567,000281: 05,3633           50337                           INDEX    SUBLIST                               
042568,000282: 05,3634           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
042569,000283: 05,3635           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.

Page 986

042571,000285: 05,3636           13621                           TCF      SNAPLOOP                              #  NOT LAST TWO.
042572,000286: 05,3637           03515        LDNPHAS2           GENADR   DNPHASE2                              
042573,000287: 05,3640           54337                           TS       SUBLIST                               #  YES, LAST.  SAVE A.
042574,000288: 05,3641           37752                           CA       NEGONE                                #  SET DNECADR AND
042575,000289: 05,3642           54336                           TS       DNECADR                               #      SUBLIST POINTERS
042576,000290: 05,3643           56337                           XCH      SUBLIST                               #          TO NEGATIVE VALUES.
042577,000291: 05,3644           54003                           TS       EBANK                                 
042578,000292: 05,3645           74357                           MASK     LOW8                                  
042579,000293: 05,3646           00006                           EXTEND                                         
042580,000294: 05,3647           50000                           INDEX    A                                     
042581,000295: 05,3650  E3,1401                                  EBANK=   1401                                  
042582,000296: 05,3650           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.
042583,000297: 05,3651     0340                                  EBANK=   DNTMBUFF                              
042584,000298: 05,3651           13700        SNAPEND            TCF      DNTMEXIT                              #     NOW GO SEND THEM.
042585,000299: 
042586,000300: 05,3652           30336        FETCH2WD           CA       DNECADR                               
042587,000301: 05,3653           54003                           TS       EBANK                                 #  SET EBANK
042588,000302: 05,3654           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
042589,000303: 05,3655           54001                           TS       L                                     
042590,000304: 05,3656           33523                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
042591,000305: 05,3657           26336                           ADS      DNECADR                               
042592,000306: 05,3660           00006                           EXTEND                                         
042593,000307: 05,3661           50001                           INDEX    L                                     
042594,000308: 05,3662  E3,1400                                  EBANK=   1400                                  
042595,000309: 05,3662           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
042596,000310: 05,3663     0340                                  EBANK=   DNTMBUFF                              
042597,000311: 05,3663           13700                           TCF      DNTMEXIT                              #     NOW GO SEND THEM.
042598,000312: 
042599,000313: 05,3664           54337        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
042600,000314: 05,3665           50337        NEXTINSL           INDEX    SUBLIST                               
042601,000315: 05,3666           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
042602,000316: 05,3667           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
042603,000317: 05,3670           24337                           INCR     SUBLIST                               #  NO-
042604,000318: 05,3671           13675                           TCF      +4                                    
042605,000319: 05,3672           54337                           TS       SUBLIST                               #  SAVE A.
042606,000320: 05,3673           37752                           CA       NEGONE                                #  SET SUBLIST TO MINUS
042607,000321: 05,3674           56337                           XCH      SUBLIST                               #  RETRIEVE A.
042608,000322: 05,3675           24000                 +4        INCR     A                                     
042609,000323: 05,3676           54336                           TS       DNECADR                               #  SAVE DNADR
042610,000324: 05,3677           13556                           TCF      SETWO      +2                         #  GO USE COMMON CODING (PROBLEMS WOULD
042611,000325:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
042612,000326:                                                                                                  #  DNPTR NOW)
042613,000327: 
042614,000328: 05,3700           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
042615,000329: 05,3701           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
042616,000330: 05,3702           30001                           CA       L                                     #  RESPECTIVELY
042617,000331: 05,3703           00006        TMEXITL            EXTEND                                         
042618,000332: 05,3704           01035                           WRITE    DNTM2                                 
042619,000333: 05,3705           15270        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.

Page 987

042621,000335: 05,3706     7744               MINB12             EQUALS   -1/8                                  
042622,000336: 05,3706     0336               DNECADR            EQUALS   TMINDEX                               
042623,000337: 05,3706     0334               CTLIST             EQUALS   LDATALST                              
042624,000338: 05,3706     0337               SUBLIST            EQUALS   DNQ                                   
042625,000339:                                                                                                  #  MOD BY - DENSMORE - JUNE 1969 - ELIMINATE ERASABLE DUMP COUNT

Page 988

042627,000341:                                                                                                  #  SUBROUTINE NAME- DNDUMP
042628,000342: 
042629,000343:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND (DUMP) ALL 8 BANKS OF ERASABLE STORAGE TWICE.  BANKS ARE SENT ONE AT A TIME
042630,000344:                                                                                                  #           EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
042631,000345:                                                                                                  #           EBANK. EBANKS ARE DUMPED IN ORDER (I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
042632,000346: 
042633,000347:                                                                                                  #  CALLING SEQUENCE- THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
042634,000348:                                                                                                  #           AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
042635,000349:                                                                                                  #           WILL BEGIN.
042636,000350:                                                                                                  #           ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
042637,000351:                                                                                                  #           BY THE FOLLOWING:
042638,000352:                                                                                                  #            1. A FRESH START
042639,000353:                                                                                                  #            2. COMPLETION OF BOTH COMPLETE DUMPS
042640,000354:                                                                                                  #            3. AND INVOLUNTARILY BY A RESTART.
042641,000355:                                                                                                  #  NORMAL EXIT MODE- TCF DNPHASE1
042642,000356:                                                                                                  #  ALARM OR ABORT MODE- NONE
042643,000357:                                                                                                  #  *SUBROUTINES CALLED- NONE.
042644,000358:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
042645,000359:                                                                                                  #           NONE
042646,000360:                                                                                                  #  DEBRIS - DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
042647,000361:                                                                                                  #  TIMING -   TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
042648,000362:                                                                                                  #             TIME (IN SECS) =  (   4    )*(    8    )*(    256     +     4   )  /     100
042649,000363:                                                                                                  #        THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
042650,000364: 
042651,000365:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM -
042652,000366:                                                                                                  #     (REMINDER - THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
042653,000367:                                                                                                  #          DOWNLIST                                   W
042654,000368:                                                                                                  #           WORD     TAKEN FROM CONTENTS OF   EXAMPLE O   COMMENTS
042655,000369: 
042656,000370:                                                                                                  #            1       ERASID                    0177X  0   DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
042657,000371:                                                                                                  #            2       LOWIDCOD                  77340  1   DOWNLINK SYNCH BITS.(SAME ONE USED IN ALL OTHER DOWNLISTS)
042658,000372:                                                                                                  #            3       DUMPLOC                   13400  1   (SEE NOTES ON DUMPLOC)1= 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
042659,000373:                                                                                                  #            4       TIME1                     14120  1   TIME IN CENTISECONDS
042660,000374:                                                                                                  #            5       FIRST WORD OF EBANK X     03400  1   IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
042661,000375:                                                                                                  #            6       2ND   WORD OF EBANK X     00142  1   IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
042662,000376:                                                                                                  #            7       3RD   WORD OF EBANK X     00142  1   IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
042663,000377:                                                                                                  #            .                                        1
042664,000378:                                                                                                  #            .                                        1
042665,000379:                                                                                                  #            .                                        1
042666,000380:                                                                                                  #          260D      256TH WORD OF EBANK X     03777  1   IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
042667,000381: 
042668,000382:                                                                                                  #  NOTE- DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
042669,000383:                                                                                                  #        THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
042670,000384:                                                                                                  #                                        X = NOT USED
042671,000385:                                                                                                  #           X ABC EEE RRRRRRRR         ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
042672,000386:                                                                                                  #                                            COMPLETE ERASABLE DUMP NUMBER 1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
042673,000387:                                                                                                  #                                      EEE = EBANK BITS
042674,000388:                                                                                                  #                                 RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
042675,000389: 
042676,000390: 
042677,000391: 05,3706           34755        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
042678,000392: 05,3707           54336                           TS       DUMPLOC                               #  ERASABLE DUMP
042679,000393: 05,3710           03751                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS

Page 989

042681,000395: 05,3711           33720                           CA       LDNDUMP1                              #  SET DNTMGOTO
042682,000396: 05,3712           54335                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
042683,000397: 05,3713           30025                           CA       TIME1                                 #  PLACE TIME1
042684,000398: 05,3714           56001                           XCH      L                                     #  INTO L
042685,000399: 05,3715           30336                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
042686,000400: 05,3716           13700                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
042687,000401: 
042688,000402: 05,3717           03721        LDNDUMP            ADRES    DNDUMP                                
042689,000403: 05,3720           03733        LDNDUMP1           ADRES    DNDUMP1                               
042690,000404: 
042691,000405: 05,3721           34752        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
042692,000406: 05,3722           26336                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
042693,000407: 05,3723           74357                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
042694,000408: 05,3724           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
042695,000409: 05,3725           13735                           TCF      DNDUMP2                               #  NO - THEN CONTINUE DUMPING
042696,000410: 05,3726           30336                           CA       DUMPLOC                               #  YES - IS THIS THE END OF THE
042697,000411: 05,3727           74737                           MASK     BIT13                                 #  SECOND COMPLETE ERASABLE DUMP?
042698,000412: 05,3730           00006                           EXTEND                                         
042699,000413: 05,3731           13710                           BZF      DNDUMPI    +2                         #  NO - GO BACK AND INITIALIZE NEXT BANK
042700,000414: 05,3732           13507                           TCF      DNPHASE1                              #  YES - SEND DOWNLIST AGAIN
042701,000415: 05,3733           33717        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
042702,000416: 05,3734           54335                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
042703,000417: 
042704,000418: 05,3735           30336        DNDUMP2            CA       DUMPLOC                               
042705,000419: 05,3736           54003                           TS       EBANK                                 #  SET EBANK
042706,000420: 05,3737           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
042707,000421: 05,3740           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
042708,000422: 05,3741           34754                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
042709,000423: 05,3742           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
042710,000424: 05,3743           50002                           INDEX    Q                                     
042711,000425: 05,3744  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
042712,000426: 05,3744           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
042713,000427: 05,3745           56001                           XCH      L                                     
042714,000428: 05,3746           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
042715,000429: 05,3747           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
042716,000430: 05,3750     0340                                  EBANK=   DNTMBUFF                              
042717,000431: 05,3750           13700                           TCF      DNTMEXIT                              #  GO SEND THEM
042718,000432: 
042719,000433: 05,3751           00006        SENDID             EXTEND                                         #  ** ENTRANCE USED BY ERASABLE DUMP PROG.**
042720,000434: 05,3752           22335                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
042721,000435: 05,3753           35011                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
042722,000436: 
042723,000437: 05,3754           54001                           TS       L                                     #  ** ENTRANCE USED BY REGULAR DOWNLINK PG **
042724,000438: 05,3755           03577                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
042725,000439: 05,3756           32065                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
042726,000440: 05,3757           56001                           XCH      L                                     #  AND ID BACK INTO A
042727,000441: 05,3760           13700                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).
042728,000442: 

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