NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: cm on September 06, 2010, 02:53:51 PM
-
Assembling this file:
%define foo "near bar"
%deftok foo_tok foo
%warning Foo = foo, Foo_tok = foo_tok
NASM outputs this:
tok.asm:5: warning: Foo = "near bar", Foo_tok = bar near
Note that I defined foo as "near bar" (with the quotes), but foo_tok got set to "bar near" (without the quotes). Is %deftok intended to return the tokens in reverse? Reading the documentation I expected %deftok would either only return the first token or a list of all the tokens, but in the order they appeared in my definition.
The NASM output is identical for these Win32 executables I had around (nasm -v):
- NASM version 2.09rc7-20100820 compiled on Aug 20 2010
- NASM version 2.09 compiled on Aug 27 2010
- NASM version 2.09-20100825 compiled on Aug 25 2010
- NASM version 2.10rc1 compiled on Aug 9 2010
-
That is not expected behavior and is not documented as such.
I've tested this on the latest release - Nasm v2.09
using the following and indeed get a reversed listing
nasm -f win32 toktest.asm
%define foo 'every rose has its thorn'
%deftok tok foo
%warning Foo = foo, Tok = tok
and get:
toktest.asm:4: warning: Foo = 'every rose has its thorn', Tok = thorn its has rose every
I would think a bug report is required.
-
Reported in bug tracker. Hope it still makes it into 2.09.01 :-)
Relevant link: https://sourceforge.net/tracker/?func=detail&aid=3060478&group_id=6208&atid=106208 (https://sourceforge.net/tracker/?func=detail&aid=3060478&group_id=6208&atid=106208)
-
sorry for initial comment that I've fixed this bug, no i didn't yet, it was a wrong topic ;)
-
this issue not yet fixed in 2.09.01, will be fixed in 2.09.02 I hope