Source Code

These source-code files are part of a reconstructed copy of Luminary 97, the second release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software. It was created to fix two incorrect ephemeris constants in Luminary 96, as described by anomaly report LNY-59.

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memos 83 and 85, using asterisks indicating changed lines in the listing as a guide. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 97 listing.

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

042373,000002:                                                                                                  ## Copyright:   Public domain.
042374,000003:                                                                                                  ## Filename:    DOWN-TELEMETRY_PROGRAM.agc
042375,000004:                                                                                                  ## Purpose:     A section of Luminary revision 97.
042376,000005:                                                                                                  ##              It is part of the reconstructed source code for the
042377,000006:                                                                                                  ##              second release of the flight software for the Lunar 
042378,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
042379,000008:                                                                                                  ##              It was created to fix two incorrect ephemeris constants in
042380,000009:                                                                                                  ##              Luminary 96, as described by anomaly report LNY-59.
042381,000010:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
042382,000011:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
042383,000012:                                                                                                  ##              the listing and Luminary Memos #83 and #85, which list 
042384,000013:                                                                                                  ##              changes between Luminary 97 and 98, and 98 and 99. The
042385,000014:                                                                                                  ##              code has been adapted such that the resulting bugger words
042386,000015:                                                                                                  ##              exactly match those specified for Luminary 97 in NASA drawing
042387,000016:                                                                                                  ##              2021152D, which gives relatively high confidence that the
042388,000017:                                                                                                  ##              reconstruction is correct.
042389,000018:                                                                                                  ## Reference:   pp. 988-997
042390,000019:                                                                                                  ## Assembler:   yaYUL
042391,000020:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042392,000021:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042393,000022:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99. Removed coding related
042394,000023:                                                                                                  ##                              to WOTEST, which was introduced in Luminary 98.
042395,000024:                                                                                                  ##              2021-05-30 ABS  Removed WO1 symbol related to WOTEST.
042396,000025: 

Page 988

042398,000027:                                                                                                  #  PROGRAM NAME - DOWN TELEMETRY PROGRAM
042399,000028:                                                                                                  #  MOD NO. - 0           TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
042400,000029:                                                                                                  #                        PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
042401,000030:                                                                                                  #                        THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.  REFER TO DOWNLINK
042402,000031:                                                                                                  #                        LISTS LOG SECTION FOR MORE DETAILS.  HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
042403,000032:                                                                                                  #                        OF DOWN TELEMETRY DATA.
042404,000033:                                                                                                  #  MOD BY - KILROY, SMITH, DEWITT
042405,000034:                                                                                                  #  DATE - 02 OCT 67
042406,000035:                                                                                                  #  AUTHORS - KILROY, SMITH, DEWITT, DEWOLF, FAGIN
042407,000036:                                                                                                  #  LOG SECTION - DOWN-TELEMETRY PROGRAM
042408,000037: 
042409,000038:                                                                                                  #  FUNCTIONAL DESCRIPTION - THIS ROUTINE IS INITIATED BY TELEMETRY END
042410,000039:                                                                                                  #        PULSE FROM THE DOWNLINK TELEMETRY CONVERTER.  THIS PULSE OCCURS
042411,000040:                                                                                                  #        AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
042412,000041:                                                                                                  #        EXECUTED AT THESE RATES.  THIS ROUTINE SELECTS THE APPROPRIATE
042413,000042:                                                                                                  #        AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
042414,000043:                                                                                                  #        CHANNELS 34 AND 35.  THE INFORMATION IS THEN GATED OUT FROM THE
042415,000044:                                                                                                  #        LGC IN SERIAL FASHION.
042416,000045: 
042417,000046:                                                                                                  #        THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST.  SINCE DOWNRUPTS
042418,000047:                                                                                                  #        OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
042419,000048:                                                                                                  #        CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
042420,000049:                                                                                                  #        OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
042421,000050: 
042422,000051:                                                                                                  #  CALLING SEQUENCE - NONE
042423,000052:                                                                                                  #        PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
042424,000053:                                                                                                  #        RESULT OF A DOWNRUPT.  CONTROL IS RETURNED VIA TCF RESUME WHICH
042425,000054:                                                                                                  #        IN EFFECT IS A RESUME.
042426,000055: 
042427,000056:                                                                                                  #  SUBROUTINES CALLED - NONE
042428,000057: 
042429,000058:                                                                                                  #  NORMAL EXIT MODE - TCF RESUME
042430,000059: 
042431,000060:                                                                                                  #  ALARM OR ABORT EXIT MODE - NONE
042432,000061: 
042433,000062:                                                                                                  #  RESTART PROTECTION:
042434,000063:                                                                                                  #        ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
042435,000064:                                                                                                  #        DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E. CURRENT CONTENTS OF DNLSTADR).  THIS HAS THE
042436,000065:                                                                                                  #        EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
042437,000066:                                                                                                  #        THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
042438,000067:                                                                                                  #        DOWNLIST.
042439,000068: 
042440,000069:                                                                                                  #        ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
042441,000070: 
042442,000071:                                                                                                  #  DOWNLINK LIST SELECTION:
042443,000072:                                                                                                  #        THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
042444,000073:                                                                                                  #        1.      FRESH START
042445,000074:                                                                                                  #        2.      V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
042446,000075:                                                                                                  #        3.      UPDATE PROGRAM (P27)
042447,000076:                                                                                                  #        4.      NON-V37 SELECTABLE TYPE PROGRAMS (E.G. AGS INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
042448,000077:                                                                                                  #                TRANSITION (COLOSSUS) ETC.).
042449,000078: 
042450,000079:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
042451,000080:                                                                                                  #        READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
042452,000081: 
042453,000082:                                                                                                  #  OUTPUT - EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E. 200 LGC
042454,000083:                                                                                                  #        COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
042455,000084: 
042456,000085:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED - NONE
042457,000086:                                                                                                  #        'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
042458,000087: 
042459,000088:                                                                                                  #  DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM) -
042460,000089:                                                                                                  #        LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.
042461,000090: 

