Stack Pointers...

Status
You're currently viewing only -Triple-'s posts. Click here to go back to viewing the entire thread.
Not open for further replies.

-Triple-

Ars Tribunus Angusticlavius
8,554
I'm rusty on my inline assembler, but isn't the external stack pointer stored in the esp register? That would make sense ;) Take a look at the following code (and remember I may be wrong):

code:<HR>
Code:
#include <iostream>
using namespace std;<P>int main()
{
    int x;
    __asm mov x,esp  ;move value stored in esp into x
    cout << "Stack pointer: " << x;
    return 0;
}
 

-Triple-

Ars Tribunus Angusticlavius
8,554
Gack! if you're running on Solaris, the only coding I've done on a SPARC box is Java... and I've never ever heard of a standard method of accessing the stack pointer (besides, of course, the *jmp functions). You probably have to use Solaris-specific assembly outside the program.

Edit: more.

[This message was edited by -Triple- on December 01, 2001 at 19:06.]
 
Status
You're currently viewing only -Triple-'s posts. Click here to go back to viewing the entire thread.
Not open for further replies.