Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

059711,000002:                                                                                                  ## Copyright:   Public domain.
059712,000003:                                                                                                  ## Filename:    UPDATE_PROGRAM.agc
059713,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
059714,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
059715,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
059716,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
059717,000008:                                                                                                  ##              that the code format has been changed to conform to the
059718,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
059719,000010:                                                                                                  ##              original YUL assembler.
059720,000011:                                                                                                  ## Reference:   pp. 1383-1393
059721,000012:                                                                                                  ## Assembler:   yaYUL
059722,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059723,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
059724,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
059725,000016:                                                                                                  ##              2016-12-06 RRB  Updated for Luminary210.
059726,000017:                                                                                                  ##              2016-12-07 HG   Fix P00 -> POO (appears only in comments)
059727,000018:                                                                                                  ##                         Change POO -> P00 in some comments
059728,000019:                                                                                                  ##              2016-12-11 HG   Add missing operation  AD BIT1
059729,000020:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
059730,000021:                                                                                                  ##                              and corrected errors found.
059731,000022:                                                                                                  ##              2017-01-28 RSB  Comment-text fixes identified for Luminary 69.
059732,000023:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified for Artemis 72.
059733,000024:                                                                                                  ##              2017-06-17 MAS  Globally removed all SBANK= workarounds.
059734,000025: 

Page 1383

059736,000027:                                                                                                  #  PROGRAM NAME:         P27
059737,000028:                                                                                                  #  WRITTEN BY:           KILROY/ DE WOLF
059738,000029: 
059739,000030:                                                                                                  #  MOD NO:               6
059740,000031:                                                                                                  #  MOD BY:               KILROY
059741,000032:                                                                                                  #  DATE:                 01DEC67
059742,000033: 
059743,000034:                                                                                                  #  LOG SECTION:          UPDATE PROGRAM.
059744,000035: 
059745,000036:                                                                                                  #  FUNCT. DESCR:         P27 (THE UPDATE PROGRAM) PROCESSES COMMANDS AND DATA
059746,000037:                                                                                                  #                                INSERTIONS REQUESTED BY THE GROUND VIA UPLINK.
059747,000038:                                                                                                  #                                THE P27 PROGRAM WILL ACCEPT UPDATES
059748,000039:                                                                                                  #                                ONLY DURING P00 FOR THE LM, AND ONLY DURING P00,
059749,000040:                                                                                                  #                        P02, AND FRESH START FOR THE CSM
059750,000041: 
059751,000042:                                                                                                  #  CALLING SEQ:          PROGRAM IS INITIATED BY UPLINK ENTRY OF VERBS 70, 71, 72 AND 73.
059752,000043: 
059753,000044:                                                                                                  #  SUBROUTINES:          TESTXACT, NEWMODEX, NEWMODEX +3, GOXDSPF, BANKCALL, FINDVAC, INTPRET, INTSTALL, TPAGREE,
059754,000045:                                                                                                  #                        INTWAKEU, ENDEXT, POSTJUMP, FALTON, NEWPHASE, PHASCHNG
059755,000046: 
059756,000047:                                                                                                  #  NORMAL EXIT:          TC ENDEXT
059757,000048: 
059758,000049:                                                                                                  #  ALARM/ABORT:          TC FALTON FOLLOWED BY TC ENDEXT
059759,000050: 
059760,000051:                                                                                                  #  RESTARTS:             P27 IS RESTART PROTECTED IN TWO WAYS ...
059761,000052:                                                                                                  #                        1.      PRIOR TO VERIFLAG INVERSION (WHICH IS CAUSED BY THE GROUND/ASTRONAUT'S VERIFICATION OF UPDATE
059762,000053:                                                                                                  #                                DATA BY SENDING A V33E WHEN V21N02 IS FLASHING)---
059763,000054:                                                                                                  #                                NO PROTECTION EXCEPT PRE-P27 MODE IS RESTORED, COAST + ALIGN DOWNLIST IS SELECTED AND UPLINK
059764,000055:                                                                                                  #                                ACTIVITY LIGHT IS TURNED OFF.  (JUST AS IF A V34E WAS SENT DURING P27 DATA LOADS).
059765,000056:                                                                                                  #                                V70,V71,V72 OR V73 WILL HAVE TO BE COMPLETELY RESENT BY USER.
059766,000057:                                                                                                  #                        2.      AFTER VERIFLAG INVERSION (WHEN UPDATE OF THE SPECIFIED ERASABLES IS BEING PERFORMED)---
059767,000058:                                                                                                  #                                PROTECTED AGAINST RESTARTS.
059768,000059: 
059769,000060:                                                                                                  #  DEBRIS:               UPBUFF  (20D)   TEMP STORAGE FOR ADDRESSES AND CONTENTS.
059770,000061:                                                                                                  #                        UPVERB  (1)     VERB NUMBER MINUS 70D (E.G. FOR V72, UPVERB = 72D - 70D = 2)
059771,000062:                                                                                                  #                        UPOLDMOD(1)     FOR MAJOR MODE INTERRUPTED BY P27.
059772,000063:                                                                                                  #                        COMPNUMB(1)     TOTAL NUMBER OF COMPONENTS TO BE TRANSMITTED.
059773,000064:                                                                                                  #                        UPCOUNT (1)     ACTUAL NUMBER OF COMPONENTS RECEIVED.
059774,000065:                                                                                                  #                        UPTEMP  (1)     SCRATCH, BUT USUALLY CONTAINS COMPONENT NUMBER TO BE CHANGED DURING VERIFY CYCLE
059775,000066: 
059776,000067:                                                                                                  #  INPUT:
059777,000068: 
059778,000069:                                                                                                  #        ENTRY:                  DESCRIPTION
059779,000070:                                                                                                  #        V70EXXXXXEXXXXXE        (LIFTOFF TIME INCREMENT) DOUBLE PRECISION OCTAL TIME INCREMENT, XXXXX XXXXX,
059780,000071:                                                                                                  #                                IS ADDED TO TEPHEM, SUBTRACTED FROM AGC CLOCK(TIME2,TIME1), SUBTRACTED FROM CSM STATE
059781,000072:                                                                                                  #                                VECTOR TIME(TETCSM) AND SUBTRACTED FROM LEM STATE VECTOR TIME(TETLEM).
059782,000073:                                                                                                  #                                THE DP OCTAL TIME INCREMENT IS SCALED AT 2(28).

