> This may not clarify the issue, but isn't the offset in the LG 
> instruction 20-bit?
> That would mean that it can address 00000 to FFFFF, or 0 to 1,048,575, 
right?

Actually, Chuck, it's a signed displacement, so it can address -512K - 
512K-1 from the address in the base and index registers.  However, I 
thought it would be useful to limit the USING range so that attempts to 
address beyond the end of a DSECT would be flagged.  After making the 
changes suggested by John E. (thanks, John), I find that an L instruction 
does get flagged as I suspected.  However, neither L nor LY can be used as 
a substitute, since they only deal with 32-bit registers.  What I need in 
this (contrived) example is a non-long-displacement 64-bit LOAD, which 
doesn't exist.

I've often thought that HLASM has a few weaknesses when it comes to long 
displacements.  For example, I can use the OPTABLE/MACHINE options to 
restrict the instruction set to eliminate the newer instructions, but I 
can't tell HLASM to avoid generating long-displacements for those 
instructions that were enhanced to use 20-bit displacements (e.g., LG). 
Apparently (and disappointingly), I can also only limit the range of a 
USING for non-long-displacement instructions.  But, at least the behavior 
is explained.  Thanks for your help.

- mb

IBM Mainframe Assembler List <[email protected]> wrote on 
11/03/2014 02:24:53 PM:

> From: "Hardee, Chuck" <[email protected]>
> To: [email protected]
> Date: 11/03/2014 02:48 PM
> Subject: Re: What does the 'end' address on a USING statement mean?
> Sent by: IBM Mainframe Assembler List <[email protected]>
> 
> Mark,
> 
> This may not clarify the issue, but isn't the offset in the LG 
> instruction 20-bit?
> That would mean that it can address 00000 to FFFFF, or 0 to 1,048,575, 
right?
> 
> Using your last instruction as an example:
> 00000012 E310 1B58 0104          00001B58      7          lg 
> 1,far4 
>                xxx xx 
> The "x" are the displacement from register 1 so, that means you are 
> addressing x'01B58' from register 1.
> 
> Maybe try a L instruction and see if it holds up to what your 
> interpretation is.
> If it does, then try an LY instruction. The LY has the same 20-bit 
> displacement as the LG.
> 
> Just a thought, not an explanation.
> 
> Chuck
> 
> Charles (Chuck) Hardee
> Senior Systems Engineer/Database Administration
> EAS Information Technology
> 
> Thermo Fisher Scientific
> 300 Industry Drive | Pittsburgh, PA 15275
> Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 
490-9230
> [email protected] | www.thermofisher.com

Reply via email to