Source Code

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

They have been adapted from sources files created from a listing of Comanche 55. These source files were updated to match binary dumps of a set of Comanche 67 rope modules. They were then further modified by applying known changes between Comanche 67 and Comanche 72. A binary dump of module B2 of Comanche 72, part number 2010802-021, was also used to validate changes made to banks 05-13. 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 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.

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

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