Source Code

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

The reconstruction began with source code of Zerlina 56, Luminary 210, and Luminary 131, previously transcribed from digitized copies of those programs. The code was created by combining the three, using Zerlina 56 as a base, since it was based off of Luminary 183. The differences between the three were carefully merged using the Luminary memos as a guide, with all changes made after Luminary 178 being backed out. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 178 listing would be different.

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.

042549,000002:                                                                                                  ## Copyright:   Public domain.
042550,000003:                                                                                                  ## Filename:    DOWN-TELEMETRY_PROGRAM.agc
042551,000004:                                                                                                  ## Purpose:     A section of Luminary revision 178.
042552,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
042553,000006:                                                                                                  ##              release of the flight software for the Lunar Module's
042554,000007:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
042555,000008:                                                                                                  ##              code has been recreated from copies of Zerlina 56, Luminary
042556,000009:                                                                                                  ##              210, and Luminary 131, as well as many Luminary memos.
042557,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
042558,000011:                                                                                                  ##              exactly match those specified for Luminary 178 in NASA
042559,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
042560,000013:                                                                                                  ##              that the reconstruction is correct.
042561,000014:                                                                                                  ## Reference:   pp. 979-988
042562,000015:                                                                                                  ## Assembler:   yaYUL
042563,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042564,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042565,000018:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Zerlina 56.
042566,000019:                                                                                                  ##              2019-09-15 MAS  Restored the definitions of DNECADR,
042567,000020:                                                                                                  ##                              CTLIST, and SUBLIST.
042568,000021: 

Page 979

042570,000023:                                                                                                  #  PROGRAM NAME- DOWN TELEMETRY PROGRAM
042571,000024:                                                                                                  #  MOD NO.- 0      TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
042572,000025:                                                                                                  #                  PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
042573,000026:                                                                                                  #                  THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS.REFER TO DOWNLINK
042574,000027:                                                                                                  #                  LISTS LOG SECTION FOR MORE DETAILS. HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
042575,000028:                                                                                                  #                  OF DOWN TELEMETRY DATA.
042576,000029:                                                                                                  #  MOD BY-  KILROY, SMITH, DEWITT
042577,000030:                                                                                                  #  DATE-    02OCT67
042578,000031:                                                                                                  #  AUTHORS- KILROY, SMITH, DEWITT, DEWOLF, FAGIN
042579,000032:                                                                                                  #  LOG SECTION- DOWN-TELEMETRY PROGRAM
042580,000033:                                                                                                  #  FUNCTIONAL DESCRIPTION- THIS ROUTINE IS INITIATED BY TELEMETRY END
042581,000034:                                                                                                  #           PULSE FROM THE DOWNLINK TELEMETRY CONVERTER. THIS PULSE OCCURS
042582,000035:                                                                                                  #           AT 50 TIMES PER SEC(EVERY 20 MS) THEREFORE DODOWNTM IS
042583,000036:                                                                                                  #           EXECUTED AT THESE RATES. THIS ROUTINE SELECTS THE APPROPRIATE
042584,000037:                                                                                                  #           AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
042585,000038:                                                                                                  #           CHANNELS 34 AND 35. THE INFORMATION IS THEN GATED OUT FROM THE
042586,000039:                                                                                                  #           LGC IN SERIAL FASHION.
042587,000040:                                                                                                  #           THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST. SINCE DOWNRUPTS
042588,000041:                                                                                                  #           OCCUR EVERY 20MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
042589,000042:                                                                                                  #           CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
042590,000043:                                                                                                  #           OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
042591,000044:                                                                                                  #  CALLING SEQUENCE- NONE
042592,000045:                                                                                                  #           PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
042593,000046:                                                                                                  #           RESULT OF A DOWNRUPT. CONTROL IS RETURNED VIA TCF RESUME WHICH
042594,000047:                                                                                                  #           IN EFFECT IS A RESUME.
042595,000048:                                                                                                  #  SUBROUTINES CALLED- NONE
042596,000049:                                                                                                  #  NORMAL EXIT MODE- TCF RESUME
042597,000050:                                                                                                  #  ALARM OR ABORT EXIT MODE- NONE
042598,000051:                                                                                                  #  RESTART PROTECTION:
042599,000052:                                                                                                  #           ON A FRESH START AND RESTART THE 'STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER(ACTUALLY
042600,000053:                                                                                                  #           DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST(I.E. CURRENT CONTENTS OF DNLSTADR). THIS HAS THE
042601,000054:                                                                                                  #           EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
042602,000055:                                                                                                  #           THE RESTART(OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
042603,000056:                                                                                                  #           DOWNLIST.
042604,000057:                                                                                                  #           ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
042605,000058:                                                                                                  #  DOWNLINK LIST SELECTION:
042606,000059:                                                                                                  #        THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
042607,000060:                                                                                                  #        1. FRESH START
042608,000061:                                                                                                  #        2. V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
042609,000062:                                                                                                  #        3. UPDATE PROGRAM(P27)
042610,000063:                                                                                                  #        4.     NON-V37 SELECTABLE TYPE PROGRAMS(E.G. AGS INITIALIZATION(SUNDANCE,LUMINARY) AND P61-P62
042611,000064:                                                                                                  #               TRANSITION(COLOSSUS) ETC.).
042612,000065:                                                                                                  #  DOWNLINK LIST RULES AND LIMITATIONS:
042613,000066:                                                                                                  #           READ SECTION(S) WHICH FOLLOW 'DEBRIS' WRITEUP.
042614,000067:                                                                                                  #  OUTPUT-  EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS(I.E. 200 LGC
042615,000068:                                                                                                  #           COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
042616,000069:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED- NONE
042617,000070:                                                                                                  #           'DNTMGOTO' AND 'DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
042618,000071:                                                                                                  #  DEBRIS(ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM)-
042619,000072:                                                                                                  #           LDATALST,DNTMBUFF TO DNTMBUFF +21D,TMINDEX,DNQ.
042620,000073: 