Page 1384

059784,000075:                                                                                                  #         V71EIIEAAAAE           (CONTIGUOUS BLOCK UPDATE) II-2 OCTAL COMPONENTS, XXXXX,
059785,000076:                                                                                                  #         XXXXXE                 ARE LOADED INTO ERASABLE STARTING AT ECADR, AAAA.
059786,000077:                                                                                                  #        XXXXXE                  IT IS .GE. 3 .AND. .LE. 20D.,
059787,000078:                                                                                                  #                                AND (AAAA + II -3) DOES NOT PRODUCE AN ADDRESS IN THE
059788,000079:                                                                                                  #        9 NEXT BANK
059789,000080:                                                                                                  #         .                      SCALING IS SAME AS INTERNAL REGISTERS.
059790,000081:                                                                                                  #        V72EIIE                 (SCATTER UPDATE) (II-1)/2 OCTAL COMPONENTS, XXXXX, ARE
059791,000082:                                                                                                  #        AAAAEXXXXXE             LOADED INTO ERASABLE LOCATIONS, AAAA.
059792,000083:                                                                                                  #        AAAAEXXXXXE             II IS .GE. 3 .AND. .LE. 19D, AND MUST BE ODD.
059793,000084:                                                                                                  #         .                      SCALING IS SAME AS INTERNAL REGISTERS.
059794,000085: 
059795,000086:                                                                                                  #        V73EXXXXXEXXXXXE        (OCTAL CLOCK INCREMENT) DOUBLE PRECISION OCTAL TIME
059796,000087:                                                                                                  #                                INCREMENT XXXXX XXXXX, IS ADDED TO THE AGC CLOCK, IN
059797,000088:                                                                                                  #                                CENTISECONDS SCALED AT (2)28.
059798,000089:                                                                                                  #                                THIS LOAD IS THE OCTAL EQUIVALENT OF V55.
059799,000090: 
059800,000091:                                                                                                  #  OUTPUT:               IN ADDITION TO THE ABOVE REGISTER LOADS, ALL UPDATES
059801,000092:                                                                                                  #                        COMPLEMENT BIT3 OF FLAGWORD7.
059802,000093: 
059803,000094:                                                                                                  #  ADDITIONAL NOTES:     VERB 71, JUST DEFINED ABOVE WILL BE USED TO PERFORM BUT NOT LIMITED TO THE FOLLOWING UPDATES --
059804,000095:                                                                                                  #                        1.  CSM/LM STATE VECTOR UPDATE
059805,000096:                                                                                                  #                        2.  REFSMMAT UPDATE
059806,000097: 
059807,000098:                                                                                                  #        THE FOLLOWING COMMENTS DELINEATE EACH SPECIAL UPDATE----
059808,000099: 
059809,000100:                                                                                                  #  1.  CSM/LM STATE VECTOR UPDATE (ALL DATA ENTRIES IN OCTAL)
059810,000101:                                                                                                  #  ENTRIES:      DATA DEFINITION:                                SCALE FACTORS:
059811,000102:                                                                                                  #  V71E          CONTIGUOUS BLOCK UPDATE VERB
059812,000103:                                                                                                  #     21E        NUMBER OF COMPONENTS FOR STATE VECTOR UPDATE
059813,000104:                                                                                                  #   AAAAE        ECADR OF 'UPSVFLAG'
059814,000105:                                                                                                  #  XXXXXE        STATE VECTOR IDENTIFIER: 00001 FOR CSM, 77776 FOR LEM - EARTH SPHERE OF INFLUENCE SCALING
059815,000106:                                                                                                  #                                         00002 FOR CSM, 77775 FOR LEM - LUNAR SPHERE OF INFLUENCE SCALING
059816,000107:                                                                                                  #  XXXXXEXXXXXE  X POSITION
059817,000108:                                                                                                  #  XXXXXEXXXXXE  Y POSITION
059818,000109:                                                                                                  #  XXXXXEXXXXXE  Z POSITION
059819,000110:                                                                                                  #  XXXXXEXXXXXE  X VELOCITY
059820,000111:                                                                                                  #  XXXXXEXXXXXE  Y VELOCITY
059821,000112:                                                                                                  #  XXXXXEXXXXXE  Z VELOCITY
059822,000113:                                                                                                  #  XXXXXEXXXXXE  TIME FROM AGC CLOCK ZERO
059823,000114:                                                                                                  #  V33E          VERB 33 TO SIGNAL THAT THE STATE VECTOR IS READY TO BE STORED.
059824,000115: 
059825,000116:                                                                                                  #  2.  REFSMMAT (ALL DATA ENTRIES IN OCTAL)
059826,000117:                                                                                                  #  ENTRIES:              DATA DEFINITIONS:                               SCALE FACTORS:

Page 1385

