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.

058880,000002:                                                                                                  ## Copyright:   Public domain.
058881,000003:                                                                                                  ## Filename:    UPDATE_PROGRAM.agc
058882,000004:                                                                                                  ## Purpose:     A section of Luminary revision 178.
058883,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
058884,000006:                                                                                                  ##              release of the flight software for the Lunar Module's
058885,000007:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
058886,000008:                                                                                                  ##              code has been recreated from copies of Zerlina 56, Luminary
058887,000009:                                                                                                  ##              210, and Luminary 131, as well as many Luminary memos.
058888,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
058889,000011:                                                                                                  ##              exactly match those specified for Luminary 178 in NASA
058890,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
058891,000013:                                                                                                  ##              that the reconstruction is correct.
058892,000014:                                                                                                  ## Reference:   pp. 1374-1384
058893,000015:                                                                                                  ## Assembler:   yaYUL
058894,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
058895,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
058896,000018:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Zerlina 56.
058897,000019:                                                                                                  ##              2021-05-30 ABS  DELTAOK -> DELTATOK
058898,000020: 

Page 1374

058900,000022:                                                                                                  #  PROGRAM NAME:   P27
058901,000023:                                                                                                  #  WRITTEN BY:     KILROY/ DE WOLF
058902,000024: 
058903,000025:                                                                                                  #  MOD NO:         6
058904,000026:                                                                                                  #  MOD BY:         KILROY
058905,000027:                                                                                                  #  DATE:           01DEC67
058906,000028: 
058907,000029:                                                                                                  #  LOG SECTION:    UPDATE PROGRAM.
058908,000030: 
058909,000031:                                                                                                  #  FUNCT. DESCR:   P27 (THE UPDATE PROGRAM) PROCESSES COMMANDS AND DATA
058910,000032:                                                                                                  #                      INSERTIONS REQUESTED BY THE GROUND VIA UPLINK.
058911,000033:                                                                                                  #                      THE P27 PROGRAM WILL ACCEPT UPDATES
058912,000034:                                                                                                  #                      ONLY DURING P00 FOR THE LM, AND ONLY DURING P00,
058913,000035:                                                                                                  #                  P02, AND FRESH START FOR THE CSM
058914,000036: 
058915,000037:                                                                                                  #  CALLING SEQ:    PROGRAM IS INITIATED BY UPLINK ENTRY OF VERBS 70, 71, 72 AND 73.
058916,000038: 
058917,000039:                                                                                                  #  SUBROUTINES:    TESTXACT, NEWMODEX, NEWMODEX +3, GOXDSPF, BANKCALL, FINDVAC, INTPRET, INTSTALL, TPAGREE,
058918,000040:                                                                                                  #                  INTWAKEU, ENDEXT, POSTJUMP, FALTON, NEWPHASE, PHASCHNG
058919,000041: 
058920,000042:                                                                                                  #  NORMAL EXIT:    TC ENDEXT
058921,000043: 
058922,000044:                                                                                                  #  ALARM/ABORT:    TC FALTON FOLLOWED BY TC ENDEXT
058923,000045: 
058924,000046:                                                                                                  #  RESTARTS:       P27 IS RESTART PROTECTED IN TWO WAYS...
058925,000047:                                                                                                  #                  1. PRIOR TO VERIFLAG INVERSION(WHICH IS CAUSED BY THE GROUND/ASTRONAUT'S VERIFICATION OF UPDATE
058926,000048:                                                                                                  #                     DATA BY SENDING A V33E WHEN V21N02 IS FLASHING)---
058927,000049:                                                                                                  #                     NO PROTECTION EXCEPT PRE-P27 MODE IS RESTORED, COAST + ALIGN DOWNLIST IS SELECTED AND UPLINK
058928,000050:                                                                                                  #                     ACTIVITY LIGHT IS TURNED OFF.(JUST AS IF A V34E WAS SENT DURING P27 DATA LOADS).
058929,000051:                                                                                                  #                     V70,V71,V72 OR V73 WILL HAVE TO BE COMPLETELY RESENT BY USER.
058930,000052:                                                                                                  #                  2. AFTER VERIFLAG INVERSION(WHEN UPDATE OF THE SPECIFIED ERASABLES IS BEING PERFORMED)---
058931,000053:                                                                                                  #                     PROTECTED AGAINST RESTARTS.
058932,000054: 
058933,000055:                                                                                                  #  DEBRIS:         UPBUFF   (20D)  TEMP STORAGE FOR ADDRESSES AND CONTENTS.
058934,000056:                                                                                                  #                  UPVERB   (1)    VERB NUMBER MINUS 70D (E.G. FOR V72, UPVERB = 72D - 70D = 2)
058935,000057:                                                                                                  #                  UPOLDMOD (1)    FOR MAJOR MODE INTERRUPTED BY P27.
058936,000058:                                                                                                  #                  COMPNUMB (1)    TOTAL NUMBER OF COMPONENTS TO BE TRANSMITTED.
058937,000059:                                                                                                  #                  UPCOUNT  (1)    ACTUAL NUMBER OF COMPONENTS RECEIVED.
058938,000060:                                                                                                  #                  UPTEMP   (1)    SCRATCH, BUT USUALLY CONTAINS COMPONENT NUMBER TO BE CHANGED DURING VERIFY CYCLE
058939,000061: 
058940,000062: 
058941,000063:                                                                                                  #  INPUT:
058942,000064: 
058943,000065:                                                                                                  #        ENTRY:      DESCRIPTION
058944,000066: 
058945,000067:                                                                                                  #   V70EXXXXXEXXXXXE (LIFTOFF TIME INCREMENT) DOUBLE PRECISION OCTAL TIME INCREMENT, XXXXX XXXXX,
058946,000068:                                                                                                  #                    IS ADDED TO TEPHEM, SUBTRACTED FROM AGC CLOCK(TIME2,TIME1), SUBTRACTED FROM CSM STATE
058947,000069:                                                                                                  #                    VECTOR TIME(TETCSM) AND SUBTRACTED FROM LEM STATE VECTOR TIME(TETLEM).
058948,000070:                                                                                                  #                    THE DP OCTAL TIME INCREMENT IS SCALED AT 2(28).

