[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug with intel syntax
From: |
Luis Sanchez Fernandez |
Subject: |
Bug with intel syntax |
Date: |
Fri, 22 Feb 2002 18:32:40 +0100 |
Dear Sir/Madam,
I'm not completely sure whether this is or not a bug. If it is a bug I
guess it should have already been reported. If it is not a bug I will
thank you if you can tell me what I'm doing wrong.
I am using gas version 2.11.2 in a linux computer. The version of the
kernel is 2.0.36. The cpu I´m not sure, but it should be a Pentium
something.
I´m trying to use gas with the Intel syntax. When I want to write an
inmedate operand that is a symbol I write the name of the symbol
undelimited, as it is explained in the manual. The problem is that gas
interprets it as a displacement, not as an inmediate operand. For
instance, in the following simple example, the instruction "push mens"
is interpreted by gas as a push with an memory operand, that is stored
in the address defined by mens.
If this is not a bug, could you tell me how should I write an inmediate
operand?
Thank you very much,
Luis Sánchez
------------------------------------------------------------
.intel_syntax noprefix
.data
mens:
.string "Hola Mundo\n"
.text
.global main
main:
push ebp
mov ebp, esp
push mens
call printf
add esp, 4
done:
mov esp,ebp
pop ebp
ret
- Bug with intel syntax,
Luis Sanchez Fernandez <=