059828,000119:                                                                                                  #  V71E          CONTIGUOUS BLOCK UPDATE VERB
059829,000120:                                                                                                  #     24E        NUMBER OF COMPONENTS FOR REFSMMAT UPDATE
059830,000121:                                                                                                  #  AAAAE         ECADR OF 'REFSMMAT'
059831,000122:                                                                                                  #  XXXXXEXXXXXE  ROW 1 COLUMN 1                                  2(-1)
059832,000123:                                                                                                  #  XXXXXEXXXXXE  ROW 1 COLUMN 2                                  2(-1)
059833,000124:                                                                                                  #  XXXXXEXXXXXE  ROW 1 COLUMN 3                                  2(-1)
059834,000125:                                                                                                  #  XXXXXEXXXXXE  ROW 2 COLUMN 1                                  2(-1)
059835,000126:                                                                                                  #  XXXXXEXXXXXE  ROW 2 COLUMN 2                                  2(-1)
059836,000127:                                                                                                  #  XXXXXEXXXXXE  ROW 2 COLUMN 3                                  2(-1)
059837,000128:                                                                                                  #  XXXXXEXXXXXE  ROW 3 COLUMN 1                                  2(-1)
059838,000129:                                                                                                  #  XXXXXEXXXXXE  ROW 3 COLUMN 2                                  2(-1)
059839,000130:                                                                                                  #  XXXXXEXXXXXE  ROW 3 COLUMN 3                                  2(-1)
059840,000131:                                                                                                  #  V33E          VERB 33 TO SIGNAL THAT REFSMMAT IS READY TO BE STORED.
059841,000132: 
059842,000133: 07,3767                                           BANK     07                                    
059843,000134: 43,2000                                           SETLOC   EXTVERBS                              
059844,000135: 43,2000                                           BANK                                           
059845,000136: 
059846,000137: 43,3727  E3,1706                                  EBANK=   TEPHEM                                
059847,000138: 
059848,000139: 43,3727                                           COUNT*   $$/P27                                
059849,000140: 43,3727           34746        V70UPDAT           CAF      UP70                                  #  COMES HERE ON V70E
059850,000141: 43,3730           13736                           TCF      V73UPDAT   +1                         
059851,000142: 
059852,000143: 43,3731           34744        V71UPDAT           CAF      UP71                                  #  COMES HERE ON V71E
059853,000144: 43,3732           13736                           TCF      V73UPDAT   +1                         
059854,000145: 
059855,000146: 43,3733           34743        V72UPDAT           CAF      UP72                                  #  COMES HERE ON V72E
059856,000147: 43,3734           13736                           TCF      V73UPDAT   +1                         
059857,000148: 
059858,000149: 43,3735           36266        V73UPDAT           CAF      UP73                                  #  COMES HERE ON V73E
059859,000150: 
059860,000151: 43,3736           55165                 +1        TS       UPVERBSV                              #  SAVE UPVERB UNTIL IT'S OK TO ENTER P27
059861,000152: 
059862,000153: 43,3737           02076                           TC       TESTXACT                              #  GRAB DISPLAY IF AVAILABLE, OTHERWISE
059863,000154:                                                                                                  #  TURN *OPERATOR ERROR* ON AND TERMINATEJOB
059864,000155: 
059865,000156: 43,3740           04626                           TC       POSTJUMP                              #  LEAVE EXTENDED VERB BANK AND
059866,000157: 43,3741           11372                           CADR     UPPART2                               #  GO TO UPDATE PROGRAM (P27) BANK.
059867,000158: 
059868,000159: 43,3742     4746               UP70               EQUALS   ZERO                                  
059869,000160: 43,3742     4744               UP71               EQUALS   ONE                                   
059870,000161: 43,3742     4743               UP72               EQUALS   TWO                                   
059871,000162: 43,3742     6266               UP73               EQUALS   THREE                                 

Page 1386

059873,000164: 04,3372                                           BANK     04                                    
059874,000165: 04,2000                                           SETLOC   UPDATE2                               
059875,000166: 04,2000                                           BANK                                           
059876,000167: 
059877,000168: 04,3372                                           COUNT*   $$/P27                                
059878,000169: 
059879,000170: 04,3372                        UPPART2            EQUALS                                         #  UPDATE PROGRAM - PART 2
059880,000171: 
059881,000172: 04,3372           31010                           CA       MODREG                                #  IS UPDATE ALLOWED AT THIS TIME?
059882,000173: 04,3373           00006                           EXTEND                                         #  IS MODREG +0 (POOH) OR -0 (FRESH START)?
059883,000174: 04,3374           13376                           BZF      UPDATOK                               
059884,000175: 
059885,000176: 04,3375           03764        UPERROR            TC       UPERROUT   +2                         #  TURN ON OPERATOR ERROR LIGHT AND EXIT
059886,000177: 
059887,000178: 04,3376           55170        UPDATOK            TS       UPOLDMOD                              
059888,000179: 
059889,000180: 04,3377           31165                           CAE      UPVERBSV                              #  SET UPVERB TO TELL P27 WHICH EXTENDED
059890,000181: 04,3400           55171                           TS       UPVERB                                #   VERB CALLED IT
059891,000182: 
059892,000183: 04,3401           34744                           CAF      ONE                                   
059893,000184: 04,3402           55172                           TS       UPCOUNT                               
059894,000185: 
059895,000186: 04,3403           05355                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO RESTORE OLD MODE
059896,000187: 04,3404           07026                           OCT      07026                                 #  AND DOWNLIST AND EXIT IF RESTART OCCURS.
059897,000188: 04,3405           30000                           OCT      30000                                 #  PRIORITY SAME AS CHRPRIO
059898,000189: 04,3406     1173                                  EBANK=   UPBUFF                                
059899,000190: 04,3406           03714 10102                     2CADR    UPOUT      +1                         
059900,000191: 
059901,000192: 04,3410           34744                           CAF      ONE                                   
059902,000193: 04,3411           54333                           TS       DNLSTCOD                              #  DOWNLIST
059903,000194: 
059904,000195: 04,3412           05313                           TC       NEWMODEX                              #  SET MAJOR MODE = 27
059905,000196: 04,3413           00033                           DEC      27         B-14                       
059906,000197: 
059907,000198: 04,3414           51171                           INDEX    UPVERB                                #  BRANCH DEPENDING ON WHETHER THE UPDATE
059908,000199: 04,3415           13416                           TCF      +1                                    #  VERB REQUIRES A FIXED OR VARIABLE NUMBER
059909,000200: 04,3416           13421                           TCF      +3                                    #  V70 FIXED.               (OF COMPONENTS.
059910,000201: 04,3417           13424                           TCF      OHWELL1                               #  V71 VARIABLE - GO GET NO. OF COMPONENTS
059911,000202: 04,3420           13424                           TCF      OHWELL1                               #  V72 VARIABLE - GO GET NO. OF COMPONENTS
059912,000203: 04,3421           34743                           CA       TWO                                   #  V73 (AND V70) FIXED
059913,000204: 04,3422           55167                           TS       COMPNUMB                              #  SET NUMBER OF COMPONENTS TO 2.
059914,000205: 04,3423           13447                           TCF      OHWELL2                               #  GO GET THE TWO UPDATE COMPONENTS
059915,000206: 
059916,000207: 04,3424           33517        OHWELL1            CAF      ADUPBUFF                              #  * REQUEST USER TO SEND NUMBER  *
059917,000208: 04,3425           54156                           TS       MPAC       +2                         #  * OF COMPONENTS PARAMETER(II). *
059918,000209: 04,3426           33520                 +2        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
059919,000210: 04,3427           04607                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
059920,000211: 04,3430           20323                           CADR     GOXDSPF                               #  TO REQUEST II.
059921,000212: 04,3431           13714                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN

Page 1387

059923,000214: 04,3432           13426                           TCF      OHWELL1    +2                         
059924,000215: 04,3433           03510                           TC       CK4V32                                #  DATA OR V32 RETURN
059925,000216: 04,3434           44743                           CS       BIT2                                  
059926,000217: 04,3435           61173                           AD       UPBUFF                                #  IS II (NUMBER OF COMPONENTS PARAMETER)
059927,000218: 04,3436           00006                           EXTEND                                         #  .GE. 3 AND .LE. 20D.
059928,000219: 04,3437           63426                           BZMF     OHWELL1    +2                         
059929,000220: 04,3440           41173                           CS       UPBUFF                                
059930,000221: 04,3441           64353                           AD       UP21                                  
059931,000222: 04,3442           00006                           EXTEND                                         
059932,000223: 04,3443           63426                           BZMF     OHWELL1    +2                         
059933,000224: 04,3444           31173                           CAE      UPBUFF                                
059934,000225: 04,3445           55167                           TS       COMPNUMB                              #  SAVE II IN COMPNUMB
059935,000226: 
059936,000227:                                                                                                  #  UPBUFF LOADING SEQUENCE
059937,000228: 
059938,000229: 04,3446           25172                           INCR     UPCOUNT                               #  INCREMENT COUNT OF COMPONENTS RECEIVED.
059939,000230: 04,3447           33664        OHWELL2            CAF      ADUPBFM1                              #  CALCULATE LOCATION(ECADR) IN UPBUFF
059940,000231: 04,3450           61172                           AD       UPCOUNT                               #  WHERE NEXT COMPONENT SHOULD BE STORED.
059941,000232: 04,3451           54156                 +2        TS       MPAC       +2                         #  PLACE ECADR INTO R3.
059942,000233: 04,3452           33520                 +3        CAF      UPLOADNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
059943,000234: 04,3453           04607                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N01
059944,000235: 04,3454           20323                           CADR     GOXDSPF                               #  TO REQUEST DATA.
059945,000236: 04,3455           13714                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE (P27) RETURN.
059946,000237: 04,3456           13452                           TCF      OHWELL2    +3                         #  V33 PROCEED RETURN
059947,000238: 04,3457           03510                           TC       CK4V32                                #  DATA OR V32 RETURN
059948,000239: 04,3460           41172                           CS       UPCOUNT                               #  HAVE WE FINISHED RECEIVING ALL
059949,000240: 04,3461           61167                           AD       COMPNUMB                              #  THE DATA WE EXPECTED.
059950,000241: 04,3462           00006                           EXTEND                                         
059951,000242: 04,3463           63465                           BZMF     UPVERIFY                              #  YES- GO TO VERIFICATION SEQUENCE
059952,000243: 04,3464           13446                           TCF      OHWELL2    -1                         #  NO- REQUEST ADDITIONAL DATA.
059953,000244: 
059954,000245:                                                                                                  #  VERIFY SEQUENCE
059955,000246: 
059956,000247: 04,3465           33516        UPVERIFY           CAF      ADUPTEMP                              #  PLACE ECADR WHERE COMPONENT NO. INDEX
059957,000248: 04,3466           54156                           TS       MPAC       +2                         #  IS TO BE STORED INTO R3.
059958,000249: 04,3467           33521                           CAF      UPVRFYNV                              #  (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
059959,000250: 04,3470           04607                           TC       BANKCALL                              #  DISPLAY A FLASHING V21N02 TO REQUEST
059960,000251: 04,3471           20323                           CADR     GOXDSPF                               #  DATA CORRECTION OR VERIFICATION.
059961,000252: 04,3472           13714                           TCF      UPOUT4                                #  V34 TERMINATE UPDATE(P27) RETURN
059962,000253: 04,3473           13522                           TCF      UPSTORE                               #  V33 DATA SENT IS GOOD.  GO STORE IT.
059963,000254: 04,3474           03510                           TC       CK4V32                                #  COMPONENT NO. INDEX OR V32 RETURN
059964,000255: 04,3475           31166                           CA       UPTEMP                                #  DOES THE COMPONENT NO. INDEX JUST SENT
059965,000256: 04,3476           00006                           EXTEND                                         #  SPECIFY A LEGAL COMPONENT NUMBER?
059966,000257: 04,3477           63465                           BZMF     UPVERIFY                              #  NO, IT IS NOT POSITIVE NONZERO
059967,000258: 04,3500           41166                           CS       UPTEMP                                
059968,000259: 04,3501           61167                           AD       COMPNUMB                              
059969,000260: 04,3502           64744                           AD       BIT1                                  
059970,000261: 04,3503           00006                           EXTEND                                         

Page 1388

059972,000263: 04,3504           63465                           BZMF     UPVERIFY                              #  NO
059973,000264: 04,3505           33664                           CAF      ADUPBFM1                              #  YES- BASED ON THE COMPONENT NO. INDEX
059974,000265: 04,3506           61166                           AD       UPTEMP                                #  CALCULATE THE ECADR OF LOCATION IN
059975,000266: 04,3507           13451                           TCF      OHWELL2    +2                         #  UPBUFF WHICH USER WANTS TO CHANGE.
059976,000267: 
059977,000268: 04,3510  04,3714               UPOUT4             EQUALS   UPOUT      +1                         #  COMES HERE ON V34 TO TERMINATE UPDATE
059978,000269: 
059979,000270:                                                                                                  #  CHECK FOR VERB 32 SEQUENCE
059980,000271: 
059981,000272: 04,3510           40154        CK4V32             CS       MPAC                                  #  ON DATA RETURN FROM 'GOXDSPF'
059982,000273: 04,3511           74737                           MASK     BIT6                                  #  ON DATA RETURN FROM "GOXDSP"& THE CON-
059983,000274: 04,3512           10000                           CCS      A                                     #  TENTS OF MPAC = VERB.  SO TEST FOR V32.
059984,000275: 04,3513           00002                           TC       Q                                     #  IT'S NOT A V32, IT'S DATA.  PROCEED.
059985,000276: 04,3514           50002                           INDEX    Q                                     
059986,000277: 04,3515           77771                           TC       0          -6                         #  V32 ENCOUNTERED - GO BACK AND GET DATA
059987,000278: 
059988,000279: 04,3516           01166        ADUPTEMP           ADRES    UPTEMP                                #  ADDRESS OF TEMP STORAGE FOR CORRECTIONS
059989,000280: 04,3517           01173        ADUPBUFF           ADRES    UPBUFF                                #  ADDRESS OF UPDATE DATA STORAGE BUFFER
059990,000281: 04,3520           05201        UPLOADNV           VN       2101                                  #  VERB 21 NOUN 01
059991,000282: 04,3521           05202        UPVRFYNV           VN       2102                                  #  VERB 21 NOUN 02
059992,000283: 04,3522     4353               UP21               =        MD1                                   #  DEC 21 = MAX NO OF COMPONENTS +1
059993,000284: 04,3522     4747               UPDTPHAS           EQUALS   FIVE                                  
059994,000285: 
059995,000286:                                                                                                  #  PRE-STORE AND FAN TO APPROPRIATE BRANCH SEQUENCE
059996,000287: 
059997,000288: 04,3522                        UPSTORE            EQUALS                                         #  GROUND HAS VERIFIED UPDATE.  STORE DATA.
059998,000289: 
059999,000290: 04,3522           00004                           INHINT                                         
060000,000291: 
060001,000292: 04,3523           30103                           CAE      FLAGWRD7                              #  INVERT VERIFLAG(BIT 3 OF FLAGWRD7) TO
060002,000293: 04,3524           56001                           XCH      L                                     #  INDICATE TO THE GROUND(VIA DOWNLINK)
060003,000294: 04,3525           34742                           CAF      VERIFBIT                              #  THAT THE V33 (WHICH THE GROUND SENT TO
060004,000295: 04,3526           00006                           EXTEND                                         #  VERIFY THE UPDATE) HAS BEEN SUCCESSFULLY
060005,000296: 04,3527           06001                           RXOR     LCHAN                                 #  RECEIVED BY THE UPDATE PROGRAM
060006,000297: 04,3530           54103                           TS       FLAGWRD7                              
060007,000298: 
060008,000299: 04,3531           05355                           TC       PHASCHNG                              #  SET RESTART GROUP 6 TO REDO THE UPDATE
060009,000300: 04,3532           04026                           OCT      04026                                 #  DATA STORE IF A RESTART OCCURS.
060010,000301: 04,3533           00004                           INHINT                                         #  (BECAUSE PHASCHNG DID A RELINT)
060011,000302: 
060012,000303: 04,3534           44743                           CS       TWO                                   #  GO TO UPFNDVAC IF INSTALL IS REQUIRED,
060013,000304: 04,3535           61171                           AD       UPVERB                                #  THAT IS, IF IT'S A V70 - V72.
060014,000305: 04,3536           00006                           EXTEND                                         #  GO TO UPEND73 IF IT'S A V73.
060015,000306: 04,3537           63546                           BZMF     UPFNDVAC                              
060016,000307: 
060017,000308:                                                                                                  #  VERB 73 BRANCH
060018,000309: 
060019,000310: 04,3540           00006        UPEND73            EXTEND                                         #  V73-PERFORM DP OCTAL AGC CLOCK INCREMENT
060020,000311: 04,3541           31174                           DCA      UPBUFF                                

Page 1389

