On 2013-11-02, at 09:39, [email protected] wrote:
> I have a simple macro
>
> AMOVE &L=LENGTH,&S=SOURCE,&T=Target
> L R15,&L .Length Of Move
> ...
> ...
> MVCL Ra,Rb
> MEXIT
> MEND
>
> In a Macro I wish to generate 3 different instructions depending on the value
> supplied for &L.
>
> If I specify AMOVE L=LENGTH
> I want the macro to generate a LOAD Of a Full Word
> L Rz,LENGTH
>
> LENGTH DS F
>
> If I Specify AMOVE L=32767
> I want the macro to generate a Load Addres
> LA Rz,32767
>
To make this work you must previously have a suitable USING
in effect. Otherwise it hardly differs from the following
case but is hard to distinguish from the previous case.
Perhaps testing symbol attributes, but this may require
prior definition of the symbol.
> If I specify AMOVE L=EQUATE
> I want the macro to generate a Load Address of
> LA Rz,EQUATE
>
> EQUATE EQI (*-BEGIN)
>
>
> Could someone please provide an example as to how to test for
> the conditions above in a Macro.
>
L Rz,=A(&L)
... is useful, but handles only two of your three cases. There
may be no general solution; requires too much DWIM.
-- gil