[fpc-pascal] Intel x86 inline assembler problem

leledumbo leledumbo_cool at yahoo.co.id
Thu Nov 20 03:45:31 CET 2008

Jonas Maebe-2 wrote:
> I don't think there is any. Use a label instead. Or do you want to  
> jump into the middle of an instruction?
OK, changed to:

procedure DumpRegs;
  call GetEIP
  pop dword ptr EIP

It runs OK, but I'm not sure whether this is the correct value or not.
I'm trying to get the current EIP value. Do you have any idea?

Jonas Maebe-2 wrote:
> While it's not user-visible, it's still the name of a cpu register.  
> And given that its 64 bit cousin (RIP) is exposed, it might also be  
> exposed in 32 bit mode in the future (although this is unlikely).
OK, so from the point of view FPC inline assembler, EIP is visible and has
higher precedence than local variable with the same name. I'll use a
different name then.
View this message in context: http://www.nabble.com/Intel-x86-inline-assembler-problem-tp20572969p20594054.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20081119/df22d1ab/attachment.html>

More information about the fpc-pascal mailing list