Re: Question regarding EIP instruction pointer
[email protected] Fri, 30 Mar 2007 15:58:23 +0200
| Newsgroups | org.kernel.vger.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-----