Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Re: Problem wit...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 4587 of 4728
Post > Topic >>

Re: Problem with "mov" in GNU GAS

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.
 




 5 Posts in Topic:
Problem with "mov" in GNU GAS
junkoi <spamtrap@[EMA  2008-03-25 01:56:13 
Re: Problem with "mov" in GNU GAS
Phil Carmody <thefatph  2008-03-25 19:22:17 
Re: Problem with "mov" in GNU GAS
Timothy Baldwin <spam  2008-03-25 18:47:42 
Re: Problem with "mov" in GNU GAS
"Rod Pemberton"  2008-03-25 17:49:55 
Re: Problem with "mov" in GNU GAS
junkoi <spamtrap@[EMA  2008-03-25 18:49:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 0:27:31 CDT 2008.