L251: MOVING THE STACK
Information in this article applies to:
I wish to locate the stack at 2000H. How do I do it?
You need to use the linker SEGMENTS directive as follows:
Note that the stack resides in the EDATA memory class; you must make sure that the address where you locate the stack is in EDATA. If not, then you may use the linker CLASSES directive to specify ranges of addresses to be in the EDATA class. For example:
CLASSES(EDATA(2000H - 21FFH))
Note that it is a bad idea to locate the stack in the middle of data segments. If the stack overflows or underflows, there is a higher chance of data being corrupted.
Last Reviewed: Friday, July 15, 2005
of your data.