Page 1375

058950,000072:                                                                                                  #   V71EIIEAAAAE     (CONTIGUOUS BLOCK UPDATE) II-2 OCTAL COMPONENTS,XXXXX,
058951,000073:                                                                                                  #   XXXXXE           ARE LOADED INTO ERASABLE STARTING AT ECADR, AAAA.
058952,000074:                                                                                                  #  XXXXXE            IT IS .GE. 3 .AND. .LE. 20D.,
058953,000075:                                                                                                  #                    AND (AAAA + II - 3) DOES NOT PRODUCE AN ADDRESS IN THE
058954,000076:                                                                                                  #  9 NEXT BANK
058955,000077:                                                                                                  #    .               SCALING IS SAME AS INTERNAL REGISTERS.
058956,000078: 
058957,000079:                                                                                                  #   V72EIIE          (SCATTER UPDATE) (II-1)/2 OCTAL COMPONENTS,XXXXX, ARE
058958,000080:                                                                                                  #   AAAAEXXXXXE      LOADED INTO ERASABLE LOCATIONS, AAAA.
058959,000081:                                                                                                  #   AAAAEXXXXXE      II IS .GE. 3 .AND. .LE. 19D, AND MUST BE ODD.
058960,000082:                                                                                                  #    .               SCALING IS SAME AS INTERNAL REGISTERS.
058961,000083: 
058962,000084:                                                                                                  #   V73EXXXXXEXXXXXE (OCTAL CLOCK INCREMENT) DOUBLE PRECISION OCTAL TIME
058963,000085:                                                                                                  #                    INCREMENT XXXXX XXXXX, IS ADDED TO THE AGC CLOCK, IN
058964,000086:                                                                                                  #                    CENTISECONDS SCALED AT (2)28.
058965,000087:                                                                                                  #                    THIS LOAD IS THE OCTAL EQUIVALENT OF V55.
058966,000088: 
058967,000089: 
058968,000090:                                                                                                  #  OUTPUT:         IN ADDITION TO THE ABOVE REGISTER LOADS, ALL UPDATES
058969,000091:                                                                                                  #                  COMPLEMENT BIT3 OF FLAGWORD7.
058970,000092: 
058971,000093: 
058972,000094:                                                                                                  #  ADDITIONAL NOTES: VERB 71, JUST DEFINED ABOVE WILL BE USED TO PERFORM BUT NOT LIMITED TO THE FOLLOWING UPDATES--
058973,000095: 
058974,000096:                                                                                                  #                  1. CSM/LM STATE VECTOR UPDATE
058975,000097:                                                                                                  #                  2. REFSMMAT UPDATE
058976,000098: 
058977,000099: 
058978,000100:                                                                                                  #           THE FOLLOWING COMMENTS DELINEATE EACH SPECIAL UPDATE----
058979,000101: 
058980,000102:                                                                                                  #  1. CSM/LM STATE VECTOR UPDATE(ALL DATA ENTRIES IN OCTAL)
058981,000103: 
058982,000104:                                                                                                  #  ENTRIES:        DATA DEFINITION:                                        SCALE FACTORS:
058983,000105:                                                                                                  #  V71E            CONTIGUOUS BLOCK UPDATE VERB
058984,000106:                                                                                                  #     21E          NUMBER OF COMPONENTS FOR STATE VECTOR UPDATE
058985,000107:                                                                                                  #   AAAAE          ECADR OF 'UPSVFLAG'
058986,000108:                                                                                                  #  XXXXXE          STATE VECTOR IDENTIFIER: 00001 FOR CSM, 77776 FOR LEM - EARTH SPHERE OF INFLUENCE SCALING
058987,000109:                                                                                                  #                                           00002 FOR CSM, 77775 FOR LEM - LUNAR SPHERE OF INFLUENCE SCALING
058988,000110:                                                                                                  #  XXXXXEXXXXXE    X POSITION
058989,000111:                                                                                                  #  XXXXXEXXXXXE    Y POSITION
058990,000112:                                                                                                  #  XXXXXEXXXXXE    Z POSITION
058991,000113:                                                                                                  #  XXXXXEXXXXXE    X VELOCITY
058992,000114:                                                                                                  #  XXXXXEXXXXXE    Y VELOCITY
058993,000115:                                                                                                  #  XXXXXEXXXXXE    Z VELOCITY
058994,000116:                                                                                                  #  XXXXXEXXXXXE    TIME FROM AGC CLOCK ZERO
058995,000117:                                                                                                  #  V33E            VERB 33 TO SIGNAL THAT THE STATE VECTOR IS READY TO BE STORED.
058996,000118: 
058997,000119: 
058998,000120:                                                                                                  #  2. REFSMMAT(ALL DATA ENTRIES IN OCTAL)
058999,000121:                                                                                                  #  ENTRIES:        DATA DEFINITIONS:                                       SCALE FACTORS:

Page 1376

059001,000123:                                                                                                  #  V71E            CONTIGUOUS BLOCK UPDATE VERB
059002,000124:                                                                                                  #     24E          NUMBER OF COMPONENTS FOR REFSMMAT UPDATE
059003,000125:                                                                                                  #   AAAAE          ECADR OF 'REFSMMAT'
059004,000126:                                                                                                  #  XXXXXEXXXXXE    ROW 1 COLUMN 1                                          2(-1)
059005,000127:                                                                                                  #  XXXXXEXXXXXE    ROW 1 COLUMN 2                                          2(-1)
059006,000128:                                                                                                  #  XXXXXEXXXXXE    ROW 1 COLUMN 3                                          2(-1)
059007,000129:                                                                                                  #  XXXXXEXXXXXE    ROW 2 COLUMN 1                                          2(-1)
059008,000130:                                                                                                  #  XXXXXEXXXXXE    ROW 2 COLUMN 2                                          2(-1)
059009,000131:                                                                                                  #  XXXXXEXXXXXE    ROW 2 COLUMN 3                                          2(-1)
059010,000132:                                                                                                  #  XXXXXEXXXXXE    ROW 3 COLUMN 1                                          2(-1)
059011,000133:                                                                                                  #  XXXXXEXXXXXE    ROW 3 COLUMN 2                                          2(-1)
059012,000134:                                                                                                  #  XXXXXEXXXXXE    ROW 3 COLUMN 3                                          2(-1)
059013,000135:                                                                                                  #  V33E            VERB 33 TO SIGNAL THAT REFSMMAT IS READY TO BE STORED.
059014,000136: 
059015,000137: 07,3776                                           BANK     07                                    
059016,000138: 43,2000                                           SETLOC   EXTVERBS                              
059017,000139: 43,2000                                           BANK                                           
059018,000140: 
059019,000141: 43,3757  E3,1706                                  EBANK=   TEPHEM                                
059020,000142: 
059021,000143: 43,3757                                           COUNT*   $$/P27                                
059022,000144: 43,3757           34755        V70UPDAT           CAF      UP70                                  #  COMES HERE ON V70E
059023,000145: 43,3760           13766                           TCF      V73UPDAT   +1                         
059024,000146: 
059025,000147: 
059026,000148: 43,3761           34753        V71UPDAT           CAF      UP71                                  #  COMES HERE ON V71E
059027,000149: 43,3762           13766                           TCF      V73UPDAT   +1                         
059028,000150: 
059029,000151: 
059030,000152: 43,3763           34752        V72UPDAT           CAF      UP72                                  #  COMES HERE ON V72E
059031,000153: 43,3764           13766                           TCF      V73UPDAT   +1                         
059032,000154: 
059033,000155: 
059034,000156: 43,3765           36250        V73UPDAT           CAF      UP73                                  #  COMES HERE ON V73E
059035,000157: 
059036,000158: 43,3766           55165                 +1        TS       UPVERBSV                              #  SAVE UPVERB UNTIL IT'S OK TO ENTER P27
059037,000159: 
059038,000160: 43,3767           02076                           TC       TESTXACT                              #  GRAB DISPLAY IF AVAILABLE, OTHERWISE
059039,000161:                                                                                                  #  TURN*OPERATOR ERROR* ON AND TERMINATEJOB
059040,000162: 
059041,000163: 43,3770           04635                           TC       POSTJUMP                              #  LEAVE EXTENDED VERB BANK AND
059042,000164: 43,3771           11374                           CADR     UPPART2                               #  GO TO UPDATE PROGRAM(P27) BANK.
059043,000165: 
059044,000166: 
059045,000167: 43,3772     4755               UP70               EQUALS   ZERO                                  
059046,000168: 43,3772     4753               UP71               EQUALS   ONE                                   
059047,000169: 43,3772     4752               UP72               EQUALS   TWO                                   
059048,000170: 43,3772     6250               UP73               EQUALS   THREE                                 
059049,000171: 

Page 1377

059051,000173: 04,3374                                           BANK     04                                    
059052,000174: 04,2000                                           SETLOC   UPDATE2                               
059053,000175: 04,2000                                           BANK                                           
059054,000176: 
059055,000177: 04,3374                                           COUNT*   $$/P27                                
059056,000178: 
059057,000179: 04,3374                        UPPART2            EQUALS                                         #  UPDATE PROGRAM - PART 2
059058,000180: 
059059,000181: 04,3374           31010                           CA       MODREG                                #  IS UPDATE ALLOWED AT THIS TIME?
059060,000182: 04,3375           00006                           EXTEND                                         #  IS MODREG +0 (POOH) OR -0 (FRESH START)?
059061,000183: 04,3376           13400                           BZF      UPDATOK                               
059062,000184: 
059063,000185: 04,3377           03766        UPERROR            TC       UPERROUT   +2                         #  TURN ON OPERATOR ERROR LIGHT AND EXIT
059064,000186: 
059065,000187: 04,3400           55170        UPDATOK            TS       UPOLDMOD                              
059066,000188: 
059067,000189: 04,3401           31165                           CAE      UPVERBSV                              #  SET UPVERB TO TELL P27 WHICH EXTENDED
059068,000190: 04,3402           55171                           TS       UPVERB                                #    VERB CALLED IT
059069,000191: 
059070,000192: 04,3403           34753                           CAF      ONE                                   
059071,000193: 04,3404           55172                           TS       UPCOUNT                               
059072,000194: 
059073,000195: 04,3405           05364                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO RESTORE OLD MODE
059074,000196: 04,3406           07026                           OCT      07026                                 #  AND DOWNLIST AND EXIT IF RESTART OCCURS.
059075,000197: 04,3407           30000                           OCT      30000                                 #  PRIORITY SAME AS CHRPRIO
059076,000198: 04,3410     1173                                  EBANK=   UPBUFF                                
059077,000199: 04,3410           03716 10102                     2CADR    UPOUT      +1                         
059078,000200: 
059079,000201: 
059080,000202: 04,3412           34753                           CAF      ONE                                   
059081,000203: 04,3413           54333                           TS       DNLSTCOD                              #  DOWNLIST
059082,000204: 
059083,000205: 04,3414           05322                           TC       NEWMODEX                              #  SET MAJOR MODE = 27
059084,000206: 04,3415           00033                           DEC      27         B-14                       
059085,000207: 
059086,000208: 04,3416           51171                           INDEX    UPVERB                                #  BRANCH DEPENDING ON WHETHER THE UPDATE
059087,000209: 04,3417           13420                           TCF      +1                                    #  VERB REQUIRES A FIXED OR VARIABLE NUMBER
059088,000210: 04,3420           13423                           TCF      +3                                    #  V70 FIXED.               (OF COMPONENTS.
059089,000211: 04,3421           13426                           TCF      OHWELL1                               #  V71 VARIABLE - GO GET NO. OF COMPONENTS
059090,000212: 04,3422           13426                           TCF      OHWELL1                               #  V72 VARIABLE - GO GET NO. OF COMPONENTS
059091,000213: 04,3423           34752                           CA       TWO                                   #  V73 (AND V70) FIXED
059092,000214: 04,3424           55167                           TS       COMPNUMB                              #  SET NUMBER OF COMPONENTS TO 2.
059093,000215: 04,3425           13451                           TCF      OHWELL2                               #  GO GET THE TWO UPDATE COMPONENTS
059094,000216: 
059095,000217: 04,3426           33521        OHWELL1            CAF      ADUPBUFF                              #  * REQUEST USER TO SEND NUMBER  *
059096,000218: 04,3427           54156                           TS       MPAC       +2                         #  * OF COMPONENTS PARAMETER(II). *
059097,000219: 04,3430           33522                 +2        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
059098,000220: 04,3431           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
059099,000221: 04,3432           20334                           CADR     GOXDSPF                               #  TO REQUEST II.
059100,000222: 04,3433           13716                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN

Page 1378

059102,000224: 04,3434           13430                           TCF      OHWELL1    +2                         
059103,000225: 04,3435           03512                           TC       CK4V32                                #  DATA OR V32 RETURN
059104,000226: 04,3436           44752                           CS       BIT2                                  
059105,000227: 04,3437           61173                           AD       UPBUFF                                #  IS II(NUMBER OF COMPONENTS PARAMETER)
059106,000228: 04,3440           00006                           EXTEND                                         #  .GE. 3 AND .LE. 20D.
059107,000229: 04,3441           63430                           BZMF     OHWELL1    +2                         
059108,000230: 04,3442           41173                           CS       UPBUFF                                
059109,000231: 04,3443           64362                           AD       UP21                                  
059110,000232: 04,3444           00006                           EXTEND                                         
059111,000233: 04,3445           63430                           BZMF     OHWELL1    +2                         
059112,000234: 04,3446           31173                           CAE      UPBUFF                                
059113,000235: 04,3447           55167                           TS       COMPNUMB                              #  SAVE II IN COMPNUMB
059114,000236: 
059115,000237: 
059116,000238:                                                                                                  #           UPBUFF LOADING SEQUENCE
059117,000239: 
059118,000240: 04,3450           25172                           INCR     UPCOUNT                               #  INCREMENT COUNT OF COMPONENTS RECEIVED.
059119,000241: 04,3451           33666        OHWELL2            CAF      ADUPBFM1                              #  CALCULATE LOCATION(ECADR) IN UPBUFF
059120,000242: 04,3452           61172                           AD       UPCOUNT                               #  WHERE NEXT COMPONENT SHOULD BE STORED.
059121,000243: 04,3453           54156                 +2        TS       MPAC       +2                         #  PLACE ECADR INTO R3.
059122,000244: 04,3454           33522                 +3        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
059123,000245: 04,3455           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
059124,000246: 04,3456           20334                           CADR     GOXDSPF                               #  TO REQUEST DATA.
059125,000247: 04,3457           13716                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE(P27) RETURN.
059126,000248: 04,3460           13454                           TCF      OHWELL2    +3                         #  V33 PROCEED RETURN
059127,000249: 04,3461           03512                           TC       CK4V32                                #  DATA OR V32 RETURN
059128,000250: 04,3462           41172                           CS       UPCOUNT                               #  HAVE WE FINISHED RECEIVING ALL
059129,000251: 04,3463           61167                           AD       COMPNUMB                              #  THE DATA WE EXPECTED.
059130,000252: 04,3464           00006                           EXTEND                                         
059131,000253: 04,3465           63467                           BZMF     UPVERIFY                              #  YES- GO TO VERIFICATION SEQUENCE
059132,000254: 04,3466           13450                           TCF      OHWELL2    -1                         #  NO- REQUEST ADDITIONAL DATA.
059133,000255: 
059134,000256: 
059135,000257:                                                                                                  #           VERIFY SEQUENCE
059136,000258: 
059137,000259: 04,3467           33520        UPVERIFY           CAF      ADUPTEMP                              #  PLACE ECADR WHERE COMPONENT NO. INDEX
059138,000260: 04,3470           54156                           TS       MPAC       +2                         #  IS TO BE STORED INTO R3.
059139,000261: 04,3471           33523                           CAF      UPVRFYNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
059140,000262: 04,3472           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N02 TO REQUEST
059141,000263: 04,3473           20334                           CADR     GOXDSPF                               #  DATA CORRECTION OR VERIFICATION.
059142,000264: 04,3474           13716                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE(P27) RETURN
059143,000265: 04,3475           13524                           TCF      UPSTORE                               #  V33 DATA SENT IS GOOD. GO STORE IT.
059144,000266: 04,3476           03512                           TC       CK4V32                                #  COMPONENT NO. INDEX OR V32 RETURN
059145,000267: 04,3477           31166                           CA       UPTEMP                                #  DOES THE COMPONENT NO. INDEX JUST SENT
059146,000268: 04,3500           00006                           EXTEND                                         #  SPECIFY A LEGAL COMPONENT NUMBER?
059147,000269: 04,3501           63467                           BZMF     UPVERIFY                              #  NO, IT IS NOT POSITIVE NONZERO
059148,000270: 04,3502           41166                           CS       UPTEMP                                
059149,000271: 04,3503           61167                           AD       COMPNUMB                              
059150,000272: 04,3504           64753                           AD       BIT1                                  
059151,000273: 04,3505           00006                           EXTEND                                         

