Source Code

This source code is very close to the Apollo Guidance Computer software for the Apollo 13 Lunar module. This revision of the Luminary 131 program is from December of 1969, whereas there was a later revision in January of 1970, and still another revision in February, which is the code that flew on the mission. As far as this transcription is concerned, it was originally from a copy made in 1991 of a printout from the collection of AGC developer Don Eyles for collector David Craig. It was subsequently scanned by Gary Neff, reprocessed for online presentation at the now-discontinued History of Recent Science and Technology (HRST) website of MIT's Dibner Institute (the full-quality scans being discarded in the process), and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a high-quality replacement scan for a completely illegible page was later provided by Gary Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many errors to be introduced into the transcription. Accordingly, a second scan of the same physical printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive, and used to correct the transcription errors. All of the scanned materials mentioned, as well as other Luminary 131 related material, are available online. Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017, so the two scans are not identical in that respect. The page-headings in the printout read, in part:
	GAP:  ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091
	17:53 DEC. 19, 1969
Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together.

058077,000002:                                                                                                  ## Copyright:   Public domain.
058078,000003:                                                                                                  ## Filename:    UPDATE_PROGRAM.agc
058079,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
058080,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
058081,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
058082,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
058083,000008:                                                                                                  ##              that the code format has been changed to conform to the
058084,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
058085,000010:                                                                                                  ##              original YUL assembler.
058086,000011:                                                                                                  ## Reference:   pp. 1378-1388
058087,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
058088,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
058089,000014:                                                                                                  ## Mod history: 06/07/03 RSB.   Began transcribing.
058090,000015:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
058091,000016:                                                                                                  ##              2010-10-25 JL   Indentation fixes.
058092,000017:                                                                                                  ##              2011-05-07 JL   Flagged SBANK= workaround for future removal.
058093,000018:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
058094,000019:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
058095,000020:                                                                                                  ##                              numbers in 1701.pdf.
058096,000021:                                                                                                  ##              2017-01-28 RSB  Comment-text fixes identified for Luminary 69.
058097,000022:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified for Artemis 72.
058098,000023:                                                                                                  ##              2017-02-28 RSB  Proofed comment text using octopus/ProoferComments.
058099,000024:                                                                                                  ##              2017-03-13 RSB  Comment-text fixes noted in proofing Luminary 116.
058100,000025:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
058101,000026:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
058102,000027:                                                                                                  ##              2017-06-17 MAS  Globally removed all SBANK= workarounds.
058103,000028: 

Page 1378

058105,000030:                                                                                                  #  PROGRAM NAME:         P27
058106,000031:                                                                                                  #  WRITTEN BY:           KILROY/ DE WOLF
058107,000032: 
058108,000033:                                                                                                  #  MOD NO:               6
058109,000034:                                                                                                  #  MOD BY:               KILROY
058110,000035:                                                                                                  #  DATE:                 01DEC67
058111,000036: 
058112,000037:                                                                                                  #  LOG SECTION:          UPDATE PROGRAM.
058113,000038: 
058114,000039:                                                                                                  #  FUNCT. DESCR:         P27 (THE UPDATE PROGRAM) PROCESSES COMMANDS AND DATA
058115,000040:                                                                                                  #                            INSERTIONS REQUESTED BY THE GROUND VIA UPLINK.
058116,000041:                                                                                                  #                            THE P27 PROGRAM WILL ACCEPT UPDATES
058117,000042:                                                                                                  #                            ONLY DURING P00 FOR THE LM, AND ONLY DURING P00,
058118,000043:                                                                                                  #                        P02, AND FRESH START FOR THE CSM
058119,000044: 
058120,000045:                                                                                                  #  CALLING SEQ:          PROGRAM IS INITIATED BY UPLINK ENTRY OF VERBS 70, 71, 72 AND 73.
058121,000046: 
058122,000047:                                                                                                  #  SUBROUTINES:          TESTXACT, NEWMODEX, NEWMODEX +3, GOXDSPF, BANKCALL, FINDVAC, INTPRET, INTSTALL, TPAGREE,
058123,000048:                                                                                                  #                        INTWAKEU, ENDEXT, POSTJUMP, FALTON, NEWPHASE, PHASCHNG
058124,000049: 
058125,000050:                                                                                                  #  NORMAL EXIT:          TC ENDEXT
058126,000051: 
058127,000052:                                                                                                  #  ALARM/ABORT:          TC FALTON FOLLOWED BY TC ENDEXT
058128,000053: 
058129,000054:                                                                                                  #  RESTARTS:             P27 IS RESTART PROTECTED IN TWO WAYS ...
058130,000055:                                                                                                  #                        1.      PRIOR TO VERIFLAG INVERSION (WHICH IS CAUSED BY THE GROUND/ASTRONAUT'S VERIFICATION OF UPDATE
058131,000056:                                                                                                  #                                DATA BY SENDING A V33E WHEN V21N02 IS FLASHING)---
058132,000057:                                                                                                  #                                NO PROTECTION EXCEPT PRE-P27 MODE IS RESTORED, COAST + ALIGN DOWNLIST IS SELECTED AND UPLINK
058133,000058:                                                                                                  #                                ACTIVITY LIGHT IS TURNED OFF.  (JUST AS IF A V34E WAS SENT DURING P27 DATA LOADS).
058134,000059:                                                                                                  #                                V70,V71,V72 OR V73 WILL HAVE TO BE COMPLETELY RESENT BY USER.
058135,000060:                                                                                                  #                        2.      AFTER VERIFLAG INVERSION (WHEN UPDATE OF THE SPECIFIED ERASABLES IS BEING PERFORMED)---
058136,000061:                                                                                                  #                                PROTECTED AGAINST RESTARTS.
058137,000062: 
058138,000063:                                                                                                  #  DEBRIS:               UPBUFF  (20D)   TEMP STORAGE FOR ADDRESSES AND CONTENTS.
058139,000064:                                                                                                  #                        UPVERB  (1)     VERB NUMBER MINUS 70D (E.G. FOR V72, UPVERB = 72D - 70D = 2)
058140,000065:                                                                                                  #                        UPOLDMOD(1)     FOR MAJOR MODE INTERRUPTED BY P27.
058141,000066:                                                                                                  #                        COMPNUMB(1)     TOTAL NUMBER OF COMPONENTS TO BE TRANSMITTED.
058142,000067:                                                                                                  #                        UPCOUNT (1)     ACTUAL NUMBER OF COMPONENTS RECEIVED.
058143,000068:                                                                                                  #                        UPTEMP  (1)     SCRATCH, BUT USUALLY CONTAINS COMPONENT NUMBER TO BE CHANGED DURING VERIFY CYCLE
058144,000069: 
058145,000070:                                                                                                  #  INPUT:
058146,000071: 
058147,000072:                                                                                                  #        ENTRY:                  DESCRIPTION
058148,000073:                                                                                                  #        V70EXXXXXEXXXXXE        (LIFTOFF TIME INCREMENT) DOUBLE PRECISION OCTAL TIME INCREMENT, XXXXX XXXXX,
058149,000074:                                                                                                  #                                IS ADDED TO TEPHEM, SUBTRACTED FROM AGC CLOCK(TIME2,TIME1), SUBTRACTED FROM CSM STATE
058150,000075:                                                                                                  #                                VECTOR TIME(TETCSM) AND SUBTRACTED FROM LEM STATE VECTOR TIME(TETLEM).
058151,000076:                                                                                                  #                                THE DP OCTAL TIME INCREMENT IS SCALED AT 2(28).

Page 1379

058153,000078:                                                                                                  #        V71EIIEAAAAE            (CONTIGUOUS BLOCK UPDATE) II-2 OCTAL COMPONENTS, XXXXX,
058154,000079:                                                                                                  #        XXXXXE                  ARE LOADED INTO ERASABLE STARTING AT ECADR, AAAA.
058155,000080:                                                                                                  #        XXXXXE                  IT IS .GE. 3 .AND. .LE. 20D.,
058156,000081:                                                                                                  #                                AND (AAAA + II -3) DOES NOT PRODUCE AN ADDRESS IN THE
058157,000082:                                                                                                  #        9 NEXT BANK
058158,000083:                                                                                                  #          .                     SCALING IS SAME AS INTERNAL REGISTERS.
058159,000084: 
058160,000085:                                                                                                  #        V72EIIE                 (SCATTER UPDATE) (II-1)/2 OCTAL COMPONENTS, XXXXX, ARE
058161,000086:                                                                                                  #        AAAAEXXXXXE             LOADED INTO ERASABLE LOCATIONS, AAAA.
058162,000087:                                                                                                  #        AAAAEXXXXXE             II IS .GE. 3 .AND. .LE. 19D, AND MUST BE ODD.
058163,000088:                                                                                                  #         .                      SCALING IS SAME AS INTERNAL REGISTERS.
058164,000089: 
058165,000090:                                                                                                  #        V73EXXXXXEXXXXXE        (OCTAL CLOCK INCREMENT) DOUBLE PRECISION OCTAL TIME
058166,000091:                                                                                                  #                                INCREMENT XXXXX XXXXX, IS ADDED TO THE AGC CLOCK, IN
058167,000092:                                                                                                  #                                CENTISECONDS SCALED AT (2)28.
058168,000093:                                                                                                  #                                THIS LOAD IS THE OCTAL EQUIVALENT OF V55.
058169,000094: 
058170,000095:                                                                                                  #  OUTPUT:               IN ADDITION TO THE ABOVE REGISTER LOADS, ALL UPDATES
058171,000096:                                                                                                  #                        COMPLEMENT BIT3 OF FLAGWORD7.
058172,000097: 
058173,000098:                                                                                                  #  ADDITIONAL NOTES:     VERB 71, JUST DEFINED ABOVE WILL BE USED TO PERFORM BUT NOT LIMITED TO THE FOLLOWING UPDATES --
058174,000099:                                                                                                  #                        1.  CSM/LM STATE VECTOR UPDATE
058175,000100:                                                                                                  #                        2.  REFSMMAT UPDATE
058176,000101: 
058177,000102:                                                                                                  #        THE FOLLOWING COMMENTS DELINEATE EACH SPECIAL UPDATE----
058178,000103: 
058179,000104:                                                                                                  #        1.  CSM/LM STATE VECTOR UPDATE (ALL DATA ENTRIES IN OCTAL)
058180,000105:                                                                                                  #                ENTRIES:        DATA DEFINITION:                                SCALE FACTORS:
058181,000106:                                                                                                  #                V71E            CONTIGUOUS BLOCK UPDATE VERB
058182,000107:                                                                                                  #                   21E          NUMBER OF COMPONENTS FOR STATE VECTOR UPDATE
058183,000108:                                                                                                  #                 AAAAE          ECADR OF 'UPSVFLAG'
058184,000109:                                                                                                  #                XXXXXE          STATE VECTOR IDENTIFIER: 00001 FOR CSM, 77776 FOR LEM - EARTH SPHERE OF INFLUENCE SCALING
058185,000110:                                                                                                  #                                                         00002 FOR CSM, 77775 FOR LEM - LUNAR SPHERE OF INFLUENCE SCALING
058186,000111:                                                                                                  #                XXXXXEXXXXXE    X POSITION
058187,000112:                                                                                                  #                XXXXXEXXXXXE    Y POSITION
058188,000113:                                                                                                  #                XXXXXEXXXXXE    Z POSITION
058189,000114:                                                                                                  #                XXXXXEXXXXXE    X VELOCITY
058190,000115:                                                                                                  #                XXXXXEXXXXXE    Y VELOCITY
058191,000116:                                                                                                  #                XXXXXEXXXXXE    Z VELOCITY
058192,000117:                                                                                                  #                XXXXXEXXXXXE    TIME FROM AGC CLOCK ZERO
058193,000118:                                                                                                  #                V33E            VERB 33 TO SIGNAL THAT THE STATE VECTOR IS READY TO BE STORED.
058194,000119: 
058195,000120:                                                                                                  #        2.  REFSMMAT (ALL DATA ENTRIES IN OCTAL)
058196,000121:                                                                                                  #                ENTRIES:        DATA DEFINITIONS:                               SCALE FACTORS:

