Author Topic: Why is nasm changing 16/32 registers  (Read 10558 times)

nobody

  • Guest
Why is nasm changing 16/32 registers
« 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

nobody

  • Guest
Re: Why is nasm changing 16/32 registers
« Reply #1 on: November 28, 2004, 09:45:42 PM »
Use the -u switch with ndisasm...