On Oct 22, 2:36 pm, Elcaro Nosille
wrote:
> Terje Mathisen schrieb:
>
> >> With downwards growing stacks you can address the "top" element of
> >> the stack at address sp + 0 and this results often in smaller opodes
> >> of the machine-instructions adressing that elements.
> >> With upwards growing stacks you either would have to know the size
> >> of the top element when pushing another element to the stack or you
> >> would have to address the top element at sp - N, you you couldn't
> >> address it with an offset-less instruction.

> > Sure you could!
> > You just need a pre-increment stack pointer.

>
> Yes, but then a push onto the stack would have to know the size of
> the element pushed before; i.e. there would be two operands of this
> push-operation - that's bulky and unnecessary.


This is logical.

Karthik Balaguru