At 14:13 -0400 on 09/09/2010, Thomas David Rivers wrote about Re:
Negative displacements (was: Instruction Set Architectu:
NEGDISP CSECT
USING -4096,R1
LA R3,-4(R2)
LA R3,-4(,R2)
I wonder why HLASM allows the negative displacement?
The HLASM documentation (HLASM V1R6 Language Reference manual)
for an "Ordinary USING" indicates:
base
specifies a base address, which can be a relocatable
or an absolute expression. The value of the expression
must lie between 0 and 2**31-1.
and -4096 doesn't lie in that range...
Yes it does. ASMH is treating the "USING -4096,R1" as "USING
NEGDISP-4096,R1" (ie: The 4096 bytes before the start of the CSECT).
Thus when you ask for -4 it is referencing NEGDISP-4 which is covered
by R1. The problem is that it is not flagging the -4(,2) case since
there is no access to that area via R2.