Source Code

These source-code files are part of a reconstructed copy of Luminary 96, the original release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. 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 96 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.

042162,000002:                                                                                                  ## Copyright:   Public domain.
042163,000003:                                                                                                  ## Filename:    DOWN-TELEMETRY_PROGRAM.agc
042164,000004:                                                                                                  ## Purpose:     A section of Luminary revision 96.
042165,000005:                                                                                                  ##              It is part of the reconstructed source code for the
042166,000006:                                                                                                  ##              original release of the flight software for the Lunar 
042167,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
042168,000008:                                                                                                  ##              The code has been recreated from a previously reconstructed
042169,000009:                                                                                                  ##              copy of Luminary 97 by undoing changes described in anomaly
042170,000010:                                                                                                  ##              report LNY-59. The code has been adapted such that the
042171,000011:                                                                                                  ##              resulting bugger words exactly match those specified for
042172,000012:                                                                                                  ##              Luminary 96 in NASA drawing 2021152D, which gives relatively
042173,000013:                                                                                                  ##              high confidence that the reconstruction is correct.
042174,000014:                                                                                                  ## Reference:   pp. 988-997
042175,000015:                                                                                                  ## Assembler:   yaYUL
042176,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042177,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042178,000018:                                                                                                  ## Mod history: 2019-08-04 MAS  Created from Luminary 97.
042179,000019: 

Page 988

042181,000021:                                                                                                  #  PROGRAM NAME - DOWN TELEMETRY PROGRAM
042182,000022:                                                                                                  #  MOD NO. - 0           TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
042183,000023:                                                                                                  #                        PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
042184,000024:                                                                                                  #                        THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.  REFER TO DOWNLINK
042185,000025:                                                                                                  #                        LISTS LOG SECTION FOR MORE DETAILS.  HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
042186,000026:                                                                                                  #                        OF DOWN TELEMETRY DATA.
042187,000027:                                                                                                  #  MOD BY - KILROY, SMITH, DEWITT
042188,000028:                                                                                                  #  DATE - 02 OCT 67
042189,000029:                                                                                                  #  AUTHORS - KILROY, SMITH, DEWITT, DEWOLF, FAGIN
042190,000030:                                                                                                  #  LOG SECTION - DOWN-TELEMETRY PROGRAM
042191,000031: 
042192,000032:                                                                                                  #  FUNCTIONAL DESCRIPTION - THIS ROUTINE IS INITIATED BY TELEMETRY END
042193,000033:                                                                                                  #        PULSE FROM THE DOWNLINK TELEMETRY CONVERTER.  THIS PULSE OCCURS
042194,000034:                                                                                                  #        AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
042195,000035:                                                                                                  #        EXECUTED AT THESE RATES.  THIS ROUTINE SELECTS THE APPROPRIATE
042196,000036:                                                                                                  #        AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
042197,000037:                                                                                                  #        CHANNELS 34 AND 35.  THE INFORMATION IS THEN GATED OUT FROM THE
042198,000038:                                                                                                  #        LGC IN SERIAL FASHION.
042199,000039: 
042200,000040:                                                                                                  #        THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST.  SINCE DOWNRUPTS
042201,000041:                                                                                                  #        OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
042202,000042:                                                                                                  #        CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
042203,000043:                                                                                                  #        OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
042204,000044: 
042205,000045:                                                                                                  #  CALLING SEQUENCE - NONE
042206,000046:                                                                                                  #        PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
042207,000047:                                                                                                  #        RESULT OF A DOWNRUPT.  CONTROL IS RETURNED VIA TCF RESUME WHICH
042208,000048:                                                                                                  #        IN EFFECT IS A RESUME.
042209,000049: 
042210,000050:                                                                                                  #  SUBROUTINES CALLED - NONE
042211,000051: 
042212,000052:                                                                                                  #  NORMAL EXIT MODE - TCF RESUME
042213,000053: 
042214,000054:                                                                                                  #  ALARM OR ABORT EXIT MODE - NONE
042215,000055: 
042216,000056:                                                                                                  #  RESTART PROTECTION:
042217,000057:                                                                                                  #        ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
042218,000058:                                                                                                  #        DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E. CURRENT CONTENTS OF DNLSTADR).  THIS HAS THE
042219,000059:                                                                                                  #        EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
042220,000060:                                                                                                  #        THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
042221,000061:                                                                                                  #        DOWNLIST.
042222,000062: 
042223,000063:                                                                                                  #        ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
042224,000064: 
042225,000065:                                                                                                  #  DOWNLINK LIST SELECTION:
042226,000066:                                                                                                  #        THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
042227,000067:                                                                                                  #        1.      FRESH START
042228,000068:                                                                                                  #        2.      V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
042229,000069:                                                                                                  #        3.      UPDATE PROGRAM (P27)
042230,000070:                                                                                                  #        4.      NON-V37 SELECTABLE TYPE PROGRAMS (E.G. AGS INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
042231,000071:                                                                                                  #                TRANSITION (COLOSSUS) ETC.).
042232,000072: 
042233,000073:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
042234,000074:                                                                                                  #        READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
042235,000075: 
042236,000076:                                                                                                  #  OUTPUT - EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E. 200 LGC
042237,000077:                                                                                                  #        COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
042238,000078: 
042239,000079:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED - NONE
042240,000080:                                                                                                  #        'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
042241,000081: 
042242,000082:                                                                                                  #  DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM) -
042243,000083:                                                                                                  #        LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.
042244,000084: 

Page 989
This page is empty

042247,000087: 

Page 990

042249,000089:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
042250,000090:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
042251,000091: 
042252,000092:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
042253,000093:                                                                                                  #  1.    DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
042254,000094:                                                                                                  #        DOWN-TELEMETRY PROGRAM.  THIS IS DONE FOR EASE OF CODING, FASTER
042255,000095:                                                                                                  #        EXECUTION.
042256,000096:                                                                                                  #  2.    EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
042257,000097:                                                                                                  #        SUBLISTS.
042258,000098:                                                                                                  #  3.    A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
042259,000099:                                                                                                  #        DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
042260,000100:                                                                                                  #        CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
042261,000101:                                                                                                  #  4.    SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
042262,000102:                                                                                                  #        SAVED IN A BUFFER DURING ONE DOWNRUPT.
042263,000103:                                                                                                  #  5.    THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
042264,000104:                                                                                                  #        OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
042265,000105:                                                                                                  #        IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
042266,000106:                                                                                                  #  6.    ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
042267,000107:                                                                                                  #        CREATED FOR THE DOWNLIST PROGRAM.
042268,000108:                                                                                                  #        A.      1DNADR                  1-WORD DOWNLIST ADDRESS.
042269,000109:                                                                                                  #                SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
042270,000110:                                                                                                  #                HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
042271,000111:                                                                                                  #        B.      2DNADR - 6DNADR         N-WORD DOWNLIST ADDRESS, N = 2 - 6.
042272,000112:                                                                                                  #                SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
042273,000113:                                                                                                  #                FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
042274,000114:                                                                                                  #                PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
042275,000115:                                                                                                  #        C.      DNCHAN                  DOWNLIST CHANNEL ADDRESS.
042276,000116:                                                                                                  #                SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
042277,000117:                                                                                                  #                A PAIR OF CHANNELS FOR DOWN TELEMETRY.
042278,000118:                                                                                                  #        D.      DNPTR                   DOWN TELEMETRY SUBLIST POINTER.
042279,000119:                                                                                                  #                SAME AS CAF BUT TAGGED AS A CONSTANT.  USED IN CONTROL LIST TO POINT TO A SUBLIST.
042280,000120:                                                                                                  #                CAUTION --- A DNPTR CANNOT BE USED IN A SUBLIST.
042281,000121:                                                                                                  #  7.    THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
042282,000122:                                                                                                  #        A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
042283,000123:                                                                                                  #  8.    IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
042284,000124: 
042285,000125:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
042286,000126:                                                                                                  #  (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
042287,000127:                                                                                                  #  DONE)
042288,000128:                                                                                                  #  1.    SNAPSHOT DOWNLIST:
042289,000129:                                                                                                  #        (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
042290,000130:                                                                                                  #        (B) CAN CONTAIN ONLY 1DNADR'S
042291,000131:                                                                                                  #  2.    ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
042292,000132:                                                                                                  #        EQUIVALENT OF THE FOLLOWING ECADRS (I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
042293,000133:                                                                                                  #        (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
042294,000134:                                                                                                  #  3.    CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777

