NASM Forum > Programming with NASM

Why is nasm changing 16/32 registers

(1/1)

nobody:
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:
Use the -u switch with ndisasm...

Navigation

[0] Message Index

Go to full version