Page 980

042622,000075: 
042623,000076: 

Page 981

042625,000078:                                                                                                  #  DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
042626,000079:                                                                                                  #  RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
042627,000080: 
042628,000081:                                                                                                  #  NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
042629,000082:                                                                                                  #  1. DOWNLISTS. - DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
042630,000083:                                                                                                  #     DOWN-TELEMETRY PROGRAM. THIS IS DONE FOR EASE OF CODING, FASTER
042631,000084:                                                                                                  #     EXECUTION.
042632,000085:                                                                                                  #  2. EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
042633,000086:                                                                                                  #     SUBLISTS.
042634,000087:                                                                                                  #  3. A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
042635,000088:                                                                                                  #     DOWNLINK LISTS.  ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
042636,000089:                                                                                                  #     CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
042637,000090:                                                                                                  #  4. SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENOUS DATA WHICH MUST BE
042638,000091:                                                                                                  #     SAVED IN A BUFFER DURING ONE DOWNRUPT.
042639,000092:                                                                                                  #  5. THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
042640,000093:                                                                                                  #     OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
042641,000094:                                                                                                  #     IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
042642,000095:                                                                                                  #  6. ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
042643,000096:                                                                                                  #     CREATED FOR THE DOWNLIST PROGRAM.
042644,000097:                                                                                                  #     A. 1DNADR              1-WORD DOWNLIST ADDRESS.
042645,000098:                                                                                                  #         SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
042646,000099:                                                                                                  #         HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
042647,000100:                                                                                                  #     B. 2DNADR - 6DNADR     N-WORD DOWNLIST ADDRESS, N = 2 - 6.
042648,000101:                                                                                                  #         SAME AS 1DNADR, BUT WITH THE 4 UNUSED BITS OF THE ECADR FORMAT
042649,000102:                                                                                                  #         FILLED IN WITH 0001-0101.  USED TO POINT TO A LIST OF N DOUBLE-
042650,000103:                                                                                                  #         PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
042651,000104:                                                                                                  #     C. DNCHAN              DOWNLIST CHANNEL ADDRESS.
042652,000105:                                                                                                  #         SAME AS 1DNADR, BUT WITH PREFIX BITS 0111.  USED TO POINT TO
042653,000106:                                                                                                  #         A PAIR OF CHANNELS FOR DOWN TELEMETRY.
042654,000107:                                                                                                  #     D. DNPTR               DOWN TELEMETRY SUBLIST POINTER.
042655,000108:                                                                                                  #      SAME AS CAF BUT TAGGED AS A CONSTANT. USED IN CONTROL LIST TO POINT TO A SUBLIST.
042656,000109:                                                                                                  #      CAUTION--- A DNPTR CANNOT BE USED IN A SUBLIST.
042657,000110:                                                                                                  #  7. THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E. CONTROL LIST) AND WHEN
042658,000111:                                                                                                  #     A '1DNADR TIME2' IS DETECTED IN THE CONTROL LIST(ONLY).
042659,000112:                                                                                                  #  8. IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
042660,000113: 
042661,000114:                                                                                                  #  DOWNLINK LIST RESTRICTIONS:
042662,000115:                                                                                                  #    (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO  IT IS CLEAR THAT THESE THINGS CANNOT BE
042663,000116:                                                                                                  #    DONE)
042664,000117:                                                                                                  #  1. SNAPSHOT DOWNLIST:
042665,000118:                                                                                                  #    (A) CANNOT CONTAIN THE FOLLOWING ECADRS(I.E. 1DNADR'S): 0, 400, 1000, 1400, 2000, 2400, 3000, 3400.
042666,000119:                                                                                                  #    (B) CAN CONTAIN ONLY 1DNADR'S
042667,000120: 
042668,000121:                                                                                                  #  2. ALL DOWNLINKED DATA(EXCEPT CHANNELS) IS PICKED UP BY A <DCA<SO DOWNLINK LISTS CANNOT CONTAIN THE
042669,000122:                                                                                                  #     EQUIVALENT OF THE FOLLOWING ECADRS(I.E. IDNADRS): 377, 777, 1377, 1777, 2377, 27777, 3377, 3777.
042670,000123: 
042671,000124:                                                                                                  #     (NOTE: THE TERM EQUIVALENT ' MEANT THAT THE IDNADR  TO 6DNADR  WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
042672,000125: 
042673,000126:                                                                                                  #  3. CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777
042674,000127: 

