On Mon, 20 Dec 2010 11:47:12 -0500, Bodoh John Robert wrote:
>I have never heard of that "convention".

Almost all of the z/OS macros use this convention.

>I don't understand your
>statement that data fields need to be addressed via a base register.
>Since I can use LARL to address data fields within my CSECT, I don't
>require a base register.  It maybe poor coding technique to do a LARL
>every time I reference my storage, but it is not an error and it would
>work.

Consider:
   LARL R14,TARGET
   L R0,0(,R14)
R14 is the base register.  Just because it was not defined in a USING
statement does not change that fact.

And I do consider it poor coding to use LARL before every instruction to set
up a local base register.  It kills pipeline performance. The referencing
instruction will be stalled for several cycles waiting for the result of the
LARL to be converted into a usable address.  This is called Address
Generation Interlock.

>For macros I use, the usual usage would be for some symbols to
>specify constants and would the constant would usually only be
>referenced by the macro.  If there are only a few constants in a program
>and they are seldom needed, why not use baseless coding and free up
>another register?

Because if you don't, you will run into these problems.  But if you really
want to use LARL then use it right before the macro call, passing the
register instead of the symbol.

David Bond

Reply via email to