Page 1379

059153,000275: 04,3506           63467                           BZMF     UPVERIFY                              #  NO
059154,000276: 04,3507           33666                           CAF      ADUPBFM1                              #  YES- BASED ON THE COMPONENT NO. INDEX
059155,000277: 04,3510           61166                           AD       UPTEMP                                #  CALCULATE THE ECADR OF LOCATION IN
059156,000278: 04,3511           13453                           TCF      OHWELL2    +2                         #  UPBUFF WHICH USER WANTS TO CHANGE.
059157,000279: 
059158,000280: 04,3512  04,3716               UPOUT4             EQUALS   UPOUT      +1                         #  COMES HERE ON V34 TO TERMINATE UPDATE
059159,000281: 
059160,000282: 
059161,000283:                                                                                                  #           CHECK FOR VERB 32 SEQUENCE
059162,000284: 
059163,000285: 04,3512           40154        CK4V32             CS       MPAC                                  #  ON DATA RETURN FROM 'GOXDSPF'
059164,000286: 04,3513           74746                           MASK     BIT6                                  #  ON DATA RETURN FROM "GOXDSP"& THE CON-
059165,000287: 04,3514           10000                           CCS      A                                     #  TENTS OF MPAC = VERB.  SO TEST FOR V32.
059166,000288: 04,3515           00002                           TC       Q                                     #  IT'S NOT A V32, IT'S DATA.  PROCEED.
059167,000289: 04,3516           50002                           INDEX    Q                                     
059168,000290: 04,3517           77771                           TC       0          -6                         #  V32 ENCOUNTERED - GO BACK AND GET DATA
059169,000291: 
059170,000292: 04,3520           01166        ADUPTEMP           ADRES    UPTEMP                                #  ADDRESS OF TEMP STORAGE FOR CORRECTIONS
059171,000293: 04,3521           01173        ADUPBUFF           ADRES    UPBUFF                                #  ADDRESS OF UPDATE DATA STORAGE BUFFER
059172,000294: 04,3522           05201        UPLOADNV           VN       2101                                  #  VERB 21 NOUN 01
059173,000295: 04,3523           05202        UPVRFYNV           VN       2102                                  #  VERB 21 NOUN 02
059174,000296: 04,3524     4362               UP21               =        MD1                                   #  DEC 21 = MAX NO OF COMPONENTS +1
059175,000297: 04,3524     4756               UPDTPHAS           EQUALS   FIVE                                  
059176,000298: 
059177,000299:                                                                                                  #           PRE-STORE AND FAN TO APPROPRIATE BRANCH SEQUENCE
059178,000300: 
059179,000301: 04,3524                        UPSTORE            EQUALS                                         #  GROUND HAS VERIFIED UPDATE. STORE DATA.
059180,000302: 
059181,000303: 04,3524           00004                           INHINT                                         
059182,000304: 
059183,000305: 04,3525           30103                           CAE      FLAGWRD7                              #  INVERT VERIFLAG(BIT3 OF FLAGWRD7) TO
059184,000306: 04,3526           56001                           XCH      L                                     #  INDICATE TO THE GROUND(VIA DOWNLINK)
059185,000307: 04,3527           34751                           CAF      VERIFBIT                              #  THAT THE V33 (WHICH THE GROUND SENT TO
059186,000308: 04,3530           00006                           EXTEND                                         #  VERIFY THE UPDATE) HAS BEEN SUCCESSFULLY
059187,000309: 04,3531           06001                           RXOR     LCHAN                                 #  RECEIVED BY THE UPDATE PROGRAM
059188,000310: 04,3532           54103                           TS       FLAGWRD7                              
059189,000311: 
059190,000312: 04,3533           05364                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO REDO THE UPDATE
059191,000313: 04,3534           04026                           OCT      04026                                 #  DATA STORE IF A RESTART OCCURS.
059192,000314: 04,3535           00004                           INHINT                                         #  (BECAUSE PHASCHNG DID A RELINT)
059193,000315: 
059194,000316: 04,3536           44752                           CS       TWO                                   #  GO TO UPFNDVAC IF INSTALL IS REQUIRED,
059195,000317: 04,3537           61171                           AD       UPVERB                                #  THAT IS, IF IT'S A V70 - V72.
059196,000318: 04,3540           00006                           EXTEND                                         #  GO TO UPEND73 IF IT'S A V73.
059197,000319: 04,3541           63550                           BZMF     UPFNDVAC                              
059198,000320: 
059199,000321:                                                                                                  #           VERB 73 BRANCH
059200,000322: 
059201,000323: 04,3542           00006        UPEND73            EXTEND                                         #  V73-PERFORM DP OCTAL AGC CLOCK INCREMENT
059202,000324: 04,3543           31174                           DCA      UPBUFF                                

Page 1380