Page 982

042676,000129:                                                                                                  #  4. THE '1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
042677,000130:                                                                                                  #     CONTROL SECTION OF THE DOWNLIST.
042678,000131: 
042679,000132:                                                                                                  #  5. 'DNCHAN 0' CANNOT BE USED.
042680,000133: 
042681,000134:                                                                                                  #  6. 'DNPTR 0' CANNOT BE USED.
042682,000135: 
042683,000136:                                                                                                  #  7. DNPTR CANNOT APPEAR IN A SUBLIST.
042684,000137: 
042685,000138: 
042686,000139: 
042687,000140: 
042688,000141:                                                                                                  #  EBANK SETTINGS
042689,000142:                                                                                                  #           IN THE PROCESS OF SETTING THE EBANK(WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
042690,000143:                                                                                                  #           'GARBAGE' INTO BITS15-12 OF EBANK. HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
042691,000144:                                                                                                  #           SIGNIFICANT SOMEDAY IN THE FUTURE. IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE(BY MASKING ETC.)
042692,000145:                                                                                                  #           THAT BITS15-12 OF EBANK ARE ZERO.
042693,000146:                                                                                                  #  INITIALIZATION REQUIRED- TO INTERRUPT CURRENT LIST AND START A NEW ONE..
042694,000147:                                                                                                  #      1.   ADRES OF DOWNLINK LIST INTO DNLSTADR
042695,000148:                                                                                                  #      2.   NEGONE INTO SUBLIST
042696,000149:                                                                                                  #      3.   NEGONE INTO DNECADR
042697,000150: 
042698,000151: 22,3710                                           BANK     22                                    
042699,000152: 05,2000                                           SETLOC   DOWNTELM                              
042700,000153: 05,2000                                           BANK                                           
042701,000154: 
042702,000155: 05,3510     0340                                  EBANK=   DNTMBUFF                              
042703,000156: 
042704,000157: 05,3510                                           COUNT*   $$/DPROG                              
042705,000158: 05,3510           54016        DODOWNTM           TS       BANKRUPT                              
042706,000159: 05,3511           00006                           EXTEND                                         
042707,000160: 05,3512           22012                           QXCH     QRUPT                                 #  SAVE Q
042708,000161: 05,3513           34745                           CA       BIT7                                  #  AT THE BEGINNING OF THE LIST THE WORD
042709,000162: 05,3514           00006                           EXTEND                                         #  ORDER BIT WILL BE SET BACK TO ZERO.
042710,000163: 05,3515           02013                           RAND     CHAN13                                
042711,000164: 05,3516           10000                           CCS      A                                     
042712,000165: 05,3517           00335                           TC       DNTMGOTO                              
042713,000166: 05,3520           06022                           TC       C13STALL                              
042714,000167: 05,3521           34745                           CA       BIT7                                  
042715,000168: 05,3522           00006                           EXTEND                                         #  SET WORD ORDER BIT TO 1 ONLY IF IT
042716,000169: 05,3523           05013                           WOR      CHAN13                                #  ALREADY ISN'T.
042717,000170: 05,3524           00335                           TC       DNTMGOTO                              #  GO TO APPROPRIATE PHASE OF PROGRAM
042718,000171: 
042719,000172: 05,2000                                           SETLOC   DOWNTELM                              
042720,000173: 05,2000                                           BANK                                           
042721,000174: 
042722,000175: 05,3525           37752        DNPHASE1           CA       NEGONE                                #  INITIALIZE ALL CONTROL WORDS
042723,000176: 05,3526           54337                           TS       SUBLIST                               #  WORDS TO MINUS ONE
042724,000177: 05,3527           54336                           TS       DNECADR                               
042725,000178: 05,3530           33655                           CA       LDNPHAS2                              #  SET DNTMGOTO =O ALL SUBSEQUENT DOWNRUPTS

