We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
In start.a51, there is defined a idata segment ?STACK.
?STACK SEGMENT IDATA
Now, in my asm file, I want to use the ?STACK to reset the SP,when using it directly as follows,
mov SP, #STACK-1
but there is an error: "error A45: UNDEFINED SYMBOL"
How can I do it, thanks.
As the limit area of stack, I store the stack when access the ISR. So, I need to renew SP, and at the end of ISR I'll get back the SP.
As the limit area of stack, I store the stack when access the ISR.
That strongly indicates you're doing way too much inside that interrupt service routine. ISRs should never use so much data (or call other functions) that their stack usage becomes a burden.