If page 1 ($100-$1FF) won't be used for anything but the stack, there's no need to initialize the stack pointer to any definite value for proper operation. The stack will overflow only when more than 256 bytes are pushed on it regardless of where the top is; wrap-around of the pointer doesn't affect the logical operation in any way.
Some benefits of initialization do come to mind:
- Predictability when debugging
- Possible use of lower part of page 1 for data storage
- Much easier access to stack parameters
The last reason needs a little bit of elaboration. By transferring the stack pointer to X, stack parameters can easily be accessed using indexed addressing:
Code:
tsx
lda $100+offset,x ; offset constant selects which parameter
This will fail if the stack pointer wrapped around partway through pushing the parameters for this routine. For example, the most recently pushed byte might be at $1FF, which would place the next at $100, then $101, etc. This is a good reason to initialize the stack pointer to $1FF (S = $FF) at startup.