linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: leslie.polzer@gmx.net
To: A D <a_d_249@hotmail.com>
Cc: linux-assembly@vger.kernel.org
Subject: Re: Question regarding EIP instruction pointer
Date: Fri, 30 Mar 2007 15:58:23 +0200	[thread overview]
Message-ID: <20070330135823.GA5129@wintermute.farpoint> (raw)
In-Reply-To: <BAY133-F35089BE38C90DC5E52C15CF5630@phx.gbl>

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

On Fri, Mar 30, 2007 at 09:38:41AM -0400, A D wrote:

> I know that EIP register is the instruction pointer. But how does it
> know how many bytes it needs to increment to the next instruction?
In order to execute the current instruction, the CPU must determine its
format, which also means finding out how many bytes the command takes.

Next command is at eip+sizeof(command).  Of course, this only holds for
subsequent execution, branching is another thing.

  Leslie

-- 
NEW homepage: https://viridian.dnsalias.net/~sky/homepage/
gpg --keyserver pgp.mit.edu --recv-keys DD4EBF83

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-03-30 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-30 13:38 Question regarding EIP instruction pointer A D
2007-03-30 13:58 ` leslie.polzer [this message]
2007-03-30 14:29   ` A D
2007-03-30 16:14     ` Robert Plantz
2007-03-30 17:55 ` Brian Raiter
     [not found] <873AB473-8332-49C7-9612-FF6357FCD5CD@ticino.com>
2007-03-31  3:24 ` A D

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=20070330135823.GA5129@wintermute.farpoint \
    --to=leslie.polzer@gmx.net \
    --cc=a_d_249@hotmail.com \
    --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).