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.
On Sunday, March 19, 2017 11:00 PM, ASSEMBLER-LIST automatic digest system
<[email protected]> wrote:
ASSEMBLER-LIST Digest - 18 Mar 2017 to 19 Mar 2017 (#2017-31)#yiv8430315785
body {font-family:Arial, Helvetica,
sans-serif;font-size:12px;color:#000000;}#yiv8430315785 td {font-family:Arial,
Helvetica, sans-serif;font-size:12px;color:#000000;}#yiv8430315785 p
{font-family:Arial, Helvetica,
sans-serif;font-size:12px;color:#000000;}#yiv8430315785 a {font-family:Arial,
Helvetica,
sans-serif;font-size:12px;font-weight:bold;color:#3366CC;text-decoration:none;}#yiv8430315785
h2 {font-family:Arial, Helvetica,
sans-serif;font-size:17px;font-weight:bold;color:#CC0033;}#yiv8430315785 h3
{font-family:Arial, Helvetica,
sans-serif;font-size:16px;font-weight:bold;color:#3366CC;}
| | | |
|
|
ASSEMBLER-LIST Digest - 18 Mar 2017 to 19 Mar 2017 (#2017-31)
Table of contents:
- HLASM "Anomaly" (2)
- HLASM "Anomaly"
- Re: HLASM "Anomaly" (03/19)
From: Abe Kornelis <[email protected]>
- Re: HLASM "Anomaly" (03/19)
From: MELVYN MALTZ <[email protected]>
|
|
| Browse the ASSEMBLER-LIST online archives. | |
Paul,
To my mind, X'FFFF' is also -1, which is in the halfword range.
Thus it merits a warning as the assembler cannot know whether the
X'FFFF' value of H5 is intended to be signed or unsigned.
Neither should it make any assumptions. So I'm entirely
fine with HLASM accepting the value and using it, while
issuing a warning. It does what it is told to do, but it might
not be what the programmer intended it to do ;-)
Abe Kornelis
===========
Op 18-3-2017 om 23:21 schreef Paul Gilmartin:
> Compare this with LHI 1,H5 and the next which generate a warning (do
> we need the warning ?)
> Yes, since X'FFFF' is 65535, and not in the halfword range, -32768 to +32767.
>
To: Abe and Paul,
Abe is quite right, when I started this thread I didn't realise just how
many "anomalies" would pop out of the woodwork
LHI 1,X'FFFFFFFF'
LHI 1,X'12345678'
Yes, you get a warning about the 2nd but not the 1st
As Abe said, I would also be drawn to the Programmer's intent, did they mean
to code LGFI ?
Melvyn.
----- Original Message -----
From: "Paul Gilmartin" <[email protected]>
To: <[email protected]>
Sent: Saturday, March 18, 2017 10:21 PM
Subject: Re: HLASM "Anomaly"
On 2017-03-18, at 15:41, MELVYN MALTZ wrote:
>
> A fine example is LHI 1,H2 and the next
> Both of these assemble without error or warning (that's a big disagree)
>
Don't you believe -1 is a valid expression to LHI? Or don't
you believe X'FFFFFFFF' is -1?
Remember, expressions are typeless. Would you change that? How?
That requires a lot of wise design. What types should exist? What
types should be allowed to be combined with what operators?
Too much of HLASM came about because someone thought some construct
worked the way he expected and twisted an account rep's arm to make
it so, and didn't care about the chaos this added to the specification.
> Compare this with LHI 1,H5 and the next which generate a warning (do we
> need the warning ?)
>
Yes, since X'FFFF' is 65535, and not in the halfword range, -32768 to
+32767.
> ----- Original Message ----- From: "Paul Gilmartin"
> Sent: Saturday, March 18, 2017 2:10 PM
> Subject: Re: HLASM "Anomaly"
>
> For which of these intructions do you agree/disagree with
> HLASM's behavior:
> ...
> H2 EQU X'FFFFFFFF'
> LHI 1,H2
> LHI 1,X'FFFFFFFF'
> DC Y(H2)
> DC Y(X'FFFFFFFF')
> ...
> H5 EQU X'FFFF'
> LHI 1,H5
> LHI 1,0+X'FFFF'
> DC Y(H5)
> DC Y(X'FFFF')
-- gil