Source Code

These source-code files are part of a reconstructed copy of Skylark 048, the Block II Command Module (CM) Apollo Guidance Computer (AGC) software for the Skylab-2, Skylab-3, Skylab-4, and Apollo-Soyuz Test Project missions.

They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on Skylab-2, part numbers 2010802-541, 2010802-551, 2010802-561, 2010802-571, 2010802-581, and 2010802-591. Access to these modules was provided by the New Mexico Museum of Space History, who we are much indebted to.

The source code for the Apollo 15, 16, and 17 software, Artemis 072, was used as a starting point. Heavy use was made of TRW 4900.5-244, Programmed Guidance Equations for Skylark Command Module Earth Orbital Program, dated 14 February 1972. This document contains pseudocode of essentially all of Skylark, using original program labels which have been copied for this source reconstruction.

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

059893,000002:                                                                                                  ## Copyright:   Public domain.
059894,000003:                                                                                                  ## Filename:    UPDATE_PROGRAM.agc
059895,000004:                                                                                                  ## Purpose:     A section of Skylark revision 048.
059896,000005:                                                                                                  ##              It is part of the source code for the Apollo Guidance Computer (AGC)
059897,000006:                                                                                                  ##              for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of
059898,000007:                                                                                                  ##              this software are available; instead, this file was created via
059899,000008:                                                                                                  ##              disassembly of dumps of the core rope modules actually flown on
059900,000009:                                                                                                  ##              Skylab-2. Access to these modules was provided by the New Mexico
059901,000010:                                                                                                  ##              Museum of Space History.
059902,000011:                                                                                                  ## Assembler:   yaYUL
059903,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059904,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
059905,000014:                                                                                                  ## Mod history: 2023-09-04 MAS  Created from Artemis 072.
059906,000015: 
059907,000016: 
059908,000017:                                                                                                  #  PROGRAM NAME:         P27
059909,000018:                                                                                                  #  WRITTEN BY:           KILROY/ DE WOLF
059910,000019: 
059911,000020:                                                                                                  #  MOD NO:               6
059912,000021:                                                                                                  #  MOD BY:               KILROY
059913,000022:                                                                                                  #  DATE:                 01DEC67
059914,000023: 
059915,000024:                                                                                                  #  LOG SECTION:          UPDATE PROGRAM.
059916,000025: 
059917,000026:                                                                                                  #  FUNCT. DESCR:         P27 (THE UPDATE PROGRAM) PROCESSES COMMANDS AND DATA
059918,000027:                                                                                                  #                            INSERTIONS REQUESTED BY THE GROUND VIA UPLINK.
059919,000028:                                                                                                  #                            THE P27 PROGRAM WILL ACCEPT UPDATES
059920,000029:                                                                                                  #                            ONLY DURING P00 FOR THE LM, AND ONLY DURING P00,
059921,000030:                                                                                                  #                        P02, AND FRESH START FOR THE CSM
059922,000031: 
059923,000032:                                                                                                  #  CALLING SEQ:          PROGRAM IS INITIATED BY UPLINK ENTRY OF VERBS 70, 71, 72 AND 73.
059924,000033: 
059925,000034:                                                                                                  #  SUBROUTINES:          TESTXACT, NEWMODEX, NEWMODEX +3, GOXDSPF, BANKCALL, FINDVAC, INTPRET, INTSTALL, TPAGREE,
059926,000035:                                                                                                  #                        INTWAKEU, ENDEXT, POSTJUMP, FALTON, NEWPHASE, PHASCHNG
059927,000036: 
059928,000037:                                                                                                  #  NORMAL EXIT:          TC ENDEXT
059929,000038: 
059930,000039:                                                                                                  #  ALARM/ABORT:          TC FALTON FOLLOWED BY TC ENDEXT
059931,000040: 
059932,000041:                                                                                                  #  RESTARTS:             P27 IS RESTART PROTECTED IN TWO WAYS...
059933,000042:                                                                                                  #                        1. PRIOR TO VERIFLAG INVERSION (WHICH IS CAUSED BY THE GROUND/ASTRONAUT'S VERIFICATION OF UPDATE
059934,000043:                                                                                                  #                           DATA BY SENDING A V33E WHEN V21N02 IS FLASHING)---
059935,000044:                                                                                                  #                           NO PROTECTION EXCEPT PRE-P27 MODE IS RESTORED, COAST + ALIGN DOWNLIST IS SELECTED AND UPLINK
059936,000045:                                                                                                  #                           ACTIVITY LIGHT IS TURNED OFF. (JUST AS IF A V34E WAS SENT DURING P27 DATA LOADS).
059937,000046:                                                                                                  #                           V70,V71,V72 OR V73 WILL HAVE TO BE COMPLETELY RESENT BY USER.
059938,000047:                                                                                                  #                        2. AFTER VERIFLAG INVERSION (WHEN UPDATE OF THE SPECIFIED ERASABLES IS BEING PERFORMED)---
059939,000048:                                                                                                  #                           PROTECTED AGAINST RESTARTS.
059940,000049: 
059941,000050:                                                                                                  #  DEBRIS:               UPBUFF  (20D)   TEMP STORAGE FOR ADDRESSES AND CONTENTS.
059942,000051:                                                                                                  #                        UPVERB  (1)     VERB NUMBER MINUS 70D (E.G. FOR V72, UPVERB = 72D - 70D = 2)
059943,000052:                                                                                                  #                        UPOLDMOD(1)     FOR MAJOR MODE INTERRUPTED BY P27.
059944,000053:                                                                                                  #                        COMPNUMB(1)     TOTAL NUMBER OF COMPONENTS TO BE TRANSMITTED.
059945,000054:                                                                                                  #                        UPCOUNT (1)     ACTUAL NUMBER OF COMPONENTS RECEIVED.
059946,000055:                                                                                                  #                        UPTEMP  (1)     SCRATCH, BUT USUALLY CONTAINS COMPONENT NUMBER TO BE CHANGED DURING VERIFY CYCLE
059947,000056: 
059948,000057:                                                                                                  #  INPUT:
059949,000058: 
059950,000059:                                                                                                  #        ENTRY:                  DESCRIPTION
059951,000060: 
059952,000061:                                                                                                  #        V70EXXXXXEXXXXXE        (LIFTOFF TIME INCREMENT) DOUBLE PRECISION OCTAL TIME INCREMENT, XXXXX XXXXX,
059953,000062:                                                                                                  #                                IS ADDED TO TEPHEM, SUBTRACTED FROM AGC CLOCK(TIME2,TIME1), SUBTRACTED FROM CSM STATE
059954,000063:                                                                                                  #                                VECTOR TIME(TETCSM) AND SUBTRACTED FROM LEM STATE VECTOR TIME (TETLEM).
059955,000064:                                                                                                  #                                THE DP OCTAL TIME INCREMENT IS SCALED AT 2(28).
059956,000065: 
059957,000066:                                                                                                  #        V71EIIEAAAAE            (CONTIGUOUS BLOCK UPDATE) II-2 OCTAL COMPONENTS, XXXXX,
059958,000067:                                                                                                  #        XXXXXE                  ARE LOADED INTO ERASABLE STARTING AT ECADR, AAAA.
059959,000068:                                                                                                  #        XXXXXE                  IT IS .GE. 3 .AND. .LE. 20D.,
059960,000069:                                                                                                  #                                AND (AAAA + II - 3) DOES NOT PRODUCE AN ADDRESS IN THE
059961,000070:                                                                                                  #        9 NEXT BANK
059962,000071:                                                                                                  #          .                     SCALING IS SAME AS INTERNAL REGISTERS.
059963,000072: 
059964,000073:                                                                                                  #        V72EIIE                 (SCATTER UPDATE) (II-1)/2 OCTAL COMPONENTS, XXXXX, ARE
059965,000074:                                                                                                  #        AAAAEXXXXXE             LOADED INTO ERASABLE LOCATIONS, AAAA.
059966,000075:                                                                                                  #        AAAAEXXXXXE             II IS .GE. 3 .AND. .LE. 19D, AND MUST BE ODD.
059967,000076:                                                                                                  #          .                     SCALING IS SAME AS INTERNAL REGISTERS.
059968,000077: 
059969,000078:                                                                                                  #        V73EXXXXXEXXXXXE        (OCTAL CLOCK INCREMENT) DOUBLE PRECISION OCTAL TIME
059970,000079:                                                                                                  #                                INCREMENT XXXXX XXXXX, IS ADDED TO THE AGC CLOCK, IN
059971,000080:                                                                                                  #                                CENTISECONDS SCALED AT (2)28.
059972,000081:                                                                                                  #                                THIS LOAD IS THE OCTAL EQUIVALENT OF V55.
059973,000082: 
059974,000083:                                                                                                  #  OUTPUT:               IN ADDITION TO THE ABOVE REGISTER LOADS, ALL UPDATES
059975,000084:                                                                                                  #                        COMPLEMENT BIT3 OF FLAGWORD7.
059976,000085: 
059977,000086:                                                                                                  #  ADDITIONAL NOTES:     VERB 71, JUST DEFINED ABOVE WILL BE USED TO PERFORM BUT NOT LIMITED TO THE FOLLOWING UPDATES --
059978,000087:                                                                                                  #                        1. CSM/LM STATE VECTOR UPDATE
059979,000088:                                                                                                  #                        2. REFSMMAT UPDATE
059980,000089: 
059981,000090: 
059982,000091:                                                                                                  #        THE FOLLOWING COMMENTS DELINEATE EACH SPECIAL UPDATE----
059983,000092: 
059984,000093:                                                                                                  #  1. CSM/LM STATE VECTOR UPDATE (ALL DATA ENTRIES IN OCTAL)
059985,000094: 
059986,000095:                                                                                                  #  ENTRIES:      DATA DEFINITION:                                SCALE FACTORS:
059987,000096:                                                                                                  #  V71E          CONTIGUOUS BLOCK UPDATE VERB
059988,000097:                                                                                                  #     21E        NUMBER OF COMPONENTS FOR STATE VECTOR UPDATE
059989,000098:                                                                                                  #   AAAAE        ECADR OF 'UPSVFLAG'
059990,000099:                                                                                                  #  XXXXXE        STATE VECTOR IDENTIFIER: 00001 FOR CSM, 77776 FOR LEM - EARTH SPHERE OF INFLUENCE SCALING
059991,000100:                                                                                                  #                                         00002 FOR CSM, 77775 FOR LEM - LUNAR SPHERE OF INFLUENCE SCALING
059992,000101:                                                                                                  #  XXXXXEXXXXXE  X POSITION
059993,000102:                                                                                                  #  XXXXXEXXXXXE  Y POSITION
059994,000103:                                                                                                  #  XXXXXEXXXXXE  Z POSITION
059995,000104:                                                                                                  #  XXXXXEXXXXXE  X VELOCITY
059996,000105:                                                                                                  #  XXXXXEXXXXXE  Y VELOCITY
059997,000106:                                                                                                  #  XXXXXEXXXXXE  Z VELOCITY
059998,000107:                                                                                                  #  XXXXXEXXXXXE  TIME FROM AGC CLOCK ZERO
059999,000108:                                                                                                  #  V33E          VERB 33 TO SIGNAL THAT THE STATE VECTOR IS READY TO BE STORED.
060000,000109: 
060001,000110: 
060002,000111:                                                                                                  #  2. REFSMMAT (ALL DATA ENTRIES IN OCTAL)
060003,000112:                                                                                                  #  ENTRIES:      DATA DEFINITIONS:                               SCALE FACTORS:
060004,000113:                                                                                                  #  V71E          CONTIGUOUS BLOCK UPDATE VERB
060005,000114:                                                                                                  #     24E        NUMBER OF COMPONENTS FOR REFSMMAT UPDATE
060006,000115:                                                                                                  #   AAAAE        ECADR OF 'REFSMMAT'
060007,000116:                                                                                                  #  XXXXXEXXXXXE  ROW 1 COLUMN 1                                  2(-1)
060008,000117:                                                                                                  #  XXXXXEXXXXXE  ROW 1 COLUMN 2                                  2(-1)
060009,000118:                                                                                                  #  XXXXXEXXXXXE  ROW 1 COLUMN 3                                  2(-1)
060010,000119:                                                                                                  #  XXXXXEXXXXXE  ROW 2 COLUMN 1                                  2(-1)
060011,000120:                                                                                                  #  XXXXXEXXXXXE  ROW 2 COLUMN 2                                  2(-1)
060012,000121:                                                                                                  #  XXXXXEXXXXXE  ROW 2 COLUMN 3                                  2(-1)
060013,000122:                                                                                                  #  XXXXXEXXXXXE  ROW 3 COLUMN 1                                  2(-1)
060014,000123:                                                                                                  #  XXXXXEXXXXXE  ROW 3 COLUMN 2                                  2(-1)
060015,000124:                                                                                                  #  XXXXXEXXXXXE  ROW 3 COLUMN 3                                  2(-1)
060016,000125:                                                                                                  #  V33E          VERB 33 TO SIGNAL THAT REFSMMAT IS READY TO BE STORED.
060017,000126: 
060018,000127: 43,2000                                           SETLOC   EXTVERBS                              
060019,000128: 43,2000                                           BANK                                           
060020,000129: 
060021,000130: 43,3721  E3,1700                                  EBANK=   TEPHEM                                
060022,000131: 
060023,000132: 43,3721                                           COUNT*   $$/P27                                
060024,000133: 43,3721           35003        V70UPDAT           CAF      UP70                                  #  COMES HERE ON V70E
060025,000134: 43,3722           13730                           TCF      V73UPDAT   +1                         
060026,000135: 
060027,000136: 43,3723           35001        V71UPDAT           CAF      UP71                                  #  COMES HERE ON V71E
060028,000137: 43,3724           13730                           TCF      V73UPDAT   +1                         
060029,000138: 
060030,000139: 43,3725           35000        V72UPDAT           CAF      UP72                                  #  COMES HERE ON V72E
060031,000140: 43,3726           13730                           TCF      V73UPDAT   +1                         
060032,000141: 
060033,000142: 43,3727           36214        V73UPDAT           CAF      UP73                                  #  COMES HERE ON V73E
060034,000143: 
060035,000144: 43,3730           54331                 +1        TS       UPVERBSV                              #  SAVE UPVERB UNTIL IT'S OK TO ENTER P27
060036,000145: 
060037,000146: 43,3731           02076                           TC       TESTXACT                              #  GRAB DISPLAY IF AVAILABLE, OTHERWISE
060038,000147:                                                                                                  #  TURN *OPERATOR ERROR* ON AND TERMINATE JOB
060039,000148: 
060040,000149: 43,3732           31204                           CA       MODREG                                #  CHECK IF UPDATE ALLOWED
060041,000150: 43,3733           00006                           EXTEND                                         #  FIRST CHECK FOR MODREG = +0, -0
060042,000151: 43,3734           13752                           BZF      UPDATEOK                              #  FRESH START OR P00
060043,000152: 43,3735           40104                           CS       FLAGWRD8                              
060044,000153: 43,3736           74771                           MASK     UTBIT                                 
060045,000154: 43,3737           10000                           CCS      A                                     
060046,000155: 43,3740           13745                           TCF      +5                                    
060047,000156: 
060048,000157: 43,3741           41204                           CS       MODREG                                
060049,000158: 43,3742           64124                           AD       OCT24                                 
060050,000159: 43,3743           00006                           EXTEND                                         
060051,000160: 43,3744           13752                           BZF      UPDATEOK                              
060052,000161: 
060053,000162: 43,3745           45000                           CS       TWO                                   
060054,000163: 43,3746           71204                           MASK     MODREG                                
060055,000164: 43,3747           00006                           EXTEND                                         
060056,000165: 43,3750           13752                           BZF      +2                                    #  P02
060057,000166: 43,3751           13762                           TCF      UPERROR                               
060058,000167: 43,3752           31204        UPDATEOK           CAE      MODREG                                #  UPDATE ALLOWED.
060059,000168: 43,3753           54301                           TS       UPOLDMOD                              #  SAVE CURRENT MAJOR MODE
060060,000169: 
060061,000170: 43,3754           30331                           CAE      UPVERBSV                              #  SET UPVERB TO INDICATE TO P27
060062,000171: 43,3755           54302                           TS       UPVERB                                #  WHICH EXTENDED VERB CALLED IT.
060063,000172: 
060064,000173: 43,3756           35001                           CAF      ONE                                   
060065,000174: 43,3757           54303                           TS       UPCOUNT                               #  INITIALIZE UPCOUNT TO 1
060066,000175: 
060067,000176: 43,3760           04666                           TC       POSTJUMP                              #  LEAVE EXTENDED VERB BANK AND
060068,000177: 43,3761           65534                           CADR     UPPART2                               #  GO TO UPDATE PROGRAM (P27) BANK.
060069,000178: 
060070,000179: 43,3762           04362        UPERROR            TC       FALTON                                #  TURN ON OP. ERROR
060071,000180: 43,3763           04415                           TC       UPACTOFF                              #  TURN OFF UPLINK ACT LITE
060072,000181: 43,3764           15537                           TCF      ENDEXT                                #  (RESTART GROUP NOT ESTABLISHED YET)
060073,000182: 
060074,000183: 43,3765     5003               UP70               EQUALS   ZERO                                  
060075,000184: 43,3765     5001               UP71               EQUALS   ONE                                   
060076,000185: 43,3765     5000               UP72               EQUALS   TWO                                   
060077,000186: 43,3765     6214               UP73               EQUALS   THREE                                 
060078,000187: 
060079,000188: 42,2000                                           SETLOC   UPDATE3                               
060080,000189: 42,2000                                           BANK                                           
060081,000190: 
060082,000191: 42,3534                                           COUNT*   $$/P27                                
060083,000192: 
060084,000193: 42,3534                        UPPART2            EQUALS                                         #  UPDATE PROGRAM - PART 2
060085,000194: 
060086,000195: 42,3534           05415                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO RESTORE OLD MODE
060087,000196: 42,3535           07026                           OCT      07026                                 #  AND DOWNLIST AND EXIT IF RESTART OCCURS.
060088,000197: 42,3536           30000                           OCT      30000                                 #  PRIORITY SAME AS CHRPRIO
060089,000198: 42,3537     0304                                  EBANK=   UPBUFF                                
060090,000199: 42,3537           03626 56100                     2CADR    UPOUT      +1                         
060091,000200: 
060092,000201: 42,3541           35001                           CAF      ONE                                   
060093,000202: 42,3542           54332                           TS       DNLSTCOD                              #  DOWNLIST
060094,000203: 
060095,000204: 42,3543           05357                           TC       NEWMODEX                              #  SET MAJOR MODE = 27
060096,000205: 42,3544           00033                           DEC      27         B-14                       
060097,000206: 
060098,000207: 42,3545           50302                           INDEX    UPVERB                                #  BRANCH DEPENDING ON WHETHER THE UPDATE
060099,000208: 42,3546           13547                           TCF      +1                                    #  VERB REQUIRES A FIXED OR VARIABLE NUMBER
060100,000209: 42,3547           13552                           TCF      +3                                    #  V70 FIXED.               (OF COMPONENTS.
060101,000210: 42,3550           13555                           TCF      OHWELL1                               #  V71 VARIABLE - GO GET NO. OF COMPONENTS
060102,000211: 42,3551           13555                           TCF      OHWELL1                               #  V72 VARIABLE - GO GET NO. OF COMPONENTS
060103,000212: 42,3552           35000                           CA       TWO                                   #  V73 (AND V70) FIXED
060104,000213: 42,3553           54300                           TS       COMPNUMB                              #  SET NUMBER OF COMPONENTS TO 2.
060105,000214: 42,3554           13600                           TCF      OHWELL2                               #  GO GET THE TWO UPDATE COMPONENTS
060106,000215: 
060107,000216: 42,3555           33652        OHWELL1            CAF      ADUPBUFF                              #  * REQUEST USER TO SEND NUMBER  *
060108,000217: 42,3556           54156                           TS       MPAC       +2                         #  * OF COMPONENTS PARAMETER(II). *
060109,000218: 42,3557           33654                 +2        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
060110,000219: 42,3560           04647                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
060111,000220: 42,3561           20456                           CADR     GOXDSPF                               #  TO REQUEST II.
060112,000221: 42,3562           13641                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN
060113,000222: 42,3563           13557                           TCF      OHWELL1    +2                         
060114,000223: 42,3564           03643                           TC       CK4V32                                #  DATA OR V32 RETURN
060115,000224: 42,3565           45000                           CS       BIT2                                  
060116,000225: 42,3566           60304                           AD       UPBUFF                                #  IS II (NUMBER OF COMPONENTS PARAMETER)
060117,000226: 42,3567           00006                           EXTEND                                         #  .GE. 3 AND .LE. 20D.
060118,000227: 42,3570           63557                           BZMF     OHWELL1    +2                         
060119,000228: 42,3571           40304                           CS       UPBUFF                                
060120,000229: 42,3572           64353                           AD       UP21                                  
060121,000230: 42,3573           00006                           EXTEND                                         
060122,000231: 42,3574           63557                           BZMF     OHWELL1    +2                         
060123,000232: 42,3575           30304                           CAE      UPBUFF                                
060124,000233: 42,3576           54300                           TS       COMPNUMB                              #  SAVE II IN COMPNUMB
060125,000234: 
060126,000235:                                                                                                  #  UPBUFF LOADING SEQUENCE
060127,000236: 
060128,000237: 42,3577           24303                 -1        INCR     UPCOUNT                               #  INCREMENT COUNT OF COMPONENTS RECEIVED
060129,000238: 42,3600           33653        OHWELL2            CAF      ADUPBFM1                              #  CALCULATE LOCATION (ECADR) IN UPBUFF
060130,000239: 42,3601           60303                           AD       UPCOUNT                               #  WHERE NEXT COMPONENT SHOULD BE STORED.
060131,000240: 42,3602           54156                 +2        TS       MPAC       +2                         #  PLACE ECADR INTO R3.
060132,000241: 42,3603           33654                 +3        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
060133,000242: 42,3604           04647                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
060134,000243: 42,3605           20456                           CADR     GOXDSPF                               #  TO REQUEST DATA.
060135,000244: 42,3606           13641                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN.
060136,000245: 42,3607           13603                           TCF      OHWELL2    +3                         #  V33 PROCEED RETURN
060137,000246: 42,3610           03643                           TC       CK4V32                                #  DATA OR V32 RETURN
060138,000247: 42,3611           40303                           CS       UPCOUNT                               #  HAVE WE FINISHED RECEIVING ALL
060139,000248: 42,3612           60300                           AD       COMPNUMB                              #  THE DATA WE EXPECTED.
060140,000249: 42,3613           00006                           EXTEND                                         
060141,000250: 42,3614           63616                           BZMF     UPVERIFY                              #  YES - GO TO VERIFICATION SEQUENCE
060142,000251: 42,3615           13577                           TCF      OHWELL2    -1                         #  NO - REQUEST ADDITIONAL DATA.
060143,000252: 
060144,000253:                                                                                                  #  VERIFY SEQUENCE
060145,000254: 42,3616           33651        UPVERIFY           CAF      ADUPTEMP                              #  PLACE ECADR WHERE COMPONENT NO. INDEX
060146,000255: 42,3617           54156                           TS       MPAC       +2                         #  IS TO BE STORED INTO R3.
060147,000256: 42,3620           33655                           CAF      UPVRFYNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
060148,000257: 42,3621           04647                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N02 TO REQUEST
060149,000258: 42,3622           20456                           CADR     GOXDSPF                               #  DATA CORRECTION OR VERIFICATION.
060150,000259: 42,3623           13641                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE(P27) RETURN
060151,000260: 42,3624           13656                           TCF      UPSTORE                               #  V33 DATA SENT IS GOOD. GO STORE IT.
060152,000261: 42,3625           03643                           TC       CK4V32                                #  COMPONENT NO. INDEX OR V32 RETURN
060153,000262: 42,3626           30330                           CA       UPTEMP                                #  DOES THE COMPONENT NO. INDEX JUST SENT
060154,000263: 42,3627           00006                           EXTEND                                         #  SPECIFY A LEGAL COMPONENT NUMBER?
060155,000264: 42,3630           63616                           BZMF     UPVERIFY                              #  NO, IT IS NOT POSITIVE NONZERO
060156,000265: 42,3631           40330                           CS       UPTEMP                                
060157,000266: 42,3632           60300                           AD       COMPNUMB                              
060158,000267: 42,3633           65001                           AD       BIT1                                  
060159,000268: 42,3634           00006                           EXTEND                                         
060160,000269: 42,3635           63616                           BZMF     UPVERIFY                              #  NO
060161,000270: 42,3636           33653                           CAF      ADUPBFM1                              #  YES - BASED ON THE COMPONENT NO. INDEX
060162,000271: 42,3637           60330                           AD       UPTEMP                                #  CALCULATE THE ECADR OF LOCATION IN
060163,000272: 42,3640           13602                           TCF      OHWELL2    +2                         #  UPBUFF WHICH USER WANTS TO CHANGE.
060164,000273: 
060165,000274: 42,3641           04666        UPOUT4             TC       POSTJUMP                              #  COMES HERE ON V34 TO TERMINATE UPDATE
060166,000275: 42,3642           57626                           CADR     UPOUT      +1                         
060167,000276: 
060168,000277:                                                                                                  #  CHECK FOR VERB 32 SEQUENCE
060169,000278: 
060170,000279: 42,3643           40154        CK4V32             CS       MPAC                                  #  ON DATA RETURN FROM 'GOXDSPF'
060171,000280: 42,3644           74774                           MASK     BIT6                                  #  ON DATA RETURN FROM "GOXDSP"& THE CON-
060172,000281: 42,3645           10000                           CCS      A                                     #  TENTS OF MPAC = VERB.  SO TEST FOR V32.
060173,000282: 42,3646           00002                           TC       Q                                     #  IT'S NOT A V32, IT'S DATA.  PROCEED.
060174,000283: 42,3647           50002                           INDEX    Q                                     
060175,000284: 42,3650           77771                           TC       0          -6                         #  V32 ENCOUNTERED - GO BACK AND GET DATA
060176,000285: 
060177,000286: 42,3651           00330        ADUPTEMP           ADRES    UPTEMP                                #  ADDRESS OF TEMP STORAGE FOR CORRECTIONS
060178,000287: 42,3652           00304        ADUPBUFF           ADRES    UPBUFF                                #  ADDRESS OF UPDATE DATA STORAGE BUFFER
060179,000288: 42,3653           00303        ADUPBFM1           ADRES    UPBUFF     -1                         #  SAME AS ADUPBUFF BUT LESS ONE
060180,000289: 42,3654           05201        UPLOADNV           VN       2101                                  #  VERB 21 NOUN 01
060181,000290: 42,3655           05202        UPVRFYNV           VN       2102                                  #  VERB 21 NOUN 02
060182,000291: 42,3656     4353               UP21               =        MD1                                   #  DEC 21 = MAX NO OF COMPONENTS +1
060183,000292: 42,3656     5004               UPDTPHAS           EQUALS   FIVE                                  
060184,000293: 
060185,000294:                                                                                                  #  PRE-STORE AND FAN TO APPROPRIATE BRANCH SEQUENCE
060186,000295: 
060187,000296: 42,3656                        UPSTORE            EQUALS                                         #  GROUND HAS VERIFIED UPDATE. STORE DATA.
060188,000297: 
060189,000298: 42,3656           00004                           INHINT                                         
060190,000299: 
060191,000300: 42,3657           30103                           CAE      FLAGWRD7                              #  INVERT VERIFLAG(BIT3 OF FLAGWRD7) TO
060192,000301: 42,3660           56001                           XCH      L                                     #  INDICATE TO THE GROUND(VIA DOWNLINK)
060193,000302: 42,3661           34777                           CAF      VERIFBIT                              #  THAT THE V33 (WHICH THE GROUND SENT TO
060194,000303: 42,3662           00006                           EXTEND                                         #  VERIFY THE UPDATE) HAS BEEN SUCCESSFULLY
060195,000304: 42,3663           06001                           RXOR     LCHAN                                 #  RECEIVED BY THE UPDATE PROGRAM
060196,000305: 42,3664           54103                           TS       FLAGWRD7                              
060197,000306: 
060198,000307: 42,3665           05415                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO REDO THE UPDATE
060199,000308: 42,3666           04026                           OCT      04026                                 #  DATA STORE IF A RESTART OCCURS.
060200,000309: 42,3667           00004                           INHINT                                         #  (BECAUSE PHASCHNG DID A RELINT)
060201,000310: 
060202,000311: 42,3670           45000                           CS       TWO                                   #  GO TO UPFNDVAC IF INSTALL IS REQUIRED,
060203,000312: 42,3671           60302                           AD       UPVERB                                #  THAT IS, IF IT'S A V70 - V72.
060204,000313: 42,3672           00006                           EXTEND                                         #  GO TO UPEND73 IF IT'S A V73.
060205,000314: 42,3673           63676                           BZMF     UPFNDVAC                              
060206,000315: 
060207,000316: 42,3674           04666                           TC       POSTJUMP                              
060208,000317: 42,3675           57677                           CADR     UPEND73                               
060209,000318: 
060210,000319: 42,3676           34346        UPFNDVAC           CAF      CHRPRIO                               #  (USE EXTENDED VERB PRIORITY)
060211,000320: 42,3677           05150                           TC       FINDVAC                               #  GET VAC AREA FOR 'CALL INTSTALL'
060212,000321: 42,3700  E3,1700                                  EBANK=   TEPHEM                                
060213,000322: 42,3700           03465 56103                     2CADR    UPJOB                                 #  (NOTE: THIS WILL ALSO SET EBANK FOR
060214,000323: 
060215,000324: 42,3702           05220                           TC       ENDOFJOB                              #  'TEPHEM' UPDATE BY V70)
060216,000325: 
060217,000326: 27,2000                                           SETLOC   UPDATE2                               
060218,000327: 27,2000                                           BANK                                           
060219,000328: 
060220,000329: 27,3465                                           COUNT*   $$/P27                                
060221,000330: 27,3465           06006        UPJOB              TC       INTPRET                               #  THIS COULD BE A STATE VECTOR UPDATE--SO
060222,000331: 27,3466           77624                           CALL                                           #  WAIT(PUT JOB TO SLEEP) IF ORBIT INT(OI)
060223,000332: 27,3467           11720                                    INTSTALL                              #  IS IN PROGRESS--OR--GRAB OI AND RETURN
060224,000333:                                                                                                  #  TO UPWAKE IF OI IS NOT IN PROGRESS.
060225,000334: 
060226,000335: 27,3470           77776        UPWAKE             EXIT                                           
060227,000336: 
060228,000337: 27,3471           05415                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
060229,000338: 27,3472           04026                           OCT      04026                                 
060230,000339: 
060231,000340: 27,3473           07710                           TC       UPFLAG                                #  SET INTEGRATION RESTART BIT
060232,000341: 27,3474           00230                           ADRES    REINTFLG                              
060233,000342: 27,3475           00004                           INHINT                                         
060234,000343: 27,3476                        UPPART3            EQUALS                                         
060235,000344: 
060236,000345: 27,3476           50302                           INDEX    UPVERB                                #  BRANCH TO THE APPROPRIATE UPDATE VERB
060237,000346: 27,3477           13500                           TCF      +1                                    #  ROUTINE TO ACTUALLY PERFORM THE UPDATE
060238,000347: 27,3500           13642                           TCF      UPEND70                               #  V70
060239,000348: 27,3501           13546                           TCF      UPEND71                               #  V71
060240,000349: 27,3502           13600                           TCF      UPEND72                               #  V72
060241,000350: 
060242,000351:                                                                                                  #  ROUTINE TO INCREMENT CLOCK (TIME2,TIME1) WITH CONTENTS OF DP WORD AT UPBUFF.
060243,000352: 27,3503           00006        TIMEDIDL           EXTEND                                         
060244,000353: 27,3504           22330                           QXCH     UPTEMP                                #  SAVE Q FOR RETURN
060245,000354: 27,3505           35003                           CAF      ZERO                                  #  ZERO AND SAVE TIME2,TIME1
060246,000355: 27,3506           22007                           ZL                                             
060247,000356: 27,3507           52025                           DXCH     TIME2                                 
060248,000357: 27,3510           52327                           DXCH     UPBUFF     +18D                       #  STORE IN CASE OF OVERFLOW
060249,000358: 
060250,000359: 27,3511           35004                           CAF      UPDTPHAS                              #  DO
060251,000360: 27,3512           54001                           TS       L                                     #  A
060252,000361: 27,3513           40000                           COM                                            #  QUICK
060253,000362: 27,3514           53160                           DXCH     -PHASE6                               #  PHASCHNG
060254,000363: 
060255,000364: 27,3515  01,2336               6P5SPT1            =        6.5SPOT                               
060256,000365: 27,3515           00004        TIMEDIDR           INHINT                                         
060257,000366: 27,3516           35003                           CAF      ZERO                                  
060258,000367: 27,3517           22007                           ZL                                             #  PICK UP INCREMENTER(AND ZERO
060259,000368: 27,3520           54156                           TS       MPAC       +2                         #  IT IN CASE OF RESTARTS) AND
060260,000369: 27,3521           52315                           DXCH     UPBUFF     +8D                        #  STORE IT
060261,000370: 27,3522           52155                           DXCH     MPAC                                  #  INTO MPAC FOR TPAGREE.
060262,000371: 
060263,000372: 27,3523           00006                           EXTEND                                         
060264,000373: 27,3524           30327                           DCA      UPBUFF     +18D                       
060265,000374: 27,3525           20155                           DAS      MPAC                                  #  FORM SUM IN MPAC
060266,000375: 27,3526           00006                           EXTEND                                         
060267,000376: 27,3527           13536                           BZF      DELTATOK                              #  TEST FOR OVERFLOW
060268,000377: 27,3530           35003                           CAF      ZERO                                  
060269,000378: 27,3531           52327                           DXCH     UPBUFF     +18D                       #  OVERFLOW, RESTORE OLD VALUE OF CLOCK
060270,000379: 27,3532           20025                           DAS      TIME2                                 #  AND TURN ON OPERATOR ERROR
060271,000380: 
060272,000381: 27,3533           05415                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
060273,000382: 27,3534           04026                           OCT      04026                                 
060274,000383: 
060275,000384: 27,3535           00330                           TC       UPTEMP                                #  GO TO ERROR EXIT
060276,000385: 
060277,000386: 27,3536           07226        DELTATOK           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
060278,000387: 27,3537           52155                           DXCH     MPAC                                  
060279,000388: 27,3540           20025                           DAS      TIME2                                 #  INCREMENT TIME2,TIME1
060280,000389: 
060281,000390: 27,3541           05415                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
060282,000391: 27,3542           04026                           OCT      04026                                 
060283,000392: 
060284,000393: 27,3543           00004                           INHINT                                         
060285,000394: 27,3544           50330                           INDEX    UPTEMP                                #  (CODED THIS WAY FOR RESTART PROTECTION)
060286,000395: 27,3545           00001                           TC       1                                     #  NORMAL RETURN
060287,000396: 
060288,000397:                                                                                                  #  VERB 71 BRANCH
060289,000398: 
060290,000399: 27,3546           30305        UPEND71            CAE      UPBUFF     +1                         #  SET EBANK
060291,000400: 27,3547           54003                           TS       EBANK                                 #     AND
060292,000401: 27,3550           74350                           MASK     LOW8                                  #  CALCULATE
060293,000402: 27,3551           54330                           TS       UPTEMP                                #  S-REG VALUE OF RECEIVING AREA
060294,000403: 
060295,000404: 27,3552           67700                           AD       NEG3                                  #  IN THE PROCESS OF
060296,000405: 27,3553           60300                           AD       COMPNUMB                              #  PERFORMING
060297,000406: 27,3554           00006                           EXTEND                                         #  THIS UPDATE
060298,000407: 27,3555           13563                           BZF      STORLP71                              #  WILL WE
060299,000408: 27,3556           74771                           MASK     BIT9                                  #  OVERFLOW
060300,000409: 27,3557           10000                           CCS      A                                     #  INTO THE NEXT EBANK....
060301,000410: 27,3560           13576                           TCF      UPERROUT                              #  YES
060302,000411: 
060303,000412: 27,3561           37700                           CA       NEG3                                  #  NO - CALCULATE NUMBER OF
060304,000413: 27,3562           60300                           AD       COMPNUMB                              #  WORDS TO BE STORED MINUS ONE
060305,000414: 27,3563           54154        STORLP71           TS       MPAC                                  #  SAVE NO. OF WORDS REMAINING MINUS ONE
060306,000415: 27,3564           50000                           INDEX    A                                     #  TAKE NEXT UPDATE WORD FROM
060307,000416: 27,3565           30306                           CA       UPBUFF     +2                         #  UPBUFF AND
060308,000417: 27,3566           54001                           TS       L                                     #  SAVE IT IN L
060309,000418: 27,3567           30154                           CA       MPAC                                  #  CALCULATE NEXT
060310,000419: 27,3570           60330                           AD       UPTEMP                                #  RECEIVING ADDRESS
060311,000420: 27,3571           50000                           INDEX    A                                     
060312,000421: 27,3572  E3,1400                                  EBANK=   1400                                  
060313,000422: 27,3572           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
060314,000423: 27,3573  E3,1700                                  EBANK=   TEPHEM                                
060315,000424: 27,3573           10154                           CCS      MPAC                                  #  ARE THERE ANY WORDS LEFT TO BE STORED
060316,000425: 27,3574           13563                           TCF      STORLP71                              #  YES
060317,000426: 27,3575           13625                           TCF      UPOUT                                 #  NO - THEN EXIT UPDATE PROGRAM
060318,000427: 27,3576           04362        UPERROUT           TC       FALTON                                #  TURN ON OP ERROR, CCS CANT GET HERE
060319,000428: 27,3577           13625                           TCF      UPOUT                                 #  NO - EXIT UPDATE (HERE WHEN COMPNUMB = 3)
060320,000429: 
060321,000430:                                                                                                  #  VERB 72 BRANCH
060322,000431: 
060323,000432: 27,3600           35001        UPEND72            CAF      BIT1                                  #  HAVE AN ODD NO. OF COMPONENTS
060324,000433: 27,3601           70300                           MASK     COMPNUMB                              #  BEEN SENT FOR A V72 UPDATE...
060325,000434: 27,3602           10000                           CCS      A                                     
060326,000435: 27,3603           13605                           TCF      +2                                    #  YES
060327,000436: 27,3604           13576                           TCF      UPERROUT                              #  ERROR - SHOULD BE ODD NO. OF COMPONENTS
060328,000437: 27,3605           45000                           CS       BIT2                                  
060329,000438: 27,3606           60300                           AD       COMPNUMB                              
060330,000439: 27,3607           54154        LDLOOP72           TS       MPAC                                  #  NOW PERFORM THE UPDATE
060331,000440: 27,3610           50000                           INDEX    A                                     
060332,000441: 27,3611           30305                           CAE      UPBUFF     +1                         #  PICK UP NEXT UPDATE WORD
060333,000442: 27,3612           22000                           LXCH     A                                     
060334,000443: 27,3613           10154                           CCS      MPAC                                  #  SET POINTER TO ECADR (MUST BE CCS)
060335,000444: 27,3614           54154                           TS       MPAC                                  
060336,000445: 27,3615           50000                           INDEX    A                                     
060337,000446: 27,3616           30305                           CAE      UPBUFF     +1                         #  PICK UP NEXT ECADR OF REG TO BE UPDATED
060338,000447: 27,3617           54003                           TS       EBANK                                 #  SET EBANK
060339,000448: 27,3620           74350                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
060340,000449: 27,3621           50000                           INDEX    A                                     
060341,000450: 27,3622  E3,1400                                  EBANK=   1400                                  
060342,000451: 27,3622           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
060343,000452: 27,3623  E3,1700                                  EBANK=   TEPHEM                                
060344,000453: 27,3623           10154                           CCS      MPAC                                  #  ARE WE THROUGH THE V72 UPDATE...
060345,000454: 27,3624           13607                           TCF      LDLOOP72                              #  NO
060346,000455: 
060347,000456:                                                                                                  #  NORMAL FINISH OF P27
060348,000457: 
060349,000458: 27,3625                        UPOUT              EQUALS                                         
060350,000459: 27,3625           03006                           TC       INTWAKEU                              #  RELEASE  GRAB  OF ORBITAL INTEGRATION
060351,000460: 27,3626           30301                 +1        CAE      UPOLDMOD                              #  RESTORE PRIOR P27 MODE
060352,000461: 27,3627           05362                           TC       NEWMODEA                              
060353,000462: 27,3630           45001                           CS       BIT1                                  
060354,000463: 27,3631           61204                           AD       MODREG                                
060355,000464: 27,3632           10000                           CCS      A                                     
060356,000465: 27,3633           10000                           CCS      A                                     
060357,000466: 27,3634           35000                           CAF      TWO                                   
060358,000467: 27,3635           54332                           TS       DNLSTCOD                              
060359,000468: 27,3636           04415                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT
060360,000469: 27,3637           04647                           TC       BANKCALL                              #  KILL GROUP 6
060361,000470: 27,3640           12464                           CADR     UPKLEAN                               
060362,000471: 
060363,000472: 27,3641           05537                           TC       ENDEXT                                #  EXTENDED VERB EXIT
060364,000473: 
060365,000474:                                                                                                  #  VERB 70 BRANCH
060366,000475: 
060367,000476: 27,3642           00006        UPEND70            EXTEND                                         #  V70 DOES THE FOLLOWING WITH DP DELTA
060368,000477: 27,3643           40305                           DCS      UPBUFF                                #  TIME IN UPBUFF
060369,000478: 27,3644           52315                           DXCH     UPBUFF     +8D                        
060370,000479: 27,3645           03503                           TC       TIMEDIDL                              #  DECREMENT AGC CLOCK
060371,000480: 
060372,000481: 27,3646           03576                           TC       UPERROUT                              #  ERROR WHILE DECREMENTING CLOCK -- EXIT
060373,000482: 
060374,000483: 27,3647  E3,1700                                  EBANK=   TEPHEM                                
060375,000484: 27,3647           00006                           EXTEND                                         
060376,000485: 27,3650           40305                           DCS      UPBUFF                                #  COPY DECREMENTERS FOR
060377,000486: 27,3651           52317                           DXCH     UPBUFF     +10D                       #  RESTART PROTECTION
060378,000487: 27,3652           00006                           EXTEND                                         
060379,000488: 27,3653           40305                           DCS      UPBUFF                                
060380,000489: 27,3654           52321                           DXCH     UPBUFF     +12D                       
060381,000490: 
060382,000491: 27,3655           05415                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
060383,000492: 27,3656           04026                           OCT      04026                                 
060384,000493: 
060385,000494: 27,3657           35003                           CAF      ZERO                                  
060386,000495: 27,3660           22007                           ZL                                             
060387,000496: 27,3661           52317                           DXCH     UPBUFF     +10D                       #  DECREMENT CSM STATE VECTOR TIME
060388,000497: 27,3662           21571                           DAS      TETCSM                                
060389,000498: 
060390,000499: 27,3663           35003                           CAF      ZERO                                  
060391,000500: 27,3664           22007                           ZL                                             
060392,000501: 27,3665           52321                           DXCH     UPBUFF     +12D                       #  DECREMENT LEM STATE VECTOR TIME
060393,000502: 27,3666           21643                           DAS      TETLEM                                
060394,000503: 
060395,000504: 27,3667           35003                           CAF      ZERO                                  
060396,000505: 27,3670           22007                           ZL                                             
060397,000506: 27,3671           52305                           DXCH     UPBUFF                                
060398,000507: 27,3672           21702                           DAS      TEPHEM     +1                         #  INCREMENT TP TEPHEM
060399,000508: 27,3673           27700                           ADS      TEPHEM                                
060400,000509: 
060401,000510: 27,3674           05415                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
060402,000511: 27,3675           04026                           OCT      04026                                 
060403,000512: 
060404,000513: 27,3676     0304                                  EBANK=   UPBUFF                                
060405,000514: 
060406,000515: 27,3676           03625                           TC       UPOUT                                 #  GO TO STANDARD UPDATE PROGRAM EXIT
060407,000516: 
060408,000517:                                                                                                  #  VERB 73 BRANCH
060409,000518: 
060410,000519: 27,3677           00006        UPEND73            EXTEND                                         
060411,000520: 27,3700           30305                           DCA      UPBUFF                                
060412,000521: 27,3701           52315                           DXCH     UPBUFF     +8D                        
060413,000522: 27,3702           03503                           TC       TIMEDIDL                              
060414,000523: 27,3703           04362                           TC       FALTON                                
060415,000524: 27,3704           03626                           TC       UPOUT      +1                         
060416,000525: 
060417,000526:                                                                                                  #  ERROR SEQUENCE
060418,000527: 
060419,000528: 27,3705  30,2000                                  SBANK=   LOWSUPER                              

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