Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Maybe this has been solved before, but I can't search for "stack" in the forum 'cause the search engine tells me it's a very common word so it won't be included in the search XD

Were the stack is located? Can I control where it is located without messing things up?

I'm asking this 'cause I'll be trying using extra RAM pages in 128K models for storage.
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)

Forum Jump:

Users browsing this thread: 1 Guest(s)