[Coco] Assembly language question: The stack

Luis Fernández luis46coco at hotmail.com
Thu Oct 25 07:58:58 EDT 2018


It is also possible to place a return to basic instruction, for example.

Since it is perfectly possible to use a PULS without having previously made a PSHS.

All this applies equally to the pointer U as well as to the pointer S



Enviado desde Correo<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10



________________________________
De: Coco <coco-bounces at maltedmedia.com> en nombre de Ciaran Anscomb <cocomalt at 6809.org.uk>
Enviado: Thursday, October 25, 2018 3:29:06 AM
Para: CoCoList for Color Computer Enthusiasts
Asunto: Re: [Coco] Assembly language question: The stack

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

--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list