Source Code

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

The reconstruction began with reconstructed source code for Luminary 178. Changes between revision 173 and 178 were backed out, as described by Luminary memo 167 (revision 1). 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 173 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.

058780,000002:                                                                                                  ## Copyright:   Public domain.
058781,000003:                                                                                                  ## Filename:    UPDATE_PROGRAM.agc
058782,000004:                                                                                                  ## Purpose:     A section of Luminary revision 173.
058783,000005:                                                                                                  ##              It is part of the reconstructed source code for the second
058784,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
058785,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
058786,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
058787,000009:                                                                                                  ##              Luminary 178, as well as Luminary memo 167 (revision 1).
058788,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
058789,000011:                                                                                                  ##              exactly match those specified for Luminary 173 in NASA
058790,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
058791,000013:                                                                                                  ##              that the reconstruction is correct.
058792,000014:                                                                                                  ## Reference:   pp. 1374-1384
058793,000015:                                                                                                  ## Assembler:   yaYUL
058794,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
058795,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
058796,000018:                                                                                                  ## Mod history: 2019-09-18 MAS  Created from Luminary 178.
058797,000019:                                                                                                  ##              2021-05-30 ABS  DELTAOK -> DELTATOK
058798,000020: 

Page 1374

058800,000022:                                                                                                  #  PROGRAM NAME:   P27
058801,000023:                                                                                                  #  WRITTEN BY:     KILROY/ DE WOLF
058802,000024: 
058803,000025:                                                                                                  #  MOD NO:         6
058804,000026:                                                                                                  #  MOD BY:         KILROY
058805,000027:                                                                                                  #  DATE:           01DEC67
058806,000028: 
058807,000029:                                                                                                  #  LOG SECTION:    UPDATE PROGRAM.
058808,000030: 
058809,000031:                                                                                                  #  FUNCT. DESCR:   P27 (THE UPDATE PROGRAM) PROCESSES COMMANDS AND DATA
058810,000032:                                                                                                  #                      INSERTIONS REQUESTED BY THE GROUND VIA UPLINK.
058811,000033:                                                                                                  #                      THE P27 PROGRAM WILL ACCEPT UPDATES
058812,000034:                                                                                                  #                      ONLY DURING P00 FOR THE LM, AND ONLY DURING P00,
058813,000035:                                                                                                  #                  P02, AND FRESH START FOR THE CSM
058814,000036: 
058815,000037:                                                                                                  #  CALLING SEQ:    PROGRAM IS INITIATED BY UPLINK ENTRY OF VERBS 70, 71, 72 AND 73.
058816,000038: 
058817,000039:                                                                                                  #  SUBROUTINES:    TESTXACT, NEWMODEX, NEWMODEX +3, GOXDSPF, BANKCALL, FINDVAC, INTPRET, INTSTALL, TPAGREE,
058818,000040:                                                                                                  #                  INTWAKEU, ENDEXT, POSTJUMP, FALTON, NEWPHASE, PHASCHNG
058819,000041: 
058820,000042:                                                                                                  #  NORMAL EXIT:    TC ENDEXT
058821,000043: 
058822,000044:                                                                                                  #  ALARM/ABORT:    TC FALTON FOLLOWED BY TC ENDEXT
058823,000045: 
058824,000046:                                                                                                  #  RESTARTS:       P27 IS RESTART PROTECTED IN TWO WAYS...
058825,000047:                                                                                                  #                  1. PRIOR TO VERIFLAG INVERSION(WHICH IS CAUSED BY THE GROUND/ASTRONAUT'S VERIFICATION OF UPDATE
058826,000048:                                                                                                  #                     DATA BY SENDING A V33E WHEN V21N02 IS FLASHING)---
058827,000049:                                                                                                  #                     NO PROTECTION EXCEPT PRE-P27 MODE IS RESTORED, COAST + ALIGN DOWNLIST IS SELECTED AND UPLINK
058828,000050:                                                                                                  #                     ACTIVITY LIGHT IS TURNED OFF.(JUST AS IF A V34E WAS SENT DURING P27 DATA LOADS).
058829,000051:                                                                                                  #                     V70,V71,V72 OR V73 WILL HAVE TO BE COMPLETELY RESENT BY USER.
058830,000052:                                                                                                  #                  2. AFTER VERIFLAG INVERSION(WHEN UPDATE OF THE SPECIFIED ERASABLES IS BEING PERFORMED)---
058831,000053:                                                                                                  #                     PROTECTED AGAINST RESTARTS.
058832,000054: 
058833,000055:                                                                                                  #  DEBRIS:         UPBUFF   (20D)  TEMP STORAGE FOR ADDRESSES AND CONTENTS.
058834,000056:                                                                                                  #                  UPVERB   (1)    VERB NUMBER MINUS 70D (E.G. FOR V72, UPVERB = 72D - 70D = 2)
058835,000057:                                                                                                  #                  UPOLDMOD (1)    FOR MAJOR MODE INTERRUPTED BY P27.
058836,000058:                                                                                                  #                  COMPNUMB (1)    TOTAL NUMBER OF COMPONENTS TO BE TRANSMITTED.
058837,000059:                                                                                                  #                  UPCOUNT  (1)    ACTUAL NUMBER OF COMPONENTS RECEIVED.
058838,000060:                                                                                                  #                  UPTEMP   (1)    SCRATCH, BUT USUALLY CONTAINS COMPONENT NUMBER TO BE CHANGED DURING VERIFY CYCLE
058839,000061: 
058840,000062: 
058841,000063:                                                                                                  #  INPUT:
058842,000064: 
058843,000065:                                                                                                  #        ENTRY:      DESCRIPTION
058844,000066: 
058845,000067:                                                                                                  #   V70EXXXXXEXXXXXE (LIFTOFF TIME INCREMENT) DOUBLE PRECISION OCTAL TIME INCREMENT, XXXXX XXXXX,
058846,000068:                                                                                                  #                    IS ADDED TO TEPHEM, SUBTRACTED FROM AGC CLOCK(TIME2,TIME1), SUBTRACTED FROM CSM STATE
058847,000069:                                                                                                  #                    VECTOR TIME(TETCSM) AND SUBTRACTED FROM LEM STATE VECTOR TIME(TETLEM).
058848,000070:                                                                                                  #                    THE DP OCTAL TIME INCREMENT IS SCALED AT 2(28).

