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" <00000014e0e4a59b-dmarc-requ...@listserv.uga.edu>
To: <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
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