Originally Posted by
CornedBee
Since there must be a linebreak before a label, and since macro definitions cannot contain whitespace, I would say this is impossible. What on earth to you want to achieve with it, anyway?
What do you mean macros can't have whitespace? In the macro name? Macros can span multiple lines. Just end the line in a \
Code:
#define FOO(x,y) \
{ \
blah \
bla \
blahblah \
}
Something like that perhaps? The only problem with the ASM being turned into a macro is the single quote around the string in the example, where they're passing it a string literal which uses double-quotes. You'd have to pass it in single quotes.
Code:
#define FOO(x,y) \
__asm { \
call short afterString \
db x,0 \
afterString: \
pop y \
}
That might work. Used like:
Code:
FOO('whatever', somevar )
Give it a shot. Worse case scenario, it nukes your PC.
Quzah.