NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: nobody on August 12, 2007, 07:52:44 PM
-
In http://sourceforge.net/docman/display_doc.php?docid=47250&group_id=6208 (http://sourceforge.net/docman/display_doc.php?docid=47250&group_id=6208) there is:
"..so you can do things like
buffer: db 'hello, world'
times 64-$+buffer db ' '
which will store exactly enough spaces to make the total length of
buffer
up to 64."
Now should'nt that be "times 64-$-buffer db ' '" ?
-
Looks correct to me. If we wrote it with parentheses...
times 64 - ($ - buffer) db ' '
Yeah, that would be correct, too.
Thanks for the feedback, though - we count on you guys to catch things like that!
Best,
Frank
-
You're so right, my bug. I always forget the precedence rules after being gone
fromem for quite long.
Offcourse, 64-($-buffer) is really 64+(-1)($-buffer) -> 64+(-$)+buffer -> 64-$+buffer .
Well I always re-/learn new/old things i guess.