Article View: comp.lang.asm.x86
Article #179Re: How can I get the current Instruction Address using asm language for intel i386
From: Tauno Voipio
Date: Thu, 31 Oct 2002 18:07
Date: Thu, 31 Oct 2002 18:07
25 lines
2440 bytes
2440 bytes
"Jim" <sorry@not.com> wrote in message news:p8f1sugm0d547nlhtiq9ress9qt1lebfhl@4ax.com... > On Thu, 31 Oct 2002 03:47:59 +0000 (UTC), Edward <yongtian@lucent.com> > wrote: > > >I am trying to get the current instruction address. > >Does anybody give me a kindly suggestion? > > > >Thanks > > > > mov eax,eip > > eip is the program counter. The i386+ is not a RISC machine - eip is not directly addressable. The only 32-bit registers usable in a mov instruction are: eax, ecx, edx, ebx, esp, ebp, esi and edi. The proper method is to access the value pushed by a call. Tauno Voipio tauno voipio @ iki fi
Technical Details
Message-ID:
<OMbw9.442$mA4.20020@read2.inet.fi>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!news.crayne.org!clax86!robomod!not-for-mailReferences:
<3DC179AE.F8F77BB@lucent.com> <p8f1sugm0d547nlhtiq9ress9qt1lebfhl@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,c1ae2bfd06633400
X-Google-Attributes: gid11318c,public
X-Google-Thread: 114917,c1ae2bfd06633400
X-Google-Attributes: gid114917,public
X-Google-ArrivalTime: 2002-10-31 11:58:53 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!news.crayne.org!clax86!robomod!not-for-mail
From: "Tauno Voipio" <tauno.voipio@iki.fi.SPAMBAIT_REMOVE.invalid>
Newsgroups: comp.lang.asm.x86,gnu.gcc.help
Subject: Re: How can I get the current Instruction Address using asm language for intel i386
Approved: CLAX86 Moderators <ccrayne@crayne.org>
Date: Thu, 31 Oct 2002 18:07:17 +0000 (UTC)
Organization: Sonera corp Internet services
Message-ID: <OMbw9.442$mA4.20020@read2.inet.fi>
Sender: clax86@odin.asgard
References: <3DC179AE.F8F77BB@lucent.com> <p8f1sugm0d547nlhtiq9ress9qt1lebfhl@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-CLAX86-Policy: http://www.pacificsites.com/~ccrayne/clax86.html
X-CLAX86-Faq: http://www2.dgsys.com/~raymoon/x86faqs.html
X-CLAX86-Info-1: Send submissions to comp-lang-asm-x86@moderators.isc.org
X-CLAX86-Info-2: Send technical complaints to ccrayne@crayne.org
X-CLAX86-Info-3: Send complaints about policy to ccrayne@crayne.org
X-Comment: moderators do not necessarily agree or disagree with this article.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-MailScanner: Found to be clean
X-UIDL: (n9!!/?,!!bR~"!01d!!
X-Complaints-To: abuse@supernews.com
Lines: 27