Page 1380

058198,000123:                                                                                                  #                V71E            CONTIGUOUS BLOCK UPDATE VERB
058199,000124:                                                                                                  #                   24E          NUMBER OF COMPONENTS FOR REFSMMAT UPDATE
058200,000125:                                                                                                  #                 AAAAE          ECADR OF 'REFSMMAT'
058201,000126:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 1                                  2(-1)
058202,000127:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 2                                  2(-1)
058203,000128:                                                                                                  #                XXXXXEXXXXXE    ROW 1 COLUMN 3                                  2(-1)
058204,000129:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 1                                  2(-1)
058205,000130:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 2                                  2(-1)
058206,000131:                                                                                                  #                XXXXXEXXXXXE    ROW 2 COLUMN 3                                  2(-1)
058207,000132:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 1                                  2(-1)
058208,000133:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 2                                  2(-1)
058209,000134:                                                                                                  #                XXXXXEXXXXXE    ROW 3 COLUMN 3                                  2(-1)
058210,000135:                                                                                                  #                V33E            VERB 33 TO SIGNAL THAT REFSMMAT IS READY TO BE STORED.
058211,000136: 
058212,000137: 07,3763                                           BANK     07                                    
058213,000138: 43,2000                                           SETLOC   EXTVERBS                              
058214,000139: 43,2000                                           BANK                                           
058215,000140: 
058216,000141: 43,3751  E3,1706                                  EBANK=   TEPHEM                                
058217,000142: 
058218,000143: 43,3751                                           COUNT*   $$/P27                                
058219,000144: 43,3751           34755        V70UPDAT           CAF      UP70                                  #  COMES HERE ON V70E
058220,000145: 43,3752           13760                           TCF      V73UPDAT   +1                         
058221,000146: 
058222,000147: 43,3753           34753        V71UPDAT           CAF      UP71                                  #  COMES HERE ON V71E
058223,000148: 43,3754           13760                           TCF      V73UPDAT   +1                         
058224,000149: 
058225,000150: 43,3755           34752        V72UPDAT           CAF      UP72                                  #  COMES HERE ON V72E
058226,000151: 43,3756           13760                           TCF      V73UPDAT   +1                         
058227,000152: 
058228,000153: 43,3757           36250        V73UPDAT           CAF      UP73                                  #  COMES HERE ON V73E
058229,000154: 
058230,000155: 43,3760           55165                 +1        TS       UPVERBSV                              #  SAVE UPVERB UNTIL IT'S OK TO ENTER P27
058231,000156: 
058232,000157: 43,3761           02076                           TC       TESTXACT                              #  GRAB DISPLAY IF AVAILABLE, OTHERWISE
058233,000158:                                                                                                  #  TURN *OPERATOR ERROR* ON AND TERMINATEJOB
058234,000159: 
058235,000160: 43,3762           31010                           CA       MODREG                                #  CHECK IF UPDATE ALLOWED
058236,000161: 43,3763           00006                           EXTEND                                         #  FIRST CHECK FOR MODREG = +0, -0
058237,000162: 43,3764           13767                           BZF      +3                                    #  (+0 = P00, -0 = FRESHSTART)
058238,000163: 43,3765           04635        UPERROR            TC       POSTJUMP                              #  TURN ON 'OPERATOR ERROR' LIGHT
058239,000164: 43,3766           11740                           CADR     UPERROUT   +2                         #  GO TO COMMON UPDATE PROGRAM EXIT
058240,000165: 
058241,000166: 43,3767  43,3765               CKMDMORE           =        UPERROR                               
058242,000167: 43,3767           55170                 +3        TS       UPOLDMOD                              #  SET UPOLDMOD TO ZERO.
058243,000168: 43,3770           31165                           CAE      UPVERBSV                              #  SET UPVERB TO INDICATE TO P27

Page 1381

058245,000170: 43,3771           55171                           TS       UPVERB                                #  WHICH EXTENDED VERB CALLED IT.
058246,000171: 
058247,000172: 43,3772           34753                           CAF      ONE                                   
058248,000173: 43,3773           55172                           TS       UPCOUNT                               #  INITIALIZE UPCOUNT TO 1
058249,000174: 
058250,000175: 43,3774           04635                           TC       POSTJUMP                              #  LEAVE EXTENDED VERB BANK AND
058251,000176: 43,3775           11357                           CADR     UPPART2                               #  GO TO UPDATE PROGRAM (P27) BANK.
058252,000177: 
058253,000178: 43,3776     4755               UP70               EQUALS   ZERO                                  
058254,000179: 43,3776     4753               UP71               EQUALS   ONE                                   
058255,000180: 43,3776     4752               UP72               EQUALS   TWO                                   
058256,000181: 43,3776     6250               UP73               EQUALS   THREE                                 
058257,000182: 
058258,000183: 04,3357                                           BANK     04                                    
058259,000184: 04,2000                                           SETLOC   UPDATE2                               
058260,000185: 04,2000                                           BANK                                           
058261,000186: 
058262,000187: 04,3357                                           COUNT*   $$/P27                                
058263,000188: 
058264,000189: 04,3357                        UPPART2            EQUALS                                         #  UPDATE PROGRAM - PART 2
058265,000190: 
058266,000191: 04,3357           05353                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO RESTORE OLD MODE
058267,000192: 04,3360           07026                           OCT      07026                                 #  AND DOWNLIST AND EXIT IF RESTART OCCURS.
058268,000193: 04,3361           30000                           OCT      30000                                 #  PRIORITY SAME AS CHRPRIO
058269,000194: 04,3362     1173                                  EBANK=   UPBUFF                                
058270,000195: 04,3362           03670 10102                     2CADR    UPOUT      +1                         
058271,000196: 
058272,000197: 04,3364           34753                           CAF      ONE                                   
058273,000198: 04,3365           54333                           TS       DNLSTCOD                              #  DOWNLIST
058274,000199: 
058275,000200: 04,3366           05311                           TC       NEWMODEX                              #  SET MAJOR MODE = 27
058276,000201: 04,3367           00033                           DEC      27         B-14                       
058277,000202: 
058278,000203: 04,3370           51171                           INDEX    UPVERB                                #  BRANCH DEPENDING ON WHETHER THE UPDATE
058279,000204: 04,3371           13372                           TCF      +1                                    #  VERB REQUIRES A FIXED OR VARIABLE NUMBER
058280,000205: 04,3372           13375                           TCF      +3                                    #  V70 FIXED.               (OF COMPONENTS.
058281,000206: 04,3373           13400                           TCF      OHWELL1                               #  V71 VARIABLE - GO GET NO. OF COMPONENTS
058282,000207: 04,3374           13400                           TCF      OHWELL1                               #  V72 VARIABLE - GO GET NO. OF COMPONENTS
058283,000208: 04,3375           34752                           CA       TWO                                   #  V73 (AND V70) FIXED
058284,000209: 04,3376           55167                           TS       COMPNUMB                              #  SET NUMBER OF COMPONENTS TO 2.
058285,000210: 04,3377           13423                           TCF      OHWELL2                               #  GO GET THE TWO UPDATE COMPONENTS
058286,000211: 
058287,000212: 04,3400           33473        OHWELL1            CAF      ADUPBUFF                              #  * REQUEST USER TO SEND NUMBER  *
058288,000213: 04,3401           54156                           TS       MPAC       +2                         #  * OF COMPONENTS PARAMETER(II). *
058289,000214: 04,3402           33474                 +2        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058290,000215: 04,3403           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
058291,000216: 04,3404           20334                           CADR     GOXDSPF                               #  TO REQUEST II.

Page 1382

058293,000218: 04,3405           13670                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN
058294,000219: 04,3406           13402                           TCF      OHWELL1    +2                         
058295,000220: 04,3407           03464                           TC       CK4V32                                #  DATA OR V32 RETURN
058296,000221: 04,3410           44752                           CS       BIT2                                  
058297,000222: 04,3411           61173                           AD       UPBUFF                                #  IS II (NUMBER OF COMPONENTS PARAMETER)
058298,000223: 04,3412           00006                           EXTEND                                         #  .GE. 3 AND .LE. 20D.
058299,000224: 04,3413           63402                           BZMF     OHWELL1    +2                         
058300,000225: 04,3414           41173                           CS       UPBUFF                                
058301,000226: 04,3415           64362                           AD       UP21                                  
058302,000227: 04,3416           00006                           EXTEND                                         
058303,000228: 04,3417           63402                           BZMF     OHWELL1    +2                         
058304,000229: 04,3420           31173                           CAE      UPBUFF                                
058305,000230: 04,3421           55167                           TS       COMPNUMB                              #  SAVE II IN COMPNUMB
058306,000231: 
058307,000232:                                                                                                  #  UPBUFF LOADING SEQUENCE
058308,000233: 
058309,000234: 04,3422           25172                           INCR     UPCOUNT                               #  INCREMENT COUNT OF COMPONENTS RECEIVED.
058310,000235: 04,3423           33640        OHWELL2            CAF      ADUPBFM1                              #  CALCULATE LOCATION (ECADR) IN UPBUFF
058311,000236: 04,3424           61172                           AD       UPCOUNT                               #  WHERE NEXT COMPONENT SHOULD BE STORED.
058312,000237: 04,3425           54156                 +2        TS       MPAC       +2                         #  PLACE ECADR INTO R3.
058313,000238: 04,3426           33474                 +3        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058314,000239: 04,3427           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
058315,000240: 04,3430           20334                           CADR     GOXDSPF                               #  TO REQUEST DATA.
058316,000241: 04,3431           13670                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN.
058317,000242: 04,3432           13426                           TCF      OHWELL2    +3                         #  V33 PROCEED RETURN
058318,000243: 04,3433           03464                           TC       CK4V32                                #  DATA OR V32 RETURN
058319,000244: 04,3434           41172                           CS       UPCOUNT                               #  HAVE WE FINISHED RECEIVING ALL
058320,000245: 04,3435           61167                           AD       COMPNUMB                              #  THE DATA WE EXPECTED.
058321,000246: 04,3436           00006                           EXTEND                                         
058322,000247: 04,3437           63441                           BZMF     UPVERIFY                              #  YES - GO TO VERIFICATION SEQUENCE
058323,000248: 04,3440           13422                           TCF      OHWELL2    -1                         #  NO - REQUEST ADDITIONAL DATA.
058324,000249: 
058325,000250:                                                                                                  #  VERIFY SEQUENCE
058326,000251: 
058327,000252: 04,3441           33472        UPVERIFY           CAF      ADUPTEMP                              #  PLACE ECADR WHERE COMPONENT NO. INDEX
058328,000253: 04,3442           54156                           TS       MPAC       +2                         #  IS TO BE STORED INTO R3.
058329,000254: 04,3443           33475                           CAF      UPVRFYNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058330,000255: 04,3444           04616                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N02 TO REQUEST
058331,000256: 04,3445           20334                           CADR     GOXDSPF                               #  DATA CORRECTION OR VERIFICATION.
058332,000257: 04,3446           13670                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN
058333,000258: 04,3447           13476                           TCF      UPSTORE                               #  V33 DATA SENT IS GOOD.  GO STORE IT.
058334,000259: 04,3450           03464                           TC       CK4V32                                #  COMPONENT NO. INDEX OR V32 RETURN
058335,000260: 04,3451           31166                           CA       UPTEMP                                #  DOES THE COMPONENT NO. INDEX JUST SENT
058336,000261: 04,3452           00006                           EXTEND                                         #  SPECIFY A LEGAL COMPONENT NUMBER?
058337,000262: 04,3453           63441                           BZMF     UPVERIFY                              #  NO, IT IS NOT POSITIVE NONZERO
058338,000263: 04,3454           41166                           CS       UPTEMP                                
058339,000264: 04,3455           61167                           AD       COMPNUMB                              
058340,000265: 04,3456           64753                           AD       BIT1                                  

Page 1383

058342,000267: 04,3457           00006                           EXTEND                                         
058343,000268: 04,3460           63441                           BZMF     UPVERIFY                              #  NO
058344,000269: 04,3461           33640                           CAF      ADUPBFM1                              #  YES - BASED ON THE COMPONENT NO. INDEX
058345,000270: 04,3462           61166                           AD       UPTEMP                                #  CALCULATE THE ECADR OF LOCATION IN
058346,000271: 04,3463           13425                           TCF      OHWELL2    +2                         #  UPBUFF WHICH USER WANTS TO CHANGE.
058347,000272: 
058348,000273: 04,3464  04,3670               UPOUT4             EQUALS   UPOUT      +1                         #  COMES HERE ON V34 TO TERMINATE UPDATE
058349,000274: 
058350,000275:                                                                                                  #  CHECK FOR VERB 32 SEQUENCE
058351,000276: 
058352,000277: 04,3464           40154        CK4V32             CS       MPAC                                  #  ON DATA RETURN FROM 'GOXDSPF'
058353,000278: 04,3465           74746                           MASK     BIT6                                  #  ON DATA RETURN FROM "GOXDSP" & THE CON-
058354,000279: 04,3466           10000                           CCS      A                                     #  TENTS OF MPAC = VERB.  SO TEST FOR V32.
058355,000280: 04,3467           00002                           TC       Q                                     #  IT'S NOT A V32, IT'S DATA.  PROCEED.
058356,000281: 04,3470           50002                           INDEX    Q                                     
058357,000282: 04,3471           77771                           TC       0          -6                         #  V32 ENCOUNTERED - GO BACK AND GET DATA
058358,000283: 
058359,000284: 04,3472           01166        ADUPTEMP           ADRES    UPTEMP                                #  ADDRESS OF TEMP STORAGE FOR CORRECTIONS
058360,000285: 04,3473           01173        ADUPBUFF           ADRES    UPBUFF                                #  ADDRESS OF UPDATE DATA STORAGE BUFFER
058361,000286: 04,3474           05201        UPLOADNV           VN       2101                                  #  VERB 21 NOUN 01
058362,000287: 04,3475           05202        UPVRFYNV           VN       2102                                  #  VERB 21 NOUN 02
058363,000288: 04,3476     4362               UP21               =        MD1                                   #  DEC 21 = MAX NO OF COMPONENTS +1
058364,000289: 04,3476     4756               UPDTPHAS           EQUALS   FIVE                                  
058365,000290: 
058366,000291:                                                                                                  #  PRE-STORE AND FAN TO APPROPRIATE BRANCH SEQUENCE
058367,000292: 
058368,000293: 04,3476                        UPSTORE            EQUALS                                         #  GROUND HAS VERIFIED UPDATE.  STORE DATA.
058369,000294: 
058370,000295: 04,3476           00004                           INHINT                                         
058371,000296: 
058372,000297: 04,3477           30103                           CAE      FLAGWRD7                              #  INVERT VERIFLAG (BIT 3 OF FLAGWRD7) TO
058373,000298: 04,3500           56001                           XCH      L                                     #  INDICATE TO THE GROUND (VIA DOWNLINK)
058374,000299: 04,3501           34751                           CAF      VERIFBIT                              #  THAT THE V33 (WHICH THE GROUND SENT TO
058375,000300: 04,3502           00006                           EXTEND                                         #  VERIFY THE UPDATE) HAS BEEN SUCCESSFULLY
058376,000301: 04,3503           06001                           RXOR     LCHAN                                 #  RECEIVED BY THE UPDATE PROGRAM
058377,000302: 04,3504           54103                           TS       FLAGWRD7                              
058378,000303: 
058379,000304: 04,3505           05353                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO REDO THE UPDATE
058380,000305: 04,3506           04026                           OCT      04026                                 #  DATA STORE IF A RESTART OCCURS.
058381,000306: 04,3507           00004                           INHINT                                         #  (BECAUSE PHASCHNG DID A RELINT)
058382,000307: 
058383,000308: 04,3510           44752                           CS       TWO                                   #  GO TO UPFNDVAC IF INSTALL IS REQUIRED,
058384,000309: 04,3511           61171                           AD       UPVERB                                #  THAT IS, IF IT'S A V70 - V72.
058385,000310: 04,3512           00006                           EXTEND                                         #  GO TO UPEND73 IF IT'S A V73.
058386,000311: 04,3513           63522                           BZMF     UPFNDVAC                              
058387,000312: 
058388,000313:                                                                                                  #  VERB 73 BRANCH
058389,000314: 
058390,000315: 04,3514           00006        UPEND73            EXTEND                                         #  V73 - PERFORM DP OCTAL AGC CLOCK INCREMENT

Page 1384

