On 2013-11-02, at 09:39, esst...@juno.com 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 code Paul suggested:
L Rz,=A(L)
makes a lot of sense- covers also the cases where a LA will not
work (above 4095) - LAY be be a way out as well.
... handles only two of your three cases.
and the third case ( fullword with the value) can easy be detected by
determine the length of
To test an attibute, the fields or equates must occur before they are tested.
In other words the macro must occur after the definition of the variable data.
If you can require that in your programs, then ISDEC('L') will return a
numeric value of 1 for 32767 and T'L will return a value of F
You should consider how IBM macros such as STORAGE handle this
situation. It requires an absolute value for LENGTH, and if you want to
generate it dynamically, or get it from a memory location, then the user
will just have to get the value into a register himself. The two
options are an
Addressing only the routing question yields
| aif (t'L eq 'O').omitted_L_value
|capL setc UPPER('L)
| aif ('capL' eq '32767').case_32767,
+
|('capL' eq 'LENGTH').case_length,
+
|('capL' eq
I obviously did not explain this wellm despite some coding errors..
I was hoping the Macro itself would test the value of the parameter and then
generate the proper instruction.
For Example: couldnt I use several TYPE attrinute
AIF (T'L EQ 'A').DOLOAD A-type Address
AIF (T'L EQ
In my last post
|capL setc UPPER('L)
is wrong. It should be
|capL setc UPPER('L')
My apologies.
John Gilmore, Ashland, MA 01721 - USA
I agree with Steve Smith that you should simply allow a length or register.
As for determining an equate, you can't specifically test for it. An equate can
be defined that exactly matches any DS or DC. You'll have to make an
assumption. Will the EQUATE length always be omitted then it will have
At 15:39 + on 11/02/2013, esst...@juno.com wrote about Some Help
with Conditional Assembly:
Could someone please provide an example as to how to test for
the conditions above in a Macro.
Others have done this. I will add that you should do a sanity check
and make sure exactly ONE of the 3