"John Marshall" <[EMAIL PROTECTED]> wrote in message
news:80242@palm-dev-forum...
>
> On Mon, Mar 18, 2002 at 04:08:27PM -0000, Russell K Bulmer wrote:
> > So, does anyone know of a way in C/C++ to get the stack pointer?
>
> void *what_is_a_stack_pointer_anyway () {
>   int insert_imagination_here;
>   return &insert_imagination_here;
>   }

Or, in CodeWarrior compiler speak,

UInt32 BringMeTheHeadOfAlfredoStackPointer(void) = 0x200E;

which inserts an instruction (when used) that copies A6 (the stack
pointer) into D0, which is then used as the return value.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to