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.

058426,000002:                                                                                                  ## Copyright:   Public domain.
058427,000003:                                                                                                  ## Filename:    UPDATE_PROGRAM.agc
058428,000004:                                                                                                  ## Purpose:     A section of Luminary revision 116.
058429,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
058430,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 12.
058431,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
058432,000008:                                                                                                  ##              that the code format has been changed to conform to the
058433,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
058434,000010:                                                                                                  ##              original YUL assembler.
058435,000011:                                                                                                  ## Reference:   pp. 1376-1386
058436,000012:                                                                                                  ## Assembler:   yaYUL
058437,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
058438,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
058439,000015:                                                                                                  ## Mod history: 2017-01-22 MAS  Created from Luminary 99.
058440,000016:                                                                                                  ##              2017-01-28 RSB  Comment-text fixes identified for Luminary 69.
058441,000017:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified for Artemis 72.
058442,000018:                                                                                                  ##              2017-02-10 RRB  Updated for Luminary 116.
058443,000019:                                                                                                  ##              2017-03-14 RSB  Proofed comment text via 3-way diff vs
058444,000020:                                                                                                  ##                              Luminary 99 and 131.
058445,000021:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
058446,000022:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
058447,000023:                                                                                                  ##              2017-03-19 HG   Remove statement CAE MODREG
058448,000024:                                                                                                  ##              2017-06-17 MAS  Globally removed all SBANK= workarounds.
058449,000025: 

Page 1376

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

Page 1377

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

Page 1378

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

Page 1379

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

Page 1380

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

Page 1381

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

Page 1382

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

Page 1383

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

Page 1384

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

Page 1385

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

Page 1386

058941,000517: 
058942,000518:                                                                                                  #  ERROR SEQUENCE
058943,000519: 
058944,000520: 04,3741           04364        UPERROUT           TC       FALTON                                #  TURN ON *OPERATOR ERROR* LIGHT
058945,000521: 04,3742           13672                           TCF      UPOUT                                 #  GO TO COMMON UPDATE PROGRAM EXIT
058946,000522: 
058947,000523: 04,3743           04364                 +2        TC       FALTON                                #  TURN ON 'OPERATOR ERROR' LIGHT
058948,000524: 04,3744           03746                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT
058949,000525: 04,3745           05472                           TC       ENDEXT                                #  EXTENDED VERB EXIT
058950,000526:                                                                                                  #  (THE PURPOSE OF UPERROUT +2 EXIT IS
058951,000527:                                                                                                  #  TO PROVIDE AN ERROR EXIT WHICH DOES NOT
058952,000528:                                                                                                  #  RESET ANY RESTART GROUPS)
058953,000529: 
058954,000530:                                                                                                  #  :UPACTOFF: IS A ROUTINE TO TURN OFF UPLINK ACTIVITY LIGHT ON ALL EXITS FROM UPDATE PROGRAM (P27).
058955,000531: 
058956,000532: 04,3746           44751        UPACTOFF           CS       BIT3                                  
058957,000533: 04,3747           00006                           EXTEND                                         #  TURN OFF UPLINK ACTIVITY LIGHT
058958,000534: 04,3750           03011                           WAND     DSALMOUT                              #  (BIT 3 OF CHANNEL 11)
058959,000535: 04,3751           00002                           TC       Q                                     
058960,000536: 

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