Source Code

These source-code files are part of a reconstructed copy of Comanche 72/3 (AKA Manche72 revision 3), the final, flown mission release of the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 13.

The starting point was the source code of Comanche 72 (itself previously reconstructed). Comanche 72 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 72 and 72/3. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments.

Since no contemporary listings of Comanche 72/3 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.

062334,000002:                                                                                                  ## Copyright:   Public domain.
062335,000003:                                                                                                  ## Filename:    UPDATE_PROGRAM.agc
062336,000004:                                                                                                  ## Purpose:     A section of Manche72 revision 3.
062337,000005:                                                                                                  ##              It is part of the reconstructed source code for the final, flown
062338,000006:                                                                                                  ##              release of the software for the Command Module's (CM) Apollo
062339,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 13. No original listings
062340,000008:                                                                                                  ##              of this program are available; instead, this file was recreated
062341,000009:                                                                                                  ##              from a reconstructed copy of Comanche 072. It has been adapted
062342,000010:                                                                                                  ##              such that the resulting bugger words exactly match those
062343,000011:                                                                                                  ##              specified for Manche72 revision 3 in NASA drawing 2021153G,
062344,000012:                                                                                                  ##              which gives relatively high confidence that the reconstruction
062345,000013:                                                                                                  ##              is correct.
062346,000014:                                                                                                  ## Assembler:   yaYUL
062347,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
062348,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
062349,000017:                                                                                                  ## Mod history: 2024-05-19 MAS  Created from Comanche 072.
062350,000018: 
062351,000019:                                                                                                  #  PROGRAM NAME:         P27
062352,000020:                                                                                                  #  WRITTEN BY:           KILROY/ DE WOLF
062353,000021: 
062354,000022:                                                                                                  #  MOD NO:               6
062355,000023:                                                                                                  #  MOD BY:               KILROY
062356,000024:                                                                                                  #  DATE:                 01DEC67
062357,000025: 
062358,000026:                                                                                                  #  LOG SECTION:          UPDATE PROGRAM.
062359,000027: 
062360,000028:                                                                                                  #  FUNCT. DESCR: P27 (THE UPDATE PROGRAM) PROCESSES COMMANDS AND DATA
062361,000029:                                                                                                  #                        INSERTIONS REQUESTED BY THE GROUND VIA UPLINK.
062362,000030:                                                                                                  #                        THE P27 PROGRAM WILL ACCEPT UPDATES
062363,000031:                                                                                                  #                        ONLY DURING P00 FOR THE LM, AND ONLY DURING P00,
062364,000032:                                                                                                  #                        P02, AND FRESH START FOR THE CSM
062365,000033: 
062366,000034:                                                                                                  #  CALLING SEQ:          PROGRAM IS INITIATED BY UPLINK ENTRY OF VERBS 70, 71, 72 AND 73.
062367,000035: 
062368,000036:                                                                                                  #  SUBROUTINES:          TESTXACT, NEWMODEX, NEWMODEX +3, GOXDSPF, BANKCALL, FINDVAC, INTPRET, INTSTALL, TPAGREE,
062369,000037:                                                                                                  #                        INTWAKEU, ENDEXT, POSTJUMP, FALTON, NEWPHASE, PHASCHNG
062370,000038: 
062371,000039:                                                                                                  #  NORMAL EXIT:          TC ENDEXT
062372,000040: 
062373,000041:                                                                                                  #  ALARM/ABORT:          TC FALTON FOLLOWED BY TC ENDEXT
062374,000042: 
062375,000043:                                                                                                  #  RESTARTS:             P27 IS RESTART PROTECTED IN TWO WAYS ...
062376,000044:                                                                                                  #                        1.      PRIOR TO VERIFLAG INVERSION (WHICH IS CAUSED BY THE GROUND/ASTRONAUT'S VERIFICATION OF UPDATE
062377,000045:                                                                                                  #                                DATA BY SENDING A V33E WHEN V21N02 IS FLASHING)---
062378,000046:                                                                                                  #                                NO PROTECTION EXCEPT PRE-P27 MODE IS RESTORED, COAST + ALIGN DOWNLIST IS SELECTED AND UPLINK
062379,000047:                                                                                                  #                                ACTIVITY LIGHT IS TURNED OFF.  (JUST AS IF A V34E WAS SENT DURING P27 DATA LOADS).
062380,000048:                                                                                                  #                                V70,V71,V72 OR V73 WILL HAVE TO BE COMPLETELY RESENT BY USER.
062381,000049:                                                                                                  #                        2.      AFTER VERIFLAG INVERSION (WHEN UPDATE OF THE SPECIFIED ERASABLES IS BEING PERFORMED)---
062382,000050:                                                                                                  #                                PROTECTED AGAINST RESTARTS.
062383,000051: 
062384,000052:                                                                                                  #  DEBRIS:               UPBUFF  (20D)   TEMP STORAGE FOR ADDRESSES AND CONTENTS.
062385,000053:                                                                                                  #                        UPVERB  (1)     VERB NUMBER MINUS 70D (E.G. FOR V72, UPVERB = 72D - 70D = 2)
062386,000054:                                                                                                  #                        UPOLDMOD(1)     FOR MAJOR MODE INTERRUPTED BY P27.
062387,000055:                                                                                                  #                        COMPNUMB(1)     TOTAL NUMBER OF COMPONENTS TO BE TRANSMITTED.
062388,000056:                                                                                                  #                        UPCOUNT (1)     ACTUAL NUMBER OF COMPONENTS RECEIVED.
062389,000057:                                                                                                  #                        UPTEMP  (1)     SCRATCH, BUT USUALLY CONTAINS COMPONENT NUMBER TO BE CHANGED DURING VERIFY CYCLE
062390,000058: 
062391,000059:                                                                                                  #  INPUT:
062392,000060: 
062393,000061:                                                                                                  #        ENTRY:                  DESCRIPTION
062394,000062:                                                                                                  #        V70EXXXXXEXXXXXE        (LIFTOFF TIME INCREMENT) DOUBLE PRECISION OCTAL TIME INCREMENT, XXXXX XXXXX,
062395,000063:                                                                                                  #                                IS ADDED TO TEPHEM, SUBTRACTED FROM AGC CLOCK(TIME2,TIME1), SUBTRACTED FROM CSM STATE
062396,000064:                                                                                                  #                                VECTOR TIME(TETCSM) AND SUBTRACTED FROM LEM STATE VECTOR TIME(TETLEM).
062397,000065:                                                                                                  #                                THE DP OCTAL TIME INCREMENT IS SCALED AT 2(28).
062398,000066:                                                                                                  #        V71EIIEAAAAE            (CONTIGUOUS BLOCK UPDATE) II-2 OCTAL COMPONENTS, XXXXX,
062399,000067:                                                                                                  #        XXXXXE                  ARE LOADED INTO ERASABLE STARTING AT ECADR, AAAA.
062400,000068:                                                                                                  #        XXXXXE                  IT IS .GE. 3 .AND. .LE. 20D.,
062401,000069:                                                                                                  #                                AND (AAAA + II -3) DOES NOT PRODUCE AN ADDRESS IN THE
062402,000070:                                                                                                  #        9 NEXT BANK
062403,000071:                                                                                                  #          .                     SCALING IS SAME AS INTERNAL REGISTERS.
062404,000072:                                                                                                  #        V72EIIE                 (SCATTER UPDATE) (II-1)/2 OCTAL COMPONENTS, XXXXX, ARE
062405,000073:                                                                                                  #        AAAAEXXXXXE             LOADED INTO ERASABLE LOCATIONS, AAAA.
062406,000074:                                                                                                  #        AAAAEXXXXXE             II IS .GE. 3 .AND. .LE. 19D, AND MUST BE ODD.
062407,000075:                                                                                                  #          .                     SCALING IS SAME AS INTERNAL REGISTERS.
062408,000076: 
062409,000077:                                                                                                  #        V73EXXXXXEXXXXXE        (OCTAL CLOCK INCREMENT) DOUBLE PRECISION OCTAL TIME
062410,000078:                                                                                                  #                                INCREMENT XXXXX XXXXX, IS ADDED TO THE AGC CLOCK, IN
062411,000079:                                                                                                  #                                CENTISECONDS SCALED AT (2)28.
062412,000080:                                                                                                  #                                THIS LOAD IS THE OCTAL EQUIVALENT OF V55.
062413,000081: 
062414,000082:                                                                                                  #  OUTPUT:               IN ADDITION TO THE ABOVE REGISTER LOADS, ALL UPDATES
062415,000083:                                                                                                  #                        COMPLEMENT BIT3 OF FLAGWORD7.
062416,000084: 
062417,000085:                                                                                                  #  ADDITIONAL NOTES:     VERB 71, JUST DEFINED ABOVE WILL BE USED TO PERFORM BUT NOT LIMITED TO THE FOLLOWING UPDATES --
062418,000086:                                                                                                  #                        1.  CSM/LM STATE VECTOR UPDATE
062419,000087:                                                                                                  #                        2.  REFSMMAT UPDATE
062420,000088: 
062421,000089:                                                                                                  #        THE FOLLOWING COMMENTS DELINEATE EACH SPECIAL UPDATE ----
062422,000090: 
062423,000091:                                                                                                  #        1.  CSM/LM STATE VECTOR UPDATE (ALL DATA ENTRIES IN OCTAL)
062424,000092:                                                                                                  #                ENTRIES:        DATA DEFINITION:                                SCALE FACTORS:
062425,000093:                                                                                                  #                V71E            CONTIGUOUS BLOCK UPDATE VERB
062426,000094:                                                                                                  #                   21E          NUMBER OF COMPONENTS FOR STATE VECTOR UPDATE
062427,000095:                                                                                                  #                 AAAAE          ECADR OF 'UPSVFLAG'
062428,000096:                                                                                                  #                XXXXXE          STATE VECTOR IDENTIFIER: 00001 FOR CSM, 77776 FOR LEM - EARTH SPHERE OF INFLUENCE SCALING
062429,000097:                                                                                                  #                                                         00002 FOR CSM, 77775 FOR LEM - LUNAR SPHERE OF INFLUENCE SCALING
062430,000098:                                                                                                  #                XXXXXEXXXXXE    X POSITION
062431,000099:                                                                                                  #                XXXXXEXXXXXE    Y POSITION
062432,000100:                                                                                                  #                XXXXXEXXXXXE    Z POSITION
062433,000101:                                                                                                  #                XXXXXEXXXXXE    X VELOCITY
062434,000102:                                                                                                  #                XXXXXEXXXXXE    Y VELOCITY
062435,000103:                                                                                                  #                XXXXXEXXXXXE    Z VELOCITY
062436,000104:                                                                                                  #                XXXXXEXXXXXE    TIME FROM AGC CLOCK ZERO
062437,000105:                                                                                                  #                V33E            VERB 33 TO SIGNAL THAT THE STATE VECTOR IS READY TO BE STORED.
062438,000106: 
062439,000107:                                                                                                  #        2.  REFSMMAT (ALL DATA ENTRIES IN OCTAL)
062440,000108:                                                                                                  #                ENTRIES:                DATA DEFINITIONS:                               SCALE FACTORS:
062441,000109:                                                                                                  #                V71E            CONTIGUOUS BLOCK UPDATE VERB
062442,000110:                                                                                                  #                   24E          NUMBER OF COMPONENTS FOR REFSMMAT UPDATE
062443,000111:                                                                                                  #                 AAAAE          ECADR OF 'REFSMMAT'
062444,000112:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 1                                  2(-1)
062445,000113:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 2                                  2(-1)
062446,000114:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 3                                  2(-1)
062447,000115:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 1                                  2(-1)
062448,000116:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 2                                  2(-1)
062449,000117:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 3                                  2(-1)
062450,000118:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 1                                  2(-1)
062451,000119:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 2                                  2(-1)
062452,000120:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 3                                  2(-1)
062453,000121:                                                                                                  #                V33E            VERB 33 TO SIGNAL THAT REFSMMAT IS READY TO BE STORED.
062454,000122: 
062455,000123: 07,3777                                           BANK     07                                    
062456,000124: 43,2000                                           SETLOC   EXTVERBS                              
062457,000125: 43,2000                                           BANK                                           
062458,000126: 
062459,000127: 43,3736  E3,1706                                  EBANK=   TEPHEM                                
062460,000128: 
062461,000129: 43,3736                                           COUNT*   $$/P27                                
062462,000130: 43,3736           35035        V70UPDAT           CAF      UP70                                  #  COMES HERE ON V70E
062463,000131: 43,3737           13745                           TCF      V73UPDAT   +1                         
062464,000132: 
062465,000133: 43,3740           35033        V71UPDAT           CAF      UP71                                  #  COMES HERE ON V71E
062466,000134: 43,3741           13745                           TCF      V73UPDAT   +1                         
062467,000135: 
062468,000136: 43,3742           35032        V72UPDAT           CAF      UP72                                  #  COMES HERE ON V72E
062469,000137: 43,3743           13745                           TCF      V73UPDAT   +1                         
062470,000138: 
062471,000139: 43,3744           36214        V73UPDAT           CAF      UP73                                  #  COMES HERE ON V73E
062472,000140: 
062473,000141: 43,3745           54331                 +1        TS       UPVERBSV                              #  SAVE UPVERB UNTIL IT'S OK TO ENTER P27
062474,000142: 
062475,000143: 43,3746           02076                           TC       TESTXACT                              #  GRAB DISPLAY IF AVAILABLE, OTHERWISE
062476,000144:                                                                                                  #  TURN *OPERATOR ERROR* ON AND TERMINATE JOB
062477,000145: 
062478,000146: 43,3747           31011                           CA       MODREG                                #  CHECK IF UPDATE ALLOWED
062479,000147: 43,3750           00006                           EXTEND                                         #  FIRST CHECK FOR MODREG = +0, -0
062480,000148: 43,3751           13753                           BZF      +2                                    #  (+0 = P00, -0 = FRESHSTART)
062481,000149: 43,3752           03763                           TC       CKMDMORE                              #  NOW CHECK FOR PROGRAM WHICH CAN BE
062482,000150:                                                                                                  #  INTERRUPTED BY P27.
062483,000151: 
062484,000152: 43,3753           31011                           CAE      MODREG                                #  UPDATE ALLOWED.
062485,000153: 43,3754           54301                           TS       UPOLDMOD                              #  SAVE CURRENT MAJOR MODE
062486,000154: 43,3755           30331                           CAE      UPVERBSV                              #  SET UPVERB TO INDICATE TO P27
062487,000155: 43,3756           54302                           TS       UPVERB                                #  WHICH EXTENDED VERB CALLED IT.
062488,000156: 
062489,000157: 43,3757           35033                           CAF      ONE                                   
062490,000158: 43,3760           54303                           TS       UPCOUNT                               #  INITIALIZE UPCOUNT TO 1
062491,000159: 
062492,000160: 43,3761           04715                           TC       POSTJUMP                              #  LEAVE EXTENDED VERB BANK AND
062493,000161: 43,3762           57374                           CADR     UPPART2                               #  GO TO UPDATE PROGRAM (P27) BANK.
062494,000162: 
062495,000163: 43,3763           40101        CKMDMORE           CS       FLAGWRD5                              
062496,000164: 43,3764           75024                           MASK     BIT8                                  #  CHECK IF COMPUTER IS LGC
062497,000165: 43,3765           10000                           CCS      A                                     #  IS COMPUTER LGC OR AGC
062498,000166: 43,3766           13774        UPERLEM            TCF      UPERROR                               #  ERROR- IT'S THE LEM + MODE IS NOT POO.
062499,000167: 43,3767           45032                           CS       TWO                                   
062500,000168: 43,3770           71011                           MASK     MODREG                                
062501,000169: 43,3771           10000                           CCS      A                                     
062502,000170: 43,3772           13774        UPERCMC            TCF      UPERROR                               #  ERROR- IT'S THE CMC AND MODE IS NOT
062503,000171:                                                                                                  #  P00 OR P02.
062504,000172: 43,3773           00002                           TC       Q                                     #  ALLOW UPDATE TO PROCEED
062505,000173: 
062506,000174: 43,3774           04715        UPERROR            TC       POSTJUMP                              #  TURN ON 'OPERATOR ERROR' LIGHT
062507,000175: 43,3775           57755                           CADR     UPERROUT   +2                         #  GO TO COMMON UPDATE PROGRAM EXIT
062508,000176: 
062509,000177: 43,3776  30,2000                                  SBANK=   LOWSUPER                              
062510,000178: 43,3776     5035               UP70               EQUALS   ZERO                                  
062511,000179: 43,3776     5033               UP71               EQUALS   ONE                                   
062512,000180: 43,3776     5032               UP72               EQUALS   TWO                                   
062513,000181: 43,3776     6214               UP73               EQUALS   THREE                                 
062514,000182: 
062515,000183: 04,3757                                           BANK     04                                    
062516,000184: 27,2000                                           SETLOC   UPDATE2                               
062517,000185: 27,2000                                           BANK                                           
062518,000186: 
062519,000187: 27,3374                                           COUNT*   $$/P27                                
062520,000188: 
062521,000189: 27,3374                        UPPART2            EQUALS                                         #  UPDATE PROGRAM - PART 2
062522,000190: 
062523,000191: 27,3374           05426                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO RESTORE OLD MODE
062524,000192: 27,3375           07026                           OCT      07026                                 #  AND DOWNLIST AND EXIT IF RESTART OCCURS.
062525,000193: 27,3376           30000                           OCT      30000                                 #  PRIORITY SAME AS CHRPRIO
062526,000194: 27,3377     0304                                  EBANK=   UPBUFF                                
062527,000195: 27,3377           03705 56060                     2CADR    UPOUT      +1                         
062528,000196: 
062529,000197: 27,3401           35033                           CAF      ONE                                   
062530,000198: 27,3402           54332                           TS       DNLSTCOD                              #  DOWNLIST
062531,000199: 
062532,000200: 27,3403           05370                           TC       NEWMODEX                              #  SET MAJOR MODE = 27
062533,000201: 27,3404           00033                           DEC      27         B-14                       
062534,000202: 
062535,000203: 27,3405           50302                           INDEX    UPVERB                                #  BRANCH DEPENDING ON WHETHER THE UPDATE
062536,000204: 27,3406           13407                           TCF      +1                                    #  VERB REQUIRES A FIXED OR VARIABLE NUMBER
062537,000205: 27,3407           13412                           TCF      +3                                    #  V70 FIXED.               (OF COMPONENTS.
062538,000206: 27,3410           13415                           TCF      OHWELL1                               #  V71 VARIABLE - GO GET NO. OF COMPONENTS
062539,000207: 27,3411           13415                           TCF      OHWELL1                               #  V72 VARIABLE - GO GET NO. OF COMPONENTS
062540,000208: 27,3412           35032                           CA       TWO                                   #  V73 (AND V70) FIXED
062541,000209: 27,3413           54300                           TS       COMPNUMB                              #  SET NUMBER OF COMPONENTS TO 2.
062542,000210: 27,3414           13440                           TCF      OHWELL2                               #  GO GET THE TWO UPDATE COMPONENTS
062543,000211: 
062544,000212: 27,3415           33510        OHWELL1            CAF      ADUPBUFF                              #  * REQUEST USER TO SEND NUMBER  *
062545,000213: 27,3416           54156                           TS       MPAC       +2                         #  * OF COMPONENTS PARAMETER(II). *
062546,000214: 27,3417           33511                 +2        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
062547,000215: 27,3420           04676                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
062548,000216: 27,3421           20561                           CADR     GOXDSPF                               #  TO REQUEST II.
062549,000217: 27,3422           13705                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN
062550,000218: 27,3423           13417                           TCF      OHWELL1    +2                         
062551,000219: 27,3424           03501                           TC       CK4V32                                #  DATA OR V32 RETURN
062552,000220: 27,3425           45032                           CS       BIT2                                  
062553,000221: 27,3426           60304                           AD       UPBUFF                                #  IS II (NUMBER OF COMPONENTS PARAMETER)
062554,000222: 27,3427           00006                           EXTEND                                         #  .GE. 3 AND .LE. 20D.
062555,000223: 27,3430           63417                           BZMF     OHWELL1    +2                         
062556,000224: 27,3431           40304                           CS       UPBUFF                                
062557,000225: 27,3432           64376                           AD       UP21                                  
062558,000226: 27,3433           00006                           EXTEND                                         
062559,000227: 27,3434           63417                           BZMF     OHWELL1    +2                         
062560,000228: 27,3435           30304                           CAE      UPBUFF                                
062561,000229: 27,3436           54300                           TS       COMPNUMB                              #  SAVE II IN COMPNUMB
062562,000230: 
062563,000231:                                                                                                  #  UPBUFF LOADING SEQUENCE
062564,000232: 
062565,000233: 27,3437           24303                           INCR     UPCOUNT                               #  INCREMENT COUNT OF COMPONENTS RECEIVED.
062566,000234: 27,3440           33655        OHWELL2            CAF      ADUPBFM1                              #  CALCULATE LOCATION (ECADR) IN UPBUFF
062567,000235: 27,3441           60303                           AD       UPCOUNT                               #  WHERE NEXT COMPONENT SHOULD BE STORED.
062568,000236: 27,3442           54156                 +2        TS       MPAC       +2                         #  PLACE ECADR INTO R3.
062569,000237: 27,3443           33511                 +3        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
062570,000238: 27,3444           04676                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
062571,000239: 27,3445           20561                           CADR     GOXDSPF                               #  TO REQUEST DATA.
062572,000240: 27,3446           13705                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN.
062573,000241: 27,3447           13443                           TCF      OHWELL2    +3                         #  V33 PROCEED RETURN
062574,000242: 27,3450           03501                           TC       CK4V32                                #  DATA OR V32 RETURN
062575,000243: 27,3451           40303                           CS       UPCOUNT                               #  HAVE WE FINISHED RECEIVING ALL
062576,000244: 27,3452           60300                           AD       COMPNUMB                              #  THE DATA WE EXPECTED.
062577,000245: 27,3453           00006                           EXTEND                                         
062578,000246: 27,3454           63456                           BZMF     UPVERIFY                              #  YES- GO TO VERIFICATION SEQUENCE
062579,000247: 27,3455           13437                           TCF      OHWELL2    -1                         #  NO- REQUEST ADDITIONAL DATA.
062580,000248: 
062581,000249:                                                                                                  #  VERIFY SEQUENCE
062582,000250: 27,3456           33507        UPVERIFY           CAF      ADUPTEMP                              #  PLACE ECADR WHERE COMPONENT NO. INDEX
062583,000251: 27,3457           54156                           TS       MPAC       +2                         #  IS TO BE STORED INTO R3.
062584,000252: 27,3460           33512                           CAF      UPVRFYNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
062585,000253: 27,3461           04676                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N02 TO REQUEST
062586,000254: 27,3462           20561                           CADR     GOXDSPF                               #  DATA CORRECTION OR VERIFICATION.
062587,000255: 27,3463           13705                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN
062588,000256: 27,3464           13513                           TCF      UPSTORE                               #  V33 DATA SENT IS GOOD.  GO STORE IT.
062589,000257: 27,3465           03501                           TC       CK4V32                                #  COMPONENT NO. INDEX OR V32 RETURN
062590,000258: 27,3466           30330                           CA       UPTEMP                                #  DOES THE COMPONENT NO. INDEX JUST SENT
062591,000259: 27,3467           00006                           EXTEND                                         #  SPECIFY A LEGAL COMPONENT NUMBER?
062592,000260: 27,3470           63456                           BZMF     UPVERIFY                              #  NO, IT IS NOT POSITIVE NONZERO
062593,000261: 27,3471           40330                           CS       UPTEMP                                
062594,000262: 27,3472           60300                           AD       COMPNUMB                              
062595,000263: 27,3473           65033                           AD       BIT1                                  
062596,000264: 27,3474           00006                           EXTEND                                         
062597,000265: 27,3475           63456                           BZMF     UPVERIFY                              #  NO
062598,000266: 27,3476           33655                           CAF      ADUPBFM1                              #  YES- BASED ON THE COMPONENT NO. INDEX
062599,000267: 27,3477           60330                           AD       UPTEMP                                #  CALCULATE THE ECADR OF LOCATION IN
062600,000268: 27,3500           13442                           TCF      OHWELL2    +2                         #  UPBUFF WHICH USER WANTS TO CHANGE.
062601,000269: 
062602,000270: 27,3501  27,3705               UPOUT4             EQUALS   UPOUT      +1                         #  COMES HERE ON V34 TO TERMINATE UPDATE
062603,000271: 
062604,000272:                                                                                                  #  CHECK FOR VERB 32 SEQUENCE
062605,000273: 
062606,000274: 27,3501           40154        CK4V32             CS       MPAC                                  #  ON DATA RETURN FROM 'GOXDSPF'
062607,000275: 27,3502           75026                           MASK     BIT6                                  #  ON DATA RETURN FROM "GOXDSP"& THE CON-
062608,000276: 27,3503           10000                           CCS      A                                     #  TENTS OF MPAC = VERB.  SO TEST FOR V32.
062609,000277: 27,3504           00002                           TC       Q                                     #  IT'S NOT A V32, IT'S DATA.  PROCEED.
062610,000278: 27,3505           50002                           INDEX    Q                                     
062611,000279: 27,3506           77771                           TC       0          -6                         #  V32 ENCOUNTERED - GO BACK AND GET DATA
062612,000280: 
062613,000281: 27,3507           00330        ADUPTEMP           ADRES    UPTEMP                                #  ADDRESS OF TEMP STORAGE FOR CORRECTIONS
062614,000282: 27,3510           00304        ADUPBUFF           ADRES    UPBUFF                                #  ADDRESS OF UPDATE DATA STORAGE BUFFER
062615,000283: 27,3511           05201        UPLOADNV           VN       2101                                  #  VERB 21 NOUN 01
062616,000284: 27,3512           05202        UPVRFYNV           VN       2102                                  #  VERB 21 NOUN 02
062617,000285: 27,3513     4376               UP21               =        MD1                                   #  DEC 21 = MAX NO OF COMPONENTS +1
062618,000286: 27,3513     5036               UPDTPHAS           EQUALS   FIVE                                  
062619,000287: 
062620,000288:                                                                                                  #  PRE-STORE AND FAN TO APPROPRIATE BRANCH SEQUENCE
062621,000289: 
062622,000290: 27,3513                        UPSTORE            EQUALS                                         #  GROUND HAS VERIFIED UPDATE.  STORE DATA.
062623,000291: 
062624,000292: 27,3513           00004                           INHINT                                         
062625,000293: 
062626,000294: 27,3514           30103                           CAE      FLAGWRD7                              #  INVERT VERIFLAG (BIT 3 OF FLAGWRD7) TO
062627,000295: 27,3515           56001                           XCH      L                                     #  INDICATE TO THE GROUND (VIA DOWNLINK)
062628,000296: 27,3516           35031                           CAF      BIT3                                  #  THAT THE V33 (WHICH THE GROUND SENT TO
062629,000297: 27,3517           00006                           EXTEND                                         #  VERIFY THE UPDATE) HAS BEEN SUCCESSFULLY
062630,000298: 27,3520           06001                           RXOR     LCHAN                                 #  RECEIVED BY THE UPDATE PROGRAM
062631,000299: 27,3521           54103                           TS       FLAGWRD7                              
062632,000300: 
062633,000301: 27,3522           05426                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO REDO THE UPDATE
062634,000302: 27,3523           04026                           OCT      04026                                 #  DATA STORE IF A RESTART OCCURS.
062635,000303: 27,3524           00004                           INHINT                                         #  (BECAUSE PHASCHNG DID A RELINT)
062636,000304: 
062637,000305: 27,3525           45032                           CS       TWO                                   #  GO TO UPFNDVAC IF INSTALL IS REQUIRED,
062638,000306: 27,3526           60302                           AD       UPVERB                                #  THAT IS, IF IT'S A V70 - V72.
062639,000307: 27,3527           00006                           EXTEND                                         #  GO TO UPEND73 IF IT'S A V73.
062640,000308: 27,3530           63537                           BZMF     UPFNDVAC                              
062641,000309: 
062642,000310:                                                                                                  #  VERB 73 BRANCH
062643,000311: 
062644,000312: 27,3531           00006        UPEND73            EXTEND                                         #  V73-PERFORM DP OCTAL AGC CLOCK INCREMENT
062645,000313: 27,3532           30305                           DCA      UPBUFF                                
062646,000314: 27,3533           52315                           DXCH     UPBUFF     +8D                        
062647,000315: 27,3534           03562                           TC       TIMEDIDL                              
062648,000316: 27,3535           04400                           TC       FALTON                                #  ERROR- TURN ON *OPERATOR ERROR* LIGHT
062649,000317: 27,3536           03705                           TC       UPOUT      +1                         #  GO TO COMMON UPDATE PROGRAM EXIT
062650,000318: 
062651,000319: 27,3537           34371        UPFNDVAC           CAF      CHRPRIO                               #  (USE EXTENDED VERB PRIORITY)
062652,000320: 27,3540           05163                           TC       FINDVAC                               #  GET VAC AREA FOR 'CALL INTSTALL'
062653,000321: 27,3541  E3,1706                                  EBANK=   TEPHEM                                
062654,000322: 27,3541           03544 56063                     2CADR    UPJOB                                 #  (NOTE:  THIS WILL ALSO SET EBANK FOR
062655,000323: 27,3543           05233                           TC       ENDOFJOB                              #  'TEPHEM' UPDATE BY V70)
062656,000324: 
062657,000325: 27,3544           06006        UPJOB              TC       INTPRET                               #  THIS COULD BE A STATE VECTOR UPDATE -- SO
062658,000326: 27,3545           77624                           CALL                                           #  WAIT (PUT JOB TO SLEEP) IF ORBIT INT(OI)
062659,000327: 27,3546           27446                                    INTSTALL                              #  IS IN PROGRESS -- OR -- GRAB OI AND RETURN
062660,000328:                                                                                                  #  TO UPWAKE IF OI IS NOT IN PROGRESS.
062661,000329: 
062662,000330: 27,3547           77776        UPWAKE             EXIT                                           
062663,000331: 
062664,000332: 27,3550           05426                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
062665,000333: 27,3551           04026                           OCT      04026                                 
062666,000334: 
062667,000335: 27,3552           05562                           TC       UPFLAG                                #  SET INTEGRATION RESTART BIT
062668,000336: 27,3553           00236                           ADRES    REINTFLG                              
062669,000337: 27,3554           00004                           INHINT                                         
062670,000338: 27,3555                        UPPART3            EQUALS                                         
062671,000339: 
062672,000340: 27,3555           50302                           INDEX    UPVERB                                #  BRANCH TO THE APPROPRIATE UPDATE VERB
062673,000341: 27,3556           13557                           TCF      +1                                    #  ROUTINE TO ACTUALLY PERFORM THE UPDATE
062674,000342: 27,3557           13716                           TCF      UPEND70                               #  V70
062675,000343: 27,3560           13625                           TCF      UPEND71                               #  V71
062676,000344: 27,3561           13657                           TCF      UPEND72                               #  V72
062677,000345: 
062678,000346:                                                                                                  #  ROUTINE TO INCREMENT CLOCK (TIME2,TIME1) WITH CONTENTS OF DP WORD AT UPBUFF.
062679,000347: 27,3562           00006        TIMEDIDL           EXTEND                                         
062680,000348: 27,3563           22330                           QXCH     UPTEMP                                #  SAVE Q FOR RETURN
062681,000349: 27,3564           35035                           CAF      ZERO                                  #  ZERO AND SAVE TIME2,TIME1
062682,000350: 27,3565           22007                           ZL                                             
062683,000351: 27,3566           52025                           DXCH     TIME2                                 
062684,000352: 27,3567           52327                           DXCH     UPBUFF     +18D                       #  STORE IN CASE OF OVERFLOW
062685,000353: 
062686,000354: 27,3570           35036                           CAF      UPDTPHAS                              #  DO
062687,000355: 27,3571           54001                           TS       L                                     #  A
062688,000356: 27,3572           40000                           COM                                            #  QUICK
062689,000357: 27,3573           52765                           DXCH     -PHASE6                               #  PHASCHNG
062690,000358: 
062691,000359: 27,3574           00004        TIMEDIDR           INHINT                                         
062692,000360: 27,3575           35035                           CAF      ZERO                                  
062693,000361: 27,3576           22007                           ZL                                             #  PICK UP INCREMENTER(AND ZERO
062694,000362: 27,3577           54156                           TS       MPAC       +2                         #  IT IN CASE OF RESTARTS) AND
062695,000363: 27,3600           52315                           DXCH     UPBUFF     +8D                        #  STORE IT
062696,000364: 27,3601           52155                           DXCH     MPAC                                  #  INTO MPAC FOR TPAGREE.
062697,000365: 
062698,000366: 27,3602           00006                           EXTEND                                         
062699,000367: 27,3603           30327                           DCA      UPBUFF     +18D                       
062700,000368: 27,3604           20155                           DAS      MPAC                                  #  FORM SUM IN MPAC
062701,000369: 27,3605           00006                           EXTEND                                         
062702,000370: 27,3606           13615                           BZF      DELTAOK                               #  TEST FOR OVERFLOW
062703,000371: 27,3607           35035                           CAF      ZERO                                  
062704,000372: 27,3610           52327                           DXCH     UPBUFF     +18D                       #  OVERFLOW, RESTORE OLD VALUE OF CLOCK
062705,000373: 27,3611           20025                           DAS      TIME2                                 #  AND TURN ON OPERATOR ERROR
062706,000374: 
062707,000375: 27,3612           05426                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
062708,000376: 27,3613           04026                           OCT      04026                                 
062709,000377: 
062710,000378: 27,3614           00330                           TC       UPTEMP                                #  GO TO ERROR EXIT
062711,000379: 
062712,000380: 27,3615           07226        DELTAOK            TC       TPAGREE                               #  FORCE SIGN AGREEMENT
062713,000381: 27,3616           52155                           DXCH     MPAC                                  
062714,000382: 27,3617           20025                           DAS      TIME2                                 #  INCREMENT TIME2,TIME1
062715,000383: 
062716,000384: 27,3620           05426                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
062717,000385: 27,3621           04026                           OCT      04026                                 
062718,000386: 
062719,000387: 27,3622           00004                           INHINT                                         
062720,000388: 27,3623           50330                           INDEX    UPTEMP                                #  (CODED THIS WAY FOR RESTART PROTECTION)
062721,000389: 27,3624           00001                           TC       1                                     #  NORMAL RETURN
062722,000390: 
062723,000391:                                                                                                  #  VERB 71 BRANCH
062724,000392: 
062725,000393: 27,3625           30305        UPEND71            CAE      UPBUFF     +1                         #  SET EBANK
062726,000394: 27,3626           54003                           TS       EBANK                                 #        AND
062727,000395: 27,3627           74373                           MASK     LOW8                                  #  CALCULATE
062728,000396: 27,3630           54330                           TS       UPTEMP                                #  S-REG VALUE OF RECEIVING AREA
062729,000397: 27,3631           67714                           AD       NEG3                                  #  IN THE PROCESS OF
062730,000398: 27,3632           60300                           AD       COMPNUMB                              #  PERFORMING
062731,000399: 27,3633           00006                           EXTEND                                         #  THIS UPDATE
062732,000400: 27,3634           13642                           BZF      STORLP71                              #  WILL WE
062733,000401: 27,3635           75023                           MASK     BIT9                                  #  OVERFLOW
062734,000402: 27,3636           10000                           CCS      A                                     #  INTO THE NEXT EBANK....
062735,000403: 27,3637           13753                           TCF      UPERROUT                              #  YES
062736,000404: 
062737,000405: 27,3640           37714                           CA       NEG3                                  #  NO- CALCULATE NUMBER OF
062738,000406: 27,3641           60300                           AD       COMPNUMB                              #  WORDS TO BE STORED MINUS ONE
062739,000407: 27,3642           54154        STORLP71           TS       MPAC                                  #  SAVE NO. OF WORDS REMAINING MINUS ONE
062740,000408: 27,3643           50000                           INDEX    A                                     #  TAKE NEXT UPDATE WORD FROM
062741,000409: 27,3644           30306                           CA       UPBUFF     +2                         #  UPBUFF AND
062742,000410: 27,3645           54001                           TS       L                                     #  SAVE IT IN L
062743,000411: 27,3646           30154                           CA       MPAC                                  #  CALCULATE NEXT
062744,000412: 27,3647           60330                           AD       UPTEMP                                #  RECEIVING ADDRESS
062745,000413: 27,3650           50000                           INDEX    A                                     
062746,000414: 27,3651  E3,1400                                  EBANK=   1400                                  
062747,000415: 27,3651           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
062748,000416: 27,3652  E3,1706                                  EBANK=   TEPHEM                                
062749,000417: 27,3652           10154                           CCS      MPAC                                  #  ARE THERE ANY WORDS LEFT TO BE STORED
062750,000418: 27,3653           13642                           TCF      STORLP71                              #  YES
062751,000419: 27,3654           13704                           TCF      UPOUT                                 #  NO- THEN EXIT UPDATE PROGRAM
062752,000420: 27,3655           00303        ADUPBFM1           ADRES    UPBUFF     -1                         #  SAME AS ADUPBUFF BUT LESS 1 (DON'T MOVE)
062753,000421: 27,3656           13704                           TCF      UPOUT                                 #  NO- EXIT UPDATE (HERE WHEN COMPNUMB = 3)
062754,000422: 
062755,000423:                                                                                                  #  VERB 72 BRANCH
062756,000424: 
062757,000425: 27,3657           35033        UPEND72            CAF      BIT1                                  #  HAVE AN ODD NO. OF COMPONENTS
062758,000426: 27,3660           70300                           MASK     COMPNUMB                              #  BEEN SENT FOR A V72 UPDATE ...
062759,000427: 27,3661           10000                           CCS      A                                     
062760,000428: 27,3662           13664                           TCF      +2                                    #  YES
062761,000429: 27,3663           13753                           TCF      UPERROUT                              #  ERROR- SHOULD BE ODD NO. OF COMPONENTS
062762,000430: 27,3664           45032                           CS       BIT2                                  
062763,000431: 27,3665           60300                           AD       COMPNUMB                              
062764,000432: 27,3666           54154        LDLOOP72           TS       MPAC                                  #  NOW PERFORM THE UPDATE
062765,000433: 27,3667           50000                           INDEX    A                                     
062766,000434: 27,3670           30305                           CAE      UPBUFF     +1                         #  PICK UP NEXT UPDATE WORD
062767,000435: 27,3671           22000                           LXCH     A                                     
062768,000436: 27,3672           10154                           CCS      MPAC                                  #  SET POINTER TO ECADR (MUST BE CCS)
062769,000437: 27,3673           54154                           TS       MPAC                                  
062770,000438: 27,3674           50000                           INDEX    A                                     
062771,000439: 27,3675           30305                           CAE      UPBUFF     +1                         #  PICK UP NEXT ECADR OF REG TO BE UPDATED
062772,000440: 27,3676           54003                           TS       EBANK                                 #  SET EBANK
062773,000441: 27,3677           74373                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
062774,000442: 27,3700           50000                           INDEX    A                                     
062775,000443: 
062776,000444: 27,3701  E3,1400                                  EBANK=   1400                                  
062777,000445: 27,3701           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
062778,000446: 27,3702  E3,1706                                  EBANK=   TEPHEM                                
062779,000447: 27,3702           10154                           CCS      MPAC                                  #  ARE WE THROUGH THE V72 UPDATE...
062780,000448: 27,3703           13666                           TCF      LDLOOP72                              #  NO
062781,000449: 
062782,000450:                                                                                                  #  NORMAL FINISH OF P27
062783,000451: 
062784,000452: 27,3704                        UPOUT              EQUALS                                         
062785,000453: 27,3704           02672                           TC       INTWAKEU                              #  RELEASE GRAB OF ORBITAL INTEGRATION
062786,000454: 27,3705           30301                 +1        CAE      UPOLDMOD                              #  RESTORE PRIOR P27 MODE
062787,000455: 27,3706           05373                           TC       NEWMODEX   +3                         
062788,000456: 27,3707           35035                           CAF      ZERO                                  
062789,000457: 27,3710           54332                           TS       DNLSTCOD                              
062790,000458: 27,3711           03760                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT
062791,000459: 27,3712           00006                           EXTEND                                         #  KILL GROUP 6.
062792,000460: 27,3713           35035                           DCA      NEG0                                  
062793,000461: 27,3714           52765                           DXCH     -PHASE6                               
062794,000462: 
062795,000463: 27,3715           05550                           TC       ENDEXT                                #  EXTENDED VERB EXIT
062796,000464: 
062797,000465:                                                                                                  #  VERB 70 BRANCH
062798,000466: 
062799,000467: 27,3716           00006        UPEND70            EXTEND                                         #  V70 DOES THE FOLLOWING WITH DP DELTA
062800,000468: 27,3717           40305                           DCS      UPBUFF                                #  TIME IN UPBUFF
062801,000469: 27,3720           52315                           DXCH     UPBUFF     +8D                        
062802,000470: 27,3721           03562                           TC       TIMEDIDL                              #  DECREMENT AGC CLOCK
062803,000471: 
062804,000472: 27,3722           03753                           TC       UPERROUT                              #  ERROR WHILE DECREMENTING CLOCK -- EXIT
062805,000473: 
062806,000474: 27,3723  E3,1706                                  EBANK=   TEPHEM                                
062807,000475: 27,3723           00006                           EXTEND                                         
062808,000476: 27,3724           40305                           DCS      UPBUFF                                #  COPY DECREMENTERS FOR
062809,000477: 27,3725           52317                           DXCH     UPBUFF     +10D                       #  RESTART PROTECTION
062810,000478: 27,3726           00006                           EXTEND                                         
062811,000479: 27,3727           40305                           DCS      UPBUFF                                
062812,000480: 27,3730           52321                           DXCH     UPBUFF     +12D                       
062813,000481: 
062814,000482: 27,3731           05426                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
062815,000483: 27,3732           04026                           OCT      04026                                 
062816,000484: 
062817,000485: 27,3733           35035                           CAF      ZERO                                  
062818,000486: 27,3734           22007                           ZL                                             
062819,000487: 27,3735           52317                           DXCH     UPBUFF     +10D                       #  DECREMENT CSM STATE VECTOR TIME
062820,000488: 27,3736           21571                           DAS      TETCSM                                
062821,000489: 
062822,000490: 27,3737           35035                           CAF      ZERO                                  
062823,000491: 
062824,000492: 27,3740           22007                           ZL                                             
062825,000493: 27,3741           52321                           DXCH     UPBUFF     +12D                       #  DECREMENT LEM STATE VECTOR TIME
062826,000494: 27,3742           21643                           DAS      TETLEM                                
062827,000495: 27,3743           35035                           CAF      ZERO                                  
062828,000496: 27,3744           22007                           ZL                                             
062829,000497: 27,3745           52305                           DXCH     UPBUFF                                
062830,000498: 27,3746           21710                           DAS      TEPHEM     +1                         #  INCREMENT TP TEPHEM
062831,000499: 27,3747           27706                           ADS      TEPHEM                                
062832,000500: 
062833,000501: 27,3750           05426                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
062834,000502: 27,3751           04026                           OCT      04026                                 
062835,000503: 
062836,000504: 27,3752     0304                                  EBANK=   UPBUFF                                
062837,000505: 
062838,000506: 27,3752           03704                           TC       UPOUT                                 #  GO TO STANDARD UPDATE PROGRAM EXIT
062839,000507: 
062840,000508:                                                                                                  #  ERROR SEQUENCE
062841,000509: 
062842,000510: 27,3753           04400        UPERROUT           TC       FALTON                                #  TURN ON *OPERATOR ERROR* LIGHT
062843,000511: 27,3754           13704                           TCF      UPOUT                                 #  GO TO COMMON UPDATE PROGRAM EXIT
062844,000512: 
062845,000513: 27,3755           04400                 +2        TC       FALTON                                #  TURN ON 'OPERATOR ERROR' LIGHT
062846,000514: 27,3756           03760                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT
062847,000515: 27,3757           05550                           TC       ENDEXT                                #  EXTENDED VERB EXIT
062848,000516:                                                                                                  #  (THE PURPOSE OF UPERROUT +2 EXIT IS
062849,000517:                                                                                                  #  TO PROVIDE AN ERROR EXIT WHICH DOES NOT
062850,000518:                                                                                                  #  RESET ANY RESTART GROUPS)
062851,000519: 
062852,000520:                                                                                                  #  :UPACTOFF: IS A ROUTINE TO TURN OFF UPLINK ACTIVITY LIGHT ON ALL EXITS FROM UPDATE PROGRAM (P27).
062853,000521: 
062854,000522: 27,3760           45031        UPACTOFF           CS       BIT3                                  
062855,000523: 27,3761           00006                           EXTEND                                         #  TURN OFF UPLINK ACTIVITY LIGHT
062856,000524: 27,3762           03011                           WAND     DSALMOUT                              #  (BIT 3 OF CHANNEL 11)
062857,000525: 27,3763           00002                           TC       Q                                     

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