Source Code

These source-code files derive from a printout of Luminary 116 (the Apollo 12 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Ron Burkey, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071
	19:09 AUG. 11,1969
Note that the date is the date of the printout, not the date of the program revision.

058448,000002:                                                                                                  ## Copyright:   Public domain.
058449,000003:                                                                                                  ## Filename:    UPDATE_PROGRAM.agc
058450,000004:                                                                                                  ## Purpose:     A section of Luminary revision 116.
058451,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
058452,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 12.
058453,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
058454,000008:                                                                                                  ##              that the code format has been changed to conform to the
058455,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
058456,000010:                                                                                                  ##              original YUL assembler.
058457,000011:                                                                                                  ## Reference:   pp. 1376-1386
058458,000012:                                                                                                  ## Assembler:   yaYUL
058459,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
058460,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
058461,000015:                                                                                                  ## Mod history: 2017-01-22 MAS  Created from Luminary 99.
058462,000016:                                                                                                  ##              2017-01-28 RSB  Comment-text fixes identified for Luminary 69.
058463,000017:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified for Artemis 72.
058464,000018:                                                                                                  ##              2017-02-10 RRB  Updated for Luminary 116.
058465,000019:                                                                                                  ##              2017-03-14 RSB  Proofed comment text via 3-way diff vs
058466,000020:                                                                                                  ##                              Luminary 99 and 131.
058467,000021:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
058468,000022:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
058469,000023:                                                                                                  ##              2017-03-19 HG   Remove statement CAE MODREG
058470,000024:                                                                                                  ##              2017-06-17 MAS  Globally removed all SBANK= workarounds.
058471,000025:                                                                                                  ##              2021-05-30 ABS  DELTAOK -> DELTATOK
058472,000026: 

Page 1376

058474,000028:                                                                                                  #  PROGRAM NAME:         P27
058475,000029:                                                                                                  #  WRITTEN BY:           KILROY/ DE WOLF
058476,000030: 
058477,000031:                                                                                                  #  MOD NO:               6
058478,000032:                                                                                                  #  MOD BY:               KILROY
058479,000033:                                                                                                  #  DATE:                 01DEC67
058480,000034: 
058481,000035:                                                                                                  #  LOG SECTION:          UPDATE PROGRAM.
058482,000036: 
058483,000037:                                                                                                  #  FUNCT. DESCR:         P27 (THE UPDATE PROGRAM) PROCESSES COMMANDS AND DATA
058484,000038:                                                                                                  #                            INSERTIONS REQUESTED BY THE GROUND VIA UPLINK.
058485,000039:                                                                                                  #                            THE P27 PROGRAM WILL ACCEPT UPDATES
058486,000040:                                                                                                  #                            ONLY DURING P00 FOR THE LM, AND ONLY DURING P00,
058487,000041:                                                                                                  #                        P02, AND FRESH START FOR THE CSM
058488,000042: 
058489,000043:                                                                                                  #  CALLING SEQ:          PROGRAM IS INITIATED BY UPLINK ENTRY OF VERBS 70, 71, 72 AND 73.
058490,000044: 
058491,000045:                                                                                                  #  SUBROUTINES:          TESTXACT, NEWMODEX, NEWMODEX +3, GOXDSPF, BANKCALL, FINDVAC, INTPRET, INTSTALL, TPAGREE,
058492,000046:                                                                                                  #                        INTWAKEU, ENDEXT, POSTJUMP, FALTON, NEWPHASE, PHASCHNG
058493,000047: 
058494,000048:                                                                                                  #  NORMAL EXIT:          TC ENDEXT
058495,000049: 
058496,000050:                                                                                                  #  ALARM/ABORT:          TC FALTON FOLLOWED BY TC ENDEXT
058497,000051: 
058498,000052:                                                                                                  #  RESTARTS:             P27 IS RESTART PROTECTED IN TWO WAYS ...
058499,000053:                                                                                                  #                        1. PRIOR TO VERIFLAG INVERSION (WHICH IS CAUSED BY THE GROUND/ASTRONAUT'S VERIFICATION OF UPDATE
058500,000054:                                                                                                  #                           DATA BY SENDING A V33E WHEN V21N02 IS FLASHING)---
058501,000055:                                                                                                  #                           NO PROTECTION EXCEPT PRE-P27 MODE IS RESTORED, COAST + ALIGN DOWNLIST IS SELECTED AND UPLINK
058502,000056:                                                                                                  #                           ACTIVITY LIGHT IS TURNED OFF.(JUST AS IF A V34E WAS SENT DURING P27 DATA LOADS).
058503,000057:                                                                                                  #                           V70,V71,V72 OR V73 WILL HAVE TO BE COMPLETELY RESENT BY USER.
058504,000058:                                                                                                  #                        2. AFTER VERIFLAG INVERSION (WHEN UPDATE OF THE SPECIFIED ERASABLES IS BEING PERFORMED)---
058505,000059:                                                                                                  #                           PROTECTED AGAINST RESTARTS.
058506,000060: 
058507,000061:                                                                                                  #  DEBRIS:               UPBUFF  (20D)   TEMP STORAGE FOR ADDRESSES AND CONTENTS.
058508,000062:                                                                                                  #                        UPVERB  (1)     VERB NUMBER MINUS 70D (E.G. FOR V72, UPVERB = 72D - 70D = 2)
058509,000063:                                                                                                  #                        UPOLDMOD(1)     FOR MAJOR MODE INTERRUPTED BY P27.
058510,000064:                                                                                                  #                        COMPNUMB(1)     TOTAL NUMBER OF COMPONENTS TO BE TRANSMITTED.
058511,000065:                                                                                                  #                        UPCOUNT (1)     ACTUAL NUMBER OF COMPONENTS RECEIVED.
058512,000066:                                                                                                  #                        UPTEMP  (1)     SCRATCH, BUT USUALLY CONTAINS COMPONENT NUMBER TO BE CHANGED DURING VERIFY CYCLE
058513,000067: 
058514,000068:                                                                                                  #  INPUT:
058515,000069: 
058516,000070:                                                                                                  #        ENTRY:                  DESCRIPTION
058517,000071:                                                                                                  #        V70EXXXXXEXXXXXE        (LIFTOFF TIME INCREMENT) DOUBLE PRECISION OCTAL TIME INCREMENT, XXXXX XXXXX,
058518,000072:                                                                                                  #                                IS ADDED TO TEPHEM, SUBTRACTED FROM AGC CLOCK(TIME2,TIME1), SUBTRACTED FROM CSM STATE
058519,000073:                                                                                                  #                                VECTOR TIME(TETCSM) AND SUBTRACTED FROM LEM STATE VECTOR TIME(TETLEM).
058520,000074:                                                                                                  #                                THE DP OCTAL TIME INCREMENT IS SCALED AT 2(28).

Page 1377

058522,000076:                                                                                                  #        V71EIIEAAAAE            (CONTIGUOUS BLOCK UPDATE) II-2 OCTAL COMPONENTS, XXXXX,
058523,000077:                                                                                                  #        XXXXXE                  ARE LOADED INTO ERASABLE STARTING AT ECADR, AAAA.
058524,000078:                                                                                                  #        XXXXXE                  IT IS .GE. 3 .AND. .LE. 20D.,
058525,000079:                                                                                                  #                                AND (AAAA + II -3) DOES NOT PRODUCE AN ADDRESS IN THE
058526,000080:                                                                                                  #        9 NEXT BANK
058527,000081:                                                                                                  #          .                     SCALING IS SAME AS INTERNAL REGISTERS.
058528,000082: 
058529,000083:                                                                                                  #        V72EIIE                 (SCATTER UPDATE) (II-1)/2 OCTAL COMPONENTS, XXXXX, ARE
058530,000084:                                                                                                  #        AAAAEXXXXXE             LOADED INTO ERASABLE LOCATIONS, AAAA.
058531,000085:                                                                                                  #        AAAAEXXXXXE             II IS .GE. 3 .AND. .LE. 19D, AND MUST BE ODD.
058532,000086:                                                                                                  #          .                     SCALING IS SAME AS INTERNAL REGISTERS.
058533,000087: 
058534,000088:                                                                                                  #        V73EXXXXXEXXXXXE        (OCTAL CLOCK INCREMENT) DOUBLE PRECISION OCTAL TIME
058535,000089:                                                                                                  #                                INCREMENT XXXXX XXXXX, IS ADDED TO THE AGC CLOCK, IN
058536,000090:                                                                                                  #                                CENTISECONDS SCALED AT (2)28.
058537,000091:                                                                                                  #                                THIS LOAD IS THE OCTAL EQUIVALENT OF V55.
058538,000092: 
058539,000093:                                                                                                  #  OUTPUT:               IN ADDITION TO THE ABOVE REGISTER LOADS, ALL UPDATES
058540,000094:                                                                                                  #                        COMPLEMENT BIT3 OF FLAGWORD7.
058541,000095: 
058542,000096:                                                                                                  #  ADDITIONAL NOTES:     VERB 71, JUST DEFINED ABOVE WILL BE USED TO PERFORM BUT NOT LIMITED TO THE FOLLOWING UPDATES --
058543,000097:                                                                                                  #                        1.  CSM/LM STATE VECTOR UPDATE
058544,000098:                                                                                                  #                        2.  REFSMMAT UPDATE
058545,000099: 
058546,000100:                                                                                                  #        THE FOLLOWING COMMENTS DELINEATE EACH SPECIAL UPDATE ----
058547,000101: 
058548,000102:                                                                                                  #        1.  CSM/LM STATE VECTOR UPDATE (ALL DATA ENTRIES IN OCTAL)
058549,000103:                                                                                                  #                ENTRIES:        DATA DEFINITION:                                SCALE FACTORS:
058550,000104:                                                                                                  #                V71E            CONTIGUOUS BLOCK UPDATE VERB
058551,000105:                                                                                                  #                   21E          NUMBER OF COMPONENTS FOR STATE VECTOR UPDATE
058552,000106:                                                                                                  #                 AAAAE          ECADR OF 'UPSVFLAG'
058553,000107:                                                                                                  #                XXXXXE          STATE VECTOR IDENTIFIER: 00001 FOR CSM, 77776 FOR LEM - EARTH SPHERE OF INFLUENCE SCALING
058554,000108:                                                                                                  #                                                         00002 FOR CSM, 77775 FOR LEM - LUNAR SPHERE OF INFLUENCE SCALING
058555,000109:                                                                                                  #                XXXXXEXXXXXE    X POSITION
058556,000110:                                                                                                  #                XXXXXEXXXXXE    Y POSITION
058557,000111:                                                                                                  #                XXXXXEXXXXXE    Z POSITION
058558,000112:                                                                                                  #                XXXXXEXXXXXE    X VELOCITY
058559,000113:                                                                                                  #                XXXXXEXXXXXE    Y VELOCITY
058560,000114:                                                                                                  #                XXXXXEXXXXXE    Z VELOCITY
058561,000115:                                                                                                  #                XXXXXEXXXXXE    TIME FROM AGC CLOCK ZERO
058562,000116:                                                                                                  #                V33E            VERB 33 TO SIGNAL THAT THE STATE VECTOR IS READY TO BE STORED.
058563,000117: 
058564,000118:                                                                                                  #        2.  REFSMMAT (ALL DATA ENTRIES IN OCTAL)
058565,000119:                                                                                                  #                ENTRIES:        DATA DEFINITIONS:                               SCALE FACTORS:

Page 1378

058567,000121:                                                                                                  #                V71E            CONTIGUOUS BLOCK UPDATE VERB
058568,000122:                                                                                                  #                   24E          NUMBER OF COMPONENTS FOR REFSMMAT UPDATE
058569,000123:                                                                                                  #                 AAAAE          ECADR OF 'REFSMMAT'
058570,000124:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 1                                  2(-1)
058571,000125:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 2                                  2(-1)
058572,000126:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 3                                  2(-1)
058573,000127:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 1                                  2(-1)
058574,000128:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 2                                  2(-1)
058575,000129:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 3                                  2(-1)
058576,000130:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 1                                  2(-1)
058577,000131:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 2                                  2(-1)
058578,000132:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 3                                  2(-1)
058579,000133:                                                                                                  #                V33E            VERB 33 TO SIGNAL THAT REFSMMAT IS READY TO BE STORED.
058580,000134: 
058581,000135: 
058582,000136: 
058583,000137: 07,3764                                           BANK     07                                    
058584,000138: 43,2000                                           SETLOC   EXTVERBS                              
058585,000139: 43,2000                                           BANK                                           
058586,000140: 
058587,000141: 43,3745  E3,1706                                  EBANK=   TEPHEM                                
058588,000142: 
058589,000143: 43,3745                                           COUNT*   $$/P27                                
058590,000144: 43,3745           34755        V70UPDAT           CAF      UP70                                  #  COMES HERE ON V70E
058591,000145: 43,3746           13754                           TCF      V73UPDAT   +1                         
058592,000146: 
058593,000147: 43,3747           34753        V71UPDAT           CAF      UP71                                  #  COMES HERE ON V71E
058594,000148: 43,3750           13754                           TCF      V73UPDAT   +1                         
058595,000149: 
058596,000150: 43,3751           34752        V72UPDAT           CAF      UP72                                  #  COMES HERE ON V72E
058597,000151: 43,3752           13754                           TCF      V73UPDAT   +1                         
058598,000152: 
058599,000153: 43,3753           36250        V73UPDAT           CAF      UP73                                  #  COMES HERE ON V73E
058600,000154: 
058601,000155: 43,3754           55165                 +1        TS       UPVERBSV                              #  SAVE UPVERB UNTIL IT'S OK TO ENTER P27
058602,000156: 
058603,000157: 43,3755           02076                           TC       TESTXACT                              #  GRAB DISPLAY IF AVAILABLE, OTHERWISE
058604,000158:                                                                                                  #  TURN*OPERATOR ERROR* ON AND TERMINATEJOB
058605,000159: 
058606,000160: 43,3756           31010                           CA       MODREG                                #  CHECK IF UPDATE ALLOWED
058607,000161: 43,3757           00006                           EXTEND                                         #  FIRST CHECK FOR MODREG = +0, -0
058608,000162: 43,3760           13763                           BZF      +3                                    #  (+0 = P00, -0 = FRESHSTART)
058609,000163: 43,3761           04635        UPERROR            TC       POSTJUMP                              #  TURN ON 'OPERATOR ERROR' LIGHT
058610,000164: 43,3762           11743                           CADR     UPERROUT   +2                         #  GO TO COMMON UPDATE PROGRAM EXIT
058611,000165: 
058612,000166: 43,3763  43,3761               CKMDMORE           =        UPERROR                               
058613,000167: 43,3763           55170                           TS       UPOLDMOD                              #  SAVE CURRENT MAJOR MODE

Page 1379

058615,000169: 43,3764           31165                           CAE      UPVERBSV                              #  SET UPVERB TO INDICATE TO P27
058616,000170: 
058617,000171: 43,3765           55171                           TS       UPVERB                                #  WHICH EXTENDED VERB CALLED IT.
058618,000172: 
058619,000173: 43,3766           34753                           CAF      ONE                                   
058620,000174: 43,3767           55172                           TS       UPCOUNT                               #  INITIALIZE UPCOUNT TO 1
058621,000175: 
058622,000176: 43,3770           04635                           TC       POSTJUMP                              #  LEAVE EXTENDED VERB BANK AND
058623,000177: 43,3771           11362                           CADR     UPPART2                               #  GO TO UPDATE PROGRAM (P27) BANK.
058624,000178: 
058625,000179: 43,3772     4755               UP70               EQUALS   ZERO                                  
058626,000180: 43,3772     4753               UP71               EQUALS   ONE                                   
058627,000181: 43,3772     4752               UP72               EQUALS   TWO                                   
058628,000182: 43,3772     6250               UP73               EQUALS   THREE                                 
058629,000183: 
058630,000184: 04,3362                                           BANK     04                                    
058631,000185: 04,2000                                           SETLOC   UPDATE2                               
058632,000186: 04,2000                                           BANK                                           
058633,000187: 
058634,000188: 04,3362                                           COUNT*   $$/P27                                
058635,000189: 
058636,000190: 04,3362                        UPPART2            EQUALS                                         #  UPDATE PROGRAM - PART 2
058637,000191: 
058638,000192: 04,3362           05353                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO RESTORE OLD MODE
058639,000193: 04,3363           07026                           OCT      07026                                 #  AND DOWNLIST AND EXIT IF RESTART OCCURS.
058640,000194: 04,3364           30000                           OCT      30000                                 #  PRIORITY SAME AS CHRPRIO
058641,000195: 04,3365     1173                                  EBANK=   UPBUFF                                
058642,000196: 04,3365           03673 10102                     2CADR    UPOUT      +1                         
058643,000197: 
058644,000198: 04,3367           34753                           CAF      ONE                                   
058645,000199: 04,3370           54333                           TS       DNLSTCOD                              #  DOWNLIST
058646,000200: 
058647,000201: 04,3371           05311                           TC       NEWMODEX                              #  SET MAJOR MODE = 27
058648,000202: 04,3372           00033                           DEC      27         B-14                       
058649,000203: 
058650,000204: 04,3373           51171                           INDEX    UPVERB                                #  BRANCH DEPENDING ON WHETHER THE UPDATE
058651,000205: 04,3374           13375                           TCF      +1                                    #  VERB REQUIRES A FIXED OR VARIABLE NUMBER
058652,000206: 04,3375           13400                           TCF      +3                                    #  V70 FIXED.               (OF COMPONENTS.
058653,000207: 04,3376           13403                           TCF      OHWELL1                               #  V71 VARIABLE - GO GET NO. OF COMPONENTS
058654,000208: 04,3377           13403                           TCF      OHWELL1                               #  V72 VARIABLE - GO GET NO. OF COMPONENTS
058655,000209: 04,3400           34752                           CA       TWO                                   #  V73 (AND V70) FIXED
058656,000210: 04,3401           55167                           TS       COMPNUMB                              #  SET NUMBER OF COMPONENTS TO 2.
058657,000211: 04,3402           13426                           TCF      OHWELL2                               #  GO GET THE TWO UPDATE COMPONENTS
058658,000212: 
058659,000213: 04,3403           33476        OHWELL1            CAF      ADUPBUFF                              #  * REQUEST USER TO SEND NUMBER *
058660,000214: 04,3404           54156                           TS       MPAC       +2                         #  * OF COMPONENTS PARAMETER(II).*
058661,000215: 04,3405           33477                 +2        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058662,000216: 04,3406           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
058663,000217: 04,3407           20334                           CADR     GOXDSPF                               #  TO REQUEST II.
058664,000218: 

Page 1380

058666,000220: 04,3410           13673                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN
058667,000221: 04,3411           13405                           TCF      OHWELL1    +2                         
058668,000222: 04,3412           03467                           TC       CK4V32                                #  DATA OR V32 RETURN
058669,000223: 04,3413           44752                           CS       BIT2                                  
058670,000224: 04,3414           61173                           AD       UPBUFF                                #  IS II (NUMBER OF COMPONENTS PARAMETER)
058671,000225: 04,3415           00006                           EXTEND                                         #  .GE. 3 AND .LE. 20D.
058672,000226: 04,3416           63405                           BZMF     OHWELL1    +2                         
058673,000227: 04,3417           41173                           CS       UPBUFF                                
058674,000228: 04,3420           64362                           AD       UP21                                  
058675,000229: 04,3421           00006                           EXTEND                                         
058676,000230: 04,3422           63405                           BZMF     OHWELL1    +2                         
058677,000231: 04,3423           31173                           CAE      UPBUFF                                
058678,000232: 04,3424           55167                           TS       COMPNUMB                              #  SAVE II IN COMPNUMB
058679,000233: 
058680,000234:                                                                                                  #  UPBUFF LOADING SEQUENCE
058681,000235: 
058682,000236: 04,3425           25172                           INCR     UPCOUNT                               #  INCREMENT COUNT OF COMPONENTS RECEIVED.
058683,000237: 04,3426           33643        OHWELL2            CAF      ADUPBFM1                              #  CALCULATE LOCATION (ECADR) IN UPBUFF
058684,000238: 04,3427           61172                           AD       UPCOUNT                               #  WHERE NEXT COMPONENT SHOULD BE STORED.
058685,000239: 04,3430           54156                 +2        TS       MPAC       +2                         #  PLACE ECADR INTO R3.
058686,000240: 04,3431           33477                 +3        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058687,000241: 04,3432           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
058688,000242: 04,3433           20334                           CADR     GOXDSPF                               #  TO REQUEST DATA.
058689,000243: 04,3434           13673                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN.
058690,000244: 04,3435           13431                           TCF      OHWELL2    +3                         #  V33 PROCEED RETURN
058691,000245: 04,3436           03467                           TC       CK4V32                                #  DATA OR V32 RETURN
058692,000246: 04,3437           41172                           CS       UPCOUNT                               #  HAVE WE FINISHED RECEIVING ALL
058693,000247: 04,3440           61167                           AD       COMPNUMB                              #  THE DATA WE EXPECTED.
058694,000248: 04,3441           00006                           EXTEND                                         
058695,000249: 04,3442           63444                           BZMF     UPVERIFY                              #  YES - GO TO VERIFICATION SEQUENCE
058696,000250: 04,3443           13425                           TCF      OHWELL2    -1                         #  NO - REQUEST ADDITIONAL DATA.
058697,000251: 
058698,000252:                                                                                                  #  VERIFY SEQUENCE
058699,000253: 
058700,000254: 04,3444           33475        UPVERIFY           CAF      ADUPTEMP                              #  PLACE ECADR WHERE COMPONENT NO. INDEX
058701,000255: 04,3445           54156                           TS       MPAC       +2                         #  IS TO BE STORED INTO R3.
058702,000256: 04,3446           33500                           CAF      UPVRFYNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058703,000257: 04,3447           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N02 TO REQUEST
058704,000258: 04,3450           20334                           CADR     GOXDSPF                               #  DATA CORRECTION OR VERIFICATION.
058705,000259: 04,3451           13673                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN
058706,000260: 04,3452           13501                           TCF      UPSTORE                               #  V33 DATA SENT IS GOOD.  GO STORE IT.
058707,000261: 04,3453           03467                           TC       CK4V32                                #  COMPONENT NO. INDEX OR V32 RETURN
058708,000262: 04,3454           31166                           CA       UPTEMP                                #  DOES THE COMPONENT NO. INDEX JUST SENT
058709,000263: 04,3455           00006                           EXTEND                                         #  SPECIFY A LEGAL COMPONENT NUMBER?
058710,000264: 04,3456           63444                           BZMF     UPVERIFY                              #  NO, IT IS NOT POSITIVE NONZERO
058711,000265: 04,3457           41166                           CS       UPTEMP                                
058712,000266: 04,3460           61167                           AD       COMPNUMB                              
058713,000267: 04,3461           64753                           AD       BIT1                                  

Page 1381

058715,000269: 04,3462           00006                           EXTEND                                         
058716,000270: 04,3463           63444                           BZMF     UPVERIFY                              #  NO
058717,000271: 04,3464           33643                           CAF      ADUPBFM1                              #  YES- BASED ON THE COMPONENT NO. INDEX
058718,000272: 04,3465           61166                           AD       UPTEMP                                #  CALCULATE THE ECADR OF LOCATION IN
058719,000273: 04,3466           13430                           TCF      OHWELL2    +2                         #  UPBUFF WHICH USER WANTS TO CHANGE.
058720,000274: 
058721,000275: 04,3467  04,3673               UPOUT4             EQUALS   UPOUT      +1                         #  COMES HERE ON V34 TO TERMINATE UPDATE
058722,000276: 
058723,000277:                                                                                                  #  CHECK FOR VERB 32 SEQUENCE
058724,000278: 
058725,000279: 04,3467           40154        CK4V32             CS       MPAC                                  #  ON DATA RETURN FROM 'GOXDSPF'
058726,000280: 04,3470           74746                           MASK     BIT6                                  #  ON DATA RETURN FROM "GOXDSP" & THE CON-
058727,000281: 04,3471           10000                           CCS      A                                     #  TENTS OF MPAC = VERB.  SO TEST FOR V32.
058728,000282: 04,3472           00002                           TC       Q                                     #  IT'S NOT A V32, IT'S DATA.  PROCEED.
058729,000283: 04,3473           50002                           INDEX    Q                                     
058730,000284: 04,3474           77771                           TC       0          -6                         #  V32 ENCOUNTERED - GO BACK AND GET DATA
058731,000285: 
058732,000286: 04,3475           01166        ADUPTEMP           ADRES    UPTEMP                                #  ADDRESS OF TEMP STORAGE FOR CORRECTIONS
058733,000287: 04,3476           01173        ADUPBUFF           ADRES    UPBUFF                                #  ADDRESS OF UPDATE DATA STORAGE BUFFER
058734,000288: 04,3477           05201        UPLOADNV           VN       2101                                  #  VERB 21 NOUN 01
058735,000289: 04,3500           05202        UPVRFYNV           VN       2102                                  #  VERB 21 NOUN 02
058736,000290: 04,3501     4362               UP21               =        MD1                                   #  DEC 21 = MAX NO OF COMPONENTS +1
058737,000291: 04,3501     4756               UPDTPHAS           EQUALS   FIVE                                  
058738,000292: 
058739,000293:                                                                                                  #  PRE-STORE AND FAN TO APPROPRIATE BRANCH SEQUENCE
058740,000294: 
058741,000295: 04,3501                        UPSTORE            EQUALS                                         #  GROUND HAS VERIFIED UPDATE.  STORE DATA.
058742,000296: 
058743,000297: 04,3501           00004                           INHINT                                         
058744,000298: 
058745,000299: 04,3502           30103                           CAE      FLAGWRD7                              #  INVERT VERIFLAG (BIT 3 OF FLAGWRD7) TO
058746,000300: 04,3503           56001                           XCH      L                                     #  INDICATE TO THE GROUND (VIA DOWNLINK)
058747,000301: 04,3504           34751                           CAF      VERIFBIT                              #  THAT THE V33 (WHICH THE GROUND SENT TO
058748,000302: 04,3505           00006                           EXTEND                                         #  VERIFY THE UPDATE) HAS BEEN SUCCESSFULLY
058749,000303: 04,3506           06001                           RXOR     LCHAN                                 #  RECEIVED BY THE UPDATE PROGRAM
058750,000304: 04,3507           54103                           TS       FLAGWRD7                              
058751,000305: 
058752,000306: 04,3510           05353                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO REDO THE UPDATE
058753,000307: 04,3511           04026                           OCT      04026                                 #  DATA STORE IF A RESTART OCCURS.
058754,000308: 04,3512           00004                           INHINT                                         #  (BECAUSE PHASCHNG DID A RELINT)
058755,000309: 
058756,000310: 04,3513           44752                           CS       TWO                                   #  GO TO UPFNDVAC IF INSTALL IS REQUIRED,
058757,000311: 04,3514           61171                           AD       UPVERB                                #  THAT IS, IF IT'S A V70 - V72.
058758,000312: 04,3515           00006                           EXTEND                                         #  GO TO UPEND73 IF IT'S A V73.
058759,000313: 04,3516           63525                           BZMF     UPFNDVAC                              
058760,000314: 
058761,000315:                                                                                                  #  VERB 73 BRANCH
058762,000316: 
058763,000317: 04,3517           00006        UPEND73            EXTEND                                         #  V73 - PERFORM DP OCTAL AGC CLOCK INCREMENT

Page 1382

058765,000319: 04,3520           31174                           DCA      UPBUFF                                
058766,000320: 04,3521           53204                           DXCH     UPBUFF     +8D                        
058767,000321: 04,3522           03550                           TC       TIMEDIDL                              
058768,000322: 04,3523           04364                           TC       FALTON                                #  ERROR- TURN ON *OPERATOR ERROR* LIGHT
058769,000323: 04,3524           03673                           TC       UPOUT      +1                         #  GO TO COMMON UPDATE PROGRAM EXIT
058770,000324: 
058771,000325: 04,3525           34355        UPFNDVAC           CAF      CHRPRIO                               #  (USE EXTENDED VERB PRIORITY)
058772,000326: 04,3526           05105                           TC       FINDVAC                               #  GET VAC AREA FOR 'CALL INTSTALL'
058773,000327: 04,3527  E3,1706                                  EBANK=   TEPHEM                                
058774,000328: 04,3527           03532 10103                     2CADR    UPJOB                                 #  (NOTE: THIS WILL ALSO SET EBANK FOR
058775,000329: 04,3531           05155                           TC       ENDOFJOB                              #  'TEPHEM' UPDATE BY V70)
058776,000330: 
058777,000331: 04,3532           06042        UPJOB              TC       INTPRET                               #  THIS COULD BE A STATE VECTOR UPDATE--SO
058778,000332: 04,3533           77624                           CALL                                           #  WAIT(PUT JOB TO SLEEP) IF ORBIT INT(OI)
058779,000333: 04,3534           27412                                    INTSTALL                              #  IS IN PROGRESS--OR--GRAB OI AND RETURN
058780,000334:                                                                                                  #  TO UPWAKE IF OI IS NOT IN PROGRESS.
058781,000335: 
058782,000336: 04,3535           77776        UPWAKE             EXIT                                           
058783,000337: 
058784,000338: 04,3536           05353                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
058785,000339: 04,3537           04026                           OCT      04026                                 
058786,000340: 
058787,000341: 04,3540           05504                           TC       UPFLAG                                #  SET INTEGRATION RESTART BIT
058788,000342: 04,3541           00236                           ADRES    REINTFLG                              
058789,000343: 04,3542           00004                           INHINT                                         
058790,000344: 04,3543                        UPPART3            EQUALS                                         
058791,000345: 
058792,000346: 04,3543           51171                           INDEX    UPVERB                                #  BRANCH TO THE APPROPRIATE UPDATE VERB
058793,000347: 04,3544           13545                           TCF      +1                                    #  ROUTINE TO ACTUALLY PERFORM THE UPDATE
058794,000348: 04,3545           13704                           TCF      UPEND70                               #  V70
058795,000349: 04,3546           13613                           TCF      UPEND71                               #  V71
058796,000350: 04,3547           13645                           TCF      UPEND72                               #  V72
058797,000351: 
058798,000352:                                                                                                  #  ROUTINE TO INCREMENT CLOCK (TIME2,TIME1) WITH CONTENTS OF DP WORD AT UPBUFF.
058799,000353: 
058800,000354: 04,3550           00006        TIMEDIDL           EXTEND                                         
058801,000355: 04,3551           23166                           QXCH     UPTEMP                                #  SAVE Q FOR RETURN
058802,000356: 04,3552           34755                           CAF      ZERO                                  #  ZERO AND SAVE TIME2,TIME1
058803,000357: 04,3553           22007                           ZL                                             
058804,000358: 04,3554           52025                           DXCH     TIME2                                 
058805,000359: 04,3555           53216                           DXCH     UPBUFF     +18D                       #  STORE IN CASE OF OVERFLOW
058806,000360: 
058807,000361: 04,3556           34756                           CAF      UPDTPHAS                              #  DO
058808,000362: 04,3557           54001                           TS       L                                     #  A
058809,000363: 04,3560           40000                           COM                                            #  QUICK
058810,000364: 04,3561           52764                           DXCH     -PHASE6                               #  PHASCHNG
058811,000365: 
058812,000366: 04,3562           00004        TIMEDIDR           INHINT                                         

Page 1383

058814,000368: 04,3563           34755                           CAF      ZERO                                  
058815,000369: 04,3564           22007                           ZL                                             #  PICK UP INCREMENTER(AND ZERO
058816,000370: 04,3565           54156                           TS       MPAC       +2                         #  IT IN CASE OF RESTARTS) AND
058817,000371: 04,3566           53204                           DXCH     UPBUFF     +8D                        #  STORE IT
058818,000372: 04,3567           52155                           DXCH     MPAC                                  #  INTO MPAC FOR TPAGREE.
058819,000373: 
058820,000374: 04,3570           00006                           EXTEND                                         
058821,000375: 04,3571           31216                           DCA      UPBUFF     +18D                       
058822,000376: 04,3572           20155                           DAS      MPAC                                  #  FORM SUM IN MPAC
058823,000377: 04,3573           00006                           EXTEND                                         
058824,000378: 04,3574           13603                           BZF      DELTATOK                              #  TEST FOR OVERFLOW
058825,000379: 04,3575           34755                           CAF      ZERO                                  
058826,000380: 04,3576           53216                           DXCH     UPBUFF     +18D                       #  OVERFLOW, RESTORE OLD VALUE OF CLOCK
058827,000381: 04,3577           20025                           DAS      TIME2                                 #  AND TURN ON OPERATOR ERROR
058828,000382: 
058829,000383: 04,3600           05353                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
058830,000384: 04,3601           04026                           OCT      04026                                 
058831,000385: 
058832,000386: 04,3602           01166                           TC       UPTEMP                                #  GO TO ERROR EXIT
058833,000387: 
058834,000388: 04,3603           07262        DELTATOK           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
058835,000389: 04,3604           52155                           DXCH     MPAC                                  
058836,000390: 04,3605           20025                           DAS      TIME2                                 #  INCREMENT TIME2,TIME1
058837,000391: 
058838,000392: 04,3606           05353                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
058839,000393: 04,3607           04026                           OCT      04026                                 
058840,000394: 
058841,000395: 04,3610           00004                           INHINT                                         
058842,000396: 04,3611           51166                           INDEX    UPTEMP                                #  (CODED THIS WAY FOR RESTART PROTECTION)
058843,000397: 04,3612           00001                           TC       1                                     #  NORMAL RETURN
058844,000398: 
058845,000399:                                                                                                  #  VERB 71 BRANCH
058846,000400: 
058847,000401: 04,3613           31174        UPEND71            CAE      UPBUFF     +1                         #  SET EBANK
058848,000402: 04,3614           54003                           TS       EBANK                                 #    AND
058849,000403: 04,3615           74357                           MASK     LOW8                                  #  CALCULATE
058850,000404: 04,3616           55166                           TS       UPTEMP                                #  S-REG VALUE OF RECEIVING AREA
058851,000405: 
058852,000406: 04,3617           67750                           AD       NEG3                                  #  IN THE PROCESS OF
058853,000407: 04,3620           61167                           AD       COMPNUMB                              #  PERFORMING
058854,000408: 04,3621           00006                           EXTEND                                         #  THIS UPDATE
058855,000409: 04,3622           13630                           BZF      STORLP71                              #  WILL WE
058856,000410: 04,3623           74743                           MASK     BIT9                                  #  OVERFLOW
058857,000411: 04,3624           10000                           CCS      A                                     #  INTO THE NEXT EBANK....
058858,000412: 04,3625           13741                           TCF      UPERROUT                              #  YES
058859,000413: 
058860,000414: 04,3626           37750                           CA       NEG3                                  #  NO - CALCULATE NUMBER OF
058861,000415: 04,3627           61167                           AD       COMPNUMB                              #  WORDS TO BE STORED MINUS ONE
058862,000416: 04,3630           54154        STORLP71           TS       MPAC                                  #  SAVE NO. OF WORDS REMAINING MINUS ONE
058863,000417: 04,3631           50000                           INDEX    A                                     #  TAKE NEXT UPDATE WORD FROM
058864,000418: 04,3632           31175                           CA       UPBUFF     +2                         #  UPBUFF AND

Page 1384

058866,000420: 04,3633           54001                           TS       L                                     #  SAVE IT IN L
058867,000421: 04,3634           30154                           CA       MPAC                                  #  CALCULATE NEXT
058868,000422: 04,3635           61166                           AD       UPTEMP                                #  RECEIVING ADDRESS
058869,000423: 04,3636           50000                           INDEX    A                                     
058870,000424: 04,3637  E3,1400                                  EBANK=   1400                                  
058871,000425: 04,3637           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
058872,000426: 04,3640  E3,1706                                  EBANK=   TEPHEM                                
058873,000427: 04,3640           10154                           CCS      MPAC                                  #  ARE THERE ANY WORDS LEFT TO BE STORED
058874,000428: 04,3641           13630                           TCF      STORLP71                              #  YES
058875,000429: 04,3642           13672                           TCF      UPOUT                                 #  NO- THEN EXIT UPDATE PROGRAM
058876,000430: 04,3643           01172        ADUPBFM1           ADRES    UPBUFF     -1                         #  SAME AS ADUPBUFF BUT LESS 1 (DON'T MOVE)
058877,000431: 04,3644           13672                           TCF      UPOUT                                 #  NO- EXIT UPDATE (HERE WHEN COMPNUMB = 3)
058878,000432: 
058879,000433:                                                                                                  #  VERB 72 BRANCH
058880,000434: 
058881,000435: 04,3645           34753        UPEND72            CAF      BIT1                                  #  HAVE AN ODD NO. OF COMPONENTS
058882,000436: 04,3646           71167                           MASK     COMPNUMB                              #  BEEN SENT FOR A V72 UPDATE ...
058883,000437: 04,3647           10000                           CCS      A                                     
058884,000438: 04,3650           13652                           TCF      +2                                    #  YES
058885,000439: 04,3651           13741                           TCF      UPERROUT                              #  ERROR- SHOULD BE ODD NO. OF COMPONENTS
058886,000440: 04,3652           44752                           CS       BIT2                                  
058887,000441: 04,3653           61167                           AD       COMPNUMB                              
058888,000442: 04,3654           54154        LDLOOP72           TS       MPAC                                  #  NOW PERFORM THE UPDATE
058889,000443: 04,3655           50000                           INDEX    A                                     
058890,000444: 04,3656           31174                           CAE      UPBUFF     +1                         #  PICK UP NEXT UPDATE WORD
058891,000445: 04,3657           22000                           LXCH     A                                     
058892,000446: 04,3660           10154                           CCS      MPAC                                  #  SET POINTER TO ECADR (MUST BE CCS)
058893,000447: 04,3661           54154                           TS       MPAC                                  
058894,000448: 04,3662           50000                           INDEX    A                                     
058895,000449: 04,3663           31174                           CAE      UPBUFF     +1                         #  PICK UP NEXT ECADR OF REG TO BE UPDATED
058896,000450: 04,3664           54003                           TS       EBANK                                 #  SET EBANK
058897,000451: 04,3665           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
058898,000452: 04,3666           50000                           INDEX    A                                     
058899,000453: 04,3667  E3,1400                                  EBANK=   1400                                  
058900,000454: 04,3667           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
058901,000455: 04,3670  E3,1706                                  EBANK=   TEPHEM                                
058902,000456: 04,3670           10154                           CCS      MPAC                                  #  ARE WE THROUGH THE V72 UPDATE...
058903,000457: 04,3671           13654                           TCF      LDLOOP72                              #  NO
058904,000458: 
058905,000459:                                                                                                  #  NORMAL FINISH OF P27
058906,000460: 
058907,000461: 04,3672                        UPOUT              EQUALS                                         
058908,000462: 04,3672           03147                           TC       INTWAKEU                              #  RELEASE GRAB OF ORBITAL INTEGRATION
058909,000463: 04,3673           31170                 +1        CAE      UPOLDMOD                              #  RESTORE PRIOR P27 MODE
058910,000464: 04,3674           05314                           TC       NEWMODEX   +3                         
058911,000465: 04,3675           34755                           CAF      ZERO                                  
058912,000466: 04,3676           54333                           TS       DNLSTCOD                              
058913,000467: 04,3677           03746                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT

Page 1385

058915,000469: 04,3700           00006                           EXTEND                                         #  KILL GROUP 6.
058916,000470: 04,3701           34755                           DCA      NEG0                                  
058917,000471: 04,3702           52764                           DXCH     -PHASE6                               
058918,000472: 
058919,000473: 04,3703           05472                           TC       ENDEXT                                #  EXTENDED VERB EXIT
058920,000474: 
058921,000475:                                                                                                  #  VERB 70 BRANCH
058922,000476: 
058923,000477: 04,3704           00006        UPEND70            EXTEND                                         #  V70 DOES THE FOLLOWING WITH DP DELTA
058924,000478: 04,3705           41174                           DCS      UPBUFF                                #  TIME IN UPBUFF
058925,000479: 04,3706           53204                           DXCH     UPBUFF     +8D                        
058926,000480: 04,3707           03550                           TC       TIMEDIDL                              #  DECREMENT AGC CLOCK
058927,000481: 
058928,000482: 04,3710           03741                           TC       UPERROUT                              #  ERROR WHILE DECREMENTING CLOCK -- EXIT
058929,000483: 
058930,000484: 04,3711  E3,1706                                  EBANK=   TEPHEM                                
058931,000485: 04,3711           00006                           EXTEND                                         
058932,000486: 04,3712           41174                           DCS      UPBUFF                                #  COPY DECREMENTERS FOR
058933,000487: 04,3713           53206                           DXCH     UPBUFF     +10D                       #  RESTART PROTECTION
058934,000488: 04,3714           00006                           EXTEND                                         
058935,000489: 04,3715           41174                           DCS      UPBUFF                                
058936,000490: 04,3716           53210                           DXCH     UPBUFF     +12D                       
058937,000491: 
058938,000492: 04,3717           05353                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
058939,000493: 04,3720           04026                           OCT      04026                                 
058940,000494: 
058941,000495: 04,3721           34755                           CAF      ZERO                                  
058942,000496: 04,3722           22007                           ZL                                             
058943,000497: 04,3723           53206                           DXCH     UPBUFF     +10D                       #  DECREMENT CSM STATE VECTOR TIME
058944,000498: 04,3724           21571                           DAS      TETCSM                                
058945,000499: 
058946,000500: 04,3725           34755                           CAF      ZERO                                  
058947,000501: 04,3726           22007                           ZL                                             
058948,000502: 04,3727           53210                           DXCH     UPBUFF     +12D                       #  DECREMENT LEM STATE VECTOR TIME
058949,000503: 04,3730           21643                           DAS      TETLEM                                
058950,000504: 
058951,000505: 04,3731           34755                           CAF      ZERO                                  
058952,000506: 04,3732           22007                           ZL                                             
058953,000507: 04,3733           53174                           DXCH     UPBUFF                                
058954,000508: 04,3734           21710                           DAS      TEPHEM     +1                         #  INCREMENT TP TEPHEM
058955,000509: 04,3735           27706                           ADS      TEPHEM                                
058956,000510: 
058957,000511: 04,3736           05353                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
058958,000512: 04,3737           04026                           OCT      04026                                 
058959,000513: 
058960,000514: 04,3740     1173                                  EBANK=   UPBUFF                                
058961,000515: 
058962,000516: 04,3740           03672                           TC       UPOUT                                 #  GO TO STANDARD UPDATE PROGRAM EXIT

Page 1386

058964,000518: 
058965,000519:                                                                                                  #  ERROR SEQUENCE
058966,000520: 
058967,000521: 04,3741           04364        UPERROUT           TC       FALTON                                #  TURN ON *OPERATOR ERROR* LIGHT
058968,000522: 04,3742           13672                           TCF      UPOUT                                 #  GO TO COMMON UPDATE PROGRAM EXIT
058969,000523: 
058970,000524: 04,3743           04364                 +2        TC       FALTON                                #  TURN ON 'OPERATOR ERROR' LIGHT
058971,000525: 04,3744           03746                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT
058972,000526: 04,3745           05472                           TC       ENDEXT                                #  EXTENDED VERB EXIT
058973,000527:                                                                                                  #  (THE PURPOSE OF UPERROUT +2 EXIT IS
058974,000528:                                                                                                  #  TO PROVIDE AN ERROR EXIT WHICH DOES NOT
058975,000529:                                                                                                  #  RESET ANY RESTART GROUPS)
058976,000530: 
058977,000531:                                                                                                  #  :UPACTOFF: IS A ROUTINE TO TURN OFF UPLINK ACTIVITY LIGHT ON ALL EXITS FROM UPDATE PROGRAM (P27).
058978,000532: 
058979,000533: 04,3746           44751        UPACTOFF           CS       BIT3                                  
058980,000534: 04,3747           00006                           EXTEND                                         #  TURN OFF UPLINK ACTIVITY LIGHT
058981,000535: 04,3750           03011                           WAND     DSALMOUT                              #  (BIT 3 OF CHANNEL 11)
058982,000536: 04,3751           00002                           TC       Q                                     
058983,000537: 

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