Page 991

042296,000136:                                                                                                  #  4.    THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
042297,000137:                                                                                                  #        CONTROL SECTION OF THE DOWNLIST.
042298,000138:                                                                                                  #  5.    'DNCHAN 0' CANNOT BE USED.
042299,000139:                                                                                                  #  6.    'DNPTR 0' CANNOT BE USED.
042300,000140:                                                                                                  #  7.    DNPTR CANNOT APPEAR IN A SUBLIST.
042301,000141: 
042302,000142:                                                                                                  #  EBANK SETTINGS
042303,000143:                                                                                                  #        IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
042304,000144:                                                                                                  #        'GARBAGE' INTO BITS15-12 OF EBANK.  HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
042305,000145:                                                                                                  #        SIGNIFICANT SOMEDAY IN THE FUTURE.  IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
042306,000146:                                                                                                  #        THAT BITS 15-12 OF EBANK ARE ZERO.
042307,000147: 
042308,000148:                                                                                                  #  INITIALIZATION REQUIRED - TO INTERRUPT CURRENT LIST AND START A NEW ONE..
042309,000149:                                                                                                  #        1. ADRES OF DOWNLINK LIST INTO DNLSTADR
042310,000150:                                                                                                  #        2. NEGONE INTO SUBLIST
042311,000151:                                                                                                  #        3. NEGONE INTO DNECADR
042312,000152: 
042313,000153: 22,3711                                           BANK     22                                    
042314,000154: 05,2000                                           SETLOC   DOWNTELM                              
042315,000155: 05,2000                                           BANK                                           
042316,000156: 
042317,000157: 05,3506     0340                                  EBANK=   DNTMBUFF                              
042318,000158: 
042319,000159: 05,3506                                           COUNT*   $$/DPROG                              
042320,000160: 05,3506           54016        DODOWNTM           TS       BANKRUPT                              
042321,000161: 05,3507           00006                           EXTEND                                         
042322,000162: 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.

042326,000166: 05,3511           34745                           CA       BIT7                                  #  SET WORD ORDER CODE TO 1. EXCEPTION- AT
042327,000167: 05,3512           00006        WO1                EXTEND                                         #  THE BEGINNING OF EACH LIST THE WORD
042328,000168: 05,3513           05013                           WOR      CHAN13                                #  CODE WILL BE SET BACK TO 0.
042329,000169: 05,3514           00335                           TC       DNTMGOTO                              #  GOTO APPROPRIATE PHASE OF PROGRAM
042330,000170: 
042331,000171: 05,3515           37747        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
042332,000172: 05,3516           54337                           TS       SUBLIST                               #  WORDS TO MINUS ONE
042333,000173: 05,3517           54336                           TS       DNECADR                               
042334,000174: 05,3520           33640                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS
042335,000175: 05,3521           54335                           TS       DNTMGOTO                              #  GO TO DNPHASE2
042336,000176: 05,3522           13536                           TCF      NEWLIST                               
042337,000177: 05,3523           10336        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS
042338,000178: 05,3524           03653        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
042339,000179: 05,3525           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
042340,000180: 05,3526           13527                           TCF      +1                                    #  (ECADR OF 3776 + 74001 = 77777)
042341,000181: 
042342,000182: 05,3527           10337                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL
042343,000183: 05,3530           13666                           TCF      NEXTINSL                              #  YES

Page 992

042345,000185: 05,3531           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
042346,000186: 
042347,000187: 05,3532           30334        CHKLIST            CA       CTLIST                                
042348,000188: 05,3533           00006                           EXTEND                                         
042349,000189: 05,3534           63536                           BZMF     NEWLIST                               #  IT WILL BE NEGATIVE AT END OF LIST
042350,000190: 05,3535           13543                           TCF      NEXTINCL                              
042351,000191: 05,3536           50332        NEWLIST            INDEX    DNLSTCOD                              
042352,000192: 05,3537           32441                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
042353,000193: 05,3540           54334                           TS       CTLIST                                #        STARTING ADDRESS OF NEW LIST
042354,000194: 05,3541           40332                           CS       DNLSTCOD                              
042355,000195: 05,3542           13756                           TCF      SENDID     +3                         
042356,000196: 05,3543           50334        NEXTINCL           INDEX    CTLIST                                
042357,000197: 05,3544           30000                           CA       0                                     
042358,000198: 05,3545           10000                           CCS      A                                     
042359,000199: 05,3546           24334                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
042360,000200: 05,3547           13553                           TCF      +4                                    #  ON NEXT ENTRY TO PROG.  (A SHOULD NOT =0)
042361,000201: 05,3550           56334                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
042362,000202: 05,3551           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
042363,000203: 05,3552           56334                           XCH      CTLIST                                #                                  (ST IN )
042364,000204: 05,3553           24000                 +4        INCR     A                                     #                                  (CTLIST)
042365,000205: 05,3554           54336                           TS       DNECADR                               #  SAVE DNADR
042366,000206: 05,3555           63525                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
042367,000207: 05,3556           10000                           CCS      A                                     
042368,000208: 05,3557           13563                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
042369,000209: 05,3560           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14 (CAN'T GET HERE)
042370,000210: 05,3561           13563                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
042371,000211: 05,3562           03605        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
042372,000212: 05,3563           30336                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
042373,000213: 05,3564           63560                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
042374,000214: 05,3565           00006                           EXTEND                                         
042375,000215: 05,3566           63653                           BZMF     FETCH2WD                              #  YES.  (A MUST NEVER BE ZERO)
042376,000216: 05,3567           67741                           AD       MINB12                                #  NO- IS IT A POINTER (DNPTR) OR A
042377,000217: 05,3570           00006                           EXTEND                                         #      CHANNEL(DNCHAN)
042378,000218: 05,3571           63611                           BZMF     DODNPTR                               #  IT'S A POINTER.  (A MUST NEVER BE ZERO)
042379,000219: 
042380,000220: 05,3572           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND)  IT S A CHANNEL
042381,000221: 05,3573           50336                           INDEX    DNECADR                               
042382,000222: 05,3574           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
042383,000223: 05,3575           54001                           TS       L                                     
042384,000224: 05,3576           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
042385,000225: 05,3577           50336                           INDEX    DNECADR                               
042386,000226: 05,3600           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
042387,000227: 05,3601           54336                           TS       DNECADR                               #  SET DNECADR
042388,000228: 05,3602           37747                           CA       NEGONE                                #        TO MINUS
042389,000229: 05,3603           56336                           XCH      DNECADR                               #                WHILE PRESERVING A.
042390,000230: 05,3604           13701                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
042391,000231: 
042392,000232: 05,3605           44745        WOZERO             CS       BIT7                                  
042393,000233: 05,3606           00006                           EXTEND                                         
042394,000234: 05,3607           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO

Page 993

042396,000236: 05,3610           00002                           TC       Q                                     #  RETURN TO CALLER
042397,000237: 
042398,000238: 05,3611           50336        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
042399,000239: 05,3612           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
042400,000240: 05,3613           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
042401,000241: 05,3614           30336                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
042402,000242: 05,3615           13665                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
042403,000243: 
042404,000244: 05,3616           56336                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
042405,000245: 05,3617           54337                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
042406,000246: 05,3620           34755                           CAF      ZERO                                  #        A    INTO     A
042407,000247: 05,3621           56336                           XCH      TMINDEX                               #  (NOTE..  TMINDEX = DNECADR)
042408,000248: 
042409,000249:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
042410,000250:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
042411,000251:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
042412,000252:                                                                                                  #  TO MINIMIZE TIME.  THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
042413,000253:                                                                                                  #  THESE RULES ARE ......
042414,000254:                                                                                                  #        1.      ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
042415,000255:                                                                                                  #        2.      THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
042416,000256: 
042417,000257: 05,3622           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
042418,000258: 05,3623           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
042419,000259: 05,3624           00006                           EXTEND                                         
042420,000260: 05,3625           50000                           INDEX    A                                     
042421,000261: 05,3626  E3,1401                                  EBANK=   1401                                  
042422,000262: 05,3626           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
042423,000263: 05,3627     0340                                  EBANK=   DNTMBUFF                              
042424,000264: 05,3627           50336                           INDEX    TMINDEX                               
042425,000265: 05,3630           52341                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
042426,000266: 05,3631           24336                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
042427,000267: 05,3632           24336                           INCR     TMINDEX                               
042428,000268: 05,3633           24337        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
042429,000269: 05,3634           50337                           INDEX    SUBLIST                               
042430,000270: 05,3635           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
042431,000271: 05,3636           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.
042432,000272: 05,3637           13622                           TCF      SNAPLOOP                              #  NOT LAST TWO.
042433,000273: 05,3640           03523        LDNPHAS2           GENADR   DNPHASE2                              
042434,000274: 05,3641           54337                           TS       SUBLIST                               #  YES, LAST.  SAVE A.
042435,000275: 05,3642           37747                           CA       NEGONE                                #  SET DNECADR AND
042436,000276: 05,3643           54336                           TS       DNECADR                               #        SUBLIST POINTERS
042437,000277: 05,3644           56337                           XCH      SUBLIST                               #                TO NEGATIVE VALUES.
042438,000278: 05,3645           54003                           TS       EBANK                                 
042439,000279: 05,3646           74357                           MASK     LOW8                                  
042440,000280: 05,3647           00006                           EXTEND                                         
042441,000281: 05,3650           50000                           INDEX    A                                     
042442,000282: 05,3651  E3,1401                                  EBANK=   1401                                  
042443,000283: 05,3651           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.

Page 994

042445,000285: 05,3652     0340                                  EBANK=   DNTMBUFF                              
042446,000286: 05,3652           13701        SNAPEND            TCF      DNTMEXIT                              #  NOW GO SEND THEM.
042447,000287: 
042448,000288: 05,3653           30336        FETCH2WD           CA       DNECADR                               
042449,000289: 05,3654           54003                           TS       EBANK                                 #  SET EBANK
042450,000290: 05,3655           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
042451,000291: 05,3656           54001                           TS       L                                     
042452,000292: 05,3657           33531                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
042453,000293: 05,3660           26336                           ADS      DNECADR                               
042454,000294: 05,3661           00006                           EXTEND                                         
042455,000295: 05,3662           50001                           INDEX    L                                     
042456,000296: 05,3663  E3,1400                                  EBANK=   1400                                  
042457,000297: 05,3663           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
042458,000298: 05,3664     0340                                  EBANK=   DNTMBUFF                              
042459,000299: 05,3664           13701                           TCF      DNTMEXIT                              #  NOW GO SEND THEM.
042460,000300: 
042461,000301: 05,3665           54337        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
042462,000302: 05,3666           50337        NEXTINSL           INDEX    SUBLIST                               
042463,000303: 05,3667           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
042464,000304: 05,3670           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
042465,000305: 05,3671           24337                           INCR     SUBLIST                               #  NO -
042466,000306: 05,3672           13676                           TCF      +4                                    
042467,000307: 05,3673           54337                           TS       SUBLIST                               #  SAVE A.
042468,000308: 05,3674           37747                           CA       NEGONE                                #  SET SUBLIST TO MINUS
042469,000309: 05,3675           56337                           XCH      SUBLIST                               #  RETRIEVE A.
042470,000310: 05,3676           24000                 +4        INCR     A                                     
042471,000311: 05,3677           54336                           TS       DNECADR                               #  SAVE DNADR
042472,000312: 05,3700           13564                           TCF      SETWO      +2                         #  GO USE COMMON CODING (PROBLEMS WOULD
042473,000313:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
042474,000314:                                                                                                  #  DNPTR NOW)
042475,000315: 
042476,000316: 05,3701           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
042477,000317: 05,3702           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
042478,000318: 05,3703           30001                           CA       L                                     #  RESPECTIVELY
042479,000319: 05,3704           00006        TMEXITL            EXTEND                                         
042480,000320: 05,3705           01035                           WRITE    DNTM2                                 
042481,000321: 05,3706           15270        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.
042482,000322: 
042483,000323: 05,3707     7741               MINB12             EQUALS   -1/8                                  
042484,000324: 05,3707     0336               DNECADR            EQUALS   TMINDEX                               
042485,000325: 05,3707     0334               CTLIST             EQUALS   LDATALST                              
042486,000326: 05,3707     0337               SUBLIST            EQUALS   DNQ                                   
042487,000327: 

Page 995

042489,000329:                                                                                                  #  SUBROUTINE NAME - DNDUMP
042490,000330: 
042491,000331:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND (DUMP) ALL ERASABLE STORAGE 'N' TIMES. (N=1 TO 4).  BANKS ARE SENT ONE AT A TIME
042492,000332:                                                                                                  #        EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
042493,000333:                                                                                                  #        EBANK.  EBANKS ARE DUMPED IN ORDER (I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
042494,000334: 
042495,000335:                                                                                                  #  CALLING SEQUENCE - THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
042496,000336:                                                                                                  #        AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
042497,000337:                                                                                                  #        WILL BEGIN.
042498,000338: 
042499,000339:                                                                                                  #        ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
042500,000340:                                                                                                  #        BY THE FOLLOWING:
042501,000341: 
042502,000342:                                                                                                  #        1.      A FRESH START
042503,000343:                                                                                                  #        2.      COMPLETION OF ALL DOWNLINK DUMPS REQUESTED (ACCORDING TO BITS SET IN DUMPCNT).  NOTE THAT DUMPCNT
042504,000344:                                                                                                  #                CAN BE ALTERED BY A V21N01.
042505,000345:                                                                                                  #        3.      AND INVOLUNTARILY BY A RESTART.
042506,000346: 
042507,000347:                                                                                                  #  NORMAL EXIT MODE - TCF DNPHASE1
042508,000348: 
042509,000349:                                                                                                  #  ALARM OR ABORT MODE - NONE
042510,000350: 
042511,000351:                                                                                                  #  *SUBROUTINES CALLED - NONE.
042512,000352: 
042513,000353:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
042514,000354:                                                                                                  #        DUMPCNT         OCT 20000       IF 4 COMPLETE ERASABLE DUMPS ARE DESIRED
042515,000355:                                                                                                  #        DUMPCNT         OCT 10000       IF 2 COMPLETE ERASABLE DUMPS ARE DESIRED
042516,000356:                                                                                                  #        DUMPCNT         OCT 04000       IF 1 COMPLETE ERASABLE DUMP  IS  DESIRED
042517,000357: 
042518,000358:                                                                                                  #  DEBRIS - DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
042519,000359: 
042520,000360:                                                                                                  #  TIMING -      TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
042521,000361:                                                                                                  #                TIME (IN SECS) =  (   4    )*(    8    )*(    256     +     4   )  /     100
042522,000362:                                                                                                  #                THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
042523,000363: 
042524,000364:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM -
042525,000365:                                                                                                  #        (REMINDER - THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
042526,000366:                                                                                                  #        DOWNLIST                                W
042527,000367:                                                                                                  #          WORD  TAKEN FROM CONTENTS OF  EXAMPLE O       COMMENTS
042528,000368:                                                                                                  #            1   ERASID                   0177X  0       DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
042529,000369:                                                                                                  #            2   LOWIDCOD                 77340  1       DOWNLINK SYNCH BITS.  (SAME ONE USED IN ALL OTHER DOWNLISTS)
042530,000370:                                                                                                  #            3   DUMPLOC                  13400  1       (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
042531,000371:                                                                                                  #            4   TIME1                    14120  1       TIME IN CENTISECONDS
042532,000372:                                                                                                  #            5   FIRST WORD OF EBANK X    03400  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
042533,000373:                                                                                                  #            6   2ND   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
042534,000374:                                                                                                  #            7   3RD   WORD OF EBANK X    00142  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
042535,000375:                                                                                                  #            .                                   1
042536,000376:                                                                                                  #            .                                   1
042537,000377:                                                                                                  #            .                                   1
042538,000378:                                                                                                  #         260D   256TH WORD OF EBANK X    03777  1       IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
042539,000379: 
042540,000380:                                                                                                  #  NOTE -        DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
042541,000381:                                                                                                  #                THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
042542,000382:                                                                                                  #                                                X = NOT USED
042543,000383:                                                                                                  #                X ABC EEE RRRRRRRR            ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
042544,000384:                                                                                                  #                                                    COMPLETE ERASABLE DUMP NUMBER 1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
042545,000385:                                                                                                  #                                              EEE = EBANK BITS
042546,000386:                                                                                                  #                                         RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
042547,000387: 

Page 996

042549,000389: 05,3707           34755        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
042550,000390: 05,3710           54336                           TS       DUMPLOC                               #  ERASABLE DUMP
042551,000391: 05,3711           03753                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS
042552,000392: 05,3712           33721                           CA       LDNDUMP1                              #  SET DNTMGOTO
042553,000393: 05,3713           54335                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
042554,000394: 05,3714           30025                           CA       TIME1                                 #  PLACE TIME1
042555,000395: 05,3715           56001                           XCH      L                                     #  INTO L
042556,000396: 05,3716           30336                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
042557,000397: 05,3717           13701                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
042558,000398: 
042559,000399: 05,3720           03722        LDNDUMP            ADRES    DNDUMP                                
042560,000400: 05,3721           03735        LDNDUMP1           ADRES    DNDUMP1                               
042561,000401: 
042562,000402: 05,3722           34752        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
042563,000403: 05,3723           26336                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
042564,000404: 05,3724           74357                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
042565,000405: 05,3725           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
042566,000406: 05,3726           13737                           TCF      DNDUMP2                               #  NO - THEN CONTINUE DUMPING
042567,000407: 05,3727           30336                           CA       DUMPLOC                               #  YES - IS THIS THE END OF THE
042568,000408: 05,3730           70333                           MASK     DUMPCNT                               #  N TH (N = 1 TO 4) COMPLETE ERASABLE
042569,000409: 05,3731           77722                           MASK     PRIO34                                #  DUMP (BIT14 FOR 4, BIT13 FOR 2 OR BIT12
042570,000410: 05,3732           10000                           CCS      A                                     #  FOR 1 COMPLETE ERASABLE DUMP(S)).
042571,000411: 05,3733           13515                           TCF      DNPHASE1                              #  YES - START SENDING INTERRUPTED DOWNLIST
042572,000412:                                                                                                  #  AGAIN
042573,000413: 05,3734           13711                           TCF      DNDUMPI    +2                         #  NO - GO BACK AND INITIALIZE NEXT BANK
042574,000414: 
042575,000415: 05,3735           33720        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
042576,000416: 05,3736           54335                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
042577,000417: 
042578,000418: 05,3737           30336        DNDUMP2            CA       DUMPLOC                               
042579,000419: 05,3740           54003                           TS       EBANK                                 #  SET EBANK
042580,000420: 05,3741           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
042581,000421: 05,3742           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
042582,000422: 05,3743           34754                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
042583,000423: 05,3744           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
042584,000424: 05,3745           50002                           INDEX    Q                                     
042585,000425: 05,3746  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
042586,000426: 05,3746           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
042587,000427: 05,3747           56001                           XCH      L                                     
042588,000428: 05,3750           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
042589,000429: 05,3751           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
042590,000430: 05,3752     0340                                  EBANK=   DNTMBUFF                              
042591,000431: 05,3752           13701                           TCF      DNTMEXIT                              #  GO SEND THEM
042592,000432: 
042593,000433: 05,3753           00006        SENDID             EXTEND                                         #  ** ENTRANCE USED BY ERASABLE DUMP PROG.**
042594,000434: 05,3754           22335                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
042595,000435: 05,3755           35011                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
042596,000436: 
042597,000437: 05,3756           54001                           TS       L                                     #  ** ENTRANCE USED BY REGULAR DOWNLINK PG **

Page 997

042599,000439: 05,3757           03605                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
042600,000440: 05,3760           32065                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
042601,000441: 05,3761           56001                           XCH      L                                     #  AND ID BACK INTO A
042602,000442: 05,3762           13701                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).
042603,000443: 

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