home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,904 of 4,675   
   wolfgang kern to All   
   Re: 32bit relocatable code   
   03 Aug 17 10:23:50   
   
   From: nowhere@never.at   
      
   I answered:   
      
   [about get IP]   
      
   >> Are there any methods of obtaining %eip which don't require the stack?   
      
   > No. At least not on any x86 CPU.   
      
   correction:   
      
   there is one instruction, even only available in long-mode:   
      
   this:   
   48 8d 05 f9 ff ff ff     LEA rax,[rip-7]    ;points to 'this'   
      
   or   
      
   48 8d 05 00 00 00 00     LEA rax,[rip+0]    ;points to 'here'   
   here:   
      
      
   while call-pop will be one byte shorter and points to 'there'.   
      
   e8 00 00 00 00           CALL +0   
   there:   
   58                       POP rax   
   __   
   wolfgang   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca