From: Maciej Hrebien <m_hrebien@wp.pl>
To: linux-assembly@vger.kernel.org
Subject: Re: looping_code
Date: Sat, 31 Aug 2002 17:51:59 +0200 [thread overview]
Message-ID: <3D70E61F.39C1CA6B@wp.pl> (raw)
In-Reply-To: Pine.SGI.4.40.0208310210540.117091029-100000@shell01.TheWorld.com
Scott Lanning wrote:
>
> On Mon, 26 Aug 2002, ssams wrote:
> > .data
> > msg: .byte 65,10
> >
> > .text
> > .globl mulai
> > mulai:
> > mov $10,%edx
> >
> > ulang:
> > mov $4,%eax
> > mov $1,%ebx
> > mov $msg,%ecx
>
> This moves the value at 'msg'
> rather than a pointer to 'msg'.
> Try this:
>
> leal msg, %ecx
"mov $msg,%ecx" and "lea msg,%ecx" does the same thing in this example -
moves ptr to 'msg' to the ecx register. The only difference is that the
first one is coded one byte shorter.
Regards,
--
Maciej Hrebien
next prev parent reply other threads:[~2002-08-31 15:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-26 9:19 looping_code ssams
2002-08-26 14:59 ` looping_code Maciej Hrebien
2002-08-31 6:17 ` looping_code Scott Lanning
2002-08-31 15:05 ` looping_code Robert Plantz
2002-08-31 17:36 ` looping_code Scott Lanning
2002-08-31 15:51 ` Maciej Hrebien [this message]
2002-08-31 17:10 ` looping_code Robert Plantz
2002-09-01 9:21 ` looping_code Maciej Hrebien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D70E61F.39C1CA6B@wp.pl \
--to=m_hrebien@wp.pl \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).