RE: mov instruction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




________________________________________
From: linux-assembly-owner@xxxxxxxxxxxxxxx [linux-assembly-owner@xxxxxxxxxxxxxxx] on behalf of horseriver [horserivers@xxxxxxxxx]
Sent: Wednesday, February 06, 2013 8:32 PM
To: Hendrik Visage
Cc: linux-assembly@xxxxxxxxxxxxxxx
Subject: Re: mov instruction

On Thu, Feb 07, 2013 at 03:57:37PM +0200, Hendrik Visage wrote:
> On Thu, Feb 7, 2013 at 5:57 AM, horseriver <horserivers@xxxxxxxxx> wrote:
> > hi:)
> >
> >   Is here a suitable place to post topics about hardware technology?
> >
> >   I am curious about how mov work.
> >   Why it can not move data from a mem adress to another adress  in one instruction.
> >   in this form : mov (eax), (ebx)
>
> That is what the (rep) movs(b/w) etc. operation(s) are designed for
> these "string copy" operations. the old 8086 had those running between
> es:di and ds:si as the registers for this.
  Yeah! I remember that.
  But why this can not work : mov (eax), (ebx)  ?  just curious .

Because the x86 architecture will not allow you to move (or do arithmetic) from memory to memory. You can only move to/from a register from/to memory. For example,

mov (eax), ecx
mov ecx, (ebx)

(assuming AT&T syntax)

--Bob--
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Linux C Programming]     [Linux for Hams]     [DCCP]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux