NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: nobody on November 25, 2004, 11:15:49 AM

Title: Why is nasm changing 16/32 registers
Post by: nobody on November 25, 2004, 11:15:49 AM
Maybe someone call tell me what I'm doing wrong...

I have assembled the following code with 0.98.38:

mov dx, ax
shl eax, 16
mov ax, dx

When I use -f bin, output is OK.
If I use -f elf or -f win32, the assemble reads:

mov edx, eax
shl ax, 10h
mov eax, edx

What's going on? The same seems to happen with

push ebp
mov ebp, esp
Title: Re: Why is nasm changing 16/32 registers
Post by: nobody on November 28, 2004, 09:45:42 PM
Use the -u switch with ndisasm...