Fellow listers I used to develop and maintain HLASM and there were lots of internal discussions about how to handle items like 16 bit immediate opearnds.
One point is that internally the assembler has an expression processor for instruction operands, and it has another one for DC operands - why it is this way I do not know. So sometimes there will be people expecting the DC type processing to be done for the instruction operands, and getting confused/annoyed/bewildered that it does not work that way. Unless the assembler is redesigned to use just one expression processor, there will always be differences in between instruction operands and DC operands And there are further complications - the instruction operand arithmetic is done using 32 bit signed binary values and it is only at the end of the process where the target operand properties are considered . So by way of an example,16 bit immediate operands come in three flavours: Arithmetic (for example, AHI) - the value is range checked to be between -32768 and +32767. So AHI R1,-1 is acceptable, but AHI R1,X'FFFF' is not Bit string (for example, TMLL) - the value is range checked to be between 0 and 65535. So TMLL R1,X'FFFF' is acceptable, but TMLL R1,-1 is not Branch operands - signed halfword count (for example, J LABEL) - the value is an arithmetic value so it is range checked as for arithmetic values. But the assembler will object if the user has coded J 10 as it considers an absolute value a possible source of error as the value is a count of halfwords (is the 10 intended as 10 bytes or 10 halfwords?) Kind Regards John R Dravnieks
