Re: Problem with "mov" in GNU GAS
- From: Phil Carmody <thefatphil_demunged@xxxxxxxxxxx>
- Date: 25 Mar 2008 19:22:17 +0200
junkoi <spamtrap@xxxxxxxxxx> writes:
Hello everybody,
I am writing a simple ASM code with GNU GAS. I am having some problems
with mov command. Please could anybody tell me why 2 lines (*) and
(**) are not equivalent?? (currently my code works as expected with
(**), but not with (*)
(My program is in 16bit mode)
---
var:
.long 0xf1234
So var is an address. At that address is reserved space for a
long, which is to be initialised to 0xf1234.
.code16gcc
movl var, %ecx // (*)
Here ecx now holds the address where the 0xf1234 above is stored.
movl $0xf1234, %ecx // (**)
But here ecx is set to the constant value 0xf1234.
Phil
--
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration
.
- Follow-Ups:
- Re: Problem with "mov" in GNU GAS
- From: Timothy Baldwin
- Re: Problem with "mov" in GNU GAS
- References:
- Problem with "mov" in GNU GAS
- From: junkoi
- Problem with "mov" in GNU GAS
- Prev by Date: Re: int 0x13 utility
- Next by Date: Re: int 0x13 utility
- Previous by thread: Problem with "mov" in GNU GAS
- Next by thread: Re: Problem with "mov" in GNU GAS
- Index(es):
Relevant Pages
|