Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The stack space looks like this:  

$2000       +------------------+
            | System use       |
            |------------------|
$1FFD       | Unsafe workspace |
            |------------------|
            | Safe workspace   |
            |------------------|
            | Stack pointer    |
            |------------------|
            |                  |
            | Stack expands    |
            | downwards...     |
            |                  |
            |------------------|
            | Mailbox data     |
$1800       | from here...     |
            |------------------|
$17FF       | System use       |
            ...
            ...
$0000       +------------------+

Gliffy
nameappl-stackframe

Even with all these demands it is unlikely that you will have much less than 1.5K to use for the stack, but clearly if you might need more space you will need to make your own arrangements, such as allocating memory and implementing you own stack procedures, or if really necessary using a bad application to provide continuous memory for a stack.

...

If your applications requires access to other banks in your card then you can use the bank switching call, OS OS_Mpb, to bind them in. However, your card could be placed in any of the three slots so you need to determine where your card is. This can simply be done by using OSusing OS_Mgb while Mgb while running ROM'ed code and then using bank offsets relative to this value.