Two's-complement is an amazingly great way for binary computers to store negative numbers. It is not so great for humans to read or write. First of all, you have to know where the sign bit is, and X expressions are ambiguous. If you watch carefully, you'll see that HLASM (almost) always left-fills to 32 bits (with 0s), so if you intend to specify -1, then you must write X'FFFFFFFF'.
It would have been nice if different conventions were chosen back in the dark ages, instead of conflating X strings with hex numbers. But it isn't nice, and you might as well learn how it works, and learn to live with it. HLASM has much historical baggage. C'est la vie. sas On Mon, Mar 20, 2017 at 3:53 PM, Charles Mills <[email protected]> wrote: > I fail to see how making the two similar constant parsers more identical > is an obscene parody of some other language. > > FWIW, I am not a young-un. I am competent in assembler -- my first > professional language -- and now quite competent in C++. I am not a > religious bigot. Each language has its place. I am writing assembler at the > moment -- it's better suited to the task at hand. (Well, writing an e-mail > at this very moment ...) > > Charles > > > -----Original Message----- > From: IBM Mainframe Assembler List [mailto:[email protected]] > On Behalf Of John Walker > Sent: Monday, March 20, 2017 11:46 AM > To: [email protected] > Subject: Re: ASSEMBLER-LIST Digest - 18 Mar 2017 to 19 Mar 2017 (#2017-31) > > That is so, isn't it. And now, as fewer and fewer true assembler > programmers are found, more and more C or C++ or Java programmers will seek > to distort Assembler into some obscene parody of their favorite language. > If IBM allows this, it will make life for real Assembler programmers more > difficult as they have to relearn AND recode old Assembler code to fit into > the C/C++/Java paradigms. I grant that the young-uns don't like Assembler, > but I still can't accept the unnecessary change solely because 'old = > unacceptable' among the children. > -- sas