Page 983

042727,000180: 05,3531           54335                           TS       DNTMGOTO                              #  GO TO DNPHASE2
042728,000181: 05,3532           13546                           TCF      NEWLIST                               
042729,000182: 05,3533           10336        DNPHASE2           CCS      DNECADR                               #  SENDING OF DATA IN PROGRESS
042730,000183: 05,3534           03670        DODNADR            TC       FETCH2WD                              #  YES - THEN FETCH THE NEXT 2 SP WORDS
042731,000184: 05,3535           77753        MINTIME2           -1DNADR  TIME2                                 #  NEGATIVE OF TIME2 1DNADR
042732,000185: 05,3536           13537                           TCF      +1                                    #  (ECADR OF  3776 + 74001 = 77777)
042733,000186: 
042734,000187: 05,3537           10337                           CCS      SUBLIST                               #  IS THE SUBLIST IN CONTROL
042735,000188: 05,3540           13703                           TCF      NEXTINSL                              #  YES
042736,000189: 05,3541           74001        DNADRDCR           OCT      74001                                 #  DNADR COUNT AND ECADR DECREMENTER
042737,000190: 
042738,000191: 05,3542           30334        CHKLIST            CA       CTLIST                                
042739,000192: 05,3543           00006                           EXTEND                                         
042740,000193: 05,3544           63546                           BZMF     NEWLIST                               #  IT WILL BE NEGATIVE AT END OF LIST
042741,000194: 05,3545           13553                           TCF      NEXTINCL                              
042742,000195: 05,3546           50333        NEWLIST            INDEX    DNLSTCOD                              
042743,000196: 05,3547           32452                           CA       DNTABLE                               #  INITIALIZE CTLIST WITH
042744,000197: 05,3550           54334                           TS       CTLIST                                #    STARTING ADDRESS OF NEW LIST
042745,000198: 05,3551           40333                           CS       DNLSTCOD                              
042746,000199: 05,3552           13772                           TCF      SENDID     +3                         
042747,000200: 05,3553           50334        NEXTINCL           INDEX    CTLIST                                
042748,000201: 05,3554           30000                           CA       0                                     
042749,000202: 05,3555           10000                           CCS      A                                     
042750,000203: 05,3556           24334                           INCR     CTLIST                                #  SET POINTER TO PICK UP NEXT CTLIST WORD
042751,000204: 05,3557           13563                           TCF      +4                                    #  ON NEXT ENTRY TO PROG. (A SHOULD NOT =0)
042752,000205: 05,3560           56334                           XCH      CTLIST                                #  SET CTLIST TO NEGATIVE AND PLACE(CODING)
042753,000206: 05,3561           40000                           COM                                            #  UNCOMPLEMENTED DNADR INTO A.    (FOR LA)
042754,000207: 05,3562           56334                           XCH      CTLIST                                #                                  (ST IN )
042755,000208: 05,3563           24000                 +4        INCR     A                                     #                                  (CTLIST)
042756,000209: 05,3564           54336                           TS       DNECADR                               #  SAVE DNADR
042757,000210: 05,3565           63535                           AD       MINTIME2                              #  TEST FOR TIME2 (NEG. OF ECADR)
042758,000211: 05,3566           10000                           CCS      A                                     
042759,000212: 05,3567           13573                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
042760,000213: 05,3570           47777        MINB1314           OCT      47777                                 #  MINUS BIT 13 AND 14  (CAN'T GET HERE)
042761,000214: 05,3571           13573                           TCF      SETWO      +1                         #  DON'T SET WORD ORDER CODE
042762,000215: 05,3572           03615        SETWO              TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO.
042763,000216: 05,3573           30336                 +1        CA       DNECADR                               #  RELOAD A WITH THE DNADR.
042764,000217: 05,3574           63570                 +2        AD       MINB1314                              #  IS THIS A REGULAR DNADR?
042765,000218: 05,3575           00006                           EXTEND                                         
042766,000219: 05,3576           63670                           BZMF     FETCH2WD                              #  YES. (A MUST NEVER BE ZERO)
042767,000220: 05,3577           67744                           AD       MINB12                                #  NO- IS IT A POINTER (DNPTR) OR A
042768,000221: 05,3600           00006                           EXTEND                                         #      CHANNEL(DNCHAN)
042769,000222: 05,3601           63626                           BZMF     DODNPTR                               #  IT'S A POINTER. (A MUST NEVER BE ZERO)
042770,000223: 
042771,000224: 05,3602           00006        DODNCHAN           TC       6                                     #  (EXECUTED AS EXTEND) IT S A CHANNEL
042772,000225: 05,3603           50336                           INDEX    DNECADR                               
042773,000226: 05,3604           44000                           INDEX    0          -4000                      #  (EXECUTED AS READ)
042774,000227: 05,3605           54001                           TS       L                                     
042775,000228: 05,3606           00006                           TC       6                                     #  (EXECUTED AS EXTEND)
042776,000229: 05,3607           50336                           INDEX    DNECADR                               