060022,000313: 04,3542           53204                           DXCH     UPBUFF     +8D                        
060023,000314: 04,3543           03571                           TC       TIMEDIDL                              
060024,000315: 04,3544           04355                           TC       FALTON                                #  ERROR- TURN ON *OPERATOR ERROR* LIGHT
060025,000316: 04,3545           03714                           TC       UPOUT      +1                         #  GO TO COMMON UPDATE PROGRAM EXIT
060026,000317: 
060027,000318: 04,3546           34346        UPFNDVAC           CAF      CHRPRIO                               #  (USE EXTENDED VERB PRIORITY)
060028,000319: 04,3547           05076                           TC       FINDVAC                               #  GET VAC AREA FOR 'CALL INTSTALL'
060029,000320: 04,3550  E3,1706                                  EBANK=   TEPHEM                                
060030,000321: 04,3550           03553 10103                     2CADR    UPJOB                                 #  (NOTE:  THIS WILL ALSO SET EBANK FOR
060031,000322: 
060032,000323: 04,3552           05146                           TC       ENDOFJOB                              #  'TEPHEM' UPDATE BY V70)
060033,000324: 
060034,000325: 04,3553           06060        UPJOB              TC       INTPRET                               #  THIS COULD BE A STATE VECTOR UPDATE--SO
060035,000326: 04,3554           77624                           CALL                                           #  WAIT(PUT JOB TO SLEEP) IF ORBIT INT(OI)
060036,000327: 04,3555           27447                                    INTSTALL                              #  IS IN PROGRESS--OR--GRAB OI AND RETURN
060037,000328:                                                                                                  #  TO UPWAKE IF OI IS NOT IN PROGRESS.
060038,000329: 
060039,000330: 04,3556           77776        UPWAKE             EXIT                                           
060040,000331: 
060041,000332: 04,3557           05355                           TC       PHASCHNG                              #  RESTART PROTECT (GROUP 6)
060042,000333: 04,3560           04026                           OCT      04026                                 
060043,000334: 
060044,000335: 04,3561           05506                           TC       UPFLAG                                #  SET INTEGRATION RESTART BIT
060045,000336: 04,3562           00236                           ADRES    REINTFLG                              
060046,000337: 04,3563           00004                           INHINT                                         
060047,000338: 04,3564                        UPPART3            EQUALS                                         
060048,000339: 
060049,000340: 04,3564           51171                           INDEX    UPVERB                                #  BRANCH TO THE APPROPRIATE UPDATE VERB
060050,000341: 04,3565           13566                           TCF      +1                                    #  ROUTINE TO ACTUALLY PERFORM THE UPDATE
060051,000342: 04,3566           13725                           TCF      UPEND70                               #  V70
060052,000343: 04,3567           13634                           TCF      UPEND71                               #  V71
060053,000344: 04,3570           13666                           TCF      UPEND72                               #  V72
060054,000345: 
060055,000346:                                                                                                  #  ROUTINE TO INCREMENT CLOCK(TIME2,TIME1) WITH CONTENTS OF DP WORD AT UPBUFF.
060056,000347: 
060057,000348: 04,3571           00006        TIMEDIDL           EXTEND                                         
060058,000349: 04,3572           23166                           QXCH     UPTEMP                                #  SAVE Q FOR RETURN
060059,000350: 04,3573           34746                           CAF      ZERO                                  #  ZERO AND SAVE TIME2,TIME1
060060,000351: 04,3574           22007                           ZL                                             
060061,000352: 04,3575           52025                           DXCH     TIME2                                 
060062,000353: 04,3576           53216                           DXCH     UPBUFF     +18D                       #  STORE IN CASE OF OVERFLOW
060063,000354: 
060064,000355: 04,3577           34747                           CAF      UPDTPHAS                              #  DO
060065,000356: 04,3600           54001                           TS       L                                     #  A
060066,000357: 04,3601           40000                           COM                                            #  QUICK
060067,000358: 04,3602           52764                           DXCH     -PHASE6                               #  PHASCHNG
060068,000359: 
060069,000360: 04,3603           00004        TIMEDIDR           INHINT                                         

Page 1390

060071,000362: 04,3604           34746                           CAF      ZERO                                  
060072,000363: 04,3605           22007                           ZL                                             #  PICK UP INCREMENTER(AND ZERO
060073,000364: 04,3606           54156                           TS       MPAC       +2                         #  IT IN CASE OF RESTARTS) AND
060074,000365: 04,3607           53204                           DXCH     UPBUFF     +8D                        #  STORE IT
060075,000366: 04,3610           52155                           DXCH     MPAC                                  #  INTO MPAC FOR TPAGREE.
060076,000367: 
060077,000368: 04,3611           00006                           EXTEND                                         
060078,000369: 04,3612           31216                           DCA      UPBUFF     +18D                       
060079,000370: 04,3613           20155                           DAS      MPAC                                  #  FORM SUM IN MPAC
060080,000371: 04,3614           00006                           EXTEND                                         
060081,000372: 04,3615           13624                           BZF      DELTAOK                               #  TEST FOR OVERFLOW
060082,000373: 04,3616           34746                           CAF      ZERO                                  
060083,000374: 04,3617           53216                           DXCH     UPBUFF     +18D                       #  OVERFLOW, RESTORE OLD VALUE OF CLOCK
060084,000375: 04,3620           20025                           DAS      TIME2                                 #  AND TURN ON OPERATOR ERROR
060085,000376: 
060086,000377: 04,3621           05355                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
060087,000378: 04,3622           04026                           OCT      04026                                 
060088,000379: 
060089,000380: 04,3623           01166                           TC       UPTEMP                                #  GO TO ERROR EXIT
060090,000381: 
060091,000382: 04,3624           07300        DELTAOK            TC       TPAGREE                               #  FORCE SIGN AGREEMENT
060092,000383: 04,3625           52155                           DXCH     MPAC                                  
060093,000384: 04,3626           20025                           DAS      TIME2                                 #  INCREMENT TIME2,TIME1
060094,000385: 
060095,000386: 04,3627           05355                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
060096,000387: 04,3630           04026                           OCT      04026                                 
060097,000388: 
060098,000389: 04,3631           00004                           INHINT                                         
060099,000390: 04,3632           51166                           INDEX    UPTEMP                                #  (CODED THIS WAY FOR RESTART PROTECTION)
060100,000391: 04,3633           00001                           TC       1                                     #  NORMAL RETURN
060101,000392: 
060102,000393:                                                                                                  #  VERB 71 BRANCH
060103,000394: 
060104,000395: 04,3634           31174        UPEND71            CAE      UPBUFF     +1                         #  SET EBANK
060105,000396: 04,3635           54003                           TS       EBANK                                 #        AND
060106,000397: 04,3636           74350                           MASK     LOW8                                  #  CALCULATE
060107,000398: 04,3637           55166                           TS       UPTEMP                                #  S-REG VALUE OF RECEIVING AREA
060108,000399: 
060109,000400: 04,3640           67766                           AD       NEG3                                  #  IN THE PROCESS OF
060110,000401: 04,3641           61167                           AD       COMPNUMB                              #  PERFORMING
060111,000402: 04,3642           00006                           EXTEND                                         #  THIS UPDATE
060112,000403: 04,3643           13651                           BZF      STORLP71                              #  WILL WE
060113,000404: 04,3644           74734                           MASK     BIT9                                  #  OVERFLOW
060114,000405: 04,3645           10000                           CCS      A                                     #  INTO THE NEXT EBANK....
060115,000406: 04,3646           13762                           TCF      UPERROUT                              #  YES
060116,000407: 
060117,000408: 04,3647           37766                           CA       NEG3                                  #  NO- CALCULATE NUMBER OF
060118,000409: 04,3650           61167                           AD       COMPNUMB                              #  WORDS TO BE STORED MINUS ONE
060119,000410: 04,3651           54154        STORLP71           TS       MPAC                                  #  SAVE NO. OF WORDS REMAINING MINUS ONE
060120,000411: 04,3652           50000                           INDEX    A                                     #  TAKE NEXT UPDATE WORD FROM
060121,000412: 04,3653           31175                           CA       UPBUFF     +2                         #  UPBUFF AND

