This is the mail archive of the
mailing list for the binutils project.
Re: macro's and local variables
On Tue, Oct 16, 2012 at 11:12 AM, Mischa Baars <email@example.com> wrote:
>> Also one uses i and the other uses j, and that matters because
>> you are invoking them in a loop that also uses i.
> This is exactly what I'm pointing at. Apart from the register naming, I was
> expecting the same values to be assigned to the respective registers. This
> does not happen, because 'i' is not a local but a global value.
Yes. That is how assembler macros work.
Assembler macros are not a high level programming language. They are
macros: bodies of text that are expanded with argument values
substituted in textually. You may want to read about how \@ is
expanded in a macro body.