next up previous contents index
Next: 4.6 ANSI-Compliance Up: 4. SDCC Technical Data Previous: 4.4 Interfacing with Assembly   Contents   Index

4.5 External Stack

The external stack is located at the start of the external ram segment, and is 256 bytes in size. When -xstack option is used to compile the program, the parameters and local variables of all reentrant functions are allocated in this area. This option is provided for programs with large stack space requirements. When used with the -stack-auto option, all parameters and local variables are allocated on the external stack (note support libraries will need to be recompiled with the same options).

The compiler outputs the higher order address byte of the external ram segment into PORT P2, therefore when using the External Stack option, this port MAY NOT be used by the application program.



Johan Knol
2001-07-13