Page 989
This page is empty

042464,000093: 

Page 990

042466,000095:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
042467,000096:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
042468,000097: 
042469,000098:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
042470,000099:                                                                                                  #  1.    DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
042471,000100:                                                                                                  #        DOWN-TELEMETRY PROGRAM.  THIS IS DONE FOR EASE OF CODING, FASTER
042472,000101:                                                                                                  #        EXECUTION.
042473,000102:                                                                                                  #  2.    EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
042474,000103:                                                                                                  #        SUBLISTS.
042475,000104:                                                                                                  #  3.    A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
042476,000105:                                                                                                  #        DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
042477,000106:                                                                                                  #        CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
042478,000107:                                                                                                  #  4.    SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
042479,000108:                                                                                                  #        SAVED IN A BUFFER DURING ONE DOWNRUPT.
042480,000109:                                                                                                  #  5.    THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
042481,000110:                                                                                                  #        OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
042482,000111:                                                                                                  #        IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
042483,000112:                                                                                                  #  6.    ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
042484,000113:                                                                                                  #        CREATED FOR THE DOWNLIST PROGRAM.
042485,000114:                                                                                                  #        A.      1DNADR                  1-WORD DOWNLIST ADDRESS.
042486,000115:                                                                                                  #                SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
042487,000116:                                                                                                  #                HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
042488,000117:                                                                                                  #        B.      2DNADR - 6DNADR         N-WORD DOWNLIST ADDRESS, N = 2 - 6.
042489,000118:                                                                                                  #                SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
042490,000119:                                                                                                  #                FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
042491,000120:                                                                                                  #                PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
042492,000121:                                                                                                  #        C.      DNCHAN                  DOWNLIST CHANNEL ADDRESS.
042493,000122:                                                                                                  #                SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
042494,000123:                                                                                                  #                A PAIR OF CHANNELS FOR DOWN TELEMETRY.
042495,000124:                                                                                                  #        D.      DNPTR                   DOWN TELEMETRY SUBLIST POINTER.
042496,000125:                                                                                                  #                SAME AS CAF BUT TAGGED AS A CONSTANT.  USED IN CONTROL LIST TO POINT TO A SUBLIST.
042497,000126:                                                                                                  #                CAUTION --- A DNPTR CANNOT BE USED IN A SUBLIST.
042498,000127:                                                                                                  #  7.    THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
042499,000128:                                                                                                  #        A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
042500,000129:                                                                                                  #  8.    IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
042501,000130: 
042502,000131:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
042503,000132:                                                                                                  #  (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
042504,000133:                                                                                                  #  DONE)
042505,000134:                                                                                                  #  1.    SNAPSHOT DOWNLIST:
042506,000135:                                                                                                  #        (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
042507,000136:                                                                                                  #        (B) CAN CONTAIN ONLY 1DNADR'S
042508,000137:                                                                                                  #  2.    ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
042509,000138:                                                                                                  #        EQUIVALENT OF THE FOLLOWING ECADRS (I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
042510,000139:                                                                                                  #        (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
042511,000140:                                                                                                  #  3.    CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777

