Paul,

The following routine should do what you want --

        MVZ     FLD(L'FLD-1),FLD+1
        NI      FLD+L'FLD-1,X'0F'

The first instruction shifts the high order nibble of each byte of the field
1 byte to the left.  Of course, the high order nibble of the first byte of
the field is discarded.
The second instruction clears the low order nibble of the rightmost byte of
the field.

Please note that this instruction sequence operates "in place".

However, if you want to operate using a source and target area, then the
code would be --

        MVZ     TGT(L'SRC-1),SRC+1
        MVN     TGT,SRC
        NI      TGT+L'SRC-1,X'0F'

Please note that is this instruction sequence, both of the source and target
areas must be of the same length.

In both of the instruction sequences provided, the maximum field length is
256 characters.

Finally, I have a question.

Why?

John P. Baker

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]]
On Behalf Of [email protected]
Sent: Thursday, March 28, 2013 4:20 PM
To: [email protected]
Subject: Shifting The High Order Bits

Hi,

does anyone have a routine, or event know an instruction that would shift
the high order bits of "n" bytes either 8 bits of 4 bits to the left as a
unit:
for example
X 'D48199838840F2F96bF2F0F1F340'

D89884FF6FFFF4
41938029B20130

then shift the high order bits to the left
89884FF6FFFF40
41938029B20130

Paul D'Angelo

Reply via email to