Table of Contents Previous topic Next topic
LINKER->Linker Command Line Options->Specify Stack Segment (/STACK:)
This option is used to specify an IDATA segment that will be located at a higher address than any other IDATA segment. This ensures that the whole of the remaining IDATA space is available for this segment. The format for the option is:
where <segment name> is the name of the IDATA segment that you wish to become the stack segment.
Note that you will still need to initialise the 8051 stack pointer SP with the start address of the IDATA segment that you specify.
An alternative way of ensuring that a segment is located at an address higher than other segments in that address space is to use the cross assembler POSTPONE directive when the segment is defined.
You do not need to use this option if you are using the C compiler with a startup routine similar to the one supplied in the compiler library.