Mail Archives: djgpp/1996/08/19/15:30:40
Orco <mar AT demon DOT co DOT uk> wrote:
>Just wondering how I would go about creating a self modifying label name
>in DJGPP.. for example in MASM I could create a MACRO :-
>
> xxx MACRO x, y, z
> LOCAL label1
>
> ......
> label1:
> ENDM
>
>How would I go about doing the same thing in DJGPP??
#define xxx(x,y,z) \
1:
That's all, but if you want to use the local label, you should reference it
with a trailing f or b:
#define xxx(x,y,z) \
mov x,%eax \
or %eax,%eax \
mov y,%eax \
jz 1f \
mov z,%eax \
1:
But beware of long macros! I found that gas cuts very long lines without
a warning.
Helge
- Raw text -