Author Topic: Macros with masm 6.1  (Read 12835 times)

ggmasm32

  • Member
  • **
  • Posts: 51
Re: Macros with masm 6.1
« Reply #30 on: September 17, 2015, 05:09:49 AM »
i have a question regarding the macro labelling.
I do remember when you declare label inside macro and call it multiple times, assembler will complain for multiple label with same name:

f1 macro param
loop1:
     ; do something
     jmp loop1
     endm

Now from main.asm call it twice and you get error


f1 param1
f1 param2

There was a special directive that generates different label suffix or prefix for each macro call, i cant recall, does someone remember?
Thanks.,

jj2007

  • Member
  • *****
  • Posts: 7558
  • Assembler is fun ;-)
    • MasmBasic
Re: Macros with masm 6.1
« Reply #31 on: September 17, 2015, 05:22:18 AM »
f1 macro param
LOCAL loop1
loop1:
     ; do something
     jmp loop1
     endm

ggmasm32

  • Member
  • **
  • Posts: 51
Re: Macros with masm 6.1
« Reply #32 on: September 17, 2015, 06:43:43 AM »
got it !! thanks.,