Ensuring the base registers are 4096 apart is important when using based
USINGs for items within the referenced area. A 4095 increment requires
separate USINGs for each register, resulting in separate USING ranges. A
4096 increment allows a single USING statement and a contiguous USING range.

If for instance, a DCB crosses base registers and the DCB fields are to be
referenced via a based USING on the IHADCB DSECT, the difference between the
two matters. It works only if the single USING statement is employed. I have
run into this problem during maintenance when data areas are added and a
based-upon area then crosses the USING ranges.

David

On Wed, 18 Aug 2010 16:30:39 -0700, John R. Ehrman wrote:
>I think the original posting was pointing out that you lose only
>a single byte of addressability by adding 4095, and that you save
>one instruction. The added byte is rarely an issue; whether or not
>the extra instruction is important depends on the application.
>John Ehrman
>    (------------------ Referenced Note Follows --------------------)
>Sent: Wednesday, August 18, 2010 3:51 PM
>
>I have always used something like this:
>
>QMGREX01 CSECT ,
>         STM   R14,R12,12(R13)
>         LR    R11,R15
>         USING QMGREX01,R11,R12
>         LA    R12,4095(R11)
>         LA    R12,1(R12)   <----------------- noticed that I added 1 to
>the 4095 bump.
>         LR    R8,R1
>         USING WORKAREA,R13
>
>Is this not the way to do it?

Reply via email to