Mail Archives: djgpp/1996/07/05/04:30:14
F.G. wrote:
>
> I've run into a small snag with a section of my program written for GAS.
> In it, I use a macro which contains a label. Later in the code I call
> the macro 8 times as part of an unrolled loop. Not surprisingly, it gives
> me an error telling me that the label has already been defined. I
> believe that TASM has a directive called "local" which allows labels to
> be placed in macros and cause the lables to act as if they were
> in functions. In other words, using the macro multiple times in the
> program will not yield "redefined label" errors. Since GAS does not
> directly support macros AFAIK, there seems to be no such directive. Is
> there any way to get around my problem?
> Thanks in advance.
Use numbered labels, "1:", "2:", etc. These are guaranteed to be local
within the asm statement.
PKE.
--
----------------------------------------------------------------------
| Pål-Kristian Engstad | engstad AT funcom DOT com | Games programmer, PSX |
| Funcom Oslo AS | Ph +47 22 42 01 02 | developer & Linux Fan |
----------------------------------------------------------------------
- Raw text -