ASM .MACRO arguments

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

I got macro in *.s file, something like this:

.MACRO MYMACRO
    STS buffer+#0, R16
.ENDM

NOTE '#0' is in fact 'percent 0' because it's not possible to post with percent 0 in the message body.

When I try to use it in the assembler code:

MYMACRO(1)

an compilation error is shown: Error: too many positional arguments

How to pass arguments to macros?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Stefan Ernst

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Stefan, you're my hero! I spent a lot of time searching for ANY macro description for gcc and now I see it was so close on my hard disk...