Re: Question regarding EIP instruction pointer

[email protected]
Newsgroups gmane.linux.assembly
Message-ID <[email protected]>
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
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGDRd+yYzv6N1Ov4MRAi34AJwLG4qkWhm/z1zvUueHWvY23c1RPACfa39X
ezhx73grgCRu7NS3UJ48tYU=
=+C2L
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.