Page 984

042778,000231: 05,3610           43777                           INDEX    0          -4001                      #  (EXECUTED AS READ)
042779,000232: 05,3611           54336                           TS       DNECADR                               #  SET DNECADR
042780,000233: 05,3612           37752                           CA       NEGONE                                #      TO MINUS
042781,000234: 05,3613           56336                           XCH      DNECADR                               #          WHILE PRESERVING A.
042782,000235: 05,3614           13716                           TCF      DNTMEXIT                              #  GO SEND CHANNELS
042783,000236: 
042784,000237: 05,3615           00006        WOZERO             EXTEND                                         
042785,000238: 05,3616           23265                           QXCH     C13QSAV                               
042786,000239: 05,3617           22070                           LXCH     RUPTREG1                              
042787,000240: 05,3620           06022                           TC       C13STALL                              
042788,000241: 
042789,000242: 05,3621           22070                           LXCH     RUPTREG1                              
042790,000243: 05,3622           44745                           CS       BIT7                                  
042791,000244: 05,3623           00006                           EXTEND                                         
042792,000245: 05,3624           03013                           WAND     CHAN13                                #  SET WORD ORDER CODE TO ZERO
042793,000246: 05,3625           01265                           TC       C13QSAV                               
042794,000247: 
042795,000248: 05,3626           50336        DODNPTR            INDEX    DNECADR                               #  DNECADR CONTAINS ADRES OF SUBLIST
042796,000249: 05,3627           00000                           0        0                                     #  CLEAR AND ADD LIST ENTRY INTO A.
042797,000250: 05,3630           10000                           CCS      A                                     #  IS THIS A SNAPSHOT SUBLIST
042798,000251: 05,3631           30336                           CA       DNECADR                               #  NO, IT IS A REGULAR SUBLIST.
042799,000252: 05,3632           13702                           TCF      DOSUBLST                              #  A MUST NOT BE ZERO.
042800,000253: 
042801,000254: 05,3633           56336                           XCH      DNECADR                               #  YES, IT IS A SNAPSHOT SUBLIST.
042802,000255: 05,3634           54337                           TS       SUBLIST                               #  C(DNECADR) INTO SUBLIST
042803,000256: 05,3635           34755                           CAF      ZERO                                  #       A    INTO    A
042804,000257: 05,3636           56336                           XCH      TMINDEX                               #  (NOTE.. TMINDEX = DNECADR)
042805,000258: 
042806,000259: 
042807,000260:                                                                                                  #  THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND)IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
042808,000261:                                                                                                  #  THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
042809,000262:                                                                                                  #  THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
042810,000263:                                                                                                  #  TO MINIMIZE TIME. THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
042811,000264:                                                                                                  #  THESE RULES ARE......
042812,000265:                                                                                                  #            1.    ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
042813,000266:                                                                                                  #            2.    THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY  BANK.
042814,000267: 
042815,000268: 05,3637           54003        SNAPLOOP           TS       EBANK                                 #  SET EBANK
042816,000269: 05,3640           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
042817,000270: 05,3641           00006                           EXTEND                                         
042818,000271: 05,3642           50000                           INDEX    A                                     
042819,000272: 05,3643  E3,1401                                  EBANK=   1401                                  
042820,000273: 05,3643           31402                           DCA      1401                                  #  PICK UP 2 SNAPSHOT WORDS.
042821,000274: 05,3644     0340                                  EBANK=   DNTMBUFF                              
042822,000275: 05,3644           50336                           INDEX    TMINDEX                               
042823,000276: 05,3645           52341                           DXCH     DNTMBUFF                              #  STORE 2 SNAPSHOT WORDS IN BUFFER
042824,000277: 05,3646           24336                           INCR     TMINDEX                               #  SET BUFFER INDEX FOR NEXT 2 WORDS.
042825,000278: 05,3647           24336                           INCR     TMINDEX                               
042826,000279: 05,3650           24337        SNAPAGN            INCR     SUBLIST                               #  SET POINTER TO NEXT 2 WORDS OF SNAPSHOT

Page 985

042828,000281: 05,3651           50337                           INDEX    SUBLIST                               
042829,000282: 05,3652           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
042830,000283: 05,3653           10000                           CCS      A                                     #  TEST FOR LAST TWO WORDS OF SNAPSHOT.
042831,000284: 05,3654           13637                           TCF      SNAPLOOP                              #  NOT LAST TWO.
042832,000285: 05,3655           03533        LDNPHAS2           GENADR   DNPHASE2                              
042833,000286: 05,3656           54337                           TS       SUBLIST                               #  YES, LAST.  SAVE A.
042834,000287: 05,3657           37752                           CA       NEGONE                                #  SET DNECADR AND
042835,000288: 05,3660           54336                           TS       DNECADR                               #      SUBLIST POINTERS
042836,000289: 05,3661           56337                           XCH      SUBLIST                               #          TO NEGATIVE VALUES.
042837,000290: 05,3662           54003                           TS       EBANK                                 
042838,000291: 05,3663           74357                           MASK     LOW8                                  
042839,000292: 05,3664           00006                           EXTEND                                         
042840,000293: 05,3665           50000                           INDEX    A                                     
042841,000294: 05,3666  E3,1401                                  EBANK=   1401                                  
042842,000295: 05,3666           31402                           DCA      1401                                  #  PICK UP FIRST 2 WORDS OF SNAPSHOT.
042843,000296: 05,3667     0340                                  EBANK=   DNTMBUFF                              
042844,000297: 05,3667           13716        SNAPEND            TCF      DNTMEXIT                              #     NOW GO SEND THEM.
042845,000298: 
042846,000299: 05,3670           30336        FETCH2WD           CA       DNECADR                               
042847,000300: 05,3671           54003                           TS       EBANK                                 #  SET EBANK
042848,000301: 05,3672           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
042849,000302: 05,3673           54001                           TS       L                                     
042850,000303: 05,3674           33541                           CA       DNADRDCR                              #  DECREMENT COUNT AND ECADR
042851,000304: 05,3675           26336                           ADS      DNECADR                               
042852,000305: 05,3676           00006                           EXTEND                                         
042853,000306: 05,3677           50001                           INDEX    L                                     
042854,000307: 05,3700  E3,1400                                  EBANK=   1400                                  
042855,000308: 05,3700           31401                           DCA      1400                                  #  PICK UP 2 DATA WORDS
042856,000309: 05,3701     0340                                  EBANK=   DNTMBUFF                              
042857,000310: 05,3701           13716                           TCF      DNTMEXIT                              #     NOW GO SEND THEM.
042858,000311: 
042859,000312: 05,3702           54337        DOSUBLST           TS       SUBLIST                               #  SET SUBLIST POINTER
042860,000313: 05,3703           50337        NEXTINSL           INDEX    SUBLIST                               
042861,000314: 05,3704           00000                           0        0                                     #  = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
042862,000315: 05,3705           10000                           CCS      A                                     #  IS IT THE END OF THE SUBLIST
042863,000316: 05,3706           24337                           INCR     SUBLIST                               #  NO-
042864,000317: 05,3707           13713                           TCF      +4                                    
042865,000318: 05,3710           54337                           TS       SUBLIST                               #  SAVE A.
042866,000319: 05,3711           37752                           CA       NEGONE                                #  SET SUBLIST TO MINUS
042867,000320: 05,3712           56337                           XCH      SUBLIST                               #  RETRIEVE A.
042868,000321: 05,3713           24000                 +4        INCR     A                                     
042869,000322: 05,3714           54336                           TS       DNECADR                               #  SAVE DNADR
042870,000323: 05,3715           13574                           TCF      SETWO      +2                         #  GO USE COMMON CODING(PROBLEMS WOULD
042871,000324:                                                                                                  #  OCCUR IF THE PROGRAM ENCOUNTERED A
042872,000325:                                                                                                  #  DNPTR NOW)
042873,000326: 
042874,000327: 05,3716           00006        DNTMEXIT           EXTEND                                         #  DOWN-TELEMETRY EXIT
042875,000328: 05,3717           01034                           WRITE    DNTM1                                 #  TO SEND A + L TO CHANNELS 34 + 35
042876,000329: 05,3720           30001                           CA       L                                     #  RESPECTIVELY
042877,000330: 05,3721           00006        TMEXITL            EXTEND                                         

Page 986

042879,000332: 05,3722           01035                           WRITE    DNTM2                                 
042880,000333: 05,3723           15301        TMRESUME           TCF      RESUME                                #  EXIT TELEMETRY PROGRAM VIA RESUME.
042881,000334: 
042882,000335: 05,3724     7744               MINB12             EQUALS   -1/8                                  
042883,000336: 05,3724     0336               DNECADR            EQUALS   TMINDEX                               
042884,000337: 05,3724     0334               CTLIST             EQUALS   LDATALST                              
042885,000338: 05,3724     0337               SUBLIST            EQUALS   DNQ                                   
042886,000339: 
042887,000340:                                                                                                  #  MOD BY - DENSMORE - JUNE 1969 - ELIMINATE ERASABLE DUMP COUNT
042888,000341: 

Page 987

042890,000343:                                                                                                  #  SUBROUTINE NAME- DNDUMP
042891,000344:                                                                                                  #  FUNCTIONAL DESCRIPTION - TO SEND (DUMP) ALL 8 BANKS OF ERASABLE STORAGE TWICE.  BANKS ARE SENT ONE AT A TIME
042892,000345:                                                                                                  #           EACH BANK IS PRECEEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
042893,000346:                                                                                                  #           EBANK. EBANKS ARE DUMPED IN ORDER(I.E. EBANK 0 FIRST, THEN EBANK1 ETC.)
042894,000347:                                                                                                  #  CALLING SEQUENCE- THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
042895,000348:                                                                                                  #           AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
042896,000349:                                                                                                  #           WILL BEGIN.
042897,000350:                                                                                                  #           ONCE INITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
042898,000351:                                                                                                  #           BY THE FOLLOWING:
042899,000352:                                                                                                  #            1. A FRESH START
042900,000353:                                                                                                  #            2. COMPLETION OF BOTH COMPLETE DUMPS
042901,000354:                                                                                                  #            3. AND INVOLUNTARILY BY A RESTART.
042902,000355:                                                                                                  #  NORMAL EXIT MODE- TCF DNPHASE1
042903,000356:                                                                                                  #  ALARM OR ABORT MODE- NONE
042904,000357:                                                                                                  #  *SUBROUTINES CALLED- NONE.
042905,000358:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
042906,000359:                                                                                                  #           NONE
042907,000360:                                                                                                  #  DEBRIS- DUMPLOC, DUMPSW, DNTMGOTO, EBANK AND CENTRAL REGISTERS
042908,000361:                                                                                                  #  TIMING-   TIME(IN SECS) = ((NO.DUMPS)*(NO.EBANKS)* (WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
042909,000362:                                                                                                  #            TIME(IN SECS) =  (   4    )*(    8    )* (    256     +     4   )  /     100
042910,000363:                                                                                                  #       THUS TIME(IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
042911,000364: 
042912,000365:                                                                                                  #  STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM-
042913,000366:                                                                                                  #     (REMINDER-THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
042914,000367:                                                                                                  #          DOWNLIST                                 W
042915,000368:                                                                                                  #           WORD   TAKEN FROM CONTENTS OF   EXAMPLE O  COMMENTS
042916,000369: 
042917,000370:                                                                                                  #            1     ERASID                    0177X  0  DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
042918,000371:                                                                                                  #            2     LOWIDCOD                  77340  1  DOWNLINK SYNCH BITS.(SAME ONE USED IN ALL OTHER DOWNLISTS)
042919,000372:                                                                                                  #            3     DUMPLOC                   13400  1  (SEE NOTES ON DUMPLOC)1= 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
042920,000373:                                                                                                  #            4     TIME1                     14120  1  TIME IN CENTISECONDS
042921,000374:                                                                                                  #            5     FIRST WORD OF EBANK X     03400  1  IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
042922,000375:                                                                                                  #            6     2ND   WORD OF EBANK X     00142  1  IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
042923,000376:                                                                                                  #            7     3RD   WORD OF EBANK X     00142  1  IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
042924,000377:                                                                                                  #            .                                      1
042925,000378:                                                                                                  #            .                                      1
042926,000379:                                                                                                  #            .                                      1
042927,000380:                                                                                                  #           260D   256TH WORD OF EBANK X     03777  1  IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
042928,000381: 
042929,000382:                                                                                                  #  NOTE- DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
042930,000383:                                                                                                  #        THE BIT STRUCTURE OF DUMPLOC IS FOLLOWS---
042931,000384:                                                                                                  #                                        X = NOT USED
042932,000385:                                                                                                  #           X ABC EEE RRRRRRRR         ABC = ERASABLE DUMP COUNTER(I.E. ABC = 0,1,2 OR 3 WHICH MEANS THAT
042933,000386:                                                                                                  #                                            COMPLETE ERASABLE DUMP NUMBER  1,2,3 OR 4 RESPECTIVELY IS IN PROGRESS)
042934,000387:                                                                                                  #                                      EEE = EBANK BITS
042935,000388:                                                                                                  #                                 RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK.
042936,000389: 
042937,000390: 05,3724           34755        DNDUMPI            CA       ZERO                                  #  INITIALIZE DOWNLINK
042938,000391: 05,3725           54336                           TS       DUMPLOC                               #  ERASABLE DUMP
042939,000392: 05,3726           03767                 +2        TC       SENDID                                #  GO SEND ID AND SYNCH BITS

Page 988

