I did point out that the expression analyser is a 32 bit operand processor - it does not know the origin or format of the original input, it is just operating on the 32 bit values and only at the end is there any consideration of the size of the target.. So at input, you might code any one of C'A', X'c1' or 193 - these will all be the same as far as the expression analyser is concerned.
The possible target fields vary a lot - the sizes are 4, 8,12, 16, 20 and 32 bits and some are signed. The output values are range checked, but remember that all we have is the final value from the analyser and the target field attributes So if you code AHI 1,65535 then HLASM will give you this 000000 A71A FFFF 0FFFF 2 ahi 1,65535 ** ASMA320W Immediate field operand may have incorrect sign or magnitude HLASM is warning you that this might not be correct - all it has is a 32 bit hex value X'0000FFFF' and a 16 bit signed target field - the range check in this instance will be -32768 to +32767 so the assembler issues the message. (To me this is clearly an error, but I vaguely recall that there was some resistance to making this message an error.) This does tend to end up as a discussion of coding style For example, you can code AHI 1,X'FFFF' and supress the warning or AHI 1,-1 the object code for both will be the same - which one is easier to understand reading the source? Similarly you can code TMLL 1,x'00FF' or TMLL 1,1+2+4+8+16+32+64+128 - exactly the same object code - again which is easier to understand from the source? Kind Regards John Dravnieks
