Re: A92: stacks


[Prev][Next][Index][Thread]

Re: A92: stacks






Anton Ivanov wrote:

> No one has bothered to answer, so I'll ask again.  What is the
> difference between all the stacks?  User stack, Supervisor stack,
> estack, the-good-old stack....
>
> As far as I can see, a7 and sp are the same thing.  Am I right?

A7 and SP are the same (however, I think SP as "stack pointer" is a
really bad
idea, because the opposite of the 68000 is, that registers aren't
reserved for
special functions)
User and Supervisor stack are both pointed by a7. So a7 is doubled
in the 68000 processor. There is one SSP (supervisor stack pointer)
and USP (supervisor stack pointer). Depending on the mode, the processor

is running in (supervisor or user mode), the processor will use SSP or
USP, if you access a7 (or simply SP)
so move a7, d0 will load d0 with the USP, if in usermode or with SSP,
if in Supervisor mode.
The estack is, as far as I know, the stack, on which values are put,
that are returned by TI-Basic functions. (Or by Fargo programs, that
return values)




References: