On 2017-03-02, at 13:04, Ngan, Robert wrote: > I was interested in the top half of the fullword, your equates give me the > bottom half, which I do not need to do anything special for since HLASM > truncates the value correctly when used directly on the MVHHI instruction. > Ah. I forgot a step. I'm glad you were able to suss out my plan and complete it. I experimented in Rexx which I know better than HLASM. I wouldn't have thought of your use of SETC. I wonder if more algebra might make it possible to avoid the ASMA320W rather than suppressing it?
> However, I can use your code to strip the low order half off the value before > dividing by 65536, which resolves my issue of the value being potentially > "off by one" when a negative value is divided. > > &M1 SETC '(&IMM-((&IMM)/65536)*65536)' > &M2 SETC '(&M1+65536)-(&M1+65536)/65536*65536' > &M3 SETC '(&IMM-&M2)/65536' > PUSH ACONTROL,PRINT,NOPRINT > PRINT NOGEN,NOPRINT Suppress printing of following ACONTROL > ACONTROL NOTYPECHECK Suppress annoying ASMA320W messages > POP PRINT,NOPRINT Print following instructions > MVHHI &TO+0,&M3 Set first half of fullword > MVHHI &TO+2,&IMM Set second half of fullword > POP ACONTROL,NOPRINT > The above complexity illustrates a sore need for additional operators in expressions, such as AND, OR, XOR, and SLL, SLA, SRL, SRA. And even LT, LE, EQ, NE, GE, GT; evaluating to 0 for false and 1 for true. And 64-bit expressions. It's difficult to fully exploit a 64-bit architecture using a 32-bit language. -- gil