042941,000394: 05,3727           33736                           CA       LDNDUMP1                              #  SET DNTMGOTO
042942,000395: 05,3730           54335                           TS       DNTMGOTO                              #  TO LOCATION FOR NEXT PASS
042943,000396: 05,3731           30025                           CA       TIME1                                 #  PLACE TIME1
042944,000397: 05,3732           56001                           XCH      L                                     #  INTO L
042945,000398: 05,3733           30336                           CA       DUMPLOC                               #  AND ECADR OF THIS EBANK INTO A
042946,000399: 05,3734           13716                           TCF      DNTMEXIT                              #  SEND DUMPLOC AND TIME1
042947,000400: 
042948,000401: 05,3735           03737        LDNDUMP            ADRES    DNDUMP                                
042949,000402: 05,3736           03751        LDNDUMP1           ADRES    DNDUMP1                               
042950,000403: 
042951,000404: 05,3737           34752        DNDUMP             CA       TWO                                   #  INCREMENT ECADR IN DUMPLOC
042952,000405: 05,3740           26336                           ADS      DUMPLOC                               #  TO NEXT DP WORD TO BE
042953,000406: 05,3741           74357                           MASK     LOW8                                  #  DUMPED AND SAVE IT.
042954,000407: 05,3742           10000                           CCS      A                                     #  IS THIS THE BEGINNING OF A NEW EBANK
042955,000408: 05,3743           13753                           TCF      DNDUMP2                               #  NO- THEN CONTINUE DUMPING
042956,000409: 05,3744           30336                           CA       DUMPLOC                               #  YES- IS THIS THE END OF THE
042957,000410: 05,3745           74737                           MASK     BIT13                                 #  SECOND COMPLETE ERASABLE DUMP?
042958,000411: 05,3746           00006                           EXTEND                                         
042959,000412: 05,3747           13726                           BZF      DNDUMPI    +2                         #  NO - GO BACK AND INITIALIZE NEXT BANK
042960,000413: 05,3750           13525                           TCF      DNPHASE1                              #  YES - SEND DOWNLIST AGAIN
042961,000414: 05,3751           33735        DNDUMP1            CA       LDNDUMP                               #  SET DNTMGOTO
042962,000415: 05,3752           54335                           TS       DNTMGOTO                              #  FOR WORDS 3 TO 256D OF CURRENT EBANK
042963,000416: 
042964,000417: 05,3753           30336        DNDUMP2            CA       DUMPLOC                               
042965,000418: 05,3754           54003                           TS       EBANK                                 #  SET EBANK
042966,000419: 05,3755           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS.
042967,000420: 05,3756           54002                           TS       Q                                     #  (NOTE: MASK INSTRUCTION IS USED TO PICK
042968,000421: 05,3757           34754                           CA       NEG0                                  #  UP ERASABLE REGISTERS SO THAT EDITING
042969,000422: 05,3760           54001                           TS       L                                     #  REGISTERS 20-23 WILL NOT BE ALTERED.)
042970,000423: 05,3761           50002                           INDEX    Q                                     
042971,000424: 05,3762  E3,1400                                  EBANK=   1400                                  #  PICK UP LOW ORDER REGISTER OF PAIR
042972,000425: 05,3762           71401                           MASK     1401                                  #  OF ERASABLE REGISTERS.
042973,000426: 05,3763           56001                           XCH      L                                     
042974,000427: 05,3764           50002                           INDEX    Q                                     #  PICK UP HIGH ORDER REGISTER OF PAIR
042975,000428: 05,3765           71400                           MASK     1400                                  #  OF ERASABLE REGISTERS.
042976,000429: 05,3766     0340                                  EBANK=   DNTMBUFF                              
042977,000430: 05,3766           13716                           TCF      DNTMEXIT                              #  GO SEND THEM
042978,000431: 
042979,000432: 
042980,000433: 05,3767           00006        SENDID             EXTEND                                         #  **ENTRANCE USED BY ERASABLE DUMP PROG.**
042981,000434: 05,3770           22335                           QXCH     DNTMGOTO                              #  SET DNTMGOTO SO NEXT TIME PROG WILL GO
042982,000435: 05,3771           35011                           CAF      ERASID                                #  TO LOCATION FOLLOWING :TC SENDID:
042983,000436: 
042984,000437: 05,3772           54001                           TS       L                                     #  **ENTRANCE USED BY REGULAR DOWNLINK PG**
042985,000438: 05,3773           03615                           TC       WOZERO                                #  GO SET WORD ORDER CODE TO ZERO
042986,000439: 05,3774           32065                           CAF      LOWIDCOD                              #  PLACE SPECIAL ID CODE INTO L
042987,000440: 05,3775           56001                           XCH      L                                     #  AND ID BACK INTO A
042988,000441: 05,3776           13716                           TCF      DNTMEXIT                              #  SEND DOWNLIST ID CODE(S).

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