<blockquote class="quote light-black dark-border-color"><div class="quote light-border-color">
<div class="quote-author" style="font-weight: bold;">Jonas Maebe-2 wrote:</div>
<div class="quote-message">
I don't think there is any. Use a label instead. Or do you want to
jump into the middle of an instruction?
</div>
</div></blockquote>
OK, changed to:
<pre><code>
procedure DumpRegs;
label
GetEIP;
...
call GetEIP
GetEIP:
pop dword ptr EIP
...
</code></pre>
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?
<blockquote class="quote light-black dark-border-color"><div class="quote light-border-color">
<div class="quote-author" style="font-weight: bold;">Jonas Maebe-2 wrote:</div>
<div class="quote-message">
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).
</div>
</div></blockquote>
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.
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/Intel-x86-inline-assembler-problem-tp20572969p20594054.html">Re: Intel x86 inline assembler problem</a><br>
Sent from the <a href="http://www.nabble.com/Free-Pascal---General-f683.html">Free Pascal - General mailing list archive</a> at Nabble.com.<br>