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, 1969Note 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. |
058106,000002: ## Copyright: Public domain.
058107,000003: ## Filename: UPDATE_PROGRAM.agc
058108,000004: ## Purpose: A section of Luminary 1C, revision 131.
058109,000005: ## It is part of the source code for the Lunar Module's (LM)
058110,000006: ## Apollo Guidance Computer (AGC) for Apollo 13.
058111,000007: ## This file is intended to be a faithful transcription, except
058112,000008: ## that the code format has been changed to conform to the
058113,000009: ## requirements of the yaYUL assembler rather than the
058114,000010: ## original YUL assembler.
058115,000011: ## Reference: pp. 1378-1388
058116,000012: ## Contact: Ron Burkey <info@sandroid.org>.
058117,000013: ## Website: www.ibiblio.org/apollo/index.html
058118,000014: ## Mod history: 06/07/03 RSB. Began transcribing.
058119,000015: ## 05/14/05 RSB Corrected website reference above.
058120,000016: ## 2010-10-25 JL Indentation fixes.
058121,000017: ## 2011-05-07 JL Flagged SBANK= workaround for future removal.
058122,000018: ## 2017-01-06 RSB Page numbers now agree with those on the
058123,000019: ## original hardcopy, as opposed to the PDF page
058124,000020: ## numbers in 1701.pdf.
058125,000021: ## 2017-01-28 RSB Comment-text fixes identified for Luminary 69.
058126,000022: ## 2017-02-09 RSB Comment-text fixes identified for Artemis 72.
058127,000023: ## 2017-02-28 RSB Proofed comment text using octopus/ProoferComments.
058128,000024: ## 2017-03-13 RSB Comment-text fixes noted in proofing Luminary 116.
058129,000025: ## 2017-03-16 RSB Comment-text fixes identified in 5-way
058130,000026: ## side-by-side diff of Luminary 69/99/116/131/210.
058131,000027: ## 2017-06-17 MAS Globally removed all SBANK= workarounds.
058132,000028: ## 2021-05-30 ABS DELTAOK -> DELTATOK
058133,000029:
Page 1378 |
058135,000031: # PROGRAM NAME: P27
058136,000032: # WRITTEN BY: KILROY/ DE WOLF
058137,000033:
058138,000034: # MOD NO: 6
058139,000035: # MOD BY: KILROY
058140,000036: # DATE: 01DEC67
058141,000037:
058142,000038: # LOG SECTION: UPDATE PROGRAM.
058143,000039:
058144,000040: # FUNCT. DESCR: P27 (THE UPDATE PROGRAM) PROCESSES COMMANDS AND DATA
058145,000041: # INSERTIONS REQUESTED BY THE GROUND VIA UPLINK.
058146,000042: # THE P27 PROGRAM WILL ACCEPT UPDATES
058147,000043: # ONLY DURING P00 FOR THE LM, AND ONLY DURING P00,
058148,000044: # P02, AND FRESH START FOR THE CSM
058149,000045:
058150,000046: # CALLING SEQ: PROGRAM IS INITIATED BY UPLINK ENTRY OF VERBS 70, 71, 72 AND 73.
058151,000047:
058152,000048: # SUBROUTINES: TESTXACT, NEWMODEX, NEWMODEX +3, GOXDSPF, BANKCALL, FINDVAC, INTPRET, INTSTALL, TPAGREE,
058153,000049: # INTWAKEU, ENDEXT, POSTJUMP, FALTON, NEWPHASE, PHASCHNG
058154,000050:
058155,000051: # NORMAL EXIT: TC ENDEXT
058156,000052:
058157,000053: # ALARM/ABORT: TC FALTON FOLLOWED BY TC ENDEXT
058158,000054:
058159,000055: # RESTARTS: P27 IS RESTART PROTECTED IN TWO WAYS ...
058160,000056: # 1. PRIOR TO VERIFLAG INVERSION (WHICH IS CAUSED BY THE GROUND/ASTRONAUT'S VERIFICATION OF UPDATE
058161,000057: # DATA BY SENDING A V33E WHEN V21N02 IS FLASHING)---
058162,000058: # NO PROTECTION EXCEPT PRE-P27 MODE IS RESTORED, COAST + ALIGN DOWNLIST IS SELECTED AND UPLINK
058163,000059: # ACTIVITY LIGHT IS TURNED OFF. (JUST AS IF A V34E WAS SENT DURING P27 DATA LOADS).
058164,000060: # V70,V71,V72 OR V73 WILL HAVE TO BE COMPLETELY RESENT BY USER.
058165,000061: # 2. AFTER VERIFLAG INVERSION (WHEN UPDATE OF THE SPECIFIED ERASABLES IS BEING PERFORMED)---
058166,000062: # PROTECTED AGAINST RESTARTS.
058167,000063:
058168,000064: # DEBRIS: UPBUFF (20D) TEMP STORAGE FOR ADDRESSES AND CONTENTS.
058169,000065: # UPVERB (1) VERB NUMBER MINUS 70D (E.G. FOR V72, UPVERB = 72D - 70D = 2)
058170,000066: # UPOLDMOD(1) FOR MAJOR MODE INTERRUPTED BY P27.
058171,000067: # COMPNUMB(1) TOTAL NUMBER OF COMPONENTS TO BE TRANSMITTED.
058172,000068: # UPCOUNT (1) ACTUAL NUMBER OF COMPONENTS RECEIVED.
058173,000069: # UPTEMP (1) SCRATCH, BUT USUALLY CONTAINS COMPONENT NUMBER TO BE CHANGED DURING VERIFY CYCLE
058174,000070:
058175,000071: # INPUT:
058176,000072:
058177,000073: # ENTRY: DESCRIPTION
058178,000074: # V70EXXXXXEXXXXXE (LIFTOFF TIME INCREMENT) DOUBLE PRECISION OCTAL TIME INCREMENT, XXXXX XXXXX,
058179,000075: # IS ADDED TO TEPHEM, SUBTRACTED FROM AGC CLOCK(TIME2,TIME1), SUBTRACTED FROM CSM STATE
058180,000076: # VECTOR TIME(TETCSM) AND SUBTRACTED FROM LEM STATE VECTOR TIME(TETLEM).
058181,000077: # THE DP OCTAL TIME INCREMENT IS SCALED AT 2(28).
Page 1379 |
058183,000079: # V71EIIEAAAAE (CONTIGUOUS BLOCK UPDATE) II-2 OCTAL COMPONENTS, XXXXX,
058184,000080: # XXXXXE ARE LOADED INTO ERASABLE STARTING AT ECADR, AAAA.
058185,000081: # XXXXXE IT IS .GE. 3 .AND. .LE. 20D.,
058186,000082: # AND (AAAA + II -3) DOES NOT PRODUCE AN ADDRESS IN THE
058187,000083: # 9 NEXT BANK
058188,000084: # . SCALING IS SAME AS INTERNAL REGISTERS.
058189,000085:
058190,000086: # V72EIIE (SCATTER UPDATE) (II-1)/2 OCTAL COMPONENTS, XXXXX, ARE
058191,000087: # AAAAEXXXXXE LOADED INTO ERASABLE LOCATIONS, AAAA.
058192,000088: # AAAAEXXXXXE II IS .GE. 3 .AND. .LE. 19D, AND MUST BE ODD.
058193,000089: # . SCALING IS SAME AS INTERNAL REGISTERS.
058194,000090:
058195,000091: # V73EXXXXXEXXXXXE (OCTAL CLOCK INCREMENT) DOUBLE PRECISION OCTAL TIME
058196,000092: # INCREMENT XXXXX XXXXX, IS ADDED TO THE AGC CLOCK, IN
058197,000093: # CENTISECONDS SCALED AT (2)28.
058198,000094: # THIS LOAD IS THE OCTAL EQUIVALENT OF V55.
058199,000095:
058200,000096: # OUTPUT: IN ADDITION TO THE ABOVE REGISTER LOADS, ALL UPDATES
058201,000097: # COMPLEMENT BIT3 OF FLAGWORD7.
058202,000098:
058203,000099: # ADDITIONAL NOTES: VERB 71, JUST DEFINED ABOVE WILL BE USED TO PERFORM BUT NOT LIMITED TO THE FOLLOWING UPDATES --
058204,000100: # 1. CSM/LM STATE VECTOR UPDATE
058205,000101: # 2. REFSMMAT UPDATE
058206,000102:
058207,000103: # THE FOLLOWING COMMENTS DELINEATE EACH SPECIAL UPDATE----
058208,000104:
058209,000105: # 1. CSM/LM STATE VECTOR UPDATE (ALL DATA ENTRIES IN OCTAL)
058210,000106: # ENTRIES: DATA DEFINITION: SCALE FACTORS:
058211,000107: # V71E CONTIGUOUS BLOCK UPDATE VERB
058212,000108: # 21E NUMBER OF COMPONENTS FOR STATE VECTOR UPDATE
058213,000109: # AAAAE ECADR OF 'UPSVFLAG'
058214,000110: # XXXXXE STATE VECTOR IDENTIFIER: 00001 FOR CSM, 77776 FOR LEM - EARTH SPHERE OF INFLUENCE SCALING
058215,000111: # 00002 FOR CSM, 77775 FOR LEM - LUNAR SPHERE OF INFLUENCE SCALING
058216,000112: # XXXXXEXXXXXE X POSITION
058217,000113: # XXXXXEXXXXXE Y POSITION
058218,000114: # XXXXXEXXXXXE Z POSITION
058219,000115: # XXXXXEXXXXXE X VELOCITY
058220,000116: # XXXXXEXXXXXE Y VELOCITY
058221,000117: # XXXXXEXXXXXE Z VELOCITY
058222,000118: # XXXXXEXXXXXE TIME FROM AGC CLOCK ZERO
058223,000119: # V33E VERB 33 TO SIGNAL THAT THE STATE VECTOR IS READY TO BE STORED.
058224,000120:
058225,000121: # 2. REFSMMAT (ALL DATA ENTRIES IN OCTAL)
058226,000122: # ENTRIES: DATA DEFINITIONS: SCALE FACTORS:
Page 1380 |
058228,000124: # V71E CONTIGUOUS BLOCK UPDATE VERB
058229,000125: # 24E NUMBER OF COMPONENTS FOR REFSMMAT UPDATE
058230,000126: # AAAAE ECADR OF 'REFSMMAT'
058231,000127: # XXXXXEXXXXXE ROW 1 COLUMN 1 2(-1)
058232,000128: # XXXXXEXXXXXE ROW 1 COLUMN 2 2(-1)
058233,000129: # XXXXXEXXXXXE ROW 1 COLUMN 3 2(-1)
058234,000130: # XXXXXEXXXXXE ROW 2 COLUMN 1 2(-1)
058235,000131: # XXXXXEXXXXXE ROW 2 COLUMN 2 2(-1)
058236,000132: # XXXXXEXXXXXE ROW 2 COLUMN 3 2(-1)
058237,000133: # XXXXXEXXXXXE ROW 3 COLUMN 1 2(-1)
058238,000134: # XXXXXEXXXXXE ROW 3 COLUMN 2 2(-1)
058239,000135: # XXXXXEXXXXXE ROW 3 COLUMN 3 2(-1)
058240,000136: # V33E VERB 33 TO SIGNAL THAT REFSMMAT IS READY TO BE STORED.
058241,000137:
058242,000138: 07,3763 BANK 07
058243,000139: 43,2000 SETLOC EXTVERBS
058244,000140: 43,2000 BANK
058245,000141:
058246,000142: 43,3751 E3,1706 EBANK= TEPHEM
058247,000143:
058248,000144: 43,3751 COUNT* $$/P27
058249,000145: 43,3751 34755 V70UPDAT CAF UP70 # COMES HERE ON V70E
058250,000146: 43,3752 13760 TCF V73UPDAT +1
058251,000147:
058252,000148: 43,3753 34753 V71UPDAT CAF UP71 # COMES HERE ON V71E
058253,000149: 43,3754 13760 TCF V73UPDAT +1
058254,000150:
058255,000151: 43,3755 34752 V72UPDAT CAF UP72 # COMES HERE ON V72E
058256,000152: 43,3756 13760 TCF V73UPDAT +1
058257,000153:
058258,000154: 43,3757 36250 V73UPDAT CAF UP73 # COMES HERE ON V73E
058259,000155:
058260,000156: 43,3760 55165 +1 TS UPVERBSV # SAVE UPVERB UNTIL IT'S OK TO ENTER P27
058261,000157:
058262,000158: 43,3761 02076 TC TESTXACT # GRAB DISPLAY IF AVAILABLE, OTHERWISE
058263,000159: # TURN *OPERATOR ERROR* ON AND TERMINATEJOB
058264,000160:
058265,000161: 43,3762 31010 CA MODREG # CHECK IF UPDATE ALLOWED
058266,000162: 43,3763 00006 EXTEND # FIRST CHECK FOR MODREG = +0, -0
058267,000163: 43,3764 13767 BZF +3 # (+0 = P00, -0 = FRESHSTART)
058268,000164: 43,3765 04635 UPERROR TC POSTJUMP # TURN ON 'OPERATOR ERROR' LIGHT
058269,000165: 43,3766 11740 CADR UPERROUT +2 # GO TO COMMON UPDATE PROGRAM EXIT
058270,000166:
058271,000167: 43,3767 43,3765 CKMDMORE = UPERROR
058272,000168: 43,3767 55170 +3 TS UPOLDMOD # SET UPOLDMOD TO ZERO.
058273,000169: 43,3770 31165 CAE UPVERBSV # SET UPVERB TO INDICATE TO P27
Page 1381 |
058275,000171: 43,3771 55171 TS UPVERB # WHICH EXTENDED VERB CALLED IT.
058276,000172:
058277,000173: 43,3772 34753 CAF ONE
058278,000174: 43,3773 55172 TS UPCOUNT # INITIALIZE UPCOUNT TO 1
058279,000175:
058280,000176: 43,3774 04635 TC POSTJUMP # LEAVE EXTENDED VERB BANK AND
058281,000177: 43,3775 11357 CADR UPPART2 # GO TO UPDATE PROGRAM (P27) BANK.
058282,000178:
058283,000179: 43,3776 4755 UP70 EQUALS ZERO
058284,000180: 43,3776 4753 UP71 EQUALS ONE
058285,000181: 43,3776 4752 UP72 EQUALS TWO
058286,000182: 43,3776 6250 UP73 EQUALS THREE
058287,000183:
058288,000184: 04,3357 BANK 04
058289,000185: 04,2000 SETLOC UPDATE2
058290,000186: 04,2000 BANK
058291,000187:
058292,000188: 04,3357 COUNT* $$/P27
058293,000189:
058294,000190: 04,3357 UPPART2 EQUALS # UPDATE PROGRAM - PART 2
058295,000191:
058296,000192: 04,3357 05353 TC PHASCHNG # SET RESTART GROUP 6 TO RESTORE OLD MODE
058297,000193: 04,3360 07026 OCT 07026 # AND DOWNLIST AND EXIT IF RESTART OCCURS.
058298,000194: 04,3361 30000 OCT 30000 # PRIORITY SAME AS CHRPRIO
058299,000195: 04,3362 1173 EBANK= UPBUFF
058300,000196: 04,3362 03670 10102 2CADR UPOUT +1
058301,000197:
058302,000198: 04,3364 34753 CAF ONE
058303,000199: 04,3365 54333 TS DNLSTCOD # DOWNLIST
058304,000200:
058305,000201: 04,3366 05311 TC NEWMODEX # SET MAJOR MODE = 27
058306,000202: 04,3367 00033 DEC 27 B-14
058307,000203:
058308,000204: 04,3370 51171 INDEX UPVERB # BRANCH DEPENDING ON WHETHER THE UPDATE
058309,000205: 04,3371 13372 TCF +1 # VERB REQUIRES A FIXED OR VARIABLE NUMBER
058310,000206: 04,3372 13375 TCF +3 # V70 FIXED. (OF COMPONENTS.
058311,000207: 04,3373 13400 TCF OHWELL1 # V71 VARIABLE - GO GET NO. OF COMPONENTS
058312,000208: 04,3374 13400 TCF OHWELL1 # V72 VARIABLE - GO GET NO. OF COMPONENTS
058313,000209: 04,3375 34752 CA TWO # V73 (AND V70) FIXED
058314,000210: 04,3376 55167 TS COMPNUMB # SET NUMBER OF COMPONENTS TO 2.
058315,000211: 04,3377 13423 TCF OHWELL2 # GO GET THE TWO UPDATE COMPONENTS
058316,000212:
058317,000213: 04,3400 33473 OHWELL1 CAF ADUPBUFF # * REQUEST USER TO SEND NUMBER *
058318,000214: 04,3401 54156 TS MPAC +2 # * OF COMPONENTS PARAMETER(II). *
058319,000215: 04,3402 33474 +2 CAF UPLOADNV # (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058320,000216: 04,3403 04616 TC BANKCALL # DISPLAY A FLASHING V21N01
058321,000217: 04,3404 20334 CADR GOXDSPF # TO REQUEST II.
Page 1382 |
058323,000219: 04,3405 13670 TCF UPOUT4 # V34 TERMINATE UPDATE (P27) RETURN
058324,000220: 04,3406 13402 TCF OHWELL1 +2
058325,000221: 04,3407 03464 TC CK4V32 # DATA OR V32 RETURN
058326,000222: 04,3410 44752 CS BIT2
058327,000223: 04,3411 61173 AD UPBUFF # IS II (NUMBER OF COMPONENTS PARAMETER)
058328,000224: 04,3412 00006 EXTEND # .GE. 3 AND .LE. 20D.
058329,000225: 04,3413 63402 BZMF OHWELL1 +2
058330,000226: 04,3414 41173 CS UPBUFF
058331,000227: 04,3415 64362 AD UP21
058332,000228: 04,3416 00006 EXTEND
058333,000229: 04,3417 63402 BZMF OHWELL1 +2
058334,000230: 04,3420 31173 CAE UPBUFF
058335,000231: 04,3421 55167 TS COMPNUMB # SAVE II IN COMPNUMB
058336,000232:
058337,000233: # UPBUFF LOADING SEQUENCE
058338,000234:
058339,000235: 04,3422 25172 INCR UPCOUNT # INCREMENT COUNT OF COMPONENTS RECEIVED.
058340,000236: 04,3423 33640 OHWELL2 CAF ADUPBFM1 # CALCULATE LOCATION (ECADR) IN UPBUFF
058341,000237: 04,3424 61172 AD UPCOUNT # WHERE NEXT COMPONENT SHOULD BE STORED.
058342,000238: 04,3425 54156 +2 TS MPAC +2 # PLACE ECADR INTO R3.
058343,000239: 04,3426 33474 +3 CAF UPLOADNV # (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058344,000240: 04,3427 04616 TC BANKCALL # DISPLAY A FLASHING V21N01
058345,000241: 04,3430 20334 CADR GOXDSPF # TO REQUEST DATA.
058346,000242: 04,3431 13670 TCF UPOUT4 # V34 TERMINATE UPDATE (P27) RETURN.
058347,000243: 04,3432 13426 TCF OHWELL2 +3 # V33 PROCEED RETURN
058348,000244: 04,3433 03464 TC CK4V32 # DATA OR V32 RETURN
058349,000245: 04,3434 41172 CS UPCOUNT # HAVE WE FINISHED RECEIVING ALL
058350,000246: 04,3435 61167 AD COMPNUMB # THE DATA WE EXPECTED.
058351,000247: 04,3436 00006 EXTEND
058352,000248: 04,3437 63441 BZMF UPVERIFY # YES - GO TO VERIFICATION SEQUENCE
058353,000249: 04,3440 13422 TCF OHWELL2 -1 # NO - REQUEST ADDITIONAL DATA.
058354,000250:
058355,000251: # VERIFY SEQUENCE
058356,000252:
058357,000253: 04,3441 33472 UPVERIFY CAF ADUPTEMP # PLACE ECADR WHERE COMPONENT NO. INDEX
058358,000254: 04,3442 54156 TS MPAC +2 # IS TO BE STORED INTO R3.
058359,000255: 04,3443 33475 CAF UPVRFYNV # (CK4V32 RETURNS HERE IF V32 ENCOUNTERED)
058360,000256: 04,3444 04616 TC BANKCALL # DISPLAY A FLASHING V21N02 TO REQUEST
058361,000257: 04,3445 20334 CADR GOXDSPF # DATA CORRECTION OR VERIFICATION.
058362,000258: 04,3446 13670 TCF UPOUT4 # V34 TERMINATE UPDATE (P27) RETURN
058363,000259: 04,3447 13476 TCF UPSTORE # V33 DATA SENT IS GOOD. GO STORE IT.
058364,000260: 04,3450 03464 TC CK4V32 # COMPONENT NO. INDEX OR V32 RETURN
058365,000261: 04,3451 31166 CA UPTEMP # DOES THE COMPONENT NO. INDEX JUST SENT
058366,000262: 04,3452 00006 EXTEND # SPECIFY A LEGAL COMPONENT NUMBER?
058367,000263: 04,3453 63441 BZMF UPVERIFY # NO, IT IS NOT POSITIVE NONZERO
058368,000264: 04,3454 41166 CS UPTEMP
058369,000265: 04,3455 61167 AD COMPNUMB
058370,000266: 04,3456 64753 AD BIT1
Page 1383 |
058372,000268: 04,3457 00006 EXTEND
058373,000269: 04,3460 63441 BZMF UPVERIFY # NO
058374,000270: 04,3461 33640 CAF ADUPBFM1 # YES - BASED ON THE COMPONENT NO. INDEX
058375,000271: 04,3462 61166 AD UPTEMP # CALCULATE THE ECADR OF LOCATION IN
058376,000272: 04,3463 13425 TCF OHWELL2 +2 # UPBUFF WHICH USER WANTS TO CHANGE.
058377,000273:
058378,000274: 04,3464 04,3670 UPOUT4 EQUALS UPOUT +1 # COMES HERE ON V34 TO TERMINATE UPDATE
058379,000275:
058380,000276: # CHECK FOR VERB 32 SEQUENCE
058381,000277:
058382,000278: 04,3464 40154 CK4V32 CS MPAC # ON DATA RETURN FROM 'GOXDSPF'
058383,000279: 04,3465 74746 MASK BIT6 # ON DATA RETURN FROM "GOXDSP" & THE CON-
058384,000280: 04,3466 10000 CCS A # TENTS OF MPAC = VERB. SO TEST FOR V32.
058385,000281: 04,3467 00002 TC Q # IT'S NOT A V32, IT'S DATA. PROCEED.
058386,000282: 04,3470 50002 INDEX Q
058387,000283: 04,3471 77771 TC 0 -6 # V32 ENCOUNTERED - GO BACK AND GET DATA
058388,000284:
058389,000285: 04,3472 01166 ADUPTEMP ADRES UPTEMP # ADDRESS OF TEMP STORAGE FOR CORRECTIONS
058390,000286: 04,3473 01173 ADUPBUFF ADRES UPBUFF # ADDRESS OF UPDATE DATA STORAGE BUFFER
058391,000287: 04,3474 05201 UPLOADNV VN 2101 # VERB 21 NOUN 01
058392,000288: 04,3475 05202 UPVRFYNV VN 2102 # VERB 21 NOUN 02
058393,000289: 04,3476 4362 UP21 = MD1 # DEC 21 = MAX NO OF COMPONENTS +1
058394,000290: 04,3476 4756 UPDTPHAS EQUALS FIVE
058395,000291:
058396,000292: # PRE-STORE AND FAN TO APPROPRIATE BRANCH SEQUENCE
058397,000293:
058398,000294: 04,3476 UPSTORE EQUALS # GROUND HAS VERIFIED UPDATE. STORE DATA.
058399,000295:
058400,000296: 04,3476 00004 INHINT
058401,000297:
058402,000298: 04,3477 30103 CAE FLAGWRD7 # INVERT VERIFLAG (BIT 3 OF FLAGWRD7) TO
058403,000299: 04,3500 56001 XCH L # INDICATE TO THE GROUND (VIA DOWNLINK)
058404,000300: 04,3501 34751 CAF VERIFBIT # THAT THE V33 (WHICH THE GROUND SENT TO
058405,000301: 04,3502 00006 EXTEND # VERIFY THE UPDATE) HAS BEEN SUCCESSFULLY
058406,000302: 04,3503 06001 RXOR LCHAN # RECEIVED BY THE UPDATE PROGRAM
058407,000303: 04,3504 54103 TS FLAGWRD7
058408,000304:
058409,000305: 04,3505 05353 TC PHASCHNG # SET RESTART GROUP 6 TO REDO THE UPDATE
058410,000306: 04,3506 04026 OCT 04026 # DATA STORE IF A RESTART OCCURS.
058411,000307: 04,3507 00004 INHINT # (BECAUSE PHASCHNG DID A RELINT)
058412,000308:
058413,000309: 04,3510 44752 CS TWO # GO TO UPFNDVAC IF INSTALL IS REQUIRED,
058414,000310: 04,3511 61171 AD UPVERB # THAT IS, IF IT'S A V70 - V72.
058415,000311: 04,3512 00006 EXTEND # GO TO UPEND73 IF IT'S A V73.
058416,000312: 04,3513 63522 BZMF UPFNDVAC
058417,000313:
058418,000314: # VERB 73 BRANCH
058419,000315:
058420,000316: 04,3514 00006 UPEND73 EXTEND # V73 - PERFORM DP OCTAL AGC CLOCK INCREMENT
Page 1384 |
058422,000318: 04,3515 31174 DCA UPBUFF
058423,000319: 04,3516 53204 DXCH UPBUFF +8D
058424,000320: 04,3517 03545 TC TIMEDIDL
058425,000321: 04,3520 04364 TC FALTON # ERROR - TURN ON *OPERATOR ERROR* LIGHT
058426,000322: 04,3521 03670 TC UPOUT +1 # GO TO COMMON UPDATE PROGRAM EXIT
058427,000323:
058428,000324: 04,3522 34355 UPFNDVAC CAF CHRPRIO # (USE EXTENDED VERB PRIORITY)
058429,000325: 04,3523 05105 TC FINDVAC # GET VAC AREA FOR 'CALL INTSTALL'
058430,000326: 04,3524 E3,1706 EBANK= TEPHEM
058431,000327: 04,3524 03527 10103 2CADR UPJOB # (NOTE: THIS WILL ALSO SET EBANK FOR
058432,000328: 04,3526 05155 TC ENDOFJOB # 'TEPHEM' UPDATE BY V70)
058433,000329:
058434,000330: 04,3527 06042 UPJOB TC INTPRET # THIS COULD BE A STATE VECTOR UPDATE -- SO
058435,000331: 04,3530 77624 CALL # WAIT (PUT JOB TO SLEEP) IF ORBIT INT(OI)
058436,000332: 04,3531 27410 INTSTALL # IS IN PROGRESS -- OR -- GRAB OI AND RETURN
058437,000333: # TO UPWAKE IF OI IS NOT IN PROGRESS.
058438,000334:
058439,000335: 04,3532 77776 UPWAKE EXIT
058440,000336:
058441,000337: 04,3533 05353 TC PHASCHNG # RESTART PROTECT (GROUP 6)
058442,000338: 04,3534 04026 OCT 04026
058443,000339:
058444,000340: 04,3535 05504 TC UPFLAG # SET INTEGRATION RESTART BIT
058445,000341: 04,3536 00236 ADRES REINTFLG
058446,000342: 04,3537 00004 INHINT
058447,000343: 04,3540 UPPART3 EQUALS
058448,000344:
058449,000345: 04,3540 51171 INDEX UPVERB # BRANCH TO THE APPROPRIATE UPDATE VERB
058450,000346: 04,3541 13542 TCF +1 # ROUTINE TO ACTUALLY PERFORM THE UPDATE
058451,000347: 04,3542 13701 TCF UPEND70 # V70
058452,000348: 04,3543 13610 TCF UPEND71 # V71
058453,000349: 04,3544 13642 TCF UPEND72 # V72
058454,000350:
058455,000351: # ROUTINE TO INCREMENT CLOCK (TIME2,TIME1) WITH CONTENTS OF DP WORD AT UPBUFF.
058456,000352:
058457,000353: 04,3545 00006 TIMEDIDL EXTEND
058458,000354: 04,3546 23166 QXCH UPTEMP # SAVE Q FOR RETURN
058459,000355: 04,3547 34755 CAF ZERO # ZERO AND SAVE TIME2,TIME1
058460,000356: 04,3550 22007 ZL
058461,000357: 04,3551 52025 DXCH TIME2
058462,000358: 04,3552 53216 DXCH UPBUFF +18D # STORE IN CASE OF OVERFLOW
058463,000359:
058464,000360: 04,3553 34756 CAF UPDTPHAS # DO
058465,000361: 04,3554 54001 TS L # A
058466,000362: 04,3555 40000 COM # QUICK
058467,000363: 04,3556 52764 DXCH -PHASE6 # PHASCHNG
058468,000364:
058469,000365: 04,3557 00004 TIMEDIDR INHINT
Page 1385 |
058471,000367: 04,3560 34755 CAF ZERO
058472,000368: 04,3561 22007 ZL # PICK UP INCREMENTER(AND ZERO
058473,000369: 04,3562 54156 TS MPAC +2 # IT IN CASE OF RESTARTS) AND
058474,000370: 04,3563 53204 DXCH UPBUFF +8D # STORE IT
058475,000371: 04,3564 52155 DXCH MPAC # INTO MPAC FOR TPAGREE.
058476,000372:
058477,000373: 04,3565 00006 EXTEND
058478,000374: 04,3566 31216 DCA UPBUFF +18D
058479,000375: 04,3567 20155 DAS MPAC # FORM SUM IN MPAC
058480,000376: 04,3570 00006 EXTEND
058481,000377: 04,3571 13600 BZF DELTATOK # TEST FOR OVERFLOW
058482,000378: 04,3572 34755 CAF ZERO
058483,000379: 04,3573 53216 DXCH UPBUFF +18D # OVERFLOW, RESTORE OLD VALUE OF CLOCK
058484,000380: 04,3574 20025 DAS TIME2 # AND TURN ON OPERATOR ERROR
058485,000381:
058486,000382: 04,3575 05353 TC PHASCHNG # RESTART PROTECT (GROUP 6)
058487,000383: 04,3576 04026 OCT 04026
058488,000384:
058489,000385: 04,3577 01166 TC UPTEMP # GO TO ERROR EXIT
058490,000386:
058491,000387: 04,3600 07262 DELTATOK TC TPAGREE # FORCE SIGN AGREEMENT
058492,000388: 04,3601 52155 DXCH MPAC
058493,000389: 04,3602 20025 DAS TIME2 # INCREMENT TIME2,TIME1
058494,000390:
058495,000391: 04,3603 05353 TC PHASCHNG # RESTART PROTECT (GROUP 6)
058496,000392: 04,3604 04026 OCT 04026
058497,000393:
058498,000394: 04,3605 00004 INHINT
058499,000395: 04,3606 51166 INDEX UPTEMP # (CODED THIS WAY FOR RESTART PROTECTION)
058500,000396: 04,3607 00001 TC 1 # NORMAL RETURN
058501,000397:
058502,000398: # VERB 71 BRANCH
058503,000399:
058504,000400: 04,3610 31174 UPEND71 CAE UPBUFF +1 # SET EBANK
058505,000401: 04,3611 54003 TS EBANK # AND
058506,000402: 04,3612 74357 MASK LOW8 # CALCULATE
058507,000403: 04,3613 55166 TS UPTEMP # S-REG VALUE OF RECEIVING AREA
058508,000404:
058509,000405: 04,3614 67750 AD NEG3 # IN THE PROCESS OF
058510,000406: 04,3615 61167 AD COMPNUMB # PERFORMING
058511,000407: 04,3616 00006 EXTEND # THIS UPDATE
058512,000408: 04,3617 13625 BZF STORLP71 # WILL WE
058513,000409: 04,3620 74743 MASK BIT9 # OVERFLOW
058514,000410: 04,3621 10000 CCS A # INTO THE NEXT EBANK....
058515,000411: 04,3622 13736 TCF UPERROUT # YES
058516,000412:
058517,000413: 04,3623 37750 CA NEG3 # NO - CALCULATE NUMBER OF
058518,000414: 04,3624 61167 AD COMPNUMB # WORDS TO BE STORED MINUS ONE
058519,000415: 04,3625 54154 STORLP71 TS MPAC # SAVE NO. OF WORDS REMAINING MINUS ONE
058520,000416: 04,3626 50000 INDEX A # TAKE NEXT UPDATE WORD FROM
058521,000417: 04,3627 31175 CA UPBUFF +2 # UPBUFF AND
Page 1386 |
058523,000419: 04,3630 54001 TS L # SAVE IT IN L
058524,000420: 04,3631 30154 CA MPAC # CALCULATE NEXT
058525,000421: 04,3632 61166 AD UPTEMP # RECEIVING ADDRESS
058526,000422: 04,3633 50000 INDEX A
058527,000423: 04,3634 E3,1400 EBANK= 1400
058528,000424: 04,3634 23400 LXCH 1400 # UPDATE THE REGISTER BY CONTENTS OF L
058529,000425: 04,3635 E3,1706 EBANK= TEPHEM
058530,000426: 04,3635 10154 CCS MPAC # ARE THERE ANY WORDS LEFT TO BE STORED
058531,000427: 04,3636 13625 TCF STORLP71 # YES
058532,000428: 04,3637 13667 TCF UPOUT # NO - THEN EXIT UPDATE PROGRAM
058533,000429: 04,3640 01172 ADUPBFM1 ADRES UPBUFF -1 # SAME AS ADUPBUFF BUT LESS 1 (DON'T MOVE)
058534,000430: 04,3641 13667 TCF UPOUT # NO - EXIT UPDATE (HERE WHEN COMPNUMB = 3)
058535,000431:
058536,000432: # VERB 72 BRANCH
058537,000433:
058538,000434: 04,3642 34753 UPEND72 CAF BIT1 # HAVE AN ODD NO. OF COMPONENTS
058539,000435: 04,3643 71167 MASK COMPNUMB # BEEN SENT FOR A V72 UPDATE ...
058540,000436: 04,3644 10000 CCS A
058541,000437: 04,3645 13647 TCF +2 # YES
058542,000438: 04,3646 13736 TCF UPERROUT # ERROR - SHOULD BE ODD NO. OF COMPONENTS
058543,000439: 04,3647 44752 CS BIT2
058544,000440: 04,3650 61167 AD COMPNUMB
058545,000441: 04,3651 54154 LDLOOP72 TS MPAC # NOW PERFORM THE UPDATE
058546,000442: 04,3652 50000 INDEX A
058547,000443: 04,3653 31174 CAE UPBUFF +1 # PICK UP NEXT UPDATE WORD
058548,000444: 04,3654 22000 LXCH A
058549,000445: 04,3655 10154 CCS MPAC # SET POINTER TO ECADR (MUST BE CCS)
058550,000446: 04,3656 54154 TS MPAC
058551,000447: 04,3657 50000 INDEX A
058552,000448: 04,3660 31174 CAE UPBUFF +1 # PICK UP NEXT ECADR OF REG TO BE UPDATED
058553,000449: 04,3661 54003 TS EBANK # SET EBANK
058554,000450: 04,3662 74357 MASK LOW8 # ISOLATE RELATIVE ADDRESS
058555,000451: 04,3663 50000 INDEX A
058556,000452: 04,3664 E3,1400 EBANK= 1400
058557,000453: 04,3664 23400 LXCH 1400 # UPDATE THE REGISTER BY CONTENTS OF L
058558,000454: 04,3665 E3,1706 EBANK= TEPHEM
058559,000455: 04,3665 10154 CCS MPAC # ARE WE THROUGH THE V72 UPDATE...
058560,000456: 04,3666 13651 TCF LDLOOP72 # NO
058561,000457:
058562,000458: # NORMAL FINISH OF P27
058563,000459:
058564,000460: 04,3667 UPOUT EQUALS
058565,000461: 04,3667 03131 TC INTWAKEU # RELEASE GRAB OF ORBITAL INTEGRATION
058566,000462: 04,3670 31170 +1 CAE UPOLDMOD # RESTORE PRIOR P27 MODE
058567,000463: 04,3671 05314 TC NEWMODEX +3
058568,000464: 04,3672 34755 CAF ZERO
058569,000465: 04,3673 54333 TS DNLSTCOD
058570,000466: 04,3674 03743 TC UPACTOFF # TURN OFF 'UPLINK ACTIVITY' LIGHT
Page 1387 |
058572,000468: 04,3675 00006 EXTEND # KILL GROUP 6.
058573,000469: 04,3676 34755 DCA NEG0
058574,000470: 04,3677 52764 DXCH -PHASE6
058575,000471:
058576,000472: 04,3700 05472 TC ENDEXT # EXTENDED VERB EXIT
058577,000473:
058578,000474: # VERB 70 BRANCH
058579,000475:
058580,000476: 04,3701 00006 UPEND70 EXTEND # V70 DOES THE FOLLOWING WITH DP DELTA
058581,000477: 04,3702 41174 DCS UPBUFF # TIME IN UPBUFF
058582,000478: 04,3703 53204 DXCH UPBUFF +8D
058583,000479: 04,3704 03545 TC TIMEDIDL # DECREMENT AGC CLOCK
058584,000480:
058585,000481: 04,3705 03736 TC UPERROUT # ERROR WHILE DECREMENTING CLOCK -- EXIT
058586,000482:
058587,000483: 04,3706 E3,1706 EBANK= TEPHEM
058588,000484: 04,3706 00006 EXTEND
058589,000485: 04,3707 41174 DCS UPBUFF # COPY DECREMENTERS FOR
058590,000486: 04,3710 53206 DXCH UPBUFF +10D # RESTART PROTECTION
058591,000487: 04,3711 00006 EXTEND
058592,000488: 04,3712 41174 DCS UPBUFF
058593,000489: 04,3713 53210 DXCH UPBUFF +12D
058594,000490:
058595,000491: 04,3714 05353 TC PHASCHNG # RESTART PROTECT (GROUP 6)
058596,000492: 04,3715 04026 OCT 04026
058597,000493:
058598,000494: 04,3716 34755 CAF ZERO
058599,000495: 04,3717 22007 ZL
058600,000496: 04,3720 53206 DXCH UPBUFF +10D # DECREMENT CSM STATE VECTOR TIME
058601,000497: 04,3721 21571 DAS TETCSM
058602,000498:
058603,000499: 04,3722 34755 CAF ZERO
058604,000500: 04,3723 22007 ZL
058605,000501: 04,3724 53210 DXCH UPBUFF +12D # DECREMENT LEM STATE VECTOR TIME
058606,000502: 04,3725 21643 DAS TETLEM
058607,000503:
058608,000504: 04,3726 34755 CAF ZERO
058609,000505: 04,3727 22007 ZL
058610,000506: 04,3730 53174 DXCH UPBUFF
058611,000507: 04,3731 21710 DAS TEPHEM +1 # INCREMENT TP TEPHEM
058612,000508: 04,3732 27706 ADS TEPHEM
058613,000509:
058614,000510: 04,3733 05353 TC PHASCHNG # RESTART PROTECT (GROUP 6)
058615,000511: 04,3734 04026 OCT 04026
058616,000512:
058617,000513: 04,3735 1173 EBANK= UPBUFF
058618,000514:
058619,000515: 04,3735 03667 TC UPOUT # GO TO STANDARD UPDATE PROGRAM EXIT
058620,000516:
Page 1388 |
058622,000518: # ERROR SEQUENCE
058623,000519:
058624,000520: 04,3736 04364 UPERROUT TC FALTON # TURN ON *OPERATOR ERROR* LIGHT
058625,000521: 04,3737 13667 TCF UPOUT # GO TO COMMON UPDATE PROGRAM EXIT
058626,000522:
058627,000523: 04,3740 04364 +2 TC FALTON # TURN ON 'OPERATOR ERROR' LIGHT
058628,000524: 04,3741 03743 TC UPACTOFF # TURN OFF 'UPLINK ACTIVITY' LIGHT
058629,000525: 04,3742 05472 TC ENDEXT # EXTENDED VERB EXIT
058630,000526: # (THE PURPOSE OF UPERROUT +2 EXIT IS
058631,000527: # TO PROVIDE AN ERROR EXIT WHICH DOES NOT
058632,000528: # RESET ANY RESTART GROUPS)
058633,000529:
058634,000530: # :UPACTOFF: IS A ROUTINE TO TURN OFF UPLINK ACTIVITY LIGHT ON ALL EXITS FROM UPDATE PROGRAM (P27).
058635,000531:
058636,000532: 04,3743 44751 UPACTOFF CS BIT3
058637,000533: 04,3744 00006 EXTEND # TURN OFF UPLINK ACTIVITY LIGHT
058638,000534: 04,3745 03011 WAND DSALMOUT # (BIT 3 OF CHANNEL 11)
058639,000535: 04,3746 00002 TC Q
058640,000536:
End of include-file UPDATE_PROGRAM.agc. Parent file is MAIN.agc