058392,000317: 04,3515           31174                           DCA      UPBUFF                                
058393,000318: 04,3516           53204                           DXCH     UPBUFF     +8D                        
058394,000319: 04,3517           03545                           TC       TIMEDIDL                              
058395,000320: 04,3520           04364                           TC       FALTON                                #  ERROR - TURN ON *OPERATOR ERROR* LIGHT
058396,000321: 04,3521           03670                           TC       UPOUT      +1                         #  GO TO COMMON UPDATE PROGRAM EXIT
058397,000322: 
058398,000323: 04,3522           34355        UPFNDVAC           CAF      CHRPRIO                               #  (USE EXTENDED VERB PRIORITY)
058399,000324: 04,3523           05105                           TC       FINDVAC                               #  GET VAC AREA FOR 'CALL INTSTALL'
058400,000325: 04,3524  E3,1706                                  EBANK=   TEPHEM                                
058401,000326: 04,3524           03527 10103                     2CADR    UPJOB                                 #  (NOTE:  THIS WILL ALSO SET EBANK FOR
058402,000327: 04,3526           05155                           TC       ENDOFJOB                              #  'TEPHEM' UPDATE BY V70)
058403,000328: 
058404,000329: 04,3527           06042        UPJOB              TC       INTPRET                               #  THIS COULD BE A STATE VECTOR UPDATE -- SO
058405,000330: 04,3530           77624                           CALL                                           #  WAIT (PUT JOB TO SLEEP) IF ORBIT INT(OI)
058406,000331: 04,3531           27410                                    INTSTALL                              #  IS IN PROGRESS -- OR -- GRAB OI AND RETURN
058407,000332:                                                                                                  #  TO UPWAKE IF OI IS NOT IN PROGRESS.
058408,000333: 
058409,000334: 04,3532           77776        UPWAKE             EXIT                                           
058410,000335: 
058411,000336: 04,3533           05353                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
058412,000337: 04,3534           04026                           OCT      04026                                 
058413,000338: 
058414,000339: 04,3535           05504                           TC       UPFLAG                                #  SET INTEGRATION RESTART BIT
058415,000340: 04,3536           00236                           ADRES    REINTFLG                              
058416,000341: 04,3537           00004                           INHINT                                         
058417,000342: 04,3540                        UPPART3            EQUALS                                         
058418,000343: 
058419,000344: 04,3540           51171                           INDEX    UPVERB                                #  BRANCH TO THE APPROPRIATE UPDATE VERB
058420,000345: 04,3541           13542                           TCF      +1                                    #  ROUTINE TO ACTUALLY PERFORM THE UPDATE
058421,000346: 04,3542           13701                           TCF      UPEND70                               #  V70
058422,000347: 04,3543           13610                           TCF      UPEND71                               #  V71
058423,000348: 04,3544           13642                           TCF      UPEND72                               #  V72
058424,000349: 
058425,000350:                                                                                                  #  ROUTINE TO INCREMENT CLOCK (TIME2,TIME1) WITH CONTENTS OF DP WORD AT UPBUFF.
058426,000351: 
058427,000352: 04,3545           00006        TIMEDIDL           EXTEND                                         
058428,000353: 04,3546           23166                           QXCH     UPTEMP                                #  SAVE Q FOR RETURN
058429,000354: 04,3547           34755                           CAF      ZERO                                  #  ZERO AND SAVE TIME2,TIME1
058430,000355: 04,3550           22007                           ZL                                             
058431,000356: 04,3551           52025                           DXCH     TIME2                                 
058432,000357: 04,3552           53216                           DXCH     UPBUFF     +18D                       #  STORE IN CASE OF OVERFLOW
058433,000358: 
058434,000359: 04,3553           34756                           CAF      UPDTPHAS                              #  DO
058435,000360: 04,3554           54001                           TS       L                                     #  A
058436,000361: 04,3555           40000                           COM                                            #  QUICK
058437,000362: 04,3556           52764                           DXCH     -PHASE6                               #  PHASCHNG
058438,000363: 
058439,000364: 04,3557           00004        TIMEDIDR           INHINT                                         

Page 1385

