Ref: Your note of Tue, 1 Feb 2022 10:40:19 +0100 Martin Truebner writes: > > LLC R0,BYTE > SRDL R0,6 > SRL R1,6 > SLDL R0,8 > AHI R0,C"11" > STH R0,RESULT > > But HLASM complains: > ** ASMA320W Immediate field operand may have incorrect sign or magnitude > > only a sev 4
That's because C'11' is decimal 61937 which is out of the range of a signed halfword. The first 17 bits must be the same to be in the correct range. If you change C'11' to C'11'-X'10000' to map it into the valid signed range then the warning should go away. Alternatively, if you have APAR PH38969 from July 2021 you can temporarily use ACONTROL TYPECHECK(NOSIGNED). > But it lacks the trick for making the result ASCII with this: > ** ASMA150E Symbol has non-alphanumeric character or invalid delimiter - > CA'11' > > for this we get a sev 8 ASCII self-defining terms have been supported since APAR PI89365 in November 2017. I'd suggest getting more up to date on maintenance. CA'11' is a valid signed halfword, avoiding the other problem. Jonathan Scott, HLASM IBM Hursley, UK