[cc65] "software" stack?

From: Gábor Lénárt <lgb1lgb.hu>
Date: 2010-10-29 18:07:39
Hi,

Maybe my question is already answered somewhere (or even at a quite trivial
place) in this case just send me for some RTFM :)

My question is about the limited stack space of 6502. If that space is not
so enough, is it possible to use an "emulated" stack, that is not using
JSR, RTS, PHA etc, but "emulate" the stack at an arbitrary memory address
with arbitrary (well of course the total memory space is limited to 64K
anyway) size?

I guess the hard part that you can only link object files/libraries if all
of those are compiled with only the same "stack model" (real or "emulated").

My project would be some primitive multi-tasking OS (for special purpose)
where 256 bytes long stack is not enough, also it's a bit problematic if I
have to copy/restore page 1 all the time on context switching to have the
feeling of one page long stack for all of the tasks (and also it's possible
that 256bytes are not enough even for a single task).

Thanks for the answer in advance and sorry for my possible off-topic or
already answered/documented question.

- Gábor
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Oct 29 18:07:45 2010

This archive was generated by hypermail 2.1.8 : 2010-10-29 18:07:50 CEST