Page 1375

058850,000072:                                                                                                  #   V71EIIEAAAAE     (CONTIGUOUS BLOCK UPDATE) II-2 OCTAL COMPONENTS,XXXXX,
058851,000073:                                                                                                  #   XXXXXE           ARE LOADED INTO ERASABLE STARTING AT ECADR, AAAA.
058852,000074:                                                                                                  #  XXXXXE            IT IS .GE. 3 .AND. .LE. 20D.,
058853,000075:                                                                                                  #                    AND (AAAA + II - 3) DOES NOT PRODUCE AN ADDRESS IN THE
058854,000076:                                                                                                  #  9 NEXT BANK
058855,000077:                                                                                                  #    .               SCALING IS SAME AS INTERNAL REGISTERS.
058856,000078: 
058857,000079:                                                                                                  #   V72EIIE          (SCATTER UPDATE) (II-1)/2 OCTAL COMPONENTS,XXXXX, ARE
058858,000080:                                                                                                  #   AAAAEXXXXXE      LOADED INTO ERASABLE LOCATIONS, AAAA.
058859,000081:                                                                                                  #   AAAAEXXXXXE      II IS .GE. 3 .AND. .LE. 19D, AND MUST BE ODD.
058860,000082:                                                                                                  #    .               SCALING IS SAME AS INTERNAL REGISTERS.
058861,000083: 
058862,000084:                                                                                                  #   V73EXXXXXEXXXXXE (OCTAL CLOCK INCREMENT) DOUBLE PRECISION OCTAL TIME
058863,000085:                                                                                                  #                    INCREMENT XXXXX XXXXX, IS ADDED TO THE AGC CLOCK, IN
058864,000086:                                                                                                  #                    CENTISECONDS SCALED AT (2)28.
058865,000087:                                                                                                  #                    THIS LOAD IS THE OCTAL EQUIVALENT OF V55.
058866,000088: 
058867,000089: 
058868,000090:                                                                                                  #  OUTPUT:         IN ADDITION TO THE ABOVE REGISTER LOADS, ALL UPDATES
058869,000091:                                                                                                  #                  COMPLEMENT BIT3 OF FLAGWORD7.
058870,000092: 
058871,000093: 
058872,000094:                                                                                                  #  ADDITIONAL NOTES: VERB 71, JUST DEFINED ABOVE WILL BE USED TO PERFORM BUT NOT LIMITED TO THE FOLLOWING UPDATES--
058873,000095: 
058874,000096:                                                                                                  #                  1. CSM/LM STATE VECTOR UPDATE
058875,000097:                                                                                                  #                  2. REFSMMAT UPDATE
058876,000098: 
058877,000099: 
058878,000100:                                                                                                  #           THE FOLLOWING COMMENTS DELINEATE EACH SPECIAL UPDATE----
058879,000101: 
058880,000102:                                                                                                  #  1. CSM/LM STATE VECTOR UPDATE(ALL DATA ENTRIES IN OCTAL)
058881,000103: 
058882,000104:                                                                                                  #  ENTRIES:        DATA DEFINITION:                                        SCALE FACTORS:
058883,000105:                                                                                                  #  V71E            CONTIGUOUS BLOCK UPDATE VERB
058884,000106:                                                                                                  #     21E          NUMBER OF COMPONENTS FOR STATE VECTOR UPDATE
058885,000107:                                                                                                  #   AAAAE          ECADR OF 'UPSVFLAG'
058886,000108:                                                                                                  #  XXXXXE          STATE VECTOR IDENTIFIER: 00001 FOR CSM, 77776 FOR LEM - EARTH SPHERE OF INFLUENCE SCALING
058887,000109:                                                                                                  #                                           00002 FOR CSM, 77775 FOR LEM - LUNAR SPHERE OF INFLUENCE SCALING
058888,000110:                                                                                                  #  XXXXXEXXXXXE    X POSITION
058889,000111:                                                                                                  #  XXXXXEXXXXXE    Y POSITION
058890,000112:                                                                                                  #  XXXXXEXXXXXE    Z POSITION
058891,000113:                                                                                                  #  XXXXXEXXXXXE    X VELOCITY
058892,000114:                                                                                                  #  XXXXXEXXXXXE    Y VELOCITY
058893,000115:                                                                                                  #  XXXXXEXXXXXE    Z VELOCITY
058894,000116:                                                                                                  #  XXXXXEXXXXXE    TIME FROM AGC CLOCK ZERO
058895,000117:                                                                                                  #  V33E            VERB 33 TO SIGNAL THAT THE STATE VECTOR IS READY TO BE STORED.
058896,000118: 
058897,000119: 
058898,000120:                                                                                                  #  2. REFSMMAT(ALL DATA ENTRIES IN OCTAL)
058899,000121:                                                                                                  #  ENTRIES:        DATA DEFINITIONS:                                       SCALE FACTORS:

Page 1376

058901,000123:                                                                                                  #  V71E            CONTIGUOUS BLOCK UPDATE VERB
058902,000124:                                                                                                  #     24E          NUMBER OF COMPONENTS FOR REFSMMAT UPDATE
058903,000125:                                                                                                  #   AAAAE          ECADR OF 'REFSMMAT'
058904,000126:                                                                                                  #  XXXXXEXXXXXE    ROW 1 COLUMN 1                                          2(-1)
058905,000127:                                                                                                  #  XXXXXEXXXXXE    ROW 1 COLUMN 2                                          2(-1)
058906,000128:                                                                                                  #  XXXXXEXXXXXE    ROW 1 COLUMN 3                                          2(-1)
058907,000129:                                                                                                  #  XXXXXEXXXXXE    ROW 2 COLUMN 1                                          2(-1)
058908,000130:                                                                                                  #  XXXXXEXXXXXE    ROW 2 COLUMN 2                                          2(-1)
058909,000131:                                                                                                  #  XXXXXEXXXXXE    ROW 2 COLUMN 3                                          2(-1)
058910,000132:                                                                                                  #  XXXXXEXXXXXE    ROW 3 COLUMN 1                                          2(-1)
058911,000133:                                                                                                  #  XXXXXEXXXXXE    ROW 3 COLUMN 2                                          2(-1)
058912,000134:                                                                                                  #  XXXXXEXXXXXE    ROW 3 COLUMN 3                                          2(-1)
058913,000135:                                                                                                  #  V33E            VERB 33 TO SIGNAL THAT REFSMMAT IS READY TO BE STORED.
058914,000136: 
058915,000137: 07,3776                                           BANK     07                                    
058916,000138: 43,2000                                           SETLOC   EXTVERBS                              
058917,000139: 43,2000                                           BANK                                           
058918,000140: 
058919,000141: 43,3757  E3,1706                                  EBANK=   TEPHEM                                
058920,000142: 
058921,000143: 43,3757                                           COUNT*   $$/P27                                
058922,000144: 43,3757           34755        V70UPDAT           CAF      UP70                                  #  COMES HERE ON V70E
058923,000145: 43,3760           13766                           TCF      V73UPDAT   +1                         
058924,000146: 
058925,000147: 
058926,000148: 43,3761           34753        V71UPDAT           CAF      UP71                                  #  COMES HERE ON V71E
058927,000149: 43,3762           13766                           TCF      V73UPDAT   +1                         
058928,000150: 
058929,000151: 
058930,000152: 43,3763           34752        V72UPDAT           CAF      UP72                                  #  COMES HERE ON V72E
058931,000153: 43,3764           13766                           TCF      V73UPDAT   +1                         
058932,000154: 
058933,000155: 
058934,000156: 43,3765           36250        V73UPDAT           CAF      UP73                                  #  COMES HERE ON V73E
058935,000157: 
058936,000158: 43,3766           55165                 +1        TS       UPVERBSV                              #  SAVE UPVERB UNTIL IT'S OK TO ENTER P27
058937,000159: 
058938,000160: 43,3767           02076                           TC       TESTXACT                              #  GRAB DISPLAY IF AVAILABLE, OTHERWISE
058939,000161:                                                                                                  #  TURN*OPERATOR ERROR* ON AND TERMINATEJOB
058940,000162: 
058941,000163: 43,3770           04635                           TC       POSTJUMP                              #  LEAVE EXTENDED VERB BANK AND
058942,000164: 43,3771           11374                           CADR     UPPART2                               #  GO TO UPDATE PROGRAM(P27) BANK.
058943,000165: 
058944,000166: 
058945,000167: 43,3772     4755               UP70               EQUALS   ZERO                                  
058946,000168: 43,3772     4753               UP71               EQUALS   ONE                                   
058947,000169: 43,3772     4752               UP72               EQUALS   TWO                                   
058948,000170: 43,3772     6250               UP73               EQUALS   THREE                                 
058949,000171: 

Page 1377

058951,000173: 04,3374                                           BANK     04                                    
058952,000174: 04,2000                                           SETLOC   UPDATE2                               
058953,000175: 04,2000                                           BANK                                           
058954,000176: 
058955,000177: 04,3374                                           COUNT*   $$/P27                                
058956,000178: 
058957,000179: 04,3374                        UPPART2            EQUALS                                         #  UPDATE PROGRAM - PART 2
058958,000180: 
058959,000181: 04,3374           31010                           CA       MODREG                                #  IS UPDATE ALLOWED AT THIS TIME?
058960,000182: 04,3375           00006                           EXTEND                                         #  IS MODREG +0 (POOH) OR -0 (FRESH START)?
058961,000183: 04,3376           13400                           BZF      UPDATOK                               
058962,000184: 
058963,000185: 04,3377           03766        UPERROR            TC       UPERROUT   +2                         #  TURN ON OPERATOR ERROR LIGHT AND EXIT
058964,000186: 
058965,000187: 04,3400           55170        UPDATOK            TS       UPOLDMOD                              
058966,000188: 
058967,000189: 04,3401           31165                           CAE      UPVERBSV                              #  SET UPVERB TO TELL P27 WHICH EXTENDED
058968,000190: 04,3402           55171                           TS       UPVERB                                #    VERB CALLED IT
058969,000191: 
058970,000192: 04,3403           34753                           CAF      ONE                                   
058971,000193: 04,3404           55172                           TS       UPCOUNT                               
058972,000194: 
058973,000195: 04,3405           05364                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO RESTORE OLD MODE
058974,000196: 04,3406           07026                           OCT      07026                                 #  AND DOWNLIST AND EXIT IF RESTART OCCURS.
058975,000197: 04,3407           30000                           OCT      30000                                 #  PRIORITY SAME AS CHRPRIO
058976,000198: 04,3410     1173                                  EBANK=   UPBUFF                                
058977,000199: 04,3410           03716 10102                     2CADR    UPOUT      +1                         
058978,000200: 
058979,000201: 
058980,000202: 04,3412           34753                           CAF      ONE                                   
058981,000203: 04,3413           54333                           TS       DNLSTCOD                              #  DOWNLIST
058982,000204: 
058983,000205: 04,3414           05322                           TC       NEWMODEX                              #  SET MAJOR MODE = 27
058984,000206: 04,3415           00033                           DEC      27         B-14                       
058985,000207: 
058986,000208: 04,3416           51171                           INDEX    UPVERB                                #  BRANCH DEPENDING ON WHETHER THE UPDATE
058987,000209: 04,3417           13420                           TCF      +1                                    #  VERB REQUIRES A FIXED OR VARIABLE NUMBER
058988,000210: 04,3420           13423                           TCF      +3                                    #  V70 FIXED.               (OF COMPONENTS.
058989,000211: 04,3421           13426                           TCF      OHWELL1                               #  V71 VARIABLE - GO GET NO. OF COMPONENTS
058990,000212: 04,3422           13426                           TCF      OHWELL1                               #  V72 VARIABLE - GO GET NO. OF COMPONENTS
058991,000213: 04,3423           34752                           CA       TWO                                   #  V73 (AND V70) FIXED
058992,000214: 04,3424           55167                           TS       COMPNUMB                              #  SET NUMBER OF COMPONENTS TO 2.
058993,000215: 04,3425           13451                           TCF      OHWELL2                               #  GO GET THE TWO UPDATE COMPONENTS
058994,000216: 
058995,000217: 04,3426           33521        OHWELL1            CAF      ADUPBUFF                              #  * REQUEST USER TO SEND NUMBER  *
058996,000218: 04,3427           54156                           TS       MPAC       +2                         #  * OF COMPONENTS PARAMETER(II). *
058997,000219: 04,3430           33522                 +2        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058998,000220: 04,3431           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
058999,000221: 04,3432           20334                           CADR     GOXDSPF                               #  TO REQUEST II.
059000,000222: 04,3433           13716                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN

Page 1378

059002,000224: 04,3434           13430                           TCF      OHWELL1    +2                         
059003,000225: 04,3435           03512                           TC       CK4V32                                #  DATA OR V32 RETURN
059004,000226: 04,3436           44752                           CS       BIT2                                  
059005,000227: 04,3437           61173                           AD       UPBUFF                                #  IS II(NUMBER OF COMPONENTS PARAMETER)
059006,000228: 04,3440           00006                           EXTEND                                         #  .GE. 3 AND .LE. 20D.
059007,000229: 04,3441           63430                           BZMF     OHWELL1    +2                         
059008,000230: 04,3442           41173                           CS       UPBUFF                                
059009,000231: 04,3443           64362                           AD       UP21                                  
059010,000232: 04,3444           00006                           EXTEND                                         
059011,000233: 04,3445           63430                           BZMF     OHWELL1    +2                         
059012,000234: 04,3446           31173                           CAE      UPBUFF                                
059013,000235: 04,3447           55167                           TS       COMPNUMB                              #  SAVE II IN COMPNUMB
059014,000236: 
059015,000237: 
059016,000238:                                                                                                  #           UPBUFF LOADING SEQUENCE
059017,000239: 
059018,000240: 04,3450           25172                           INCR     UPCOUNT                               #  INCREMENT COUNT OF COMPONENTS RECEIVED.
059019,000241: 04,3451           33666        OHWELL2            CAF      ADUPBFM1                              #  CALCULATE LOCATION(ECADR) IN UPBUFF
059020,000242: 04,3452           61172                           AD       UPCOUNT                               #  WHERE NEXT COMPONENT SHOULD BE STORED.
059021,000243: 04,3453           54156                 +2        TS       MPAC       +2                         #  PLACE ECADR INTO R3.
059022,000244: 04,3454           33522                 +3        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
059023,000245: 04,3455           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
059024,000246: 04,3456           20334                           CADR     GOXDSPF                               #  TO REQUEST DATA.
059025,000247: 04,3457           13716                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE(P27) RETURN.
059026,000248: 04,3460           13454                           TCF      OHWELL2    +3                         #  V33 PROCEED RETURN
059027,000249: 04,3461           03512                           TC       CK4V32                                #  DATA OR V32 RETURN
059028,000250: 04,3462           41172                           CS       UPCOUNT                               #  HAVE WE FINISHED RECEIVING ALL
059029,000251: 04,3463           61167                           AD       COMPNUMB                              #  THE DATA WE EXPECTED.
059030,000252: 04,3464           00006                           EXTEND                                         
059031,000253: 04,3465           63467                           BZMF     UPVERIFY                              #  YES- GO TO VERIFICATION SEQUENCE
059032,000254: 04,3466           13450                           TCF      OHWELL2    -1                         #  NO- REQUEST ADDITIONAL DATA.
059033,000255: 
059034,000256: 
059035,000257:                                                                                                  #           VERIFY SEQUENCE
059036,000258: 
059037,000259: 04,3467           33520        UPVERIFY           CAF      ADUPTEMP                              #  PLACE ECADR WHERE COMPONENT NO. INDEX
059038,000260: 04,3470           54156                           TS       MPAC       +2                         #  IS TO BE STORED INTO R3.
059039,000261: 04,3471           33523                           CAF      UPVRFYNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
059040,000262: 04,3472           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N02 TO REQUEST
059041,000263: 04,3473           20334                           CADR     GOXDSPF                               #  DATA CORRECTION OR VERIFICATION.
059042,000264: 04,3474           13716                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE(P27) RETURN
059043,000265: 04,3475           13524                           TCF      UPSTORE                               #  V33 DATA SENT IS GOOD. GO STORE IT.
059044,000266: 04,3476           03512                           TC       CK4V32                                #  COMPONENT NO. INDEX OR V32 RETURN
059045,000267: 04,3477           31166                           CA       UPTEMP                                #  DOES THE COMPONENT NO. INDEX JUST SENT
059046,000268: 04,3500           00006                           EXTEND                                         #  SPECIFY A LEGAL COMPONENT NUMBER?
059047,000269: 04,3501           63467                           BZMF     UPVERIFY                              #  NO, IT IS NOT POSITIVE NONZERO
059048,000270: 04,3502           41166                           CS       UPTEMP                                
059049,000271: 04,3503           61167                           AD       COMPNUMB                              
059050,000272: 04,3504           64753                           AD       BIT1                                  
059051,000273: 04,3505           00006                           EXTEND                                         

Page 1379

059053,000275: 04,3506           63467                           BZMF     UPVERIFY                              #  NO
059054,000276: 04,3507           33666                           CAF      ADUPBFM1                              #  YES- BASED ON THE COMPONENT NO. INDEX
059055,000277: 04,3510           61166                           AD       UPTEMP                                #  CALCULATE THE ECADR OF LOCATION IN
059056,000278: 04,3511           13453                           TCF      OHWELL2    +2                         #  UPBUFF WHICH USER WANTS TO CHANGE.
059057,000279: 
059058,000280: 04,3512  04,3716               UPOUT4             EQUALS   UPOUT      +1                         #  COMES HERE ON V34 TO TERMINATE UPDATE
059059,000281: 
059060,000282: 
059061,000283:                                                                                                  #           CHECK FOR VERB 32 SEQUENCE
059062,000284: 
059063,000285: 04,3512           40154        CK4V32             CS       MPAC                                  #  ON DATA RETURN FROM 'GOXDSPF'
059064,000286: 04,3513           74746                           MASK     BIT6                                  #  ON DATA RETURN FROM "GOXDSP"& THE CON-
059065,000287: 04,3514           10000                           CCS      A                                     #  TENTS OF MPAC = VERB.  SO TEST FOR V32.
059066,000288: 04,3515           00002                           TC       Q                                     #  IT'S NOT A V32, IT'S DATA.  PROCEED.
059067,000289: 04,3516           50002                           INDEX    Q                                     
059068,000290: 04,3517           77771                           TC       0          -6                         #  V32 ENCOUNTERED - GO BACK AND GET DATA
059069,000291: 
059070,000292: 04,3520           01166        ADUPTEMP           ADRES    UPTEMP                                #  ADDRESS OF TEMP STORAGE FOR CORRECTIONS
059071,000293: 04,3521           01173        ADUPBUFF           ADRES    UPBUFF                                #  ADDRESS OF UPDATE DATA STORAGE BUFFER
059072,000294: 04,3522           05201        UPLOADNV           VN       2101                                  #  VERB 21 NOUN 01
059073,000295: 04,3523           05202        UPVRFYNV           VN       2102                                  #  VERB 21 NOUN 02
059074,000296: 04,3524     4362               UP21               =        MD1                                   #  DEC 21 = MAX NO OF COMPONENTS +1
059075,000297: 04,3524     4756               UPDTPHAS           EQUALS   FIVE                                  
059076,000298: 
059077,000299:                                                                                                  #           PRE-STORE AND FAN TO APPROPRIATE BRANCH SEQUENCE
059078,000300: 
059079,000301: 04,3524                        UPSTORE            EQUALS                                         #  GROUND HAS VERIFIED UPDATE. STORE DATA.
059080,000302: 
059081,000303: 04,3524           00004                           INHINT                                         
059082,000304: 
059083,000305: 04,3525           30103                           CAE      FLAGWRD7                              #  INVERT VERIFLAG(BIT3 OF FLAGWRD7) TO
059084,000306: 04,3526           56001                           XCH      L                                     #  INDICATE TO THE GROUND(VIA DOWNLINK)
059085,000307: 04,3527           34751                           CAF      VERIFBIT                              #  THAT THE V33 (WHICH THE GROUND SENT TO
059086,000308: 04,3530           00006                           EXTEND                                         #  VERIFY THE UPDATE) HAS BEEN SUCCESSFULLY
059087,000309: 04,3531           06001                           RXOR     LCHAN                                 #  RECEIVED BY THE UPDATE PROGRAM
059088,000310: 04,3532           54103                           TS       FLAGWRD7                              
059089,000311: 
059090,000312: 04,3533           05364                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO REDO THE UPDATE
059091,000313: 04,3534           04026                           OCT      04026                                 #  DATA STORE IF A RESTART OCCURS.
059092,000314: 04,3535           00004                           INHINT                                         #  (BECAUSE PHASCHNG DID A RELINT)
059093,000315: 
059094,000316: 04,3536           44752                           CS       TWO                                   #  GO TO UPFNDVAC IF INSTALL IS REQUIRED,
059095,000317: 04,3537           61171                           AD       UPVERB                                #  THAT IS, IF IT'S A V70 - V72.
059096,000318: 04,3540           00006                           EXTEND                                         #  GO TO UPEND73 IF IT'S A V73.
059097,000319: 04,3541           63550                           BZMF     UPFNDVAC                              
059098,000320: 
059099,000321:                                                                                                  #           VERB 73 BRANCH
059100,000322: 
059101,000323: 04,3542           00006        UPEND73            EXTEND                                         #  V73-PERFORM DP OCTAL AGC CLOCK INCREMENT
059102,000324: 04,3543           31174                           DCA      UPBUFF                                

Page 1380

