Board index » cppbuilder » ESP assembly language

ESP assembly language


2003-12-10 08:16:06 AM
cppbuilder70
I need to find the value of what ESP currently points to
DWORD getESP
{
asm
{
...
};
}
Can someone fill in the ...? Or is there a better/easier way?
Reason I'm asking is that I library I am using for VCL Stack tracing
requires the currentESP as one of its parameters. And I can't figure out
how to get it.
 
 

Re:ESP assembly language

"JunkMail" < XXXX@XXXXX.COM >wrote in message
Quote
I need to find the value of what ESP currently points to
DWORD CurrentESP;
//...
asm mov CurrentESP, esp;
//...
Gambit
 

Re:ESP assembly language

Borland's C and C++ compilers have pseudo-variables which represent most of
the registers.
The value of the ESP register is in the variable _ESP
. Ed
Quote
JunkMail wrote in message
news:3fd665be$ XXXX@XXXXX.COM ...

I need to find the value of what ESP currently points to

DWORD getESP
{
asm
{
...
};
}

Can someone fill in the ...? Or is there a better/easier way?

Reason I'm asking is that I library I am using for VCL
Stack tracing requires the currentESP as one of its
parameters. And I can't figure out how to get it.
 

{smallsort}

Re:ESP assembly language

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
The value of the ESP register is in the variable _ESP
I was looking for that before posting my earlier reply. I knew there was
one for EAX and such, but I couldn't remember the exact syntax, and of
course they are not documented in the help files :-( I figured there would
be one for ESP as well.
Gambit
 

Re:ESP assembly language

FYI:
They are documented in the help files but you have to know the secret code
:-(
If you put the word pseudovariables into the Index you should find the
entry for them.
. Ed
Quote
Remy Lebeau wrote in message
news:3fd6dad4$ XXXX@XXXXX.COM ...

>The value of the ESP register is in the variable _ESP

I was looking for that before posting my earlier reply. I
knew there was one for EAX and such, but I couldn't
remember the exact syntax, and of course they are
not documented in the help files :-( I figured there would
be one for ESP as well.
 

Re:ESP assembly language

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
If you put the word pseudovariables into the Index you
should find the entry for them.
For which version of BCB? I do not see it listed for either BCB 5 or 6 :-(
Gambit
 

Re:ESP assembly language

I just looked it up using each of bcb6.hlp and bcb4.hlp and it worked. In
the BCB 6 IDE, clicking Help|C++_Builder_Help and putting pseudovariables
(is that really a word?) into the edit control and it went to the same
place.
HTML formatting is banned on here so the columnar data is munged. I added 2
extra spaces to each column so the entries will no longer greatly overlap.
---------------------
Table of C++ Builder register pseudovariables
_AH _CL _EAX _ESP
_AL _CS _EBP _FLAGS
_AX _CX _EBX _FS
_BH _DH _ECX _GS
_BL _DI _EDI _SI
_BP _DL _EDX _SP
_BX _DS _ES _SS
_CH _DX _ESI
All but the _FLAGS and _EFLAGS register pseudovariables
are associated with the general purpose, segment, address,
and special purpose registers.
Use register pseudovariables anywhere that you can use an
integer variable to directly access the corresponding 80x86
register.
The flags registers contain information about the state of the
80x86 and the results of recent instructions.
---------------------
. Ed
Quote
Remy Lebeau wrote in message
news: XXXX@XXXXX.COM ...

>If you put the word pseudovariables into the Index you
>should find the entry for them.

For which version of BCB? I do not see it listed for either
BCB 5 or 6 :-(
 

Re:ESP assembly language

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
I just looked it up using each of bcb6.hlp and bcb4.hlp and it
worked. In the BCB 6 IDE, clicking Help|C++_Builder_Help
and putting pseudovariables (is that really a word?) into the edit
control and it went to the same place.
I did that, it wasn't listed in BCB6's help files at all. I did find it
listed in BCB3, 4, and 5, though.
Gambit
 

Re:ESP assembly language

I cannot understand that. I even started the BCB 6 IDE and verified the
link was there.
. Ed
Quote
Remy Lebeau wrote in message
news:3fd77945$ XXXX@XXXXX.COM ...

I did that, it wasn't listed in BCB6's help files at all. I did find it
listed in BCB3, 4, and 5, though.