NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: nobody on November 15, 2008, 04:39:49 PM
-
Hello !
I have the following problem (using SUSE LINUX 11 with NASM version 2.02 compiled on Jun 6 2008).
I program 64bit assembly code and the following code does not execute properly after code generation with nasm:
mov r9,[memoryvalue] = 08900000000000089h
and r9,0ff00000000000000h
yields 0x0 in r9
--> incorrect !
This code works fine, but not the way I want it:
mov r9,[memoryvalue]
mov rax,0ff00000000000000h
and r9,rax
yields 0x089 in r9
--> correct
Is there a newer version of nasm avaiable or a workaround (wo the add. command) possible?
Many thanks
Bjoern
-
Yes, there is a newer version, with many bugs fixed. Get it here on the download page, or better yet:
http://www.nasm.us (http://www.nasm.us)
The "downloads" section has a better selection of "releases" than you'll find here, and the "snapshots" section has the "latest and greatest". I *think* 2.05.01 will fix your problem, but might as well look at the lastest if you're hunting bugs. If it *isn't* fixed (I'm not up on the 64-bit code), please get back to us. Thanks for the feedback!
Best,
Frank
-
Just used latest NASM version, bug is fixed.
Many thanks,
Bjoern
-
Ooops,
wrong (still had the mov instr., not the and instr. changed).
and r9,0ff00000000000000h
instruction yield the following warning on compiling (now latest NASM version 2.05.01 compiled on Oct 29 2008):
warning: signed dword immediate exceeds bounds
and still the code does not execute properly (also if i use an unsigned 64bit no).
So any remedies for this problem are still welcome !
Many thanks,
Björn