059204,000326: 04,3544           53204                           DXCH     UPBUFF     +8D                        
059205,000327: 04,3545           03573                           TC       TIMEDIDL                              
059206,000328: 04,3546           04364                           TC       FALTON                                #  ERROR- TURN ON *OPERATOR ERROR* LIGHT
059207,000329: 04,3547           03716                           TC       UPOUT      +1                         #  GO TO COMMON UPDATE PROGRAM EXIT
059208,000330: 
059209,000331: 04,3550           34355        UPFNDVAC           CAF      CHRPRIO                               #  (USE EXTENDED VERB PRIORITY)
059210,000332: 04,3551           05105                           TC       FINDVAC                               #  GET VAC AREA FOR 'CALL INTSTALL'
059211,000333: 04,3552  E3,1706                                  EBANK=   TEPHEM                                
059212,000334: 04,3552           03555 10103                     2CADR    UPJOB                                 #  (NOTE: THIS WILL ALSO SET EBANK FOR
059213,000335: 
059214,000336: 04,3554           05155                           TC       ENDOFJOB                              #  'TEPHEM' UPDATE BY V70)
059215,000337: 
059216,000338: 04,3555           06042        UPJOB              TC       INTPRET                               #  THIS COULD BE A STATE VECTOR UPDATE--SO
059217,000339: 04,3556           77624                           CALL                                           #  WAIT(PUT JOB TO SLEEP) IF ORBIT INT(OI)
059218,000340: 04,3557           27410                                    INTSTALL                              #  IS IN PROGRESS--OR--GRAB OI AND RETURN
059219,000341:                                                                                                  #  TO UPWAKE IF OI IS NOT IN PROGRESS.
059220,000342: 
059221,000343: 04,3560           77776        UPWAKE             EXIT                                           
059222,000344: 
059223,000345: 04,3561           05364                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
059224,000346: 04,3562           04026                           OCT      04026                                 
059225,000347: 
059226,000348: 04,3563           05515                           TC       UPFLAG                                #  SET INTEGRATION RESTART BIT
059227,000349: 04,3564           00236                           ADRES    REINTFLG                              
059228,000350: 04,3565           00004                           INHINT                                         
059229,000351: 04,3566                        UPPART3            EQUALS                                         
059230,000352: 
059231,000353: 04,3566           51171                           INDEX    UPVERB                                #  BRANCH TO THE APPROPRIATE UPDATE VERB
059232,000354: 04,3567           13570                           TCF      +1                                    #  ROUTINE TO ACTUALLY PERFORM THE UPDATE
059233,000355: 04,3570           13727                           TCF      UPEND70                               #  V70
059234,000356: 04,3571           13636                           TCF      UPEND71                               #  V71
059235,000357: 04,3572           13670                           TCF      UPEND72                               #  V72
059236,000358: 
059237,000359: 
059238,000360:                                                                                                  #           ROUTINE TO INCREMENT CLOCK(TIME2,TIME1) WITH CONTENTS OF DP WORD AT UPBUFF.
059239,000361: 
059240,000362: 04,3573           00006        TIMEDIDL           EXTEND                                         
059241,000363: 04,3574           23166                           QXCH     UPTEMP                                #  SAVE Q FOR RETURN
059242,000364: 04,3575           34755                           CAF      ZERO                                  #  ZERO AND SAVE TIME2,TIME1
059243,000365: 04,3576           22007                           ZL                                             
059244,000366: 04,3577           52025                           DXCH     TIME2                                 
059245,000367: 04,3600           53216                           DXCH     UPBUFF     +18D                       #  STORE IN CASE OF OVERFLOW
059246,000368: 
059247,000369: 04,3601           34756                           CAF      UPDTPHAS                              #  DO
059248,000370: 04,3602           54001                           TS       L                                     #  A
059249,000371: 04,3603           40000                           COM                                            #  QUICK
059250,000372: 04,3604           52764                           DXCH     -PHASE6                               #  PHASCHNG
059251,000373: 
059252,000374: 04,3605           00004        TIMEDIDR           INHINT                                         

Page 1381

059254,000376: 04,3606           34755                           CAF      ZERO                                  
059255,000377: 04,3607           22007                           ZL                                             #  PICK UP INCREMENTER(AND ZERO
059256,000378: 04,3610           54156                           TS       MPAC       +2                         #  IT IN CASE OF RESTARTS) AND
059257,000379: 04,3611           53204                           DXCH     UPBUFF     +8D                        #  STORE IT
059258,000380: 04,3612           52155                           DXCH     MPAC                                  #  INTO MPAC FOR TPAGREE.
059259,000381: 
059260,000382: 04,3613           00006                           EXTEND                                         
059261,000383: 04,3614           31216                           DCA      UPBUFF     +18D                       
059262,000384: 04,3615           20155                           DAS      MPAC                                  #  FORM SUM IN MPAC
059263,000385: 04,3616           00006                           EXTEND                                         
059264,000386: 04,3617           13626                           BZF      DELTATOK                              #  TEST FOR OVERFLOW
059265,000387: 04,3620           34755                           CAF      ZERO                                  
059266,000388: 04,3621           53216                           DXCH     UPBUFF     +18D                       #  OVERFLOW, RESTORE OLD VALUE OF CLOCK
059267,000389: 04,3622           20025                           DAS      TIME2                                 #  AND TURN ON OPERATOR ERROR
059268,000390: 
059269,000391: 04,3623           05364                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
059270,000392: 04,3624           04026                           OCT      04026                                 
059271,000393: 
059272,000394: 04,3625           01166                           TC       UPTEMP                                #  GO TO ERROR EXIT
059273,000395: 
059274,000396: 04,3626           07262        DELTATOK           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
059275,000397: 04,3627           52155                           DXCH     MPAC                                  
059276,000398: 04,3630           20025                           DAS      TIME2                                 #  INCREMENT TIME2,TIME1
059277,000399: 
059278,000400: 04,3631           05364                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
059279,000401: 04,3632           04026                           OCT      04026                                 
059280,000402: 
059281,000403: 04,3633           00004                           INHINT                                         
059282,000404: 04,3634           51166                           INDEX    UPTEMP                                #  (CODED THIS WAY FOR RESTART PROTECTION)
059283,000405: 04,3635           00001                           TC       1                                     #  NORMAL RETURN
059284,000406:                                                                                                  #           VERB 71 BRANCH
059285,000407: 
059286,000408: 04,3636           31174        UPEND71            CAE      UPBUFF     +1                         #  SET EBANK
059287,000409: 04,3637           54003                           TS       EBANK                                 #     AND
059288,000410: 04,3640           74357                           MASK     LOW8                                  #  CALCULATE
059289,000411: 04,3641           55166                           TS       UPTEMP                                #  S-REG VALUE OF RECEIVING AREA
059290,000412: 
059291,000413: 04,3642           67750                           AD       NEG3                                  #  IN THE PROCESS OF
059292,000414: 04,3643           61167                           AD       COMPNUMB                              #  PERFORMING
059293,000415: 04,3644           00006                           EXTEND                                         #  THIS UPDATE
059294,000416: 04,3645           13653                           BZF      STORLP71                              #  WILL WE
059295,000417: 04,3646           74743                           MASK     BIT9                                  #  OVERFLOW
059296,000418: 04,3647           10000                           CCS      A                                     #  INTO THE NEXT EBANK....
059297,000419: 04,3650           13764                           TCF      UPERROUT                              #  YES
059298,000420: 
059299,000421: 04,3651           37750                           CA       NEG3                                  #  NO- CALCULATE NUMBER OF
059300,000422: 04,3652           61167                           AD       COMPNUMB                              #  WORDS TO BE STORED MINUS ONE
059301,000423: 04,3653           54154        STORLP71           TS       MPAC                                  #  SAVE NO. OF WORDS REMAINING MINUS ONE
059302,000424: 04,3654           50000                           INDEX    A                                     #  TAKE NEXT UPDATE WORD FROM
059303,000425: 04,3655           31175                           CA       UPBUFF     +2                         #  UPBUFF AND

