View Single Post
Old 01 May 2024, 19:12   #1554
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,182
Quote:
Originally Posted by jotd View Post
that's good and it works. But not in macros (.macro) where it's very useful. Maybe with #define... but multi-line defines with "" don't seem to work either. Oh damn.
Ahh, new requirements


You can probably hack around it with another level of indirection, like:
Code:
// before
  .macro m x,y
  //..

  .endm

  m x,y
// after
  .macro _m x,y,line
  move.l #\line,d0

  //..

  .endm


#define m(x,y) _m x,y,__LINE__

  m(x,y)
Not tested, but you get the idea... Maybe there is some GCC magic to get line in another way in .macro, but I doubt it..
paraj is offline  
 
Page generated in 0.04352 seconds with 11 queries