Bug in macros

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

When combining the old-style multiline macros defined with .macro name, and the C-style #define-s, the assembler says "Undefined Symbol X"

Example:

#define NACK = 0xFF

.macro Send
ldi R16, @0 <-- Undefined Symbol NACK
mov R0, R16
rcall SendMessage
.endmacro

....
....
...

Send NACK

...
...
...

axos88

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

Quote:
#define NACK = 0xFF
is incorrect. Use #define NACK 0xFF instead

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

yeah okay it was like that in the code...

axos88