UPT Assembler instruction
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Application Programming

#1: UPT Assembler instruction Author: asr2Location: Germany PostPosted: Tue May 08, 2012 3:13 am
    —
The Update Tree instruction is probably the least understood z/Architecture instruction, not helped by the confusing description in the PoPs, in particular in the case of processing to be performed for equal codewords.

To empirically investigate the behaviour, I wrote a very simple program with a tree containing 2 and 3, elements respectively; each tree element has the same codeword. In both cases, UPT returns 8 as index - why? According to the instruction flowchart in the PoPs, the tree should be processed from the leaf towards the root: why then is 16 (decimal) not returned as index in the 3-element case?
When the codewords are unequal, UPT executes as expected.


Keys: 100000, 100001, 100002
CFC-generated codeword: 00020E0F

Tree with 2 elements
Before UPT
+TREE 00020E0F1EE00B60 00020E0F1EE00B66 0000000000000000
+R0 00020E0F
+R1 1EE00B66
+R5 00000010

After UPT
+CC 00 (=equal codeword)
+R5 00000008 << OK
+TREE 00020E0F1EE00B60 00020E0F1EE00B66 0000000000000000
+R0 00020E0F
+R1 1EE00B66
+R2 00020E0F
+R3 1EE00B60

3 elements
Before UPT
+TREE 00020E0F1EE00B60 00020E0F1EE00B66 00020E0F1EE00B6C
+R0 00020E0F
+R1 1EE00B6C
+R5 00000018

After UPT
+CC 00
+R5 00000008 << why not hex 10?
+TREE 00020E0F1EE00B60 00020E0F1EE00B66 00020E0F1EE00B6C
+R0 00020E0F
+R1 1EE00B6C
+R2 00020E0F
+R3 1EE00B60



MVSFORUMS.com -> Application Programming


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group