NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: hyram on August 08, 2012, 04:29:13 PM
-
Hi folks first post here.
Ok... I'm obviously doing something wrong, but can't noodle out. Neither have I been able to find it on the forum via a search. So if someone could kindly point me in the right direction...
I'm trying to do this:
or word[esi+6], 0FFFFh
Which should assemble as: 66 81 8e 06 00 00 00 ff ff
If I run this back through a disassembler (IDAPro and Pym's) I get back: or word[esi+6], 0FFFFh
Nowever, NASM assembles this instruction as: 66 83 8e 06 00 00 00 ff
If I run this thru a disassembler I get back: or word[esi+6], 0FFh
What am I missing that causes NASM to not give me what I really want?
-TIA
-
I'm confused. What is it you want Nasm to produce?
I'm seeing:
66 83 4E 06 FF
If you really want the "long form":
66 81 4E FF FF
the easiest way is to add "-O0" to Nasm's command line.
Some of the alternatives you suggest don't look like anything Nasm will produce at all to me (alternative encodings?). You can try a list of "db"s, if you want specific encodings.
Of course, we have no control over what IDAPro or "Pym's"(?) will produce.
Best,
Frank
-
Okay, I take it back...
or word [dword esi + 6], strict word 0FFFFh
may do what you want.
Best,
Frank
-
Thanks Frank... strict did the trick.