Signed or not is also a function of how the constant is specified. It's not often convenient to specify constants as binary strings. Mr Ngan's solution is pretty elegant, given HLASM's lack.
000001F8 1170 284 DC AL2(70000) 000001FA 9C40 285 DC AL2(40000) 000001FC 1170 286 DC Y(70000) ** ASMA072E Data item too large ** ASMA435I Record 32 in TSSAS.WORK.ASM(TEST4) on volume: TSO003 000001FE 7530 287 DC Y(30000) 00000200 9C40 288 DC Y(40000) ** ASMA072E Data item too large ** ASMA435I Record 34 in TSSAS.WORK.ASM(TEST4) on volume: TSO003 00000202 8AD0 289 DC Y(-30000) 00000204 63C0 290 DC Y(-40000) ** ASMA072E Data item too large ** ASMA435I Record 36 in TSSAS.WORK.ASM(TEST4) on volume: TSO003 00000206 63C0 291 DC AL2(-40000) sas On Tue, Mar 29, 2016 at 1:38 AM, John P. Hartmann <[email protected]> wrote: > The contents of a storage location is a bunch of bits. Signed or not is > an interpretation of the instruction accessing the location. LH will > sign-expand a halfword, so it was treated as signed; LLH does not sign > extend, so the same bunch of bits are now taken as unsigned. > > I don't wish to be labeled as a troll, but it seems to me that you have > got the architecture topsy-turvy. > > > On 03/29/2016 12:18 AM, Ngan, Robert wrote: > >> For non-relocatable values, the range of Y values is the same as a signed >> halfword. >> In my case, I want unsigned values so I can't use Y. >> I ended up coding: >> >> DC AL2(expr) >> DS 0XL(65536-expr) ASSERT: expr was not truncated >> >> -----Original Message----- >> From: IBM Mainframe Assembler List [mailto: >> [email protected]] On Behalf Of Robert Netzlof >> Sent: Saturday, March 26, 2016 11:59 >> To: [email protected] >> Subject: Re: Generating warning for AL2 expression truncation? >> >> On 3/26/16, Steve Smith <[email protected]> wrote: >> >>> Well, it seems to me that the lack of any message on the AL2 is a bug. >>> >>> Correct me if I'm wrong, but I think Y-cons are signed... >>> >> >> H type constants, yes. >> >> Y type constants, no. >> >> They are address constants, addresses cannot be negative. >> They date from the dawn of time, when there were 32K and smaller 360's >> abroad in the land. >> >> -- >> Bob Netzlof a/k/a Sweet Old Bob >> >> CSC - This is a PRIVATE message - If you are not the intended >> recipient, please delete without copying and kindly advise us by e-mail of >> the mistake in delivery. NOTE: Regardless of content, this e-mail shall >> not operate to bind the Company to any order or other contract unless >> pursuant to explicit written agreement or government initiative expressly >> permitting the use of e-mail for such purpose. >> >> -- sas