059104,000326: 04,3544           53204                           DXCH     UPBUFF     +8D                        
059105,000327: 04,3545           03573                           TC       TIMEDIDL                              
059106,000328: 04,3546           04364                           TC       FALTON                                #  ERROR- TURN ON *OPERATOR ERROR* LIGHT
059107,000329: 04,3547           03716                           TC       UPOUT      +1                         #  GO TO COMMON UPDATE PROGRAM EXIT
059108,000330: 
059109,000331: 04,3550           34355        UPFNDVAC           CAF      CHRPRIO                               #  (USE EXTENDED VERB PRIORITY)
059110,000332: 04,3551           05105                           TC       FINDVAC                               #  GET VAC AREA FOR 'CALL INTSTALL'
059111,000333: 04,3552  E3,1706                                  EBANK=   TEPHEM                                
059112,000334: 04,3552           03555 10103                     2CADR    UPJOB                                 #  (NOTE: THIS WILL ALSO SET EBANK FOR
059113,000335: 
059114,000336: 04,3554           05155                           TC       ENDOFJOB                              #  'TEPHEM' UPDATE BY V70)
059115,000337: 
059116,000338: 04,3555           06042        UPJOB              TC       INTPRET                               #  THIS COULD BE A STATE VECTOR UPDATE--SO
059117,000339: 04,3556           77624                           CALL                                           #  WAIT(PUT JOB TO SLEEP) IF ORBIT INT(OI)
059118,000340: 04,3557           27410                                    INTSTALL                              #  IS IN PROGRESS--OR--GRAB OI AND RETURN
059119,000341:                                                                                                  #  TO UPWAKE IF OI IS NOT IN PROGRESS.
059120,000342: 
059121,000343: 04,3560           77776        UPWAKE             EXIT                                           
059122,000344: 
059123,000345: 04,3561           05364                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
059124,000346: 04,3562           04026                           OCT      04026                                 
059125,000347: 
059126,000348: 04,3563           05515                           TC       UPFLAG                                #  SET INTEGRATION RESTART BIT
059127,000349: 04,3564           00236                           ADRES    REINTFLG                              
059128,000350: 04,3565           00004                           INHINT                                         
059129,000351: 04,3566                        UPPART3            EQUALS                                         
059130,000352: 
059131,000353: 04,3566           51171                           INDEX    UPVERB                                #  BRANCH TO THE APPROPRIATE UPDATE VERB
059132,000354: 04,3567           13570                           TCF      +1                                    #  ROUTINE TO ACTUALLY PERFORM THE UPDATE
059133,000355: 04,3570           13727                           TCF      UPEND70                               #  V70
059134,000356: 04,3571           13636                           TCF      UPEND71                               #  V71
059135,000357: 04,3572           13670                           TCF      UPEND72                               #  V72
059136,000358: 
059137,000359: 
059138,000360:                                                                                                  #           ROUTINE TO INCREMENT CLOCK(TIME2,TIME1) WITH CONTENTS OF DP WORD AT UPBUFF.
059139,000361: 
059140,000362: 04,3573           00006        TIMEDIDL           EXTEND                                         
059141,000363: 04,3574           23166                           QXCH     UPTEMP                                #  SAVE Q FOR RETURN
059142,000364: 04,3575           34755                           CAF      ZERO                                  #  ZERO AND SAVE TIME2,TIME1
059143,000365: 04,3576           22007                           ZL                                             
059144,000366: 04,3577           52025                           DXCH     TIME2                                 
059145,000367: 04,3600           53216                           DXCH     UPBUFF     +18D                       #  STORE IN CASE OF OVERFLOW
059146,000368: 
059147,000369: 04,3601           34756                           CAF      UPDTPHAS                              #  DO
059148,000370: 04,3602           54001                           TS       L                                     #  A
059149,000371: 04,3603           40000                           COM                                            #  QUICK
059150,000372: 04,3604           52764                           DXCH     -PHASE6                               #  PHASCHNG
059151,000373: 
059152,000374: 04,3605           00004        TIMEDIDR           INHINT                                         

Page 1381

059154,000376: 04,3606           34755                           CAF      ZERO                                  
059155,000377: 04,3607           22007                           ZL                                             #  PICK UP INCREMENTER(AND ZERO
059156,000378: 04,3610           54156                           TS       MPAC       +2                         #  IT IN CASE OF RESTARTS) AND
059157,000379: 04,3611           53204                           DXCH     UPBUFF     +8D                        #  STORE IT
059158,000380: 04,3612           52155                           DXCH     MPAC                                  #  INTO MPAC FOR TPAGREE.
059159,000381: 
059160,000382: 04,3613           00006                           EXTEND                                         
059161,000383: 04,3614           31216                           DCA      UPBUFF     +18D                       
059162,000384: 04,3615           20155                           DAS      MPAC                                  #  FORM SUM IN MPAC
059163,000385: 04,3616           00006                           EXTEND                                         
059164,000386: 04,3617           13626                           BZF      DELTATOK                              #  TEST FOR OVERFLOW
059165,000387: 04,3620           34755                           CAF      ZERO                                  
059166,000388: 04,3621           53216                           DXCH     UPBUFF     +18D                       #  OVERFLOW, RESTORE OLD VALUE OF CLOCK
059167,000389: 04,3622           20025                           DAS      TIME2                                 #  AND TURN ON OPERATOR ERROR
059168,000390: 
059169,000391: 04,3623           05364                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
059170,000392: 04,3624           04026                           OCT      04026                                 
059171,000393: 
059172,000394: 04,3625           01166                           TC       UPTEMP                                #  GO TO ERROR EXIT
059173,000395: 
059174,000396: 04,3626           07262        DELTATOK           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
059175,000397: 04,3627           52155                           DXCH     MPAC                                  
059176,000398: 04,3630           20025                           DAS      TIME2                                 #  INCREMENT TIME2,TIME1
059177,000399: 
059178,000400: 04,3631           05364                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
059179,000401: 04,3632           04026                           OCT      04026                                 
059180,000402: 
059181,000403: 04,3633           00004                           INHINT                                         
059182,000404: 04,3634           51166                           INDEX    UPTEMP                                #  (CODED THIS WAY FOR RESTART PROTECTION)
059183,000405: 04,3635           00001                           TC       1                                     #  NORMAL RETURN
059184,000406:                                                                                                  #           VERB 71 BRANCH
059185,000407: 
059186,000408: 04,3636           31174        UPEND71            CAE      UPBUFF     +1                         #  SET EBANK
059187,000409: 04,3637           54003                           TS       EBANK                                 #     AND
059188,000410: 04,3640           74357                           MASK     LOW8                                  #  CALCULATE
059189,000411: 04,3641           55166                           TS       UPTEMP                                #  S-REG VALUE OF RECEIVING AREA
059190,000412: 
059191,000413: 04,3642           67750                           AD       NEG3                                  #  IN THE PROCESS OF
059192,000414: 04,3643           61167                           AD       COMPNUMB                              #  PERFORMING
059193,000415: 04,3644           00006                           EXTEND                                         #  THIS UPDATE
059194,000416: 04,3645           13653                           BZF      STORLP71                              #  WILL WE
059195,000417: 04,3646           74743                           MASK     BIT9                                  #  OVERFLOW
059196,000418: 04,3647           10000                           CCS      A                                     #  INTO THE NEXT EBANK....
059197,000419: 04,3650           13764                           TCF      UPERROUT                              #  YES
059198,000420: 
059199,000421: 04,3651           37750                           CA       NEG3                                  #  NO- CALCULATE NUMBER OF
059200,000422: 04,3652           61167                           AD       COMPNUMB                              #  WORDS TO BE STORED MINUS ONE
059201,000423: 04,3653           54154        STORLP71           TS       MPAC                                  #  SAVE NO. OF WORDS REMAINING MINUS ONE
059202,000424: 04,3654           50000                           INDEX    A                                     #  TAKE NEXT UPDATE WORD FROM
059203,000425: 04,3655           31175                           CA       UPBUFF     +2                         #  UPBUFF AND

