Hello All,
Is there a way of accessing contents of SP in my C/C++ code? I want to know the address stored in SP for some reason. I know it is possible using assembly. However my observation is that SP is not easily available in C/C++ code (or at least i dont know how to access it and documentation doesnt talk about it, documentation says that it is available in assembler as control register).
I would like to see working something like this,
WORD myStackPointer = SP; or WORD myStackPointer = *SP;
I dont know how to declare it as extern?
Please guide.
Thanks in advance.