058441,000366: 04,3560           34755                           CAF      ZERO                                  
058442,000367: 04,3561           22007                           ZL                                             #  PICK UP INCREMENTER(AND ZERO
058443,000368: 04,3562           54156                           TS       MPAC       +2                         #  IT IN CASE OF RESTARTS) AND
058444,000369: 04,3563           53204                           DXCH     UPBUFF     +8D                        #  STORE IT
058445,000370: 04,3564           52155                           DXCH     MPAC                                  #  INTO MPAC FOR TPAGREE.
058446,000371: 
058447,000372: 04,3565           00006                           EXTEND                                         
058448,000373: 04,3566           31216                           DCA      UPBUFF     +18D                       
058449,000374: 04,3567           20155                           DAS      MPAC                                  #  FORM SUM IN MPAC
058450,000375: 04,3570           00006                           EXTEND                                         
058451,000376: 04,3571           13600                           BZF      DELTAOK                               #  TEST FOR OVERFLOW
058452,000377: 04,3572           34755                           CAF      ZERO                                  
058453,000378: 04,3573           53216                           DXCH     UPBUFF     +18D                       #  OVERFLOW, RESTORE OLD VALUE OF CLOCK
058454,000379: 04,3574           20025                           DAS      TIME2                                 #  AND TURN ON OPERATOR ERROR
058455,000380: 
058456,000381: 04,3575           05353                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
058457,000382: 04,3576           04026                           OCT      04026                                 
058458,000383: 
058459,000384: 04,3577           01166                           TC       UPTEMP                                #  GO TO ERROR EXIT
058460,000385: 
058461,000386: 04,3600           07262        DELTAOK            TC       TPAGREE                               #  FORCE SIGN AGREEMENT
058462,000387: 04,3601           52155                           DXCH     MPAC                                  
058463,000388: 04,3602           20025                           DAS      TIME2                                 #  INCREMENT TIME2,TIME1
058464,000389: 
058465,000390: 04,3603           05353                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
058466,000391: 04,3604           04026                           OCT      04026                                 
058467,000392: 
058468,000393: 04,3605           00004                           INHINT                                         
058469,000394: 04,3606           51166                           INDEX    UPTEMP                                #  (CODED THIS WAY FOR RESTART PROTECTION)
058470,000395: 04,3607           00001                           TC       1                                     #  NORMAL RETURN
058471,000396: 
058472,000397:                                                                                                  #  VERB 71 BRANCH
058473,000398: 
058474,000399: 04,3610           31174        UPEND71            CAE      UPBUFF     +1                         #  SET EBANK
058475,000400: 04,3611           54003                           TS       EBANK                                 #        AND
058476,000401: 04,3612           74357                           MASK     LOW8                                  #  CALCULATE
058477,000402: 04,3613           55166                           TS       UPTEMP                                #  S-REG VALUE OF RECEIVING AREA
058478,000403: 
058479,000404: 04,3614           67750                           AD       NEG3                                  #  IN THE PROCESS OF
058480,000405: 04,3615           61167                           AD       COMPNUMB                              #  PERFORMING
058481,000406: 04,3616           00006                           EXTEND                                         #  THIS UPDATE
058482,000407: 04,3617           13625                           BZF      STORLP71                              #  WILL WE
058483,000408: 04,3620           74743                           MASK     BIT9                                  #  OVERFLOW
058484,000409: 04,3621           10000                           CCS      A                                     #  INTO THE NEXT EBANK....
058485,000410: 04,3622           13736                           TCF      UPERROUT                              #  YES
058486,000411: 
058487,000412: 04,3623           37750                           CA       NEG3                                  #  NO - CALCULATE NUMBER OF
058488,000413: 04,3624           61167                           AD       COMPNUMB                              #  WORDS TO BE STORED MINUS ONE
058489,000414: 04,3625           54154        STORLP71           TS       MPAC                                  #  SAVE NO. OF WORDS REMAINING MINUS ONE
058490,000415: 04,3626           50000                           INDEX    A                                     #  TAKE NEXT UPDATE WORD FROM
058491,000416: 04,3627           31175                           CA       UPBUFF     +2                         #  UPBUFF AND

Page 1386

058493,000418: 04,3630           54001                           TS       L                                     #  SAVE IT IN L
058494,000419: 04,3631           30154                           CA       MPAC                                  #  CALCULATE NEXT
058495,000420: 04,3632           61166                           AD       UPTEMP                                #  RECEIVING ADDRESS
058496,000421: 04,3633           50000                           INDEX    A                                     
058497,000422: 04,3634  E3,1400                                  EBANK=   1400                                  
058498,000423: 04,3634           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
058499,000424: 04,3635  E3,1706                                  EBANK=   TEPHEM                                
058500,000425: 04,3635           10154                           CCS      MPAC                                  #  ARE THERE ANY WORDS LEFT TO BE STORED
058501,000426: 04,3636           13625                           TCF      STORLP71                              #  YES
058502,000427: 04,3637           13667                           TCF      UPOUT                                 #  NO - THEN EXIT UPDATE PROGRAM
058503,000428: 04,3640           01172        ADUPBFM1           ADRES    UPBUFF     -1                         #  SAME AS ADUPBUFF BUT LESS 1 (DON'T MOVE)
058504,000429: 04,3641           13667                           TCF      UPOUT                                 #  NO - EXIT UPDATE (HERE WHEN COMPNUMB = 3)
058505,000430: 
058506,000431:                                                                                                  #  VERB 72 BRANCH
058507,000432: 
058508,000433: 04,3642           34753        UPEND72            CAF      BIT1                                  #  HAVE AN ODD NO. OF COMPONENTS
058509,000434: 04,3643           71167                           MASK     COMPNUMB                              #  BEEN SENT FOR A V72 UPDATE ...
058510,000435: 04,3644           10000                           CCS      A                                     
058511,000436: 04,3645           13647                           TCF      +2                                    #  YES
058512,000437: 04,3646           13736                           TCF      UPERROUT                              #  ERROR - SHOULD BE ODD NO. OF COMPONENTS
058513,000438: 04,3647           44752                           CS       BIT2                                  
058514,000439: 04,3650           61167                           AD       COMPNUMB                              
058515,000440: 04,3651           54154        LDLOOP72           TS       MPAC                                  #  NOW PERFORM THE UPDATE
058516,000441: 04,3652           50000                           INDEX    A                                     
058517,000442: 04,3653           31174                           CAE      UPBUFF     +1                         #  PICK UP NEXT UPDATE WORD
058518,000443: 04,3654           22000                           LXCH     A                                     
058519,000444: 04,3655           10154                           CCS      MPAC                                  #  SET POINTER TO ECADR (MUST BE CCS)
058520,000445: 04,3656           54154                           TS       MPAC                                  
058521,000446: 04,3657           50000                           INDEX    A                                     
058522,000447: 04,3660           31174                           CAE      UPBUFF     +1                         #  PICK UP NEXT ECADR OF REG TO BE UPDATED
058523,000448: 04,3661           54003                           TS       EBANK                                 #  SET EBANK
058524,000449: 04,3662           74357                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
058525,000450: 04,3663           50000                           INDEX    A                                     
058526,000451: 04,3664  E3,1400                                  EBANK=   1400                                  
058527,000452: 04,3664           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
058528,000453: 04,3665  E3,1706                                  EBANK=   TEPHEM                                
058529,000454: 04,3665           10154                           CCS      MPAC                                  #  ARE WE THROUGH THE V72 UPDATE...
058530,000455: 04,3666           13651                           TCF      LDLOOP72                              #  NO
058531,000456: 
058532,000457:                                                                                                  #  NORMAL FINISH OF P27
058533,000458: 
058534,000459: 04,3667                        UPOUT              EQUALS                                         
058535,000460: 04,3667           03131                           TC       INTWAKEU                              #  RELEASE GRAB OF ORBITAL INTEGRATION
058536,000461: 04,3670           31170                 +1        CAE      UPOLDMOD                              #  RESTORE PRIOR P27 MODE
058537,000462: 04,3671           05314                           TC       NEWMODEX   +3                         
058538,000463: 04,3672           34755                           CAF      ZERO                                  
058539,000464: 04,3673           54333                           TS       DNLSTCOD                              
058540,000465: 04,3674           03743                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT

Page 1387

058542,000467: 04,3675           00006                           EXTEND                                         #  KILL GROUP 6.
058543,000468: 04,3676           34755                           DCA      NEG0                                  
058544,000469: 04,3677           52764                           DXCH     -PHASE6                               
058545,000470: 
058546,000471: 04,3700           05472                           TC       ENDEXT                                #  EXTENDED VERB EXIT
058547,000472: 
058548,000473:                                                                                                  #  VERB 70 BRANCH
058549,000474: 
058550,000475: 04,3701           00006        UPEND70            EXTEND                                         #  V70 DOES THE FOLLOWING WITH DP DELTA
058551,000476: 04,3702           41174                           DCS      UPBUFF                                #  TIME IN UPBUFF
058552,000477: 04,3703           53204                           DXCH     UPBUFF     +8D                        
058553,000478: 04,3704           03545                           TC       TIMEDIDL                              #  DECREMENT AGC CLOCK
058554,000479: 
058555,000480: 04,3705           03736                           TC       UPERROUT                              #  ERROR WHILE DECREMENTING CLOCK -- EXIT
058556,000481: 
058557,000482: 04,3706  E3,1706                                  EBANK=   TEPHEM                                
058558,000483: 04,3706           00006                           EXTEND                                         
058559,000484: 04,3707           41174                           DCS      UPBUFF                                #  COPY DECREMENTERS FOR
058560,000485: 04,3710           53206                           DXCH     UPBUFF     +10D                       #  RESTART PROTECTION
058561,000486: 04,3711           00006                           EXTEND                                         
058562,000487: 04,3712           41174                           DCS      UPBUFF                                
058563,000488: 04,3713           53210                           DXCH     UPBUFF     +12D                       
058564,000489: 
058565,000490: 04,3714           05353                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
058566,000491: 04,3715           04026                           OCT      04026                                 
058567,000492: 
058568,000493: 04,3716           34755                           CAF      ZERO                                  
058569,000494: 04,3717           22007                           ZL                                             
058570,000495: 04,3720           53206                           DXCH     UPBUFF     +10D                       #  DECREMENT CSM STATE VECTOR TIME
058571,000496: 04,3721           21571                           DAS      TETCSM                                
058572,000497: 
058573,000498: 04,3722           34755                           CAF      ZERO                                  
058574,000499: 04,3723           22007                           ZL                                             
058575,000500: 04,3724           53210                           DXCH     UPBUFF     +12D                       #  DECREMENT LEM STATE VECTOR TIME
058576,000501: 04,3725           21643                           DAS      TETLEM                                
058577,000502: 
058578,000503: 04,3726           34755                           CAF      ZERO                                  
058579,000504: 04,3727           22007                           ZL                                             
058580,000505: 04,3730           53174                           DXCH     UPBUFF                                
058581,000506: 04,3731           21710                           DAS      TEPHEM     +1                         #  INCREMENT TP TEPHEM
058582,000507: 04,3732           27706                           ADS      TEPHEM                                
058583,000508: 
058584,000509: 04,3733           05353                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
058585,000510: 04,3734           04026                           OCT      04026                                 
058586,000511: 
058587,000512: 04,3735     1173                                  EBANK=   UPBUFF                                
058588,000513: 
058589,000514: 04,3735           03667                           TC       UPOUT                                 #  GO TO STANDARD UPDATE PROGRAM EXIT
058590,000515: 

Page 1388

058592,000517:                                                                                                  #  ERROR SEQUENCE
058593,000518: 
058594,000519: 04,3736           04364        UPERROUT           TC       FALTON                                #  TURN ON *OPERATOR ERROR* LIGHT
058595,000520: 04,3737           13667                           TCF      UPOUT                                 #  GO TO COMMON UPDATE PROGRAM EXIT
058596,000521: 
058597,000522: 04,3740           04364                 +2        TC       FALTON                                #  TURN ON 'OPERATOR ERROR' LIGHT
058598,000523: 04,3741           03743                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT
058599,000524: 04,3742           05472                           TC       ENDEXT                                #  EXTENDED VERB EXIT
058600,000525:                                                                                                  #  (THE PURPOSE OF UPERROUT +2 EXIT IS
058601,000526:                                                                                                  #  TO PROVIDE AN ERROR EXIT WHICH DOES NOT
058602,000527:                                                                                                  #  RESET ANY RESTART GROUPS)
058603,000528: 
058604,000529:                                                                                                  #  :UPACTOFF: IS A ROUTINE TO TURN OFF UPLINK ACTIVITY LIGHT ON ALL EXITS FROM UPDATE PROGRAM (P27).
058605,000530: 
058606,000531: 04,3743           44751        UPACTOFF           CS       BIT3                                  
058607,000532: 04,3744           00006                           EXTEND                                         #  TURN OFF UPLINK ACTIVITY LIGHT
058608,000533: 04,3745           03011                           WAND     DSALMOUT                              #  (BIT 3 OF CHANNEL 11)
058609,000534: 04,3746           00002                           TC       Q                                     
058610,000535: 

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