nasm/test/selfref.asm
H. Peter Anvin 6263a2a4c2 preproc: add %*? and %*??
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>
2020-07-18 13:47:59 -07:00

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