[Coco] Assembly language question: The stack

Ciaran Anscomb cocomalt at 6809.org.uk
Thu Oct 25 03:29:06 EDT 2018


Salvador Garcia via Coco wrote:
> [stack works like ,-S ,S+]
> I'll pause here in case any of the above needs correction.

Nope that's right.

> If I am correct in how the stack works, the first byte of the
> stack is always wasted [...]

Not wasted, S doesn't have to point to usable RAM.  e.g., if ROM starts
at $8000 and you want stack immediately below ROM, LDS #$8000 doesn't
waste anything.

> Also, I assume it is the developer's responsibility to manage the stack,

Yep.

..ciaran


More information about the Coco mailing list