Page 1382

059305,000427: 04,3656           54001                           TS       L                                     #  SAVE IT IN L
059306,000428: 04,3657           30154                           CA       MPAC                                  #  CALCULATE NEXT
059307,000429: 04,3660           61166                           AD       UPTEMP                                #  RECEIVING ADDRESS
059308,000430: 04,3661           50000                           INDEX    A                                     
059309,000431: 04,3662  E3,1400                                  EBANK=   1400                                  
059310,000432: 04,3662           23400                           LXCH     1400                                  #  UPDATE THE REGISTER  BY CONTENTS OF L
059311,000433: 04,3663  E3,1706                                  EBANK=   TEPHEM                                
059312,000434: 04,3663           10154                           CCS      MPAC                                  #  ARE THERE ANY WORDS LEFT TO BE STORED
059313,000435: 04,3664           13653                           TCF      STORLP71                              #  YES
059314,000436: 04,3665           13715                           TCF      UPOUT                                 #  NO- THEN EXIT UPDATE PROGRAM
059315,000437: 04,3666           01172        ADUPBFM1           ADRES    UPBUFF     -1                         #  SAME AS ADUPBUFF BUT LESS 1 (DON'T MOVE)
059316,000438: 04,3667           13715                           TCF      UPOUT                                 #  NO- EXIT UPDATE(HERE WHEN COMPNUMB = 3)
059317,000439: 
059318,000440: 
059319,000441:                                                                                                  #           VERB 72 BRANCH
059320,000442: 
059321,000443: 04,3670           34753        UPEND72            CAF      BIT1                                  #  HAVE AN ODD NO. OF COMPONENTS
059322,000444: 04,3671           71167                           MASK     COMPNUMB                              #  BEEN SENT FOR A V72 UPDATE...
059323,000445: 04,3672           10000                           CCS      A                                     
059324,000446: 04,3673           13675                           TCF      +2                                    #  YES
059325,000447: 04,3674           13764                           TCF      UPERROUT                              #  ERROR- SHOULD BE ODD NO. OF COMPONENTS
059326,000448: 04,3675           44752                           CS       BIT2                                  
059327,000449: 04,3676           61167                           AD       COMPNUMB                              
059328,000450: 04,3677           54154        LDLOOP72           TS       MPAC                                  #  NOW PERFORM THE UPDATE
059329,000451: 04,3700           50000                           INDEX    A                                     
059330,000452: 04,3701           31174                           CAE      UPBUFF     +1                         #  PICK UP NEXT UPDATE WORD
059331,000453: 04,3702           22000                           LXCH     A                                     
059332,000454: 04,3703           10154                           CCS      MPAC                                  #  SET POINTER TO ECADR(MUST BE CCS)
059333,000455: 04,3704           54154                           TS       MPAC                                  
059334,000456: 04,3705           50000                           INDEX    A                                     
059335,000457: 04,3706           31174                           CAE      UPBUFF     +1                         #  PICK UP NEXT ECADR OF REG TO BE UPDATED
059336,000458: 04,3707           54003                           TS       EBANK                                 #  SET EBANK
059337,000459: 04,3710           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
059338,000460: 04,3711           50000                           INDEX    A                                     
059339,000461: 04,3712  E3,1400                                  EBANK=   1400                                  
059340,000462: 04,3712           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
059341,000463: 04,3713  E3,1706                                  EBANK=   TEPHEM                                
059342,000464: 04,3713           10154                           CCS      MPAC                                  #  ARE WE THROUGH THE V72 UPDATE...
059343,000465: 04,3714           13677                           TCF      LDLOOP72                              #  NO
059344,000466: 
059345,000467: 
059346,000468:                                                                                                  #           NORMAL FINISH OF P27
059347,000469: 
059348,000470: 04,3715                        UPOUT              EQUALS                                         
059349,000471: 04,3715           03137                           TC       INTWAKEU                              #  RELEASE  GRAB  OF ORBITAL INTEGRATION
059350,000472: 04,3716           31170                 +1        CAE      UPOLDMOD                              #  RESTORE PRIOR P27 MODE
059351,000473: 04,3717           05325                           TC       NEWMODEX   +3                         
059352,000474: 04,3720           34755                           CAF      ZERO                                  
059353,000475: 04,3721           54333                           TS       DNLSTCOD                              
059354,000476: 04,3722           03771                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT

Page 1383

059356,000478: 04,3723           00006                           EXTEND                                         #  KILL GROUP 6.
059357,000479: 04,3724           34755                           DCA      NEG0                                  
059358,000480: 04,3725           52764                           DXCH     -PHASE6                               
059359,000481: 
059360,000482: 04,3726           05503                           TC       ENDEXT                                #  EXTENDED VERB EXIT
059361,000483: 
059362,000484: 
059363,000485:                                                                                                  #           VERB 70 BRANCH
059364,000486: 
059365,000487: 04,3727           00006        UPEND70            EXTEND                                         #  V70 DOES THE FOLLOWING WITH DP DELTA
059366,000488: 04,3730           41174                           DCS      UPBUFF                                #  TIME IN UPBUFF
059367,000489: 04,3731           53204                           DXCH     UPBUFF     +8D                        
059368,000490: 04,3732           03573                           TC       TIMEDIDL                              #  DECREMENT AGC CLOCK
059369,000491: 
059370,000492: 04,3733           03764                           TC       UPERROUT                              #  ERROR WHILE DECREMENTING CLOCK -- EXIT
059371,000493: 
059372,000494: 04,3734  E3,1706                                  EBANK=   TEPHEM                                
059373,000495: 04,3734           00006                           EXTEND                                         
059374,000496: 04,3735           41174                           DCS      UPBUFF                                #  COPY DECREMENTERS FOR
059375,000497: 04,3736           53206                           DXCH     UPBUFF     +10D                       #  RESTART PROTECTION
059376,000498: 04,3737           00006                           EXTEND                                         
059377,000499: 04,3740           41174                           DCS      UPBUFF                                
059378,000500: 04,3741           53210                           DXCH     UPBUFF     +12D                       
059379,000501: 
059380,000502: 04,3742           05364                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
059381,000503: 04,3743           04026                           OCT      04026                                 
059382,000504: 
059383,000505: 04,3744           34755                           CAF      ZERO                                  
059384,000506: 04,3745           22007                           ZL                                             
059385,000507: 04,3746           53206                           DXCH     UPBUFF     +10D                       #  DECREMENT CSM STATE VECTOR TIME
059386,000508: 04,3747           21571                           DAS      TETCSM                                
059387,000509: 
059388,000510: 04,3750           34755                           CAF      ZERO                                  
059389,000511: 04,3751           22007                           ZL                                             
059390,000512: 04,3752           53210                           DXCH     UPBUFF     +12D                       #  DECREMENT LEM STATE VECTOR TIME
059391,000513: 04,3753           21643                           DAS      TETLEM                                
059392,000514: 
059393,000515: 04,3754           34755                           CAF      ZERO                                  
059394,000516: 04,3755           22007                           ZL                                             
059395,000517: 04,3756           53174                           DXCH     UPBUFF                                
059396,000518: 04,3757           21710                           DAS      TEPHEM     +1                         #  INCREMENT TP TEPHEM
059397,000519: 04,3760           27706                           ADS      TEPHEM                                
059398,000520: 
059399,000521: 04,3761           05364                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
059400,000522: 04,3762           04026                           OCT      04026                                 
059401,000523: 
059402,000524: 04,3763     1173                                  EBANK=   UPBUFF                                
059403,000525: 
059404,000526: 04,3763           03715                           TC       UPOUT                                 #  GO TO STANDARD UPDATE PROGRAM EXIT
059405,000527: 

Page 1384

059407,000529:                                                                                                  #           ERROR SEQUENCE
059408,000530: 
059409,000531: 04,3764           04364        UPERROUT           TC       FALTON                                #  TURN ON *OPERATOR ERROR* LIGHT
059410,000532: 04,3765           13715                           TCF      UPOUT                                 #  GO TO COMMON UPDATE PROGRAM EXIT
059411,000533: 
059412,000534: 04,3766           04364                 +2        TC       FALTON                                #  TURN ON 'OPERATOR ERROR' LIGHT
059413,000535: 04,3767           03771                           TC       UPACTOFF                              #  TURN OFF'UPLINK ACTIVITY'LIGHT
059414,000536: 04,3770           05503                           TC       ENDEXT                                #  EXTENDED VERB EXIT
059415,000537:                                                                                                  #  (THE PURPOSE OF UPERROUT +2 EXIT IS
059416,000538:                                                                                                  #  TO PROVIDE AN ERROR EXIT WHICH DOES NOT
059417,000539:                                                                                                  #  RESET ANY RESTART GROUPS)
059418,000540: 
059419,000541: 
059420,000542: 
059421,000543:                                                                                                  #           :UPACTOFF: IS A ROUTINE TO TURN OFF UPLINK ACTIVITY LIGHT ON ALL EXITS FROM UPDATE PROGRAM(P27).
059422,000544: 
059423,000545: 04,3771           44751        UPACTOFF           CS       BIT3                                  
059424,000546: 04,3772           00006                           EXTEND                                         #  TURN OFF UPLINK ACTIVITY LIGHT
059425,000547: 04,3773           03011                           WAND     DSALMOUT                              #  (BIT 3 OF CHANNEL 11)
059426,000548: 04,3774           00002                           TC       Q                                     

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