According to the tech manual, you are allowed to
have the stack anywhere you like and upto 64K.
Does anyone know if you can have multiple stacks?
If so, how is this done?
According to the tech manual, you are allowed to
have the stack anywhere you like and upto 64K.
Does anyone know if you can have multiple stacks?
If so, how is this done?
No Ads.
No Trackers.
No Social Media.
All Content Locally Hosted.
40 Gigabytes and Growing.
Always Free.
Please consider contributing.
This page, the entire Applefritter site, and all subsites of are copyright 1999-2999 by Tom Owad unless otherwise noted. All rights reserved. Apple, the Apple logo, Macintosh, Mac, MacOS, MacBook, iMac, and Mac Pro are trademarks of Apple Computer, Inc. LEGO®is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this site (the feeling's mutual).
According to which tech manual? Apple IIGS GS OS Internals describes it's interaction with the stack. There are memory locations to manage the stack and calls.
The 65816 has one 16-bit stack limited to bank 0. You could create smaller stacks within the overall 64K of stack space. You could even copy bank 0 to and from other banks if you needed to free up stack space or switch context, albeit slowly.
There are many ways to do this.
Apple IIGS/OS Reference Manual
Page 516-517
I forgot about this section
Each program running on the Apple IlGS reserves a portion of bank $00 as a combined
direct-page/stack space. Because more than one application can be loaded in memory at
one time on the Apple IIGS, more than one stack and one direct page could be in bank $00
at a given time. Furthermore, some applications may place some of their code in bank
$00. A given program should therefore probably not use more than about 4 KB for its
direct-page/stack space.
mmphosis
You say you can have have smaller stacks that add up to 64K. Are you saying
just to write your program in smaller sections?
Okay, now I am reading the same manual as you. from page 38...
It sounds like GSOS has some limitations, but nothing that probably could not be worked around if you need to. How large of stack does your program need? I was thinking in terms of programming the 65816 with GSOS out of the way, but I can think of some ways to get around this. It means managing your stack (or stacks) yourself -- like checking for overflow, swapping stack memory as needed and returning everything back to the way GSOS expects it on return.
I will say that I will go for the maximum (64K) and tailor it from there.