NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: nobody on August 21, 2007, 07:12:21 PM
-
Is there a limitation of 15 parameters allowed by NASM when
invoking a MACRO ?
NASM crashes during compile with this code :
%macro testmacro 16
%rep %0
mov eax,dword [%1]
%rotate 1
%endrep
%endmacro
;----------------------------
[section .text]
testmacro var,var,var,var,var,var,var,var,\
var,var,var,var,var,var,var,var
;---------------------------
[section .data]
var dd 4
It works up to and including 15 parameters but I can't find any
mention of a limiting number of parameters in the NASM docs.
If the macro is NOT called then NASM doesn't throw any error msgs.
The crash happens when it tries to expand the code.
Thanks in advance for any help
Austin
-
Not intentional, but I think there *is* a bug with 16 parameters, exactly. More than 16 may or may not work (haven't tested it). I think there's something about it on the bug-tracker (haven't checked that, either). I'll look into it. Thanks for the feedback, Austin.
Best,
Frank
-
Hi Frank,
You're right. The stumbling block is 16 and its multiples
(17-31 is o.k. but 32 fails.)
Thanks again,
Austin
-
See SF bug #1284169.