請參考C18 User's Guide 3.2.4 章節的說明: MPLAB C18 supports stack sizes greater than 256 bytes. The default linker scripts allocate one memory region per bank of memory, so to allocate a stack larger than 256 bytes requires combining two or more memory regions, as the stack section cannot cross memory region boundaries. For example, the default linker script for the PIC18C452 contains the definitions:
If a stack larger than 256 bytes is used, the -ls option must be given to the compiler. There is a slight performance penalty that is incurred when using a large stack, as both bytes of the Frame Pointer (FSR2L and FSR2H) must be incremented/decremented when doing a push/pop, rather than just the low-byte.