Article View: comp.lang.asm.x86
Article #177Re: How can I get the current Instruction Address using asm language for intel i386
From: Lyle Goldman
Date: Thu, 31 Oct 2002 06:56
Date: Thu, 31 Oct 2002 06:56
29 lines
2512 bytes
2512 bytes
Frank Kotler <fbkotler@attbi.com> wrote:
>
> Edward <yongtian@lucent.com> wrote:
> > I am trying to get the current instruction address.
> > Does anybody give me a kindly suggestion?
>
> call nowhere
> nowhere:
> pop eax
>
> (add the appropriate punctuation if you're using gas) ... but I
> understand it messes up the "prediction" logic on some processors and
> causes a performance penalty.
>
> Or if you mean at "assemble time", "$" for Nasm - think it's "." for
> gas(?). Dunno about gcc.
>
> Best,
> Frank
>
It's "$" for MASM and TASM.
By the way, why do you keep putting "{SPAM}" at the beginning of your
subject lines?
- Lyle Goldman
Technical Details
Message-ID:
<3DC0C9AF.6080308@erols.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!west.cox.net!cox.net!newsfeed-east.nntpserver.com!nntpserver.com!newshosting.com!news-xfer1.atl.newshosting.com!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> <3DC0B562.7000102@attbi.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 00:00:02 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!west.cox.net!cox.net!newsfeed-east.nntpserver.com!nntpserver.com!newshosting.com!news-xfer1.atl.newshosting.com!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: Lyle Goldman <gizmo-p@erols.com> 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 06:56:54 +0000 (UTC) Organization: crayne.org Message-ID: <3DC0C9AF.6080308@erols.com> Sender: clax86@odin.asgard References: <3DC179AE.F8F77BB@lucent.com> <3DC0B562.7000102@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed 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-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-MailScanner: Found to be clean X-UIDL: P<$#!`)H!!_K@!!(A;!! X-Complaints-To: abuse@supernews.com Lines: 31