Page 1391

060123,000414: 04,3654           54001                           TS       L                                     #  SAVE IT IN L
060124,000415: 04,3655           30154                           CA       MPAC                                  #  CALCULATE NEXT
060125,000416: 04,3656           61166                           AD       UPTEMP                                #  RECEIVING ADDRESS
060126,000417: 04,3657           50000                           INDEX    A                                     
060127,000418: 04,3660  E3,1400                                  EBANK=   1400                                  
060128,000419: 04,3660           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
060129,000420: 04,3661  E3,1706                                  EBANK=   TEPHEM                                
060130,000421: 04,3661           10154                           CCS      MPAC                                  #  ARE THERE ANY WORDS LEFT TO BE STORED
060131,000422: 04,3662           13651                           TCF      STORLP71                              #  YES
060132,000423: 04,3663           13713                           TCF      UPOUT                                 #  NO- THEN EXIT UPDATE PROGRAM
060133,000424: 04,3664           01172        ADUPBFM1           ADRES    UPBUFF     -1                         #  SAME AS ADUPBUFF BUT LESS 1 (DON'T MOVE)
060134,000425: 04,3665           13713                           TCF      UPOUT                                 #  NO- EXIT UPDATE(HERE WHEN COMPNUMB = 3)
060135,000426: 
060136,000427:                                                                                                  #  VERB 72 BRANCH
060137,000428: 
060138,000429: 04,3666           34744        UPEND72            CAF      BIT1                                  #  HAVE AN ODD NO. OF COMPONENTS
060139,000430: 04,3667           71167                           MASK     COMPNUMB                              #  BEEN SENT FOR A V72 UPDATE...
060140,000431: 04,3670           10000                           CCS      A                                     
060141,000432: 04,3671           13673                           TCF      +2                                    #  YES
060142,000433: 04,3672           13762                           TCF      UPERROUT                              #  ERROR- SHOULD BE ODD NO. OF COMPONENTS
060143,000434: 04,3673           44743                           CS       BIT2                                  
060144,000435: 04,3674           61167                           AD       COMPNUMB                              
060145,000436: 04,3675           54154        LDLOOP72           TS       MPAC                                  #  NOW PERFORM THE UPDATE
060146,000437: 04,3676           50000                           INDEX    A                                     
060147,000438: 04,3677           31174                           CAE      UPBUFF     +1                         #  PICK UP NEXT UPDATE WORD
060148,000439: 04,3700           22000                           LXCH     A                                     
060149,000440: 04,3701           10154                           CCS      MPAC                                  #  SET POINTER TO ECADR(MUST BE CCS)
060150,000441: 04,3702           54154                           TS       MPAC                                  
060151,000442: 04,3703           50000                           INDEX    A                                     
060152,000443: 04,3704           31174                           CAE      UPBUFF     +1                         #  PICK UP NEXT ECADR OF REG TO BE UPDATED
060153,000444: 04,3705           54003                           TS       EBANK                                 #  SET EBANK
060154,000445: 04,3706           74350                           MASK     LOW8                                  #  ISOLATE RELATIVE ADDRESS
060155,000446: 04,3707           50000                           INDEX    A                                     
060156,000447: 04,3710  E3,1400                                  EBANK=   1400                                  
060157,000448: 04,3710           23400                           LXCH     1400                                  #  UPDATE THE REGISTER BY CONTENTS OF L
060158,000449: 04,3711  E3,1706                                  EBANK=   TEPHEM                                
060159,000450: 04,3711           10154                           CCS      MPAC                                  #  ARE WE THROUGH THE V72 UPDATE...
060160,000451: 04,3712           13675                           TCF      LDLOOP72                              #  NO
060161,000452: 
060162,000453:                                                                                                  #  NORMAL FINISH OF P27
060163,000454: 
060164,000455: 04,3713                        UPOUT              EQUALS                                         
060165,000456: 04,3713           03172                           TC       INTWAKEU                              #  RELEASE GRAB OF ORBITAL INTEGRATION
060166,000457: 04,3714           31170                 +1        CAE      UPOLDMOD                              #  RESTORE PRIOR P27 MODE
060167,000458: 04,3715           05316                           TC       NEWMODEX   +3                         
060168,000459: 04,3716           34746                           CAF      ZERO                                  
060169,000460: 04,3717           54333                           TS       DNLSTCOD                              
060170,000461: 04,3720           03767                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT

Page 1392

060172,000463: 04,3721           00006                           EXTEND                                         #  KILL GROUP 6.
060173,000464: 04,3722           34746                           DCA      NEG0                                  
060174,000465: 04,3723           52764                           DXCH     -PHASE6                               
060175,000466: 
060176,000467: 04,3724           05474                           TC       ENDEXT                                #  EXTENDED VERB EXIT
060177,000468: 
060178,000469:                                                                                                  #  VERB 70 BRANCH
060179,000470: 
060180,000471: 04,3725           00006        UPEND70            EXTEND                                         #  V70 DOES THE FOLLOWING WITH DP DELTA
060181,000472: 04,3726           41174                           DCS      UPBUFF                                #  TIME IN UPBUFF
060182,000473: 04,3727           53204                           DXCH     UPBUFF     +8D                        
060183,000474: 04,3730           03571                           TC       TIMEDIDL                              #  DECREMENT AGC CLOCK
060184,000475: 
060185,000476: 04,3731           03762                           TC       UPERROUT                              #  ERROR WHILE DECREMENTING CLOCK -- EXIT
060186,000477: 
060187,000478: 04,3732  E3,1706                                  EBANK=   TEPHEM                                
060188,000479: 04,3732           00006                           EXTEND                                         
060189,000480: 04,3733           41174                           DCS      UPBUFF                                #  COPY DECREMENTERS FOR
060190,000481: 04,3734           53206                           DXCH     UPBUFF     +10D                       #  RESTART PROTECTION
060191,000482: 04,3735           00006                           EXTEND                                         
060192,000483: 04,3736           41174                           DCS      UPBUFF                                
060193,000484: 04,3737           53210                           DXCH     UPBUFF     +12D                       
060194,000485: 
060195,000486: 04,3740           05355                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
060196,000487: 04,3741           04026                           OCT      04026                                 
060197,000488: 
060198,000489: 04,3742           34746                           CAF      ZERO                                  
060199,000490: 04,3743           22007                           ZL                                             
060200,000491: 04,3744           53206                           DXCH     UPBUFF     +10D                       #  DECREMENT CSM STATE VECTOR TIME
060201,000492: 04,3745           21571                           DAS      TETCSM                                
060202,000493: 
060203,000494: 04,3746           34746                           CAF      ZERO                                  
060204,000495: 04,3747           22007                           ZL                                             
060205,000496: 04,3750           53210                           DXCH     UPBUFF     +12D                       #  DECREMENT LEM STATE VECTOR TIME
060206,000497: 04,3751           21643                           DAS      TETLEM                                
060207,000498: 
060208,000499: 04,3752           34746                           CAF      ZERO                                  
060209,000500: 04,3753           22007                           ZL                                             
060210,000501: 04,3754           53174                           DXCH     UPBUFF                                
060211,000502: 04,3755           21710                           DAS      TEPHEM     +1                         #  INCREMENT TP TEPHEM
060212,000503: 04,3756           27706                           ADS      TEPHEM                                
060213,000504: 
060214,000505: 04,3757           05355                           TC       PHASCHNG                              #  RESTART PROTECT(GROUP 6)
060215,000506: 04,3760           04026                           OCT      04026                                 
060216,000507: 
060217,000508: 04,3761     1173                                  EBANK=   UPBUFF                                
060218,000509: 
060219,000510: 04,3761           03713                           TC       UPOUT                                 #  GO TO STANDARD UPDATE PROGRAM EXIT
060220,000511: 

Page 1393

060222,000513:                                                                                                  #  ERROR SEQUENCE
060223,000514: 
060224,000515: 04,3762           04355        UPERROUT           TC       FALTON                                #  TURN ON *OPERATOR ERROR* LIGHT
060225,000516: 04,3763           13713                           TCF      UPOUT                                 #  GO TO COMMON UPDATE PROGRAM EXIT
060226,000517: 
060227,000518: 04,3764           04355                 +2        TC       FALTON                                #  TURN ON 'OPERATOR ERROR' LIGHT
060228,000519: 04,3765           03767                           TC       UPACTOFF                              #  TURN OFF 'UPLINK ACTIVITY' LIGHT
060229,000520: 04,3766           05474                           TC       ENDEXT                                #  EXTENDED VERB EXIT
060230,000521:                                                                                                  #  (THE PURPOSE OF UPERROUT +2 EXIT IS
060231,000522:                                                                                                  #  TO PROVIDE AN ERROR EXIT WHICH DOES NOT
060232,000523:                                                                                                  #  RESET ANY RESTART GROUPS)
060233,000524: 
060234,000525:                                                                                                  #  :UPACTOFF: IS A ROUTINE TO TURN OFF UPLINK ACTIVITY LIGHT ON ALL EXITS FROM UPDATE PROGRAM(P27).
060235,000526: 
060236,000527: 04,3767           44742        UPACTOFF           CS       BIT3                                  
060237,000528: 04,3770           00006                           EXTEND                                         #  TURN OFF UPLINK ACTIVITY LIGHT
060238,000529: 04,3771           03011                           WAND     DSALMOUT                              #  (BIT 3 OF CHANNEL 11)
060239,000530: 04,3772           00002                           TC       Q                                     
060240,000531: 

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