Source Code

These source-code files are part of a reconstructed copy of Comanche 67, the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 12.

They have been adapted from sources files for Comanche 55, and updated via disassembly of binary dumps of original core rope memory modules, part numbers 2003972-1081, 2003972-1091, 2003972-1111, 2003972-1121, 2003972-1131, and 2003972-1141.

Since only binary dumps (rather than listings) of Comanche 67 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

061950,000002:                                                                                                  ## Copyright:   Public domain.
061951,000003:                                                                                                  ## Filename:    UPDATE_PROGRAM.agc
061952,000004:                                                                                                  ## Purpose:     A section of Comanche revision 067.
061953,000005:                                                                                                  ##              It is part of the reconstructed source code for the flight
061954,000006:                                                                                                  ##              software for the Command Module's (CM) Apollo Guidance Computer
061955,000007:                                                                                                  ##              (AGC) for Apollo 12. No original listings of this program are
061956,000008:                                                                                                  ##              available; instead, this file was created via dissassembly of
061957,000009:                                                                                                  ##              dumps of Comanche 067 core rope modules and comparison with
061958,000010:                                                                                                  ##              other AGC programs.
061959,000011:                                                                                                  ## Assembler:   yaYUL
061960,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
061961,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
061962,000014:                                                                                                  ## Mod history: 2023-08-16 MAS  Created from Comanche 055.
061963,000015: 
061964,000016:                                                                                                  #  PROGRAM NAME:         P27
061965,000017:                                                                                                  #  WRITTEN BY:           KILROY/ DE WOLF
061966,000018: 
061967,000019:                                                                                                  #  MOD NO:               6
061968,000020:                                                                                                  #  MOD BY:               KILROY
061969,000021:                                                                                                  #  DATE:                 01DEC67
061970,000022: 
061971,000023:                                                                                                  #  LOG SECTION:          UPDATE PROGRAM.
061972,000024: 
061973,000025:                                                                                                  #  FUNCT. DESCR: P27 (THE UPDATE PROGRAM) PROCESSES COMMANDS AND DATA
061974,000026:                                                                                                  #                        INSERTIONS REQUESTED BY THE GROUND VIA UPLINK.
061975,000027:                                                                                                  #                        THE P27 PROGRAM WILL ACCEPT UPDATES
061976,000028:                                                                                                  #                        ONLY DURING P00 FOR THE LM, AND ONLY DURING P00,
061977,000029:                                                                                                  #                        P02, AND FRESH START FOR THE CSM
061978,000030: 
061979,000031:                                                                                                  #  CALLING SEQ:          PROGRAM IS INITIATED BY UPLINK ENTRY OF VERBS 70, 71, 72 AND 73.
061980,000032: 
061981,000033:                                                                                                  #  SUBROUTINES:          TESTXACT, NEWMODEX, NEWMODEX +3, GOXDSPF, BANKCALL, FINDVAC, INTPRET, INTSTALL, TPAGREE,
061982,000034:                                                                                                  #                        INTWAKEU, ENDEXT, POSTJUMP, FALTON, NEWPHASE, PHASCHNG
061983,000035: 
061984,000036:                                                                                                  #  NORMAL EXIT:          TC ENDEXT
061985,000037: 
061986,000038:                                                                                                  #  ALARM/ABORT:          TC FALTON FOLLOWED BY TC ENDEXT
061987,000039: 
061988,000040:                                                                                                  #  RESTARTS:             P27 IS RESTART PROTECTED IN TWO WAYS ...
061989,000041:                                                                                                  #                        1.      PRIOR TO VERIFLAG INVERSION (WHICH IS CAUSED BY THE GROUND/ASTRONAUT'S VERIFICATION OF UPDATE
061990,000042:                                                                                                  #                                DATA BY SENDING A V33E WHEN V21N02 IS FLASHING)---
061991,000043:                                                                                                  #                                NO PROTECTION EXCEPT PRE-P27 MODE IS RESTORED, COAST + ALIGN DOWNLIST IS SELECTED AND UPLINK
061992,000044:                                                                                                  #                                ACTIVITY LIGHT IS TURNED OFF.  (JUST AS IF A V34E WAS SENT DURING P27 DATA LOADS).
061993,000045:                                                                                                  #                                V70,V71,V72 OR V73 WILL HAVE TO BE COMPLETELY RESENT BY USER.
061994,000046:                                                                                                  #                        2.      AFTER VERIFLAG INVERSION (WHEN UPDATE OF THE SPECIFIED ERASABLES IS BEING PERFORMED)---
061995,000047:                                                                                                  #                                PROTECTED AGAINST RESTARTS.
061996,000048: 
061997,000049:                                                                                                  #  DEBRIS:               UPBUFF  (20D)   TEMP STORAGE FOR ADDRESSES AND CONTENTS.
061998,000050:                                                                                                  #                        UPVERB  (1)     VERB NUMBER MINUS 70D (E.G. FOR V72, UPVERB = 72D - 70D = 2)
061999,000051:                                                                                                  #                        UPOLDMOD(1)     FOR MAJOR MODE INTERRUPTED BY P27.
062000,000052:                                                                                                  #                        COMPNUMB(1)     TOTAL NUMBER OF COMPONENTS TO BE TRANSMITTED.
062001,000053:                                                                                                  #                        UPCOUNT (1)     ACTUAL NUMBER OF COMPONENTS RECEIVED.
062002,000054:                                                                                                  #                        UPTEMP  (1)     SCRATCH, BUT USUALLY CONTAINS COMPONENT NUMBER TO BE CHANGED DURING VERIFY CYCLE
062003,000055: 
062004,000056:                                                                                                  #  INPUT:
062005,000057: 
062006,000058:                                                                                                  #        ENTRY:                  DESCRIPTION
062007,000059:                                                                                                  #        V70EXXXXXEXXXXXE        (LIFTOFF TIME INCREMENT) DOUBLE PRECISION OCTAL TIME INCREMENT, XXXXX XXXXX,
062008,000060:                                                                                                  #                                IS ADDED TO TEPHEM, SUBTRACTED FROM AGC CLOCK(TIME2,TIME1), SUBTRACTED FROM CSM STATE
062009,000061:                                                                                                  #                                VECTOR TIME(TETCSM) AND SUBTRACTED FROM LEM STATE VECTOR TIME(TETLEM).
062010,000062:                                                                                                  #                                THE DP OCTAL TIME INCREMENT IS SCALED AT 2(28).
062011,000063:                                                                                                  #        V71EIIEAAAAE            (CONTIGUOUS BLOCK UPDATE) II-2 OCTAL COMPONENTS, XXXXX,
062012,000064:                                                                                                  #        XXXXXE                  ARE LOADED INTO ERASABLE STARTING AT ECADR, AAAA.
062013,000065:                                                                                                  #        XXXXXE                  IT IS .GE. 3 .AND. .LE. 20D.,
062014,000066:                                                                                                  #                                AND (AAAA + II -3) DOES NOT PRODUCE AN ADDRESS IN THE
062015,000067:                                                                                                  #        9 NEXT BANK
062016,000068:                                                                                                  #          .                     SCALING IS SAME AS INTERNAL REGISTERS.
062017,000069:                                                                                                  #        V72EIIE                 (SCATTER UPDATE) (II-1)/2 OCTAL COMPONENTS, XXXXX, ARE
062018,000070:                                                                                                  #        AAAAEXXXXXE             LOADED INTO ERASABLE LOCATIONS, AAAA.
062019,000071:                                                                                                  #        AAAAEXXXXXE             II IS .GE. 3 .AND. .LE. 19D, AND MUST BE ODD.
062020,000072:                                                                                                  #          .                     SCALING IS SAME AS INTERNAL REGISTERS.
062021,000073: 
062022,000074:                                                                                                  #        V73EXXXXXEXXXXXE        (OCTAL CLOCK INCREMENT) DOUBLE PRECISION OCTAL TIME
062023,000075:                                                                                                  #                                INCREMENT XXXXX XXXXX, IS ADDED TO THE AGC CLOCK, IN
062024,000076:                                                                                                  #                                CENTISECONDS SCALED AT (2)28.
062025,000077:                                                                                                  #                                THIS LOAD IS THE OCTAL EQUIVALENT OF V55.
062026,000078: 
062027,000079:                                                                                                  #  OUTPUT:               IN ADDITION TO THE ABOVE REGISTER LOADS, ALL UPDATES
062028,000080:                                                                                                  #                        COMPLEMENT BIT3 OF FLAGWORD7.
062029,000081: 
062030,000082:                                                                                                  #  ADDITIONAL NOTES:     VERB 71, JUST DEFINED ABOVE WILL BE USED TO PERFORM BUT NOT LIMITED TO THE FOLLOWING UPDATES --
062031,000083:                                                                                                  #                        1.  CSM/LM STATE VECTOR UPDATE
062032,000084:                                                                                                  #                        2.  REFSMMAT UPDATE
062033,000085: 
062034,000086:                                                                                                  #        THE FOLLOWING COMMENTS DELINEATE EACH SPECIAL UPDATE ----
062035,000087: 
062036,000088:                                                                                                  #        1.  CSM/LM STATE VECTOR UPDATE (ALL DATA ENTRIES IN OCTAL)
062037,000089:                                                                                                  #                ENTRIES:        DATA DEFINITION:                                SCALE FACTORS:
062038,000090:                                                                                                  #                V71E            CONTIGUOUS BLOCK UPDATE VERB
062039,000091:                                                                                                  #                   21E          NUMBER OF COMPONENTS FOR STATE VECTOR UPDATE
062040,000092:                                                                                                  #                 AAAAE          ECADR OF 'UPSVFLAG'
062041,000093:                                                                                                  #                XXXXXE          STATE VECTOR IDENTIFIER: 00001 FOR CSM, 77776 FOR LEM - EARTH SPHERE OF INFLUENCE SCALING
062042,000094:                                                                                                  #                                                         00002 FOR CSM, 77775 FOR LEM - LUNAR SPHERE OF INFLUENCE SCALING
062043,000095:                                                                                                  #                XXXXXEXXXXXE    X POSITION
062044,000096:                                                                                                  #                XXXXXEXXXXXE    Y POSITION
062045,000097:                                                                                                  #                XXXXXEXXXXXE    Z POSITION
062046,000098:                                                                                                  #                XXXXXEXXXXXE    X VELOCITY
062047,000099:                                                                                                  #                XXXXXEXXXXXE    Y VELOCITY
062048,000100:                                                                                                  #                XXXXXEXXXXXE    Z VELOCITY
062049,000101:                                                                                                  #                XXXXXEXXXXXE    TIME FROM AGC CLOCK ZERO
062050,000102:                                                                                                  #                V33E            VERB 33 TO SIGNAL THAT THE STATE VECTOR IS READY TO BE STORED.
062051,000103: 
062052,000104:                                                                                                  #        2.  REFSMMAT (ALL DATA ENTRIES IN OCTAL)
062053,000105:                                                                                                  #                ENTRIES:                DATA DEFINITIONS:                               SCALE FACTORS:
062054,000106:                                                                                                  #                V71E            CONTIGUOUS BLOCK UPDATE VERB
062055,000107:                                                                                                  #                   24E          NUMBER OF COMPONENTS FOR REFSMMAT UPDATE
062056,000108:                                                                                                  #                 AAAAE          ECADR OF 'REFSMMAT'
062057,000109:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 1                                  2(-1)
062058,000110:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 2                                  2(-1)
062059,000111:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 3                                  2(-1)
062060,000112:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 1                                  2(-1)
062061,000113:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 2                                  2(-1)
062062,000114:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 3                                  2(-1)
062063,000115:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 1                                  2(-1)
062064,000116:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 2                                  2(-1)
062065,000117:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 3                                  2(-1)
062066,000118:                                                                                                  #                V33E            VERB 33 TO SIGNAL THAT REFSMMAT IS READY TO BE STORED.
062067,000119: 
062068,000120: 07,3777                                           BANK     07                                    
062069,000121: 43,2000                                           SETLOC   EXTVERBS                              
062070,000122: 43,2000                                           BANK                                           
062071,000123: 
062072,000124: 43,3736  E3,1706                                  EBANK=   TEPHEM                                
062073,000125: 
062074,000126: 43,3736                                           COUNT*   $$/P27                                
062075,000127: 43,3736           35035        V70UPDAT           CAF      UP70                                  #  COMES HERE ON V70E
062076,000128: 43,3737           13745                           TCF      V73UPDAT   +1                         
062077,000129: 
062078,000130: 43,3740           35033        V71UPDAT           CAF      UP71                                  #  COMES HERE ON V71E
062079,000131: 43,3741           13745                           TCF      V73UPDAT   +1                         
062080,000132: 
062081,000133: 43,3742           35032        V72UPDAT           CAF      UP72                                  #  COMES HERE ON V72E
062082,000134: 43,3743           13745                           TCF      V73UPDAT   +1                         
062083,000135: 
062084,000136: 43,3744           36214        V73UPDAT           CAF      UP73                                  #  COMES HERE ON V73E
062085,000137: 
062086,000138: 43,3745           54331                 +1        TS       UPVERBSV                              #  SAVE UPVERB UNTIL IT'S OK TO ENTER P27
062087,000139: 
062088,000140: 43,3746           02076                           TC       TESTXACT                              #  GRAB DISPLAY IF AVAILABLE, OTHERWISE
062089,000141:                                                                                                  #  TURN *OPERATOR ERROR* ON AND TERMINATE JOB
062090,000142: 
062091,000143: 43,3747           31011                           CA       MODREG                                #  CHECK IF UPDATE ALLOWED
062092,000144: 43,3750           00006                           EXTEND                                         #  FIRST CHECK FOR MODREG = +0, -0
062093,000145: 43,3751           13753                           BZF      +2                                    #  (+0 = P00, -0 = FRESHSTART)
062094,000146: 43,3752           03763                           TC       CKMDMORE                              #  NOW CHECK FOR PROGRAM WHICH CAN BE
062095,000147:                                                                                                  #  INTERRUPTED BY P27.
062096,000148: 
062097,000149: 43,3753           31011                           CAE      MODREG                                #  UPDATE ALLOWED.
062098,000150: 43,3754           54301                           TS       UPOLDMOD                              #  SAVE CURRENT MAJOR MODE
062099,000151: 43,3755           30331                           CAE      UPVERBSV                              #  SET UPVERB TO INDICATE TO P27
062100,000152: 43,3756           54302                           TS       UPVERB                                #  WHICH EXTENDED VERB CALLED IT.
062101,000153: 
062102,000154: 43,3757           35033                           CAF      ONE                                   
062103,000155: 43,3760           54303                           TS       UPCOUNT                               #  INITIALIZE UPCOUNT TO 1
062104,000156: 
062105,000157: 43,3761           04715                           TC       POSTJUMP                              #  LEAVE EXTENDED VERB BANK AND
062106,000158: 43,3762           57374                           CADR     UPPART2                               #  GO TO UPDATE PROGRAM (P27) BANK.
062107,000159: 
062108,000160: 43,3763           40101        CKMDMORE           CS       FLAGWRD5                              
062109,000161: 43,3764           75024                           MASK     BIT8                                  #  CHECK IF COMPUTER IS LGC
062110,000162: 43,3765           10000                           CCS      A                                     #  IS COMPUTER LGC OR AGC
062111,000163: 43,3766           13774        UPERLEM            TCF      UPERROR                               #  ERROR- IT'S THE LEM + MODE IS NOT POO.
062112,000164: 43,3767           45032                           CS       TWO                                   
062113,000165: 43,3770           71011                           MASK     MODREG                                
062114,000166: 43,3771           10000                           CCS      A                                     
062115,000167: 43,3772           13774        UPERCMC            TCF      UPERROR                               #  ERROR- IT'S THE CMC AND MODE IS NOT
062116,000168:                                                                                                  #  P00 OR P02.
062117,000169: 43,3773           00002                           TC       Q                                     #  ALLOW UPDATE TO PROCEED
062118,000170: 
062119,000171: 43,3774           04715        UPERROR            TC       POSTJUMP                              #  TURN ON 'OPERATOR ERROR' LIGHT
062120,000172: 43,3775           57755                           CADR     UPERROUT   +2                         #  GO TO COMMON UPDATE PROGRAM EXIT
062121,000173: 
062122,000174: 43,3776  30,2000                                  SBANK=   LOWSUPER                              
062123,000175: 43,3776     5035               UP70               EQUALS   ZERO                                  
062124,000176: 43,3776     5033               UP71               EQUALS   ONE                                   
062125,000177: 43,3776     5032               UP72               EQUALS   TWO                                   
062126,000178: 43,3776     6214               UP73               EQUALS   THREE                                 
062127,000179: 
062128,000180: 04,3757                                           BANK     04                                    
062129,000181: 27,2000                                           SETLOC   UPDATE2                               
062130,000182: 27,2000                                           BANK                                           
062131,000183: 
062132,000184: 27,3374                                           COUNT*   $$/P27                                
062133,000185: 
062134,000186: 27,3374                        UPPART2            EQUALS                                         #  UPDATE PROGRAM - PART 2
062135,000187: 
062136,000188: 27,3374           05426                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO RESTORE OLD MODE
062137,000189: 27,3375           07026                           OCT      07026                                 #  AND DOWNLIST AND EXIT IF RESTART OCCURS.
062138,000190: 27,3376           30000                           OCT      30000                                 #  PRIORITY SAME AS CHRPRIO
062139,000191: 27,3377     0304                                  EBANK=   UPBUFF                                
062140,000192: 27,3377           03705 56060                     2CADR    UPOUT      +1                         
062141,000193: 
062142,000194: 27,3401           35033                           CAF      ONE                                   
062143,000195: 27,3402           54332                           TS       DNLSTCOD                              #  DOWNLIST
062144,000196: 
062145,000197: 27,3403           05370                           TC       NEWMODEX                              #  SET MAJOR MODE = 27
062146,000198: 27,3404           00033                           DEC      27         B-14                       
062147,000199: 
062148,000200: 27,3405           50302                           INDEX    UPVERB                                #  BRANCH DEPENDING ON WHETHER THE UPDATE
062149,000201: 27,3406           13407                           TCF      +1                                    #  VERB REQUIRES A FIXED OR VARIABLE NUMBER
062150,000202: 27,3407           13412                           TCF      +3                                    #  V70 FIXED.               (OF COMPONENTS.
062151,000203: 27,3410           13415                           TCF      OHWELL1                               #  V71 VARIABLE - GO GET NO. OF COMPONENTS
062152,000204: 27,3411           13415                           TCF      OHWELL1                               #  V72 VARIABLE - GO GET NO. OF COMPONENTS
062153,000205: 27,3412           35032                           CA       TWO                                   #  V73 (AND V70) FIXED
062154,000206: 27,3413           54300                           TS       COMPNUMB                              #  SET NUMBER OF COMPONENTS TO 2.
062155,000207: 27,3414           13440                           TCF      OHWELL2                               #  GO GET THE TWO UPDATE COMPONENTS
062156,000208: 
062157,000209: 27,3415           33510        OHWELL1            CAF      ADUPBUFF                              #  * REQUEST USER TO SEND NUMBER  *
062158,000210: 27,3416           54156                           TS       MPAC       +2                         #  * OF COMPONENTS PARAMETER(II). *
062159,000211: 27,3417           33511                 +2        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
062160,000212: 27,3420           04676                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
062161,000213: 27,3421           20561                           CADR     GOXDSPF                               #  TO REQUEST II.
062162,000214: 27,3422           13705                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN
062163,000215: 27,3423           13417                           TCF      OHWELL1    +2                         
062164,000216: 27,3424           03501                           TC       CK4V32                                #  DATA OR V32 RETURN
062165,000217: 27,3425           45032                           CS       BIT2                                  
062166,000218: 27,3426           60304                           AD       UPBUFF                                #  IS II (NUMBER OF COMPONENTS PARAMETER)
062167,000219: 27,3427           00006                           EXTEND                                         #  .GE. 3 AND .LE. 20D.
062168,000220: 27,3430           63417                           BZMF     OHWELL1    +2                         
062169,000221: 27,3431           40304                           CS       UPBUFF                                
062170,000222: 27,3432           64376                           AD       UP21                                  
062171,000223: 27,3433           00006                           EXTEND                                         
062172,000224: 27,3434           63417                           BZMF     OHWELL1    +2                         
062173,000225: 27,3435           30304                           CAE      UPBUFF                                
062174,000226: 27,3436           54300                           TS       COMPNUMB                              #  SAVE II IN COMPNUMB
062175,000227: 
062176,000228:                                                                                                  #  UPBUFF LOADING SEQUENCE
062177,000229: 
062178,000230: 27,3437           24303                           INCR     UPCOUNT                               #  INCREMENT COUNT OF COMPONENTS RECEIVED.
062179,000231: 27,3440           33655        OHWELL2            CAF      ADUPBFM1                              #  CALCULATE LOCATION (ECADR) IN UPBUFF
062180,000232: 27,3441           60303                           AD       UPCOUNT                               #  WHERE NEXT COMPONENT SHOULD BE STORED.
062181,000233: 27,3442           54156                 +2        TS       MPAC       +2                         #  PLACE ECADR INTO R3.
062182,000234: 27,3443           33511                 +3        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
062183,000235: 27,3444           04676                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
062184,000236: 27,3445           20561                           CADR     GOXDSPF                               #  TO REQUEST DATA.
062185,000237: 27,3446           13705                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN.
062186,000238: 27,3447           13443                           TCF      OHWELL2    +3                         #  V33 PROCEED RETURN
062187,000239: 27,3450           03501                           TC       CK4V32                                #  DATA OR V32 RETURN
062188,000240: 27,3451           40303                           CS       UPCOUNT                               #  HAVE WE FINISHED RECEIVING ALL
062189,000241: 27,3452           60300                           AD       COMPNUMB                              #  THE DATA WE EXPECTED.
062190,000242: 27,3453           00006                           EXTEND                                         
062191,000243: 27,3454           63456                           BZMF     UPVERIFY                              #  YES- GO TO VERIFICATION SEQUENCE
062192,000244: 27,3455           13437                           TCF      OHWELL2    -1                         #  NO- REQUEST ADDITIONAL DATA.
062193,000245: 
062194,000246:                                                                                                  #  VERIFY SEQUENCE
062195,000247: 27,3456           33507        UPVERIFY           CAF      ADUPTEMP                              #  PLACE ECADR WHERE COMPONENT NO. INDEX
062196,000248: 27,3457           54156                           TS       MPAC       +2                         #  IS TO BE STORED INTO R3.
062197,000249: 27,3460           33512                           CAF      UPVRFYNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
062198,000250: 27,3461           04676                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N02 TO REQUEST
062199,000251: 27,3462           20561                           CADR     GOXDSPF                               #  DATA CORRECTION OR VERIFICATION.
062200,000252: 27,3463           13705                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN
062201,000253: 27,3464           13513                           TCF      UPSTORE                               #  V33 DATA SENT IS GOOD.  GO STORE IT.
062202,000254: 27,3465           03501                           TC       CK4V32                                #  COMPONENT NO. INDEX OR V32 RETURN
062203,000255: 27,3466           30330                           CA       UPTEMP                                #  DOES THE COMPONENT NO. INDEX JUST SENT
062204,000256: 27,3467           00006                           EXTEND                                         #  SPECIFY A LEGAL COMPONENT NUMBER?
062205,000257: 27,3470           63456                           BZMF     UPVERIFY                              #  NO, IT IS NOT POSITIVE NONZERO
062206,000258: 27,3471           40330                           CS       UPTEMP                                
062207,000259: 27,3472           60300                           AD       COMPNUMB                              
062208,000260: 27,3473           65033                           AD       BIT1                                  
062209,000261: 27,3474           00006                           EXTEND                                         
062210,000262: 27,3475           63456                           BZMF     UPVERIFY                              #  NO
062211,000263: 27,3476           33655                           CAF      ADUPBFM1                              #  YES- BASED ON THE COMPONENT NO. INDEX
062212,000264: 27,3477           60330                           AD       UPTEMP                                #  CALCULATE THE ECADR OF LOCATION IN
062213,000265: 27,3500           13442                           TCF      OHWELL2    +2                         #  UPBUFF WHICH USER WANTS TO CHANGE.
062214,000266: 
062215,000267: 27,3501  27,3705               UPOUT4             EQUALS   UPOUT      +1                         #  COMES HERE ON V34 TO TERMINATE UPDATE
062216,000268: 
062217,000269:                                                                                                  #  CHECK FOR VERB 32 SEQUENCE
062218,000270: 
062219,000271: 27,3501           40154        CK4V32             CS       MPAC                                  #  ON DATA RETURN FROM 'GOXDSPF'
062220,000272: 27,3502           75026                           MASK     BIT6                                  #  ON DATA RETURN FROM "GOXDSP"& THE CON-
062221,000273: 27,3503           10000                           CCS      A                                     #  TENTS OF MPAC = VERB.  SO TEST FOR V32.
062222,000274: 27,3504           00002                           TC       Q                                     #  IT'S NOT A V32, IT'S DATA.  PROCEED.
062223,000275: 27,3505           50002                           INDEX    Q                                     
062224,000276: 27,3506           77771                           TC       0          -6                         #  V32 ENCOUNTERED - GO BACK AND GET DATA
062225,000277: 
062226,000278: 27,3507           00330        ADUPTEMP           ADRES    UPTEMP                                #  ADDRESS OF TEMP STORAGE FOR CORRECTIONS
062227,000279: 27,3510           00304        ADUPBUFF           ADRES    UPBUFF                                #  ADDRESS OF UPDATE DATA STORAGE BUFFER
062228,000280: 27,3511           05201        UPLOADNV           VN       2101                                  #  VERB 21 NOUN 01
062229,000281: 27,3512           05202        UPVRFYNV           VN       2102                                  #  VERB 21 NOUN 02
062230,000282: 27,3513     4376               UP21               =        MD1                                   #  DEC 21 = MAX NO OF COMPONENTS +1
062231,000283: 27,3513     5036               UPDTPHAS           EQUALS   FIVE                                  
062232,000284: 
062233,000285:                                                                                                  #  PRE-STORE AND FAN TO APPROPRIATE BRANCH SEQUENCE
062234,000286: 
062235,000287: 27,3513                        UPSTORE            EQUALS                                         #  GROUND HAS VERIFIED UPDATE.  STORE DATA.
062236,000288: 
062237,000289: 27,3513           00004                           INHINT                                         
062238,000290: 
062239,000291: 27,3514           30103                           CAE      FLAGWRD7                              #  INVERT VERIFLAG (BIT 3 OF FLAGWRD7) TO
062240,000292: 27,3515           56001                           XCH      L                                     #  INDICATE TO THE GROUND (VIA DOWNLINK)
062241,000293: 27,3516           35031                           CAF      BIT3                                  #  THAT THE V33 (WHICH THE GROUND SENT TO
062242,000294: 27,3517           00006                           EXTEND                                         #  VERIFY THE UPDATE) HAS BEEN SUCCESSFULLY
062243,000295: 27,3520           06001                           RXOR     LCHAN                                 #  RECEIVED BY THE UPDATE PROGRAM
062244,000296: 27,3521           54103                           TS       FLAGWRD7                              
062245,000297: 
062246,000298: 27,3522           05426                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO REDO THE UPDATE
062247,000299: 27,3523           04026                           OCT      04026                                 #  DATA STORE IF A RESTART OCCURS.
062248,000300: 27,3524           00004                           INHINT                                         #  (BECAUSE PHASCHNG DID A RELINT)
062249,000301: 
062250,000302: 27,3525           45032                           CS       TWO                                   #  GO TO UPFNDVAC IF INSTALL IS REQUIRED,
062251,000303: 27,3526           60302                           AD       UPVERB                                #  THAT IS, IF IT'S A V70 - V72.
062252,000304: 27,3527           00006                           EXTEND                                         #  GO TO UPEND73 IF IT'S A V73.
062253,000305: 27,3530           63537                           BZMF     UPFNDVAC                              
062254,000306: 
062255,000307:                                                                                                  #  VERB 73 BRANCH
062256,000308: 
062257,000309: 27,3531           00006        UPEND73            EXTEND                                         #  V73-PERFORM DP OCTAL AGC CLOCK INCREMENT
062258,000310: 27,3532           30305                           DCA      UPBUFF                                
062259,000311: 27,3533           52315                           DXCH     UPBUFF     +8D                        
062260,000312: 27,3534           03562                           TC       TIMEDIDL                              
062261,000313: 27,3535           04400                           TC       FALTON                                #  ERROR- TURN ON *OPERATOR ERROR* LIGHT
062262,000314: 27,3536           03705                           TC       UPOUT      +1                         #  GO TO COMMON UPDATE PROGRAM EXIT
062263,000315: 
062264,000316: 27,3537           34371        UPFNDVAC           CAF      CHRPRIO                               #  (USE EXTENDED VERB PRIORITY)
062265,000317: 27,3540           05163                           TC       FINDVAC                               #  GET VAC AREA FOR 'CALL INTSTALL'
062266,000318: 27,3541  E3,1706                                  EBANK=   TEPHEM                                
062267,000319: 27,3541           03544 56063                     2CADR    UPJOB                                 #  (NOTE:  THIS WILL ALSO SET EBANK FOR
062268,000320: 27,3543           05233                           TC       ENDOFJOB                              #  'TEPHEM' UPDATE BY V70)
062269,000321: 
062270,000322: 27,3544           06006        UPJOB              TC       INTPRET                               #  THIS COULD BE A STATE VECTOR UPDATE -- SO
062271,000323: 27,3545           77624                           CALL                                           #  WAIT (PUT JOB TO SLEEP) IF ORBIT INT(OI)
062272,000324: 27,3546           27452                                    INTSTALL                              #  IS IN PROGRESS -- OR -- GRAB OI AND RETURN
062273,000325:                                                                                                  #  TO UPWAKE IF OI IS NOT IN PROGRESS.
062274,000326: 
062275,000327: 27,3547           77776        UPWAKE             EXIT                                           
062276,000328: 
062277,000329: 27,3550           05426                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
062278,000330: 27,3551           04026                           OCT      04026                                 
062279,000331: 
062280,000332: 27,3552           05562                           TC       UPFLAG                                #  SET INTEGRATION RESTART BIT
062281,000333: 27,3553           00236                           ADRES    REINTFLG                              
062282,000334: 27,3554           00004                           INHINT                                         
062283,000335: 27,3555                        UPPART3            EQUALS                                         
062284,000336: 
062285,000337: 27,3555           50302                           INDEX    UPVERB                                #  BRANCH TO THE APPROPRIATE UPDATE VERB
062286,000338: 27,3556           13557                           TCF      +1                                    #  ROUTINE TO ACTUALLY PERFORM THE UPDATE
062287,000339: 27,3557           13716                           TCF      UPEND70                               #  V70
062288,000340: 27,3560           13625                           TCF      UPEND71                               #  V71
062289,000341: 27,3561           13657                           TCF      UPEND72                               #  V72
062290,000342: 
062291,000343:                                                                                                  #  ROUTINE TO INCREMENT CLOCK (TIME2,TIME1) WITH CONTENTS OF DP WORD AT UPBUFF.
062292,000344: 27,3562           00006        TIMEDIDL           EXTEND                                         
062293,000345: 27,3563           22330                           QXCH     UPTEMP                                #  SAVE Q FOR RETURN
062294,000346: 27,3564           35035                           CAF      ZERO                                  #  ZERO AND SAVE TIME2,TIME1
062295,000347: 27,3565           22007                           ZL                                             
062296,000348: 27,3566           52025                           DXCH     TIME2                                 
062297,000349: 27,3567           52327                           DXCH     UPBUFF     +18D                       #  STORE IN CASE OF OVERFLOW
062298,000350: 
062299,000351: 27,3570           35036                           CAF      UPDTPHAS                              #  DO
062300,000352: 27,3571           54001                           TS       L                                     #  A
062301,000353: 27,3572           40000                           COM                                            #  QUICK
062302,000354: 27,3573           52765                           DXCH     -PHASE6                               #  PHASCHNG
062303,000355: 
062304,000356: 27,3574           00004        TIMEDIDR           INHINT                                         
062305,000357: 27,3575           35035                           CAF      ZERO                                  
062306,000358: 27,3576           22007                           ZL                                             #  PICK UP INCREMENTER(AND ZERO
062307,000359: 27,3577           54156                           TS       MPAC       +2                         #  IT IN CASE OF RESTARTS) AND
062308,000360: 27,3600           52315                           DXCH     UPBUFF     +8D                        #  STORE IT
062309,000361: 27,3601           52155                           DXCH     MPAC                                  #  INTO MPAC FOR TPAGREE.
062310,000362: 
062311,000363: 27,3602           00006                           EXTEND                                         
062312,000364: 27,3603           30327                           DCA      UPBUFF     +18D                       
062313,000365: 27,3604           20155                           DAS      MPAC                                  #  FORM SUM IN MPAC
062314,000366: 27,3605           00006                           EXTEND                                         
062315,000367: 27,3606           13615                           BZF      DELTAOK                               #  TEST FOR OVERFLOW
062316,000368: 27,3607           35035                           CAF      ZERO                                  
062317,000369: 27,3610           52327                           DXCH     UPBUFF     +18D                       #  OVERFLOW, RESTORE OLD VALUE OF CLOCK
062318,000370: 27,3611           20025                           DAS      TIME2                                 #  AND TURN ON OPERATOR ERROR
062319,000371: 
062320,000372: 27,3612           05426                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
062321,000373: 27,3613           04026                           OCT      04026                                 
062322,000374: 
062323,000375: 27,3614           00330                           TC       UPTEMP                                #  GO TO ERROR EXIT
062324,000376: 
062325,000377: 27,3615           07226        DELTAOK            TC       TPAGREE                               #  FORCE SIGN AGREEMENT
062326,000378: 27,3616           52155                           DXCH     MPAC                                  
062327,000379: 27,3617           20025                           DAS      TIME2                                 #  INCREMENT TIME2,TIME1
062328,000380: 
062329,000381: 27,3620           05426                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
062330,000382: 27,3621           04026                           OCT      04026                                 
062331,000383: 
062332,000384: 27,3622           00004                           INHINT                                         
062333,000385: 27,3623           50330                           INDEX    UPTEMP                                #  (CODED THIS WAY FOR RESTART PROTECTION)
062334,000386: 27,3624           00001                           TC       1                                     #  NORMAL RETURN
062335,000387: 
062336,000388:                                                                                                  #  VERB 71 BRANCH
062337,000389: 
062338,000390: 27,3625           30305        UPEND71            CAE      UPBUFF     +1                         #  SET EBANK
062339,000391: 27,3626           54003                           TS       EBANK                                 #        AND
062340,000392: 27,3627           74373                           MASK     LOW8                                  #  CALCULATE
062341,000393: 27,3630           54330                           TS       UPTEMP                                #  S-REG VALUE OF RECEIVING AREA
062342,000394: 27,3631           67714                           AD       NEG3                                  #  IN THE PROCESS OF
062343,000395: 27,3632           60300                           AD       COMPNUMB                              #  PERFORMING
062344,000396: 27,3633           00006                           EXTEND                                         #  THIS UPDATE
062345,000397: 27,3634           13642                           BZF      STORLP71                              #  WILL WE
062346,000398: 27,3635           75023                           MASK     BIT9                                  #  OVERFLOW
062347,000399: 27,3636           10000                           CCS      A                                     #  INTO THE NEXT EBANK....
062348,000400: 27,3637           13753                           TCF      UPERROUT                              #  YES
062349,000401: 
062350,000402: 27,3640           37714                           CA       NEG3                                  #  NO- CALCULATE NUMBER OF
062351,000403: 27,3641           60300                           AD       COMPNUMB                              #  WORDS TO BE STORED MINUS ONE
062352,000404: 27,3642           54154        STORLP71           TS       MPAC                                  #  SAVE NO. OF WORDS REMAINING MINUS ONE
062353,000405: 27,3643           50000                           INDEX    A                                     #  TAKE NEXT UPDATE WORD FROM
062354,000406: 27,3644           30306                           CA       UPBUFF     +2                         #  UPBUFF AND
062355,000407: 27,3645           54001                           TS       L                                     #  SAVE IT IN L
062356,000408: 27,3646           30154                           CA       MPAC                                  #  CALCULATE NEXT
062357,000409: 27,3647           60330                           AD       UPTEMP                                #  RECEIVING ADDRESS
062358,000410: 27,3650           50000                           INDEX    A                                     
062359,000411: 27,3651  E3,1400                                  EBANK=   1400                                  
062360,000412: 27,3651           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
062361,000413: 27,3652  E3,1706                                  EBANK=   TEPHEM                                
062362,000414: 27,3652           10154                           CCS      MPAC                                  #  ARE THERE ANY WORDS LEFT TO BE STORED
062363,000415: 27,3653           13642                           TCF      STORLP71                              #  YES
062364,000416: 27,3654           13704                           TCF      UPOUT                                 #  NO- THEN EXIT UPDATE PROGRAM
062365,000417: 27,3655           00303        ADUPBFM1           ADRES    UPBUFF     -1                         #  SAME AS ADUPBUFF BUT LESS 1 (DON'T MOVE)
062366,000418: 27,3656           13704                           TCF      UPOUT                                 #  NO- EXIT UPDATE (HERE WHEN COMPNUMB = 3)
062367,000419: 
062368,000420:                                                                                                  #  VERB 72 BRANCH
062369,000421: 
062370,000422: 27,3657           35033        UPEND72            CAF      BIT1                                  #  HAVE AN ODD NO. OF COMPONENTS
062371,000423: 27,3660           70300                           MASK     COMPNUMB                              #  BEEN SENT FOR A V72 UPDATE ...
062372,000424: 27,3661           10000                           CCS      A                                     
062373,000425: 27,3662           13664                           TCF      +2                                    #  YES
062374,000426: 27,3663           13753                           TCF      UPERROUT                              #  ERROR- SHOULD BE ODD NO. OF COMPONENTS
062375,000427: 27,3664           45032                           CS       BIT2                                  
062376,000428: 27,3665           60300                           AD       COMPNUMB                              
062377,000429: 27,3666           54154        LDLOOP72           TS       MPAC                                  #  NOW PERFORM THE UPDATE
062378,000430: 27,3667           50000                           INDEX    A                                     
062379,000431: 27,3670           30305                           CAE      UPBUFF     +1                         #  PICK UP NEXT UPDATE WORD
062380,000432: 27,3671           22000                           LXCH     A                                     
062381,000433: 27,3672           10154                           CCS      MPAC                                  #  SET POINTER TO ECADR (MUST BE CCS)
062382,000434: 27,3673           54154                           TS       MPAC                                  
062383,000435: 27,3674           50000                           INDEX    A                                     
062384,000436: 27,3675           30305                           CAE      UPBUFF     +1                         #  PICK UP NEXT ECADR OF REG TO BE UPDATED
062385,000437: 27,3676           54003                           TS       EBANK                                 #  SET EBANK
062386,000438: 27,3677           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
062387,000439: 27,3700           50000                           INDEX    A                                     
062388,000440: 
062389,000441: 27,3701  E3,1400                                  EBANK=   1400                                  
062390,000442: 27,3701           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
062391,000443: 27,3702  E3,1706                                  EBANK=   TEPHEM                                
062392,000444: 27,3702           10154                           CCS      MPAC                                  #  ARE WE THROUGH THE V72 UPDATE...
062393,000445: 27,3703           13666                           TCF      LDLOOP72                              #  NO
062394,000446: 
062395,000447:                                                                                                  #  NORMAL FINISH OF P27
062396,000448: 
062397,000449: 27,3704                        UPOUT              EQUALS                                         
062398,000450: 27,3704           02672                           TC       INTWAKEU                              #  RELEASE GRAB OF ORBITAL INTEGRATION
062399,000451: 27,3705           30301                 +1        CAE      UPOLDMOD                              #  RESTORE PRIOR P27 MODE
062400,000452: 27,3706           05373                           TC       NEWMODEX   +3                         
062401,000453: 27,3707           35035                           CAF      ZERO                                  
062402,000454: 27,3710           54332                           TS       DNLSTCOD                              
062403,000455: 27,3711           03760                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT
062404,000456: 27,3712           00006                           EXTEND                                         #  KILL GROUP 6.
062405,000457: 27,3713           35035                           DCA      NEG0                                  
062406,000458: 27,3714           52765                           DXCH     -PHASE6                               
062407,000459: 
062408,000460: 27,3715           05550                           TC       ENDEXT                                #  EXTENDED VERB EXIT
062409,000461: 
062410,000462:                                                                                                  #  VERB 70 BRANCH
062411,000463: 
062412,000464: 27,3716           00006        UPEND70            EXTEND                                         #  V70 DOES THE FOLLOWING WITH DP DELTA
062413,000465: 27,3717           40305                           DCS      UPBUFF                                #  TIME IN UPBUFF
062414,000466: 27,3720           52315                           DXCH     UPBUFF     +8D                        
062415,000467: 27,3721           03562                           TC       TIMEDIDL                              #  DECREMENT AGC CLOCK
062416,000468: 
062417,000469: 27,3722           03753                           TC       UPERROUT                              #  ERROR WHILE DECREMENTING CLOCK -- EXIT
062418,000470: 
062419,000471: 27,3723  E3,1706                                  EBANK=   TEPHEM                                
062420,000472: 27,3723           00006                           EXTEND                                         
062421,000473: 27,3724           40305                           DCS      UPBUFF                                #  COPY DECREMENTERS FOR
062422,000474: 27,3725           52317                           DXCH     UPBUFF     +10D                       #  RESTART PROTECTION
062423,000475: 27,3726           00006                           EXTEND                                         
062424,000476: 27,3727           40305                           DCS      UPBUFF                                
062425,000477: 27,3730           52321                           DXCH     UPBUFF     +12D                       
062426,000478: 
062427,000479: 27,3731           05426                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
062428,000480: 27,3732           04026                           OCT      04026                                 
062429,000481: 
062430,000482: 27,3733           35035                           CAF      ZERO                                  
062431,000483: 27,3734           22007                           ZL                                             
062432,000484: 27,3735           52317                           DXCH     UPBUFF     +10D                       #  DECREMENT CSM STATE VECTOR TIME
062433,000485: 27,3736           21571                           DAS      TETCSM                                
062434,000486: 
062435,000487: 27,3737           35035                           CAF      ZERO                                  
062436,000488: 
062437,000489: 27,3740           22007                           ZL                                             
062438,000490: 27,3741           52321                           DXCH     UPBUFF     +12D                       #  DECREMENT LEM STATE VECTOR TIME
062439,000491: 27,3742           21643                           DAS      TETLEM                                
062440,000492: 27,3743           35035                           CAF      ZERO                                  
062441,000493: 27,3744           22007                           ZL                                             
062442,000494: 27,3745           52305                           DXCH     UPBUFF                                
062443,000495: 27,3746           21710                           DAS      TEPHEM     +1                         #  INCREMENT TP TEPHEM
062444,000496: 27,3747           27706                           ADS      TEPHEM                                
062445,000497: 
062446,000498: 27,3750           05426                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
062447,000499: 27,3751           04026                           OCT      04026                                 
062448,000500: 
062449,000501: 27,3752     0304                                  EBANK=   UPBUFF                                
062450,000502: 
062451,000503: 27,3752           03704                           TC       UPOUT                                 #  GO TO STANDARD UPDATE PROGRAM EXIT
062452,000504: 
062453,000505:                                                                                                  #  ERROR SEQUENCE
062454,000506: 
062455,000507: 27,3753           04400        UPERROUT           TC       FALTON                                #  TURN ON *OPERATOR ERROR* LIGHT
062456,000508: 27,3754           13704                           TCF      UPOUT                                 #  GO TO COMMON UPDATE PROGRAM EXIT
062457,000509: 
062458,000510: 27,3755           04400                 +2        TC       FALTON                                #  TURN ON 'OPERATOR ERROR' LIGHT
062459,000511: 27,3756           03760                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT
062460,000512: 27,3757           05550                           TC       ENDEXT                                #  EXTENDED VERB EXIT
062461,000513:                                                                                                  #  (THE PURPOSE OF UPERROUT +2 EXIT IS
062462,000514:                                                                                                  #  TO PROVIDE AN ERROR EXIT WHICH DOES NOT
062463,000515:                                                                                                  #  RESET ANY RESTART GROUPS)
062464,000516: 
062465,000517:                                                                                                  #  :UPACTOFF: IS A ROUTINE TO TURN OFF UPLINK ACTIVITY LIGHT ON ALL EXITS FROM UPDATE PROGRAM (P27).
062466,000518: 
062467,000519: 27,3760           45031        UPACTOFF           CS       BIT3                                  
062468,000520: 27,3761           00006                           EXTEND                                         #  TURN OFF UPLINK ACTIVITY LIGHT
062469,000521: 27,3762           03011                           WAND     DSALMOUT                              #  (BIT 3 OF CHANNEL 11)
062470,000522: 27,3763           00002                           TC       Q                                     

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