At 12:01 -0700 on 01/01/2011, Paul Gilmartin wrote about Re: A bug or
a feature?:

On Dec 30, 2010, at 10:05, Tom Marchant wrote:

 <quote from HLASM V1R6 Language Reference>
 5.46.4.3 Range of an ordinary USING instruction

 The range of an ordinary USING instruction (called the ordinary
 USING range, or simply the USING range) is the 4096 bytes
 beginning at the base address specified in the USING instruction,
 or the range as specified by the range end, whichever is the
 lesser. For long-displacement instructions, the range is the
 addresses between (base_address-524288) and (base_address+524287)
 </quote>

 You'll notice that the range in not addressed at all for long
 displacement instructions.

That's bizarre.  I wonder what rationale there might be for
ignoring a range end explicitly coded by the programmer when
the displacement is long.

Possibly due to the range being from the defined base address to the
defined range end (or Base+4095 in the absence of the definition).
For long instructions, while you could in theory define a cut-off
point (which could be enforced by the assembler) there is no way to
define a range that starts BEFORE the base. Thus the range is
Base-512K to Base+512K. Since it is a displacement off a base
register, why would you want to restrict the range? You would get a
protection error if you try to access data you should not have access
to (ie: It is a programming error to reference the location).

Reply via email to