by Timothy Baldwin <spamtrap@[EMAIL PROTECTED]
>
Mar 25, 2008 at 06:47 PM
In message <87abkmra5y.fsf@[EMAIL PROTECTED]
>, Phil Carmody
<thefatphil_demunged@[EMAIL PROTECTED]
> wrote:
> junkoi <spamtrap@[EMAIL PROTECTED]
> 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.
No that loads 0xf1234 or whatever happens to be at var into %ecx. THe bug
must be elsewhere.