The way I see it, that's a function, and so you can currently do this:
Code: Select all
.function bcall(label)
rst rBR_CALL
.dw label
.endfunction
The way macros are currently handled in Brass 1 are crude string replacement techniques. Brass 2 calls each function as if it was a complete piece of assembly code in its own right, temporarily switching into its own module so that you don't get label conflicts. (Brass 1 expands a macro "call" into a string; Brass 2 will use the same mechanism as it does for #including other source files).
There is a slight style problem here. In TASM/Brass 1 you can do this:
Code: Select all
#define bcall(label) rst rBR_CALL \ .dw label
Due to the way Brass 2 breaks up code, this is impossible to handle without a hack. That's seen as two isolated commands.
The other use of macros I know of are run-time switches. As in:
Code: Select all
#define Debug
#ifdef Debug
call xyz
#endif
What I might do is provide a #define that works purely as a text replacement system, using regular expressions.
Thoughts?