Page 1382

059205,000427: 04,3656           54001                           TS       L                                     #  SAVE IT IN L
059206,000428: 04,3657           30154                           CA       MPAC                                  #  CALCULATE NEXT
059207,000429: 04,3660           61166                           AD       UPTEMP                                #  RECEIVING ADDRESS
059208,000430: 04,3661           50000                           INDEX    A                                     
059209,000431: 04,3662  E3,1400                                  EBANK=   1400                                  
059210,000432: 04,3662           23400                           LXCH     1400                                  #  UPDATE THE REGISTER  BY CONTENTS OF L
059211,000433: 04,3663  E3,1706                                  EBANK=   TEPHEM                                
059212,000434: 04,3663           10154                           CCS      MPAC                                  #  ARE THERE ANY WORDS LEFT TO BE STORED
059213,000435: 04,3664           13653                           TCF      STORLP71                              #  YES
059214,000436: 04,3665           13715                           TCF      UPOUT                                 #  NO- THEN EXIT UPDATE PROGRAM
059215,000437: 04,3666           01172        ADUPBFM1           ADRES    UPBUFF     -1                         #  SAME AS ADUPBUFF BUT LESS 1 (DON'T MOVE)
059216,000438: 04,3667           13715                           TCF      UPOUT                                 #  NO- EXIT UPDATE(HERE WHEN COMPNUMB = 3)
059217,000439: 
059218,000440: 
059219,000441:                                                                                                  #           VERB 72 BRANCH
059220,000442: 
059221,000443: 04,3670           34753        UPEND72            CAF      BIT1                                  #  HAVE AN ODD NO. OF COMPONENTS
059222,000444: 04,3671           71167                           MASK     COMPNUMB                              #  BEEN SENT FOR A V72 UPDATE...
059223,000445: 04,3672           10000                           CCS      A                                     
059224,000446: 04,3673           13675                           TCF      +2                                    #  YES
059225,000447: 04,3674           13764                           TCF      UPERROUT                              #  ERROR- SHOULD BE ODD NO. OF COMPONENTS
059226,000448: 04,3675           44752                           CS       BIT2                                  
059227,000449: 04,3676           61167                           AD       COMPNUMB                              
059228,000450: 04,3677           54154        LDLOOP72           TS       MPAC                                  #  NOW PERFORM THE UPDATE
059229,000451: 04,3700           50000                           INDEX    A                                     
059230,000452: 04,3701           31174                           CAE      UPBUFF     +1                         #  PICK UP NEXT UPDATE WORD
059231,000453: 04,3702           22000                           LXCH     A                                     
059232,000454: 04,3703           10154                           CCS      MPAC                                  #  SET POINTER TO ECADR(MUST BE CCS)
059233,000455: 04,3704           54154                           TS       MPAC                                  
059234,000456: 04,3705           50000                           INDEX    A                                     
059235,000457: 04,3706           31174                           CAE      UPBUFF     +1                         #  PICK UP NEXT ECADR OF REG TO BE UPDATED
059236,000458: 04,3707           54003                           TS       EBANK                                 #  SET EBANK
059237,000459: 04,3710           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
059238,000460: 04,3711           50000                           INDEX    A                                     
059239,000461: 04,3712  E3,1400                                  EBANK=   1400                                  
059240,000462: 04,3712           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
059241,000463: 04,3713  E3,1706                                  EBANK=   TEPHEM                                
059242,000464: 04,3713           10154                           CCS      MPAC                                  #  ARE WE THROUGH THE V72 UPDATE...
059243,000465: 04,3714           13677                           TCF      LDLOOP72                              #  NO
059244,000466: 
059245,000467: 
059246,000468:                                                                                                  #           NORMAL FINISH OF P27
059247,000469: 
059248,000470: 04,3715                        UPOUT              EQUALS                                         
059249,000471: 04,3715           03137                           TC       INTWAKEU                              #  RELEASE  GRAB  OF ORBITAL INTEGRATION
059250,000472: 04,3716           31170                 +1        CAE      UPOLDMOD                              #  RESTORE PRIOR P27 MODE
059251,000473: 04,3717           05325                           TC       NEWMODEX   +3                         
059252,000474: 04,3720           34755                           CAF      ZERO                                  
059253,000475: 04,3721           54333                           TS       DNLSTCOD                              
059254,000476: 04,3722           03771                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT

Page 1383

059256,000478: 04,3723           00006                           EXTEND                                         #  KILL GROUP 6.
059257,000479: 04,3724           34755                           DCA      NEG0                                  
059258,000480: 04,3725           52764                           DXCH     -PHASE6                               
059259,000481: 
059260,000482: 04,3726           05503                           TC       ENDEXT                                #  EXTENDED VERB EXIT
059261,000483: 
059262,000484: 
059263,000485:                                                                                                  #           VERB 70 BRANCH
059264,000486: 
059265,000487: 04,3727           00006        UPEND70            EXTEND                                         #  V70 DOES THE FOLLOWING WITH DP DELTA
059266,000488: 04,3730           41174                           DCS      UPBUFF                                #  TIME IN UPBUFF
059267,000489: 04,3731           53204                           DXCH     UPBUFF     +8D                        
059268,000490: 04,3732           03573                           TC       TIMEDIDL                              #  DECREMENT AGC CLOCK
059269,000491: 
059270,000492: 04,3733           03764                           TC       UPERROUT                              #  ERROR WHILE DECREMENTING CLOCK -- EXIT
059271,000493: 
059272,000494: 04,3734  E3,1706                                  EBANK=   TEPHEM                                
059273,000495: 04,3734           00006                           EXTEND                                         
059274,000496: 04,3735           41174                           DCS      UPBUFF                                #  COPY DECREMENTERS FOR
059275,000497: 04,3736           53206                           DXCH     UPBUFF     +10D                       #  RESTART PROTECTION
059276,000498: 04,3737           00006                           EXTEND                                         
059277,000499: 04,3740           41174                           DCS      UPBUFF                                
059278,000500: 04,3741           53210                           DXCH     UPBUFF     +12D                       
059279,000501: 
059280,000502: 04,3742           05364                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
059281,000503: 04,3743           04026                           OCT      04026                                 
059282,000504: 
059283,000505: 04,3744           34755                           CAF      ZERO                                  
059284,000506: 04,3745           22007                           ZL                                             
059285,000507: 04,3746           53206                           DXCH     UPBUFF     +10D                       #  DECREMENT CSM STATE VECTOR TIME
059286,000508: 04,3747           21571                           DAS      TETCSM                                
059287,000509: 
059288,000510: 04,3750           34755                           CAF      ZERO                                  
059289,000511: 04,3751           22007                           ZL                                             
059290,000512: 04,3752           53210                           DXCH     UPBUFF     +12D                       #  DECREMENT LEM STATE VECTOR TIME
059291,000513: 04,3753           21643                           DAS      TETLEM                                
059292,000514: 
059293,000515: 04,3754           34755                           CAF      ZERO                                  
059294,000516: 04,3755           22007                           ZL                                             
059295,000517: 04,3756           53174                           DXCH     UPBUFF                                
059296,000518: 04,3757           21710                           DAS      TEPHEM     +1                         #  INCREMENT TP TEPHEM
059297,000519: 04,3760           27706                           ADS      TEPHEM                                
059298,000520: 
059299,000521: 04,3761           05364                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
059300,000522: 04,3762           04026                           OCT      04026                                 
059301,000523: 
059302,000524: 04,3763     1173                                  EBANK=   UPBUFF                                
059303,000525: 
059304,000526: 04,3763           03715                           TC       UPOUT                                 #  GO TO STANDARD UPDATE PROGRAM EXIT
059305,000527: 

Page 1384

059307,000529:                                                                                                  #           ERROR SEQUENCE
059308,000530: 
059309,000531: 04,3764           04364        UPERROUT           TC       FALTON                                #  TURN ON *OPERATOR ERROR* LIGHT
059310,000532: 04,3765           13715                           TCF      UPOUT                                 #  GO TO COMMON UPDATE PROGRAM EXIT
059311,000533: 
059312,000534: 04,3766           04364                 +2        TC       FALTON                                #  TURN ON 'OPERATOR ERROR' LIGHT
059313,000535: 04,3767           03771                           TC       UPACTOFF                              #  TURN OFF'UPLINK ACTIVITY'LIGHT
059314,000536: 04,3770           05503                           TC       ENDEXT                                #  EXTENDED VERB EXIT
059315,000537:                                                                                                  #  (THE PURPOSE OF UPERROUT +2 EXIT IS
059316,000538:                                                                                                  #  TO PROVIDE AN ERROR EXIT WHICH DOES NOT
059317,000539:                                                                                                  #  RESET ANY RESTART GROUPS)
059318,000540: 
059319,000541: 
059320,000542: 
059321,000543:                                                                                                  #           :UPACTOFF: IS A ROUTINE TO TURN OFF UPLINK ACTIVITY LIGHT ON ALL EXITS FROM UPDATE PROGRAM(P27).
059322,000544: 
059323,000545: 04,3771           44751        UPACTOFF           CS       BIT3                                  
059324,000546: 04,3772           00006                           EXTEND                                         #  TURN OFF UPLINK ACTIVITY LIGHT
059325,000547: 04,3773           03011                           WAND     DSALMOUT                              #  (BIT 3 OF CHANNEL 11)
059326,000548: 04,3774           00002                           TC       Q                                     

End of include-file UPDATE_PROGRAM.agc.  Parent file is MAIN.agc