www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/26/03:59:14

Message-Id: <199604260732.DAA14969@delorie.com>
Date: Fri, 26 Apr 96 10:29:40 LIT
From: Martynas Kunigelis <martynas DOT kunigelis AT VM DOT KTU DOT LT>
Subject: Re: Getting the IP
To: jkillen AT tinuviel DOT cs DOT wcu DOT edu, djgpp AT delorie DOT com
In-Reply-To: Your message of 25 Apr 1996 00:27:55 -0500

On 25 Apr 1996 00:27:55 -0500 you said:
>Does anyone know how to get the IP (Instruction Pointer) (the PC for you
>
>MIPS people) using gas or djgpp.
>
>Jason Killen
>jkillen AT tinuviel DOT cs DOT wcu DOT edu


Try this:

   ....
   call foo
   ...      /* you got your EIP in EAX now */


foo:
   movl (%esp), %eax
   ret


huh, this comes from my Z80 assembly experience. ages ago....

Martynas

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019