02-08-2013, 10:44 AM
Stack is leave untouched, so it's below the RAMTOP (it's set with the CLEAR command in the loader). Basically, it's below your ORG address. So setting ORG at 32767 for example, will enlarge your available stack (at expenses of shrinking the program memory).
Update: Stack is only used for function calls (parameters, return address, etc). So it's possible (with some caution) to change the SP register before calling a function, call it, and restore the SP register upon return, for example. I guess you could use a switched memory bank as a temporary stack. 8)
Update: Stack is only used for function calls (parameters, return address, etc). So it's possible (with some caution) to change the SP register before calling a function, call it, and restore the SP register upon return, for example. I guess you could use a switched memory bank as a temporary stack. 8)