Page 991

042513,000142:                                                                                                  #  4.    THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
042514,000143:                                                                                                  #        CONTROL SECTION OF THE DOWNLIST.
042515,000144:                                                                                                  #  5.    'DNCHAN 0' CANNOT BE USED.
042516,000145:                                                                                                  #  6.    'DNPTR 0' CANNOT BE USED.
042517,000146:                                                                                                  #  7.    DNPTR CANNOT APPEAR IN A SUBLIST.
042518,000147: 
042519,000148:                                                                                                  #  EBANK SETTINGS
042520,000149:                                                                                                  #        IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
042521,000150:                                                                                                  #        'GARBAGE' INTO BITS15-12 OF EBANK.  HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
042522,000151:                                                                                                  #        SIGNIFICANT SOMEDAY IN THE FUTURE.  IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
042523,000152:                                                                                                  #        THAT BITS 15-12 OF EBANK ARE ZERO.
042524,000153: 
042525,000154:                                                                                                  #  INITIALIZATION REQUIRED - TO INTERRUPT CURRENT LIST AND START A NEW ONE..
042526,000155:                                                                                                  #        1. ADRES OF DOWNLINK LIST INTO DNLSTADR
042527,000156:                                                                                                  #        2. NEGONE INTO SUBLIST
042528,000157:                                                                                                  #        3. NEGONE INTO DNECADR
042529,000158: 
042530,000159: 22,3711                                           BANK     22                                    
042531,000160: 05,2000                                           SETLOC   DOWNTELM                              
042532,000161: 05,2000                                           BANK                                           
042533,000162: 
042534,000163: 05,3506     0340                                  EBANK=   DNTMBUFF                              
042535,000164: 
042536,000165: 05,3506                                           COUNT*   $$/DPROG                              
042537,000166: 05,3506           54016        DODOWNTM           TS       BANKRUPT                              
042538,000167: 05,3507           00006                           EXTEND                                         
042539,000168: 05,3510           22012                           QXCH     QRUPT                                 #  SAVE Q

In Luminary 98, the following instruction was changed to jump to a piece of code to check whether or not it is time to write the word order bit. This was done to decrease the write frequency.

042543,000172: 05,3511           34745                           CA       BIT7                                  #  SET WORD ORDER CODE TO 1. EXCEPTION- AT
042544,000173: 05,3512           00006                           EXTEND                                         #  THE BEGINNING OF EACH LIST THE WORD
042545,000174: 05,3513           05013                           WOR      CHAN13                                #  CODE WILL BE SET BACK TO 0.
042546,000175: 05,3514           00335                           TC       DNTMGOTO                              #  GOTO APPROPRIATE PHASE OF PROGRAM
042547,000176: 
042548,000177: 05,3515           37747        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
042549,000178: 05,3516           54337                           TS       SUBLIST                               #  WORDS TO MINUS ONE
042550,000179: 05,3517           54336                           TS       DNECADR                               
042551,000180: 05,3520           33640                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS
042552,000181: 05,3521           54335                           TS       DNTMGOTO                              #  GO TO DNPHASE2
042553,000182: 05,3522           13536                           TCF      NEWLIST                               
042554,000183: 05,3523           10336        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS
042555,000184: 05,3524           03653        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
042556,000185: 05,3525           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
042557,000186: 05,3526           13527                           TCF      +1                                    #  (ECADR OF 3776 + 74001 = 77777)
042558,000187: 
042559,000188: 05,3527           10337                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL
042560,000189: 05,3530           13666                           TCF      NEXTINSL                              #  YES

Page 992

