NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: Roman on July 31, 2012, 10:02:52 AM
-
Hi, All!
Sorry for my English, i do not know it...
I have a some trouble: I support the old code, which would be written in nasm 0.98.35. And now i'm use nasm 2.10.
I don't know enough English to describe the problem, therefore show an example :D
there is a macro
%macro defineMacro 2
; defines new one line macro
; %1 - macro name
; %2 - macro value
%define %1 %2
%endm
and this macro calling as
defineMacro %$SOMENAME1 %+ %$SOMENAME2, 1
expected
%define %$SOMENAME1%$SOMENAME2 1 ; it was in nasm0.98
but nasm 2.10 generates
%define %$SOMENAME1 %$SOMENAME2 1 ; %$SOMENAME1 - macros name and '%$SOMENAME2 1' - value
is there any way to fix this?
-
Would it help if you define it as below
defineMacro %$SOMENAME1%+%$SOMENAME2, 1
i.e. without spaces around %+ term?
-
By the way, if there some unexpected change in behavior -- don't hesitate to file a bug on http://bugzilla.nasm.us/ This allows us to track the problems and fix them.
-
For me it looks like a bug, so I filed it here http://bugzilla.nasm.us/show_bug.cgi?id=3392219
-
The patch has been pushed upstream, please test it out.
-
I mean wait until our compile farm build a snapshot (http://www.nasm.us/pub/nasm/snapshots/) and pick it up from there.
Optionally you can fetch git repo itself and build nasm by own.