* mov instruction
@ 2013-02-07 3:57 horseriver
2013-02-07 13:57 ` Hendrik Visage
0 siblings, 1 reply; 4+ messages in thread
From: horseriver @ 2013-02-07 3:57 UTC (permalink / raw)
To: linux-assembly
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)
thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mov instruction
2013-02-07 13:57 ` Hendrik Visage
@ 2013-02-07 4:32 ` horseriver
2013-02-08 20:30 ` Robert Plantz
0 siblings, 1 reply; 4+ messages in thread
From: horseriver @ 2013-02-07 4:32 UTC (permalink / raw)
To: Hendrik Visage; +Cc: linux-assembly
On Thu, Feb 07, 2013 at 03:57:37PM +0200, Hendrik Visage wrote:
> On Thu, Feb 7, 2013 at 5:57 AM, horseriver <horserivers@gmail.com> 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 .
thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mov instruction
2013-02-07 3:57 mov instruction horseriver
@ 2013-02-07 13:57 ` Hendrik Visage
2013-02-07 4:32 ` horseriver
0 siblings, 1 reply; 4+ messages in thread
From: Hendrik Visage @ 2013-02-07 13:57 UTC (permalink / raw)
To: horseriver; +Cc: linux-assembly
On Thu, Feb 7, 2013 at 5:57 AM, horseriver <horserivers@gmail.com> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: mov instruction
2013-02-07 4:32 ` horseriver
@ 2013-02-08 20:30 ` Robert Plantz
0 siblings, 0 replies; 4+ messages in thread
From: Robert Plantz @ 2013-02-08 20:30 UTC (permalink / raw)
To: horseriver, Hendrik Visage; +Cc: linux-assembly
________________________________________
From: linux-assembly-owner@vger.kernel.org [linux-assembly-owner@vger.kernel.org] on behalf of horseriver [horserivers@gmail.com]
Sent: Wednesday, February 06, 2013 8:32 PM
To: Hendrik Visage
Cc: linux-assembly@vger.kernel.org
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@gmail.com> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-08 20:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07 3:57 mov instruction horseriver
2013-02-07 13:57 ` Hendrik Visage
2013-02-07 4:32 ` horseriver
2013-02-08 20:30 ` Robert Plantz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.