042562,000191: 05,3531           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
042563,000192: 
042564,000193: 05,3532           30334        CHKLIST            CA       CTLIST                                
042565,000194: 05,3533           00006                           EXTEND                                         
042566,000195: 05,3534           63536                           BZMF     NEWLIST                               #  IT WILL BE NEGATIVE AT END OF LIST
042567,000196: 05,3535           13543                           TCF      NEXTINCL                              
042568,000197: 05,3536           50332        NEWLIST            INDEX    DNLSTCOD                              
042569,000198: 05,3537           32441                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
042570,000199: 05,3540           54334                           TS       CTLIST                                #        STARTING ADDRESS OF NEW LIST
042571,000200: 05,3541           40332                           CS       DNLSTCOD                              
042572,000201: 05,3542           13756                           TCF      SENDID     +3                         
042573,000202: 05,3543           50334        NEXTINCL           INDEX    CTLIST                                
042574,000203: 05,3544           30000                           CA       0                                     
042575,000204: 05,3545           10000                           CCS      A                                     
042576,000205: 05,3546           24334                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
042577,000206: 05,3547           13553                           TCF      +4                                    #  ON NEXT ENTRY TO PROG.  (A SHOULD NOT =0)
042578,000207: 05,3550           56334                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
042579,000208: 05,3551           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
042580,000209: 05,3552           56334                           XCH      CTLIST                                #                                  (ST IN )
042581,000210: 05,3553           24000                 +4        INCR     A                                     #                                  (CTLIST)
042582,000211: 05,3554           54336                           TS       DNECADR                               #  SAVE DNADR
042583,000212: 05,3555           63525                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
042584,000213: 05,3556           10000                           CCS      A                                     
042585,000214: 05,3557           13563                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
042586,000215: 05,3560           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14 (CAN'T GET HERE)
042587,000216: 05,3561           13563                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
042588,000217: 05,3562           03605        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
042589,000218: 05,3563           30336                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
042590,000219: 05,3564           63560                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
042591,000220: 05,3565           00006                           EXTEND                                         
042592,000221: 05,3566           63653                           BZMF     FETCH2WD                              #  YES.  (A MUST NEVER BE ZERO)
042593,000222: 05,3567           67741                           AD       MINB12                                #  NO- IS IT A POINTER (DNPTR) OR A
042594,000223: 05,3570           00006                           EXTEND                                         #      CHANNEL(DNCHAN)
042595,000224: 05,3571           63611                           BZMF     DODNPTR                               #  IT'S A POINTER.  (A MUST NEVER BE ZERO)
042596,000225: 
042597,000226: 05,3572           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND)  IT S A CHANNEL
042598,000227: 05,3573           50336                           INDEX    DNECADR                               
042599,000228: 05,3574           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
042600,000229: 05,3575           54001                           TS       L                                     
042601,000230: 05,3576           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
042602,000231: 05,3577           50336                           INDEX    DNECADR                               
042603,000232: 05,3600           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
042604,000233: 05,3601           54336                           TS       DNECADR                               #  SET DNECADR
042605,000234: 05,3602           37747                           CA       NEGONE                                #        TO MINUS
042606,000235: 05,3603           56336                           XCH      DNECADR                               #                WHILE PRESERVING A.
042607,000236: 05,3604           13701                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
042608,000237: 
042609,000238: 05,3605           44745        WOZERO             CS       BIT7                                  
042610,000239: 05,3606           00006                           EXTEND                                         
042611,000240: 05,3607           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO

Page 993

042613,000242: 05,3610           00002                           TC       Q                                     #  RETURN TO CALLER
042614,000243: 
042615,000244: 05,3611           50336        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
042616,000245: 05,3612           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
042617,000246: 05,3613           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
042618,000247: 05,3614           30336                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
042619,000248: 05,3615           13665                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
042620,000249: 
042621,000250: 05,3616           56336                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
042622,000251: 05,3617           54337                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
042623,000252: 05,3620           34755                           CAF      ZERO                                  #        A    INTO     A
042624,000253: 05,3621           56336                           XCH      TMINDEX                               #  (NOTE..  TMINDEX = DNECADR)
042625,000254: 
042626,000255:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
042627,000256:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
042628,000257:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
042629,000258:                                                                                                  #  TO MINIMIZE TIME.  THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
042630,000259:                                                                                                  #  THESE RULES ARE ......
042631,000260:                                                                                                  #        1.      ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
042632,000261:                                                                                                  #        2.      THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
042633,000262: 
042634,000263: 05,3622           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
042635,000264: 05,3623           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
042636,000265: 05,3624           00006                           EXTEND                                         
042637,000266: 05,3625           50000                           INDEX    A                                     
042638,000267: 05,3626  E3,1401                                  EBANK=   1401                                  
042639,000268: 05,3626           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
042640,000269: 05,3627     0340                                  EBANK=   DNTMBUFF                              
042641,000270: 05,3627           50336                           INDEX    TMINDEX                               
042642,000271: 05,3630           52341                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
042643,000272: 05,3631           24336                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
042644,000273: 05,3632           24336                           INCR     TMINDEX                               
042645,000274: 05,3633           24337        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
042646,000275: 05,3634           50337                           INDEX    SUBLIST                               
042647,000276: 05,3635           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
042648,000277: 05,3636           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.
042649,000278: 05,3637           13622                           TCF      SNAPLOOP                              #  NOT LAST TWO.
042650,000279: 05,3640           03523        LDNPHAS2           GENADR   DNPHASE2                              
042651,000280: 05,3641           54337                           TS       SUBLIST                               #  YES, LAST.  SAVE A.
042652,000281: 05,3642           37747                           CA       NEGONE                                #  SET DNECADR AND
042653,000282: 05,3643           54336                           TS       DNECADR                               #        SUBLIST POINTERS
042654,000283: 05,3644           56337                           XCH      SUBLIST                               #                TO NEGATIVE VALUES.
042655,000284: 05,3645           54003                           TS       EBANK                                 
042656,000285: 05,3646           74357                           MASK     LOW8                                  
042657,000286: 05,3647           00006                           EXTEND                                         
042658,000287: 05,3650           50000                           INDEX    A                                     
042659,000288: 05,3651  E3,1401                                  EBANK=   1401                                  
042660,000289: 05,3651           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.

Page 994

042662,000291: 05,3652     0340                                  EBANK=   DNTMBUFF                              
042663,000292: 05,3652           13701        SNAPEND            TCF      DNTMEXIT                              #  NOW GO SEND THEM.
042664,000293: 
042665,000294: 05,3653           30336        FETCH2WD           CA       DNECADR                               
042666,000295: 05,3654           54003                           TS       EBANK                                 #  SET EBANK
042667,000296: 05,3655           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
042668,000297: 05,3656           54001                           TS       L                                     
042669,000298: 05,3657           33531                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
042670,000299: 05,3660           26336                           ADS      DNECADR                               
042671,000300: 05,3661           00006                           EXTEND                                         
042672,000301: 05,3662           50001                           INDEX    L                                     
042673,000302: 05,3663  E3,1400                                  EBANK=   1400                                  
042674,000303: 05,3663           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
042675,000304: 05,3664     0340                                  EBANK=   DNTMBUFF                              
042676,000305: 05,3664           13701                           TCF      DNTMEXIT                              #  NOW GO SEND THEM.
042677,000306: 
042678,000307: 05,3665           54337        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
042679,000308: 05,3666           50337        NEXTINSL           INDEX    SUBLIST                               
042680,000309: 05,3667           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
042681,000310: 05,3670           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
042682,000311: 05,3671           24337                           INCR     SUBLIST                               #  NO -
042683,000312: 05,3672           13676                           TCF      +4                                    
042684,000313: 05,3673           54337                           TS       SUBLIST                               #  SAVE A.
042685,000314: 05,3674           37747                           CA       NEGONE                                #  SET SUBLIST TO MINUS
042686,000315: 05,3675           56337                           XCH      SUBLIST                               #  RETRIEVE A.
042687,000316: 05,3676           24000                 +4        INCR     A                                     
042688,000317: 05,3677           54336                           TS       DNECADR                               #  SAVE DNADR
042689,000318: 05,3700           13564                           TCF      SETWO      +2                         #  GO USE COMMON CODING (PROBLEMS WOULD
042690,000319:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
042691,000320:                                                                                                  #  DNPTR NOW)
042692,000321: 
042693,000322: 05,3701           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
042694,000323: 05,3702           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
042695,000324: 05,3703           30001                           CA       L                                     #  RESPECTIVELY
042696,000325: 05,3704           00006        TMEXITL            EXTEND                                         
042697,000326: 05,3705           01035                           WRITE    DNTM2                                 
042698,000327: 05,3706           15270        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.
042699,000328: 
042700,000329: 05,3707     7741               MINB12             EQUALS   -1/8                                  
042701,000330: 05,3707     0336               DNECADR            EQUALS   TMINDEX                               
042702,000331: 05,3707     0334               CTLIST             EQUALS   LDATALST                              
042703,000332: 05,3707     0337               SUBLIST            EQUALS   DNQ                                   
042704,000333: 

Page 995

042706,000335:                                                                                                  #  SUBROUTINE NAME - DNDUMP
042707,000336: 
042708,000337:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND (DUMP) ALL ERASABLE STORAGE 'N' TIMES. (N=1 TO 4).  BANKS ARE SENT ONE AT A TIME
042709,000338:                                                                                                  #        EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
042710,000339:                                                                                                  #        EBANK.  EBANKS ARE DUMPED IN ORDER (I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
042711,000340: 
042712,000341:                                                                                                  #  CALLING SEQUENCE - THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
042713,000342:                                                                                                  #        AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
042714,000343:                                                                                                  #        WILL BEGIN.
042715,000344: 
042716,000345:                                                                                                  #        ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
042717,000346:                                                                                                  #        BY THE FOLLOWING:
042718,000347: 
042719,000348:                                                                                                  #        1.      A FRESH START
042720,000349:                                                                                                  #        2.      COMPLETION OF ALL DOWNLINK DUMPS REQUESTED (ACCORDING TO BITS SET IN DUMPCNT).  NOTE THAT DUMPCNT
042721,000350:                                                                                                  #                CAN BE ALTERED BY A V21N01.
042722,000351:                                                                                                  #        3.      AND INVOLUNTARILY BY A RESTART.
042723,000352: 
042724,000353:                                                                                                  #  NORMAL EXIT MODE - TCF DNPHASE1
042725,000354: 
042726,000355:                                                                                                  #  ALARM OR ABORT MODE - NONE
042727,000356: 
042728,000357:                                                                                                  #  *SUBROUTINES CALLED - NONE.
042729,000358: 
042730,000359:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
042731,000360:                                                                                                  #        DUMPCNT         OCT 20000       IF 4 COMPLETE ERASABLE DUMPS ARE DESIRED
042732,000361:                                                                                                  #        DUMPCNT         OCT 10000       IF 2 COMPLETE ERASABLE DUMPS ARE DESIRED
042733,000362:                                                                                                  #        DUMPCNT         OCT 04000       IF 1 COMPLETE ERASABLE DUMP  IS  DESIRED
042734,000363: 
042735,000364:                                                                                                  #  DEBRIS - DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
042736,000365: 
042737,000366:                                                                                                  #  TIMING -      TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
042738,000367:                                                                                                  #                TIME (IN SECS) =  (   4    )*(    8    )*(    256     +     4   )  /     100
042739,000368:                                                                                                  #                THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
042740,000369: 
042741,000370:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM -
042742,000371:                                                                                                  #        (REMINDER - THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
042743,000372:                                                                                                  #        DOWNLIST                                W
042744,000373:                                                                                                  #          WORD  TAKEN FROM CONTENTS OF  EXAMPLE O       COMMENTS
042745,000374:                                                                                                  #            1   ERASID                   0177X  0       DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
042746,000375:                                                                                                  #            2   LOWIDCOD                 77340  1       DOWNLINK SYNCH BITS.  (SAME ONE USED IN ALL OTHER DOWNLISTS)
042747,000376:                                                                                                  #            3   DUMPLOC                  13400  1       (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
042748,000377:                                                                                                  #            4   TIME1                    14120  1       TIME IN CENTISECONDS
042749,000378:                                                                                                  #            5   FIRST WORD OF EBANK X    03400  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
042750,000379:                                                                                                  #            6   2ND   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
042751,000380:                                                                                                  #            7   3RD   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
042752,000381:                                                                                                  #            .                                   1
042753,000382:                                                                                                  #            .                                   1
042754,000383:                                                                                                  #            .                                   1
042755,000384:                                                                                                  #         260D   256TH WORD OF EBANK X    03777  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
042756,000385: 
042757,000386:                                                                                                  #  NOTE -        DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
042758,000387:                                                                                                  #                THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
042759,000388:                                                                                                  #                                                X = NOT USED
042760,000389:                                                                                                  #                X ABC EEE RRRRRRRR            ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
042761,000390:                                                                                                  #                                                    COMPLETE ERASABLE DUMP NUMBER 1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
042762,000391:                                                                                                  #                                              EEE = EBANK BITS
042763,000392:                                                                                                  #                                         RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
042764,000393: 

