|
Post by VDC 8x2 on Jul 8, 2014 19:01:33 GMT
I was thinking of using the mmu to set aside a seperate stack just for temp variables.
would have sei in effect while getting or pushing variables. and stack pointer varables.
Just another idea out of the blue from me.
|
|
|
Post by gsteemso on Jul 22, 2014 4:48:20 GMT
Last year, I did quite a bit of thinking on the maintenance of software stacks in a C128. You can use more than one page for your stack and still take advantage of hardware-assisted stack access if you use either a stack sniffer, or paranoid sanity-checking on every PUSH and POP operation (or, as a less time-consuming third alternative, on major routine entrances and exits), in order to adjust the S register and where the MMU thinks the stack is whenever S gets too close to 0 or to 255. Alternatively, you can do the whole thing in software; your stack would be as big as you please and PUSH and POP operations would be library routines instead of single machine instructions. Obviously, that would be a lot more flexible, but also probably an order of magnitude slower.
|
|
|
Post by cthulhu on Aug 5, 2014 8:47:22 GMT
Commodore Free has an ongoing article series about using the stack to call and pass parameters to a function library.
|
|