mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-15 09:09:58 +08:00
34eefd3803
Add the %map() function which can apply arguments to a macro from a list. Allow the user to specify the desired radix for an evaluated parameter. It doesn't make any direct difference, but can be nice for debugging or turning into strings. As part of this, split expand_one_smacro() into two parts: parameter parsing and macro expansion. This is a very straightforward splitting of two mostly unrelated pieces of functionality. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
67 lines
513 B
NASM
67 lines
513 B
NASM
%macro mmac 0
|
|
%rep 1
|
|
%endrep
|
|
%endmacro
|
|
mmac
|
|
|
|
%macro mmac1 0
|
|
%rep 1
|
|
%rep 1
|
|
mmac
|
|
%endrep
|
|
%endrep
|
|
%endmacro
|
|
|
|
%macro mmac2 0
|
|
%rep 1
|
|
|
|
%endrep
|
|
%endmacro
|
|
mmac2
|
|
|
|
%macro mmac3 1
|
|
%rep 1
|
|
%rep 1
|
|
%endrep
|
|
%endrep
|
|
%endmacro
|
|
mmac3 x
|
|
|
|
%macro mmac4 0
|
|
%rep 1
|
|
%rep 1
|
|
mmac3 x
|
|
%endrep
|
|
%endrep
|
|
%endmacro
|
|
mmac4
|
|
|
|
%macro mmac5 0
|
|
%rep 1
|
|
%rep 1
|
|
nop
|
|
%endrep
|
|
%endrep
|
|
%endmacro
|
|
mmac5
|
|
|
|
%macro mmac6 0
|
|
%endmacro
|
|
mmac6
|
|
|
|
%macro mmac7 0
|
|
mmac6
|
|
%endmacro
|
|
mmac7
|
|
|
|
%macro mmac8 0
|
|
%rep 1
|
|
mmac6
|
|
%endrep
|
|
%endmacro
|
|
mmac8
|
|
|
|
%rep 1
|
|
mmac3 y
|
|
%endrep
|