Page 996

042766,000395: 05,3707           34755        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
042767,000396: 05,3710           54336                           TS       DUMPLOC                               #  ERASABLE DUMP
042768,000397: 05,3711           03753                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS
042769,000398: 05,3712           33721                           CA       LDNDUMP1                              #  SET DNTMGOTO
042770,000399: 05,3713           54335                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
042771,000400: 05,3714           30025                           CA       TIME1                                 #  PLACE TIME1
042772,000401: 05,3715           56001                           XCH      L                                     #  INTO L
042773,000402: 05,3716           30336                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
042774,000403: 05,3717           13701                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
042775,000404: 
042776,000405: 05,3720           03722        LDNDUMP            ADRES    DNDUMP                                
042777,000406: 05,3721           03735        LDNDUMP1           ADRES    DNDUMP1                               
042778,000407: 
042779,000408: 05,3722           34752        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
042780,000409: 05,3723           26336                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
042781,000410: 05,3724           74357                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
042782,000411: 05,3725           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
042783,000412: 05,3726           13737                           TCF      DNDUMP2                               #  NO - THEN CONTINUE DUMPING
042784,000413: 05,3727           30336                           CA       DUMPLOC                               #  YES - IS THIS THE END OF THE
042785,000414: 05,3730           70333                           MASK     DUMPCNT                               #  N TH (N = 1 TO 4) COMPLETE ERASABLE
042786,000415: 05,3731           77722                           MASK     PRIO34                                #  DUMP (BIT14 FOR 4, BIT13 FOR 2 OR BIT12
042787,000416: 05,3732           10000                           CCS      A                                     #  FOR 1 COMPLETE ERASABLE DUMP(S)).
042788,000417: 05,3733           13515                           TCF      DNPHASE1                              #  YES - START SENDING INTERRUPTED DOWNLIST
042789,000418:                                                                                                  #  AGAIN
042790,000419: 05,3734           13711                           TCF      DNDUMPI    +2                         #  NO - GO BACK AND INITIALIZE NEXT BANK
042791,000420: 
042792,000421: 05,3735           33720        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
042793,000422: 05,3736           54335                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
042794,000423: 
042795,000424: 05,3737           30336        DNDUMP2            CA       DUMPLOC                               
042796,000425: 05,3740           54003                           TS       EBANK                                 #  SET EBANK
042797,000426: 05,3741           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
042798,000427: 05,3742           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
042799,000428: 05,3743           34754                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
042800,000429: 05,3744           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
042801,000430: 05,3745           50002                           INDEX    Q                                     
042802,000431: 05,3746  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
042803,000432: 05,3746           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
042804,000433: 05,3747           56001                           XCH      L                                     
042805,000434: 05,3750           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
042806,000435: 05,3751           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
042807,000436: 05,3752     0340                                  EBANK=   DNTMBUFF                              
042808,000437: 05,3752           13701                           TCF      DNTMEXIT                              #  GO SEND THEM
042809,000438: 
042810,000439: 05,3753           00006        SENDID             EXTEND                                         #  ** ENTRANCE USED BY ERASABLE DUMP PROG.**
042811,000440: 05,3754           22335                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
042812,000441: 05,3755           35011                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
042813,000442: 
042814,000443: 05,3756           54001                           TS       L                                     #  ** ENTRANCE USED BY REGULAR DOWNLINK PG **

Page 997

042816,000445: 05,3757           03605                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
042817,000446: 05,3760           32065                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
042818,000447: 05,3761           56001                           XCH      L                                     #  AND ID BACK INTO A
042819,000448: 05,3762           13701                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).
042820,000449: 

In Luminary 98, code to check if it is time to set the word order bit was inserted here.


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