Source Code
These source-code files are part of a reconstructed copy of LM131 revision 1,
the final release of the Apollo 13 Lunar Module (LM) Apollo Guidance Computer
(AGC) software.
The source reconstruction began with source code of Luminary 131 previously transcribed from a digitized copy of that program. A dump of the flight spare core rope memory module B5, part number 2010802-171, serial number RAY 411, was obtained. This module is the only module different between Luminary 131 and LM131 revision 1. The dump was disassembled and all changes were incorporated into these source files. Note that page numbers in the reconstructed code match those on the Luminary 131 printout, although the changed code would likely have changed page numbers for a real LM131 revision 1 listing. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. |
057927,000002: ## Copyright: Public domain.
057928,000003: ## Filename: UPDATE_PROGRAM.agc
057929,000004: ## Purpose: A section of LM131 revision 1.
057930,000005: ## It is part of the reconstructed source code for the final
057931,000006: ## release of the flight software for the Lunar Module's (LM)
057932,000007: ## Apollo Guidance Computer (AGC) for Apollo 13. The code has
057933,000008: ## been reconstructed from a listing of Luminary 131 and a dump
057934,000009: ## of a core rope memory module B5, part number 2010802-171,
057935,000010: ## which is the only module different between LM131 revision 1
057936,000011: ## and Luminary 131. The executable generated from this source
057937,000012: ## has been verified against the module dump, so while the names,
057938,000013: ## comments, and ordering may not be exactly correct, the
057939,000014: ## resulting binary is.
057940,000015: ## Reference: pp. 1378-1388
057941,000016: ## Assembler: yaYUL
057942,000017: ## Contact: Ron Burkey <info@sandroid.org>.
057943,000018: ## Website: www.ibiblio.org/apollo/index.html
057944,000019: ## Mod history: 2022-10-28 MAS Created from Luminary 131.
057945,000020:
Page 1378 |
057947,000022: # PROGRAM NAME: P27
057948,000023: # WRITTEN BY: KILROY/ DE WOLF
057949,000024:
057950,000025: # MOD NO: 6
057951,000026: # MOD BY: KILROY
057952,000027: # DATE: 01DEC67
057953,000028:
057954,000029: # LOG SECTION: UPDATE PROGRAM.
057955,000030:
057956,000031: # FUNCT. DESCR: P27 (THE UPDATE PROGRAM) PROCESSES COMMANDS AND DATA
057957,000032: # INSERTIONS REQUESTED BY THE GROUND VIA UPLINK.
057958,000033: # THE P27 PROGRAM WILL ACCEPT UPDATES
057959,000034: # ONLY DURING P00 FOR THE LM, AND ONLY DURING P00,
057960,000035: # P02, AND FRESH START FOR THE CSM
057961,000036:
057962,000037: # CALLING SEQ: PROGRAM IS INITIATED BY UPLINK ENTRY OF VERBS 70, 71, 72 AND 73.
057963,000038:
057964,000039: # SUBROUTINES: TESTXACT, NEWMODEX, NEWMODEX +3, GOXDSPF, BANKCALL, FINDVAC, INTPRET, INTSTALL, TPAGREE,
057965,000040: # INTWAKEU, ENDEXT, POSTJUMP, FALTON, NEWPHASE, PHASCHNG
057966,000041:
057967,000042: # NORMAL EXIT: TC ENDEXT
057968,000043:
057969,000044: # ALARM/ABORT: TC FALTON FOLLOWED BY TC ENDEXT
057970,000045:
057971,000046: # RESTARTS: P27 IS RESTART PROTECTED IN TWO WAYS ...
057972,000047: # 1. PRIOR TO VERIFLAG INVERSION (WHICH IS CAUSED BY THE GROUND/ASTRONAUT'S VERIFICATION OF UPDATE
057973,000048: # DATA BY SENDING A V33E WHEN V21N02 IS FLASHING)---
057974,000049: # NO PROTECTION EXCEPT PRE-P27 MODE IS RESTORED, COAST + ALIGN DOWNLIST IS SELECTED AND UPLINK
057975,000050: # ACTIVITY LIGHT IS TURNED OFF. (JUST AS IF A V34E WAS SENT DURING P27 DATA LOADS).
057976,000051: # V70,V71,V72 OR V73 WILL HAVE TO BE COMPLETELY RESENT BY USER.
057977,000052: # 2. AFTER VERIFLAG INVERSION (WHEN UPDATE OF THE SPECIFIED ERASABLES IS BEING PERFORMED)---
057978,000053: # PROTECTED AGAINST RESTARTS.
057979,000054:
057980,000055: # DEBRIS: UPBUFF (20D) TEMP STORAGE FOR ADDRESSES AND CONTENTS.
057981,000056: # UPVERB (1) VERB NUMBER MINUS 70D (E.G. FOR V72, UPVERB = 72D - 70D = 2)
057982,000057: # UPOLDMOD(1) FOR MAJOR MODE INTERRUPTED BY P27.
057983,000058: # COMPNUMB(1) TOTAL NUMBER OF COMPONENTS TO BE TRANSMITTED.
057984,000059: # UPCOUNT (1) ACTUAL NUMBER OF COMPONENTS RECEIVED.
057985,000060: # UPTEMP (1) SCRATCH, BUT USUALLY CONTAINS COMPONENT NUMBER TO BE CHANGED DURING VERIFY CYCLE
057986,000061:
057987,000062: # INPUT:
057988,000063:
057989,000064: # ENTRY: DESCRIPTION
057990,000065: # V70EXXXXXEXXXXXE (LIFTOFF TIME INCREMENT) DOUBLE PRECISION OCTAL TIME INCREMENT, XXXXX XXXXX,
057991,000066: # IS ADDED TO TEPHEM, SUBTRACTED FROM AGC CLOCK(TIME2,TIME1), SUBTRACTED FROM CSM STATE
057992,000067: # VECTOR TIME(TETCSM) AND SUBTRACTED FROM LEM STATE VECTOR TIME(TETLEM).
057993,000068: # THE DP OCTAL TIME INCREMENT IS SCALED AT 2(28).
Page 1379 |
057995,000070: # V71EIIEAAAAE (CONTIGUOUS BLOCK UPDATE) II-2 OCTAL COMPONENTS, XXXXX,
057996,000071: # XXXXXE ARE LOADED INTO ERASABLE STARTING AT ECADR, AAAA.
057997,000072: # XXXXXE IT IS .GE. 3 .AND. .LE. 20D.,
057998,000073: # AND (AAAA + II -3) DOES NOT PRODUCE AN ADDRESS IN THE
057999,000074: # 9 NEXT BANK
058000,000075: # . SCALING IS SAME AS INTERNAL REGISTERS.
058001,000076:
058002,000077: # V72EIIE (SCATTER UPDATE) (II-1)/2 OCTAL COMPONENTS, XXXXX, ARE
058003,000078: # AAAAEXXXXXE LOADED INTO ERASABLE LOCATIONS, AAAA.
058004,000079: # AAAAEXXXXXE II IS .GE. 3 .AND. .LE. 19D, AND MUST BE ODD.
058005,000080: # . SCALING IS SAME AS INTERNAL REGISTERS.
058006,000081:
058007,000082: # V73EXXXXXEXXXXXE (OCTAL CLOCK INCREMENT) DOUBLE PRECISION OCTAL TIME
058008,000083: # INCREMENT XXXXX XXXXX, IS ADDED TO THE AGC CLOCK, IN
058009,000084: # CENTISECONDS SCALED AT (2)28.
058010,000085: # THIS LOAD IS THE OCTAL EQUIVALENT OF V55.
058011,000086:
058012,000087: # OUTPUT: IN ADDITION TO THE ABOVE REGISTER LOADS, ALL UPDATES
058013,000088: # COMPLEMENT BIT3 OF FLAGWORD7.
058014,000089:
058015,000090: # ADDITIONAL NOTES: VERB 71, JUST DEFINED ABOVE WILL BE USED TO PERFORM BUT NOT LIMITED TO THE FOLLOWING UPDATES --
058016,000091: # 1. CSM/LM STATE VECTOR UPDATE
058017,000092: # 2. REFSMMAT UPDATE
058018,000093:
058019,000094: # THE FOLLOWING COMMENTS DELINEATE EACH SPECIAL UPDATE----
058020,000095:
058021,000096: # 1. CSM/LM STATE VECTOR UPDATE (ALL DATA ENTRIES IN OCTAL)
058022,000097: # ENTRIES: DATA DEFINITION: SCALE FACTORS:
058023,000098: # V71E CONTIGUOUS BLOCK UPDATE VERB
058024,000099: # 21E NUMBER OF COMPONENTS FOR STATE VECTOR UPDATE
058025,000100: # AAAAE ECADR OF 'UPSVFLAG'
058026,000101: # XXXXXE STATE VECTOR IDENTIFIER: 00001 FOR CSM, 77776 FOR LEM - EARTH SPHERE OF INFLUENCE SCALING
058027,000102: # 00002 FOR CSM, 77775 FOR LEM - LUNAR SPHERE OF INFLUENCE SCALING
058028,000103: # XXXXXEXXXXXE X POSITION
058029,000104: # XXXXXEXXXXXE Y POSITION
058030,000105: # XXXXXEXXXXXE Z POSITION
058031,000106: # XXXXXEXXXXXE X VELOCITY
058032,000107: # XXXXXEXXXXXE Y VELOCITY
058033,000108: # XXXXXEXXXXXE Z VELOCITY
058034,000109: # XXXXXEXXXXXE TIME FROM AGC CLOCK ZERO
058035,000110: # V33E VERB 33 TO SIGNAL THAT THE STATE VECTOR IS READY TO BE STORED.
058036,000111:
058037,000112: # 2. REFSMMAT (ALL DATA ENTRIES IN OCTAL)
058038,000113: # ENTRIES: DATA DEFINITIONS: SCALE FACTORS:
Page 1380 |
058040,000115: # V71E CONTIGUOUS BLOCK UPDATE VERB
058041,000116: # 24E NUMBER OF COMPONENTS FOR REFSMMAT UPDATE
058042,000117: # AAAAE ECADR OF 'REFSMMAT'
058043,000118: # XXXXXEXXXXXE ROW 1 COLUMN 1 2(-1)
058044,000119: # XXXXXEXXXXXE ROW 1 COLUMN 2 2(-1)
058045,000120: # XXXXXEXXXXXE ROW 1 COLUMN 3 2(-1)
058046,000121: # XXXXXEXXXXXE ROW 2 COLUMN 1 2(-1)
058047,000122: # XXXXXEXXXXXE ROW 2 COLUMN 2 2(-1)
058048,000123: # XXXXXEXXXXXE ROW 2 COLUMN 3 2(-1)
058049,000124: # XXXXXEXXXXXE ROW 3 COLUMN 1 2(-1)
058050,000125: # XXXXXEXXXXXE ROW 3 COLUMN 2 2(-1)
058051,000126: # XXXXXEXXXXXE ROW 3 COLUMN 3 2(-1)
058052,000127: # V33E VERB 33 TO SIGNAL THAT REFSMMAT IS READY TO BE STORED.
058053,000128:
058054,000129: 07,3763 BANK 07
058055,000130: 43,2000 SETLOC EXTVERBS
058056,000131: 43,2000 BANK
058057,000132:
058058,000133: 43,3751 E3,1706 EBANK= TEPHEM
058059,000134:
058060,000135: 43,3751 COUNT* $$/P27
058061,000136: 43,3751 34755 V70UPDAT CAF UP70 # COMES HERE ON V70E
058062,000137: 43,3752 13760 TCF V73UPDAT +1
058063,000138:
058064,000139: 43,3753 34753 V71UPDAT CAF UP71 # COMES HERE ON V71E
058065,000140: 43,3754 13760 TCF V73UPDAT +1
058066,000141:
058067,000142: 43,3755 34752 V72UPDAT CAF UP72 # COMES HERE ON V72E
058068,000143: 43,3756 13760 TCF V73UPDAT +1
058069,000144:
058070,000145: 43,3757 36250 V73UPDAT CAF UP73 # COMES HERE ON V73E
058071,000146:
058072,000147: 43,3760 55165 +1 TS UPVERBSV # SAVE UPVERB UNTIL IT'S OK TO ENTER P27
058073,000148:
058074,000149: 43,3761 02076 TC TESTXACT # GRAB DISPLAY IF AVAILABLE, OTHERWISE
058075,000150: # TURN *OPERATOR ERROR* ON AND TERMINATEJOB
058076,000151:
058077,000152: 43,3762 31010 CA MODREG # CHECK IF UPDATE ALLOWED
058078,000153: 43,3763 00006 EXTEND # FIRST CHECK FOR MODREG = +0, -0
058079,000154: 43,3764 13767 BZF +3 # (+0 = P00, -0 = FRESHSTART)
058080,000155: 43,3765 04635 UPERROR TC POSTJUMP # TURN ON 'OPERATOR ERROR' LIGHT
058081,000156: 43,3766 11740 CADR UPERROUT +2 # GO TO COMMON UPDATE PROGRAM EXIT
058082,000157:
058083,000158: 43,3767 43,3765 CKMDMORE = UPERROR
058084,000159: 43,3767 55170 +3 TS UPOLDMOD # SET UPOLDMOD TO ZERO.
058085,000160: 43,3770 31165 CAE UPVERBSV # SET UPVERB TO INDICATE TO P27
Page 1381 |
058087,000162: 43,3771 55171 TS UPVERB # WHICH EXTENDED VERB CALLED IT.
058088,000163:
058089,000164: 43,3772 34753 CAF ONE
058090,000165: 43,3773 55172 TS UPCOUNT # INITIALIZE UPCOUNT TO 1
058091,000166:
058092,000167: 43,3774 04635 TC POSTJUMP # LEAVE EXTENDED VERB BANK AND
058093,000168: 43,3775 11357 CADR UPPART2 # GO TO UPDATE PROGRAM (P27) BANK.
058094,000169:
058095,000170: 43,3776 4755 UP70 EQUALS ZERO
058096,000171: 43,3776 4753 UP71 EQUALS ONE
058097,000172: 43,3776 4752 UP72 EQUALS TWO
058098,000173: 43,3776 6250 UP73 EQUALS THREE
058099,000174:
058100,000175: 04,3357 BANK 04
058101,000176: 04,2000 SETLOC UPDATE2
058102,000177: 04,2000 BANK
058103,000178:
058104,000179: 04,3357 COUNT* $$/P27
058105,000180:
058106,000181: 04,3357 UPPART2 EQUALS # UPDATE PROGRAM - PART 2
058107,000182:
058108,000183: 04,3357 05353 TC PHASCHNG # SET RESTART GROUP 6 TO RESTORE OLD MODE
058109,000184: 04,3360 07026 OCT 07026 # AND DOWNLIST AND EXIT IF RESTART OCCURS.
058110,000185: 04,3361 30000 OCT 30000 # PRIORITY SAME AS CHRPRIO
058111,000186: 04,3362 1173 EBANK= UPBUFF
058112,000187: 04,3362 03670 10102 2CADR UPOUT +1
058113,000188:
058114,000189: 04,3364 34753 CAF ONE
058115,000190: 04,3365 54333 TS DNLSTCOD # DOWNLIST
058116,000191:
058117,000192: 04,3366 05311 TC NEWMODEX # SET MAJOR MODE = 27
058118,000193: 04,3367 00033 DEC 27 B-14
058119,000194:
058120,000195: 04,3370 51171 INDEX UPVERB # BRANCH DEPENDING ON WHETHER THE UPDATE
058121,000196: 04,3371 13372 TCF +1 # VERB REQUIRES A FIXED OR VARIABLE NUMBER
058122,000197: 04,3372 13375 TCF +3 # V70 FIXED. (OF COMPONENTS.
058123,000198: 04,3373 13400 TCF OHWELL1 # V71 VARIABLE - GO GET NO. OF COMPONENTS
058124,000199: 04,3374 13400 TCF OHWELL1 # V72 VARIABLE - GO GET NO. OF COMPONENTS
058125,000200: 04,3375 34752 CA TWO # V73 (AND V70) FIXED
058126,000201: 04,3376 55167 TS COMPNUMB # SET NUMBER OF COMPONENTS TO 2.
058127,000202: 04,3377 13423 TCF OHWELL2 # GO GET THE TWO UPDATE COMPONENTS
058128,000203:
058129,000204: 04,3400 33473 OHWELL1 CAF ADUPBUFF # * REQUEST USER TO SEND NUMBER *
058130,000205: 04,3401 54156 TS MPAC +2 # * OF COMPONENTS PARAMETER(II). *
058131,000206: 04,3402 33474 +2 CAF UPLOADNV # (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058132,000207: 04,3403 04616 TC BANKCALL # DISPLAY A FLASHING V21N01
058133,000208: 04,3404 20334 CADR GOXDSPF # TO REQUEST II.
Page 1382 |
058135,000210: 04,3405 13670 TCF UPOUT4 # V34 TERMINATE UPDATE (P27) RETURN
058136,000211: 04,3406 13402 TCF OHWELL1 +2
058137,000212: 04,3407 03464 TC CK4V32 # DATA OR V32 RETURN
058138,000213: 04,3410 44752 CS BIT2
058139,000214: 04,3411 61173 AD UPBUFF # IS II (NUMBER OF COMPONENTS PARAMETER)
058140,000215: 04,3412 00006 EXTEND # .GE. 3 AND .LE. 20D.
058141,000216: 04,3413 63402 BZMF OHWELL1 +2
058142,000217: 04,3414 41173 CS UPBUFF
058143,000218: 04,3415 64362 AD UP21
058144,000219: 04,3416 00006 EXTEND
058145,000220: 04,3417 63402 BZMF OHWELL1 +2
058146,000221: 04,3420 31173 CAE UPBUFF
058147,000222: 04,3421 55167 TS COMPNUMB # SAVE II IN COMPNUMB
058148,000223:
058149,000224: # UPBUFF LOADING SEQUENCE
058150,000225:
058151,000226: 04,3422 25172 INCR UPCOUNT # INCREMENT COUNT OF COMPONENTS RECEIVED.
058152,000227: 04,3423 33640 OHWELL2 CAF ADUPBFM1 # CALCULATE LOCATION (ECADR) IN UPBUFF
058153,000228: 04,3424 61172 AD UPCOUNT # WHERE NEXT COMPONENT SHOULD BE STORED.
058154,000229: 04,3425 54156 +2 TS MPAC +2 # PLACE ECADR INTO R3.
058155,000230: 04,3426 33474 +3 CAF UPLOADNV # (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058156,000231: 04,3427 04616 TC BANKCALL # DISPLAY A FLASHING V21N01
058157,000232: 04,3430 20334 CADR GOXDSPF # TO REQUEST DATA.
058158,000233: 04,3431 13670 TCF UPOUT4 # V34 TERMINATE UPDATE (P27) RETURN.
058159,000234: 04,3432 13426 TCF OHWELL2 +3 # V33 PROCEED RETURN
058160,000235: 04,3433 03464 TC CK4V32 # DATA OR V32 RETURN
058161,000236: 04,3434 41172 CS UPCOUNT # HAVE WE FINISHED RECEIVING ALL
058162,000237: 04,3435 61167 AD COMPNUMB # THE DATA WE EXPECTED.
058163,000238: 04,3436 00006 EXTEND
058164,000239: 04,3437 63441 BZMF UPVERIFY # YES - GO TO VERIFICATION SEQUENCE
058165,000240: 04,3440 13422 TCF OHWELL2 -1 # NO - REQUEST ADDITIONAL DATA.
058166,000241:
058167,000242: # VERIFY SEQUENCE
058168,000243:
058169,000244: 04,3441 33472 UPVERIFY CAF ADUPTEMP # PLACE ECADR WHERE COMPONENT NO. INDEX
058170,000245: 04,3442 54156 TS MPAC +2 # IS TO BE STORED INTO R3.
058171,000246: 04,3443 33475 CAF UPVRFYNV # (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058172,000247: 04,3444 04616 TC BANKCALL # DISPLAY A FLASHING V21N02 TO REQUEST
058173,000248: 04,3445 20334 CADR GOXDSPF # DATA CORRECTION OR VERIFICATION.
058174,000249: 04,3446 13670 TCF UPOUT4 # V34 TERMINATE UPDATE (P27) RETURN
058175,000250: 04,3447 13476 TCF UPSTORE # V33 DATA SENT IS GOOD. GO STORE IT.
058176,000251: 04,3450 03464 TC CK4V32 # COMPONENT NO. INDEX OR V32 RETURN
058177,000252: 04,3451 31166 CA UPTEMP # DOES THE COMPONENT NO. INDEX JUST SENT
058178,000253: 04,3452 00006 EXTEND # SPECIFY A LEGAL COMPONENT NUMBER?
058179,000254: 04,3453 63441 BZMF UPVERIFY # NO, IT IS NOT POSITIVE NONZERO
058180,000255: 04,3454 41166 CS UPTEMP
058181,000256: 04,3455 61167 AD COMPNUMB
058182,000257: 04,3456 64753 AD BIT1
Page 1383 |
058184,000259: 04,3457 00006 EXTEND
058185,000260: 04,3460 63441 BZMF UPVERIFY # NO
058186,000261: 04,3461 33640 CAF ADUPBFM1 # YES - BASED ON THE COMPONENT NO. INDEX
058187,000262: 04,3462 61166 AD UPTEMP # CALCULATE THE ECADR OF LOCATION IN
058188,000263: 04,3463 13425 TCF OHWELL2 +2 # UPBUFF WHICH USER WANTS TO CHANGE.
058189,000264:
058190,000265: 04,3464 04,3670 UPOUT4 EQUALS UPOUT +1 # COMES HERE ON V34 TO TERMINATE UPDATE
058191,000266:
058192,000267: # CHECK FOR VERB 32 SEQUENCE
058193,000268:
058194,000269: 04,3464 40154 CK4V32 CS MPAC # ON DATA RETURN FROM 'GOXDSPF'
058195,000270: 04,3465 74746 MASK BIT6 # ON DATA RETURN FROM "GOXDSP" & THE CON-
058196,000271: 04,3466 10000 CCS A # TENTS OF MPAC = VERB. SO TEST FOR V32.
058197,000272: 04,3467 00002 TC Q # IT'S NOT A V32, IT'S DATA. PROCEED.
058198,000273: 04,3470 50002 INDEX Q
058199,000274: 04,3471 77771 TC 0 -6 # V32 ENCOUNTERED - GO BACK AND GET DATA
058200,000275:
058201,000276: 04,3472 01166 ADUPTEMP ADRES UPTEMP # ADDRESS OF TEMP STORAGE FOR CORRECTIONS
058202,000277: 04,3473 01173 ADUPBUFF ADRES UPBUFF # ADDRESS OF UPDATE DATA STORAGE BUFFER
058203,000278: 04,3474 05201 UPLOADNV VN 2101 # VERB 21 NOUN 01
058204,000279: 04,3475 05202 UPVRFYNV VN 2102 # VERB 21 NOUN 02
058205,000280: 04,3476 4362 UP21 = MD1 # DEC 21 = MAX NO OF COMPONENTS +1
058206,000281: 04,3476 4756 UPDTPHAS EQUALS FIVE
058207,000282:
058208,000283: # PRE-STORE AND FAN TO APPROPRIATE BRANCH SEQUENCE
058209,000284:
058210,000285: 04,3476 UPSTORE EQUALS # GROUND HAS VERIFIED UPDATE. STORE DATA.
058211,000286:
058212,000287: 04,3476 00004 INHINT
058213,000288:
058214,000289: 04,3477 30103 CAE FLAGWRD7 # INVERT VERIFLAG (BIT 3 OF FLAGWRD7) TO
058215,000290: 04,3500 56001 XCH L # INDICATE TO THE GROUND (VIA DOWNLINK)
058216,000291: 04,3501 34751 CAF VERIFBIT # THAT THE V33 (WHICH THE GROUND SENT TO
058217,000292: 04,3502 00006 EXTEND # VERIFY THE UPDATE) HAS BEEN SUCCESSFULLY
058218,000293: 04,3503 06001 RXOR LCHAN # RECEIVED BY THE UPDATE PROGRAM
058219,000294: 04,3504 54103 TS FLAGWRD7
058220,000295:
058221,000296: 04,3505 05353 TC PHASCHNG # SET RESTART GROUP 6 TO REDO THE UPDATE
058222,000297: 04,3506 04026 OCT 04026 # DATA STORE IF A RESTART OCCURS.
058223,000298: 04,3507 00004 INHINT # (BECAUSE PHASCHNG DID A RELINT)
058224,000299:
058225,000300: 04,3510 44752 CS TWO # GO TO UPFNDVAC IF INSTALL IS REQUIRED,
058226,000301: 04,3511 61171 AD UPVERB # THAT IS, IF IT'S A V70 - V72.
058227,000302: 04,3512 00006 EXTEND # GO TO UPEND73 IF IT'S A V73.
058228,000303: 04,3513 63522 BZMF UPFNDVAC
058229,000304:
058230,000305: # VERB 73 BRANCH
058231,000306:
058232,000307: 04,3514 00006 UPEND73 EXTEND # V73 - PERFORM DP OCTAL AGC CLOCK INCREMENT
Page 1384 |
058234,000309: 04,3515 31174 DCA UPBUFF
058235,000310: 04,3516 53204 DXCH UPBUFF +8D
058236,000311: 04,3517 03545 TC TIMEDIDL
058237,000312: 04,3520 04364 TC FALTON # ERROR - TURN ON *OPERATOR ERROR* LIGHT
058238,000313: 04,3521 03670 TC UPOUT +1 # GO TO COMMON UPDATE PROGRAM EXIT
058239,000314:
058240,000315: 04,3522 34355 UPFNDVAC CAF CHRPRIO # (USE EXTENDED VERB PRIORITY)
058241,000316: 04,3523 05105 TC FINDVAC # GET VAC AREA FOR 'CALL INTSTALL'
058242,000317: 04,3524 E3,1706 EBANK= TEPHEM
058243,000318: 04,3524 03527 10103 2CADR UPJOB # (NOTE: THIS WILL ALSO SET EBANK FOR
058244,000319: 04,3526 05155 TC ENDOFJOB # 'TEPHEM' UPDATE BY V70)
058245,000320:
058246,000321: 04,3527 06042 UPJOB TC INTPRET # THIS COULD BE A STATE VECTOR UPDATE -- SO
058247,000322: 04,3530 77624 CALL # WAIT (PUT JOB TO SLEEP) IF ORBIT INT(OI)
058248,000323: 04,3531 27410 INTSTALL # IS IN PROGRESS -- OR -- GRAB OI AND RETURN
058249,000324: # TO UPWAKE IF OI IS NOT IN PROGRESS.
058250,000325:
058251,000326: 04,3532 77776 UPWAKE EXIT
058252,000327:
058253,000328: 04,3533 05353 TC PHASCHNG # RESTART PROTECT (GROUP 6)
058254,000329: 04,3534 04026 OCT 04026
058255,000330:
058256,000331: 04,3535 05504 TC UPFLAG # SET INTEGRATION RESTART BIT
058257,000332: 04,3536 00236 ADRES REINTFLG
058258,000333: 04,3537 00004 INHINT
058259,000334: 04,3540 UPPART3 EQUALS
058260,000335:
058261,000336: 04,3540 51171 INDEX UPVERB # BRANCH TO THE APPROPRIATE UPDATE VERB
058262,000337: 04,3541 13542 TCF +1 # ROUTINE TO ACTUALLY PERFORM THE UPDATE
058263,000338: 04,3542 13701 TCF UPEND70 # V70
058264,000339: 04,3543 13610 TCF UPEND71 # V71
058265,000340: 04,3544 13642 TCF UPEND72 # V72
058266,000341:
058267,000342: # ROUTINE TO INCREMENT CLOCK (TIME2,TIME1) WITH CONTENTS OF DP WORD AT UPBUFF.
058268,000343:
058269,000344: 04,3545 00006 TIMEDIDL EXTEND
058270,000345: 04,3546 23166 QXCH UPTEMP # SAVE Q FOR RETURN
058271,000346: 04,3547 34755 CAF ZERO # ZERO AND SAVE TIME2,TIME1
058272,000347: 04,3550 22007 ZL
058273,000348: 04,3551 52025 DXCH TIME2
058274,000349: 04,3552 53216 DXCH UPBUFF +18D # STORE IN CASE OF OVERFLOW
058275,000350:
058276,000351: 04,3553 34756 CAF UPDTPHAS # DO
058277,000352: 04,3554 54001 TS L # A
058278,000353: 04,3555 40000 COM # QUICK
058279,000354: 04,3556 52764 DXCH -PHASE6 # PHASCHNG
058280,000355:
058281,000356: 04,3557 00004 TIMEDIDR INHINT
Page 1385 |
058283,000358: 04,3560 34755 CAF ZERO
058284,000359: 04,3561 22007 ZL # PICK UP INCREMENTER(AND ZERO
058285,000360: 04,3562 54156 TS MPAC +2 # IT IN CASE OF RESTARTS) AND
058286,000361: 04,3563 53204 DXCH UPBUFF +8D # STORE IT
058287,000362: 04,3564 52155 DXCH MPAC # INTO MPAC FOR TPAGREE.
058288,000363:
058289,000364: 04,3565 00006 EXTEND
058290,000365: 04,3566 31216 DCA UPBUFF +18D
058291,000366: 04,3567 20155 DAS MPAC # FORM SUM IN MPAC
058292,000367: 04,3570 00006 EXTEND
058293,000368: 04,3571 13600 BZF DELTATOK # TEST FOR OVERFLOW
058294,000369: 04,3572 34755 CAF ZERO
058295,000370: 04,3573 53216 DXCH UPBUFF +18D # OVERFLOW, RESTORE OLD VALUE OF CLOCK
058296,000371: 04,3574 20025 DAS TIME2 # AND TURN ON OPERATOR ERROR
058297,000372:
058298,000373: 04,3575 05353 TC PHASCHNG # RESTART PROTECT (GROUP 6)
058299,000374: 04,3576 04026 OCT 04026
058300,000375:
058301,000376: 04,3577 01166 TC UPTEMP # GO TO ERROR EXIT
058302,000377:
058303,000378: 04,3600 07262 DELTATOK TC TPAGREE # FORCE SIGN AGREEMENT
058304,000379: 04,3601 52155 DXCH MPAC
058305,000380: 04,3602 20025 DAS TIME2 # INCREMENT TIME2,TIME1
058306,000381:
058307,000382: 04,3603 05353 TC PHASCHNG # RESTART PROTECT (GROUP 6)
058308,000383: 04,3604 04026 OCT 04026
058309,000384:
058310,000385: 04,3605 00004 INHINT
058311,000386: 04,3606 51166 INDEX UPTEMP # (CODED THIS WAY FOR RESTART PROTECTION)
058312,000387: 04,3607 00001 TC 1 # NORMAL RETURN
058313,000388:
058314,000389: # VERB 71 BRANCH
058315,000390:
058316,000391: 04,3610 31174 UPEND71 CAE UPBUFF +1 # SET EBANK
058317,000392: 04,3611 54003 TS EBANK # AND
058318,000393: 04,3612 74357 MASK LOW8 # CALCULATE
058319,000394: 04,3613 55166 TS UPTEMP # S-REG VALUE OF RECEIVING AREA
058320,000395:
058321,000396: 04,3614 67750 AD NEG3 # IN THE PROCESS OF
058322,000397: 04,3615 61167 AD COMPNUMB # PERFORMING
058323,000398: 04,3616 00006 EXTEND # THIS UPDATE
058324,000399: 04,3617 13625 BZF STORLP71 # WILL WE
058325,000400: 04,3620 74743 MASK BIT9 # OVERFLOW
058326,000401: 04,3621 10000 CCS A # INTO THE NEXT EBANK....
058327,000402: 04,3622 13736 TCF UPERROUT # YES
058328,000403:
058329,000404: 04,3623 37750 CA NEG3 # NO - CALCULATE NUMBER OF
058330,000405: 04,3624 61167 AD COMPNUMB # WORDS TO BE STORED MINUS ONE
058331,000406: 04,3625 54154 STORLP71 TS MPAC # SAVE NO. OF WORDS REMAINING MINUS ONE
058332,000407: 04,3626 50000 INDEX A # TAKE NEXT UPDATE WORD FROM
058333,000408: 04,3627 31175 CA UPBUFF +2 # UPBUFF AND
Page 1386 |
058335,000410: 04,3630 54001 TS L # SAVE IT IN L
058336,000411: 04,3631 30154 CA MPAC # CALCULATE NEXT
058337,000412: 04,3632 61166 AD UPTEMP # RECEIVING ADDRESS
058338,000413: 04,3633 50000 INDEX A
058339,000414: 04,3634 E3,1400 EBANK= 1400
058340,000415: 04,3634 23400 LXCH 1400 # UPDATE THE REGISTER BY CONTENTS OF L
058341,000416: 04,3635 E3,1706 EBANK= TEPHEM
058342,000417: 04,3635 10154 CCS MPAC # ARE THERE ANY WORDS LEFT TO BE STORED
058343,000418: 04,3636 13625 TCF STORLP71 # YES
058344,000419: 04,3637 13667 TCF UPOUT # NO - THEN EXIT UPDATE PROGRAM
058345,000420: 04,3640 01172 ADUPBFM1 ADRES UPBUFF -1 # SAME AS ADUPBUFF BUT LESS 1 (DON'T MOVE)
058346,000421: 04,3641 13667 TCF UPOUT # NO - EXIT UPDATE (HERE WHEN COMPNUMB = 3)
058347,000422:
058348,000423: # VERB 72 BRANCH
058349,000424:
058350,000425: 04,3642 34753 UPEND72 CAF BIT1 # HAVE AN ODD NO. OF COMPONENTS
058351,000426: 04,3643 71167 MASK COMPNUMB # BEEN SENT FOR A V72 UPDATE ...
058352,000427: 04,3644 10000 CCS A
058353,000428: 04,3645 13647 TCF +2 # YES
058354,000429: 04,3646 13736 TCF UPERROUT # ERROR - SHOULD BE ODD NO. OF COMPONENTS
058355,000430: 04,3647 44752 CS BIT2
058356,000431: 04,3650 61167 AD COMPNUMB
058357,000432: 04,3651 54154 LDLOOP72 TS MPAC # NOW PERFORM THE UPDATE
058358,000433: 04,3652 50000 INDEX A
058359,000434: 04,3653 31174 CAE UPBUFF +1 # PICK UP NEXT UPDATE WORD
058360,000435: 04,3654 22000 LXCH A
058361,000436: 04,3655 10154 CCS MPAC # SET POINTER TO ECADR (MUST BE CCS)
058362,000437: 04,3656 54154 TS MPAC
058363,000438: 04,3657 50000 INDEX A
058364,000439: 04,3660 31174 CAE UPBUFF +1 # PICK UP NEXT ECADR OF REG TO BE UPDATED
058365,000440: 04,3661 54003 TS EBANK # SET EBANK
058366,000441: 04,3662 74357 MASK LOW8 # ISOLATE RELATIVE ADDRESS
058367,000442: 04,3663 50000 INDEX A
058368,000443: 04,3664 E3,1400 EBANK= 1400
058369,000444: 04,3664 23400 LXCH 1400 # UPDATE THE REGISTER BY CONTENTS OF L
058370,000445: 04,3665 E3,1706 EBANK= TEPHEM
058371,000446: 04,3665 10154 CCS MPAC # ARE WE THROUGH THE V72 UPDATE...
058372,000447: 04,3666 13651 TCF LDLOOP72 # NO
058373,000448:
058374,000449: # NORMAL FINISH OF P27
058375,000450:
058376,000451: 04,3667 UPOUT EQUALS
058377,000452: 04,3667 03131 TC INTWAKEU # RELEASE GRAB OF ORBITAL INTEGRATION
058378,000453: 04,3670 31170 +1 CAE UPOLDMOD # RESTORE PRIOR P27 MODE
058379,000454: 04,3671 05314 TC NEWMODEX +3
058380,000455: 04,3672 34755 CAF ZERO
058381,000456: 04,3673 54333 TS DNLSTCOD
058382,000457: 04,3674 03743 TC UPACTOFF # TURN OFF 'UPLINK ACTIVITY' LIGHT
Page 1387 |
058384,000459: 04,3675 00006 EXTEND # KILL GROUP 6.
058385,000460: 04,3676 34755 DCA NEG0
058386,000461: 04,3677 52764 DXCH -PHASE6
058387,000462:
058388,000463: 04,3700 05472 TC ENDEXT # EXTENDED VERB EXIT
058389,000464:
058390,000465: # VERB 70 BRANCH
058391,000466:
058392,000467: 04,3701 00006 UPEND70 EXTEND # V70 DOES THE FOLLOWING WITH DP DELTA
058393,000468: 04,3702 41174 DCS UPBUFF # TIME IN UPBUFF
058394,000469: 04,3703 53204 DXCH UPBUFF +8D
058395,000470: 04,3704 03545 TC TIMEDIDL # DECREMENT AGC CLOCK
058396,000471:
058397,000472: 04,3705 03736 TC UPERROUT # ERROR WHILE DECREMENTING CLOCK -- EXIT
058398,000473:
058399,000474: 04,3706 E3,1706 EBANK= TEPHEM
058400,000475: 04,3706 00006 EXTEND
058401,000476: 04,3707 41174 DCS UPBUFF # COPY DECREMENTERS FOR
058402,000477: 04,3710 53206 DXCH UPBUFF +10D # RESTART PROTECTION
058403,000478: 04,3711 00006 EXTEND
058404,000479: 04,3712 41174 DCS UPBUFF
058405,000480: 04,3713 53210 DXCH UPBUFF +12D
058406,000481:
058407,000482: 04,3714 05353 TC PHASCHNG # RESTART PROTECT (GROUP 6)
058408,000483: 04,3715 04026 OCT 04026
058409,000484:
058410,000485: 04,3716 34755 CAF ZERO
058411,000486: 04,3717 22007 ZL
058412,000487: 04,3720 53206 DXCH UPBUFF +10D # DECREMENT CSM STATE VECTOR TIME
058413,000488: 04,3721 21571 DAS TETCSM
058414,000489:
058415,000490: 04,3722 34755 CAF ZERO
058416,000491: 04,3723 22007 ZL
058417,000492: 04,3724 53210 DXCH UPBUFF +12D # DECREMENT LEM STATE VECTOR TIME
058418,000493: 04,3725 21643 DAS TETLEM
058419,000494:
058420,000495: 04,3726 34755 CAF ZERO
058421,000496: 04,3727 22007 ZL
058422,000497: 04,3730 53174 DXCH UPBUFF
058423,000498: 04,3731 21710 DAS TEPHEM +1 # INCREMENT TP TEPHEM
058424,000499: 04,3732 27706 ADS TEPHEM
058425,000500:
058426,000501: 04,3733 05353 TC PHASCHNG # RESTART PROTECT (GROUP 6)
058427,000502: 04,3734 04026 OCT 04026
058428,000503:
058429,000504: 04,3735 1173 EBANK= UPBUFF
058430,000505:
058431,000506: 04,3735 03667 TC UPOUT # GO TO STANDARD UPDATE PROGRAM EXIT
058432,000507:
Page 1388 |
058434,000509: # ERROR SEQUENCE
058435,000510:
058436,000511: 04,3736 04364 UPERROUT TC FALTON # TURN ON *OPERATOR ERROR* LIGHT
058437,000512: 04,3737 13667 TCF UPOUT # GO TO COMMON UPDATE PROGRAM EXIT
058438,000513:
058439,000514: 04,3740 04364 +2 TC FALTON # TURN ON 'OPERATOR ERROR' LIGHT
058440,000515: 04,3741 03743 TC UPACTOFF # TURN OFF 'UPLINK ACTIVITY' LIGHT
058441,000516: 04,3742 05472 TC ENDEXT # EXTENDED VERB EXIT
058442,000517: # (THE PURPOSE OF UPERROUT +2 EXIT IS
058443,000518: # TO PROVIDE AN ERROR EXIT WHICH DOES NOT
058444,000519: # RESET ANY RESTART GROUPS)
058445,000520:
058446,000521: # :UPACTOFF: IS A ROUTINE TO TURN OFF UPLINK ACTIVITY LIGHT ON ALL EXITS FROM UPDATE PROGRAM (P27).
058447,000522:
058448,000523: 04,3743 44751 UPACTOFF CS BIT3
058449,000524: 04,3744 00006 EXTEND # TURN OFF UPLINK ACTIVITY LIGHT
058450,000525: 04,3745 03011 WAND DSALMOUT # (BIT 3 OF CHANNEL 11)
058451,000526: 04,3746 00002 TC Q
058452,000527:
End of include-file UPDATE_PROGRAM.agc. Parent file is MAIN.agc