At 10:51 AM 10/18/96 +0200, you wrote: >Hi folks! > >I wonder if there is a simple way to use jump-labels within macros, >which are instanciated more than once. If I use a normal label, the >assembler complains from the second instanciation of the macro on. >Example: > >; macro definition: >mymacro macro > bla >local_label: bla > bla > goto local_label > bla > endm > >; main program: > bla > mymacro > bla > mymacro > bla > >I have found a workaround for this: I number the labels for each >instanciation, but I hope someone knows a simpler and more straight >forward solution than this: > >variable i >mymacro macro > i+=1 > bla >local_label#v(i): > bla > goto local_label#v(i) > bla > endm > >Sorry: Maybe the syntax is not correct, I wrote this down from memory >- but it works for me. > >-- >Stefan Bormann s.bormann@tu-bs.de > >FREMO: http://ourworld.compuserve.com/homepages/shipmill/inhalt.htm > > I think you need to use the LOCAL directive. Try this: mymacro macro local local_label bla local_label: bla bla goto local_label bla endm This should give each invocation of the macro its own local copy of the label. DRC