The 256 byte hardware stack is plenty for function return addresses and temporary use within a function. How deep are you planning to nest function calls anyway?
You can create as many other stacks as you want using pairs of Zero Page locations as stack pointers.
Best practice for recursive/reentrant code (e.g. compiling C) is to follow modern RISC/x86_64 practice and reserve a few (16 maybe) Zero Page locations as argument/working registers, a few (16 maybe) as callee-save registers, and have prolog and epilog utility functions that create/destroy a stack frame and save/restore N bytes of callee-save ZP locations.
You can unroll those into a sequence of elements like...
lda $1F
dey
sta (SP),y
lda $1E
dey
sta (SP),y
:
lda $10
dey
sta (SP),y
... at 5 bytes and 11 cycles per byte saved. And of course jump into the appropriate part of the sequence.
Comments
The 6502 doesn't even have much of a stack.
The 256 byte hardware stack is plenty for function return addresses and temporary use within a function. How deep are you planning to nest function calls anyway?
You can create as many other stacks as you want using pairs of Zero Page locations as stack pointers.
Best practice for recursive/reentrant code (e.g. compiling C) is to follow modern RISC/x86_64 practice and reserve a few (16 maybe) Zero Page locations as argument/working registers, a few (16 maybe) as callee-save registers, and have prolog and epilog utility functions that create/destroy a stack frame and save/restore N bytes of callee-save ZP locations.
You can unroll those into a sequence of elements like...
... at 5 bytes and 11 cycles per byte saved. And of course jump into the appropriate part of the sequence.