mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-15 09:09:58 +08:00
6263a2a4c2
The %? and %?? tokens are ambiguous when used inside a multi-line macro. Add tokens %*? and %*?? that only expand during single-macro expansion. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
25 lines
276 B
NASM
25 lines
276 B
NASM
bits 32
|
|
|
|
%idefine zoom $%?
|
|
mov ebx,Zoom
|
|
%idefine boom $%?
|
|
mov ecx,Boom
|
|
|
|
%imacro Foo1 0
|
|
%idefine Bar1 _%?
|
|
%idefine baz1 $%?
|
|
mov BAR1,baz1
|
|
%endmacro
|
|
|
|
foo1
|
|
mov eax,bar1
|
|
|
|
%imacro Foo2 0
|
|
%idefine Bar2 _%*?
|
|
%idefine baz2 $%*?
|
|
mov BAR2,baz2
|
|
%endmacro
|
|
|
|
foo2
|
|
mov eax,bar2
|