0

I'm just curious. When I first started learning about the 6502 processor line, I was quite confused because I'd never heard of a descending stack at all.

I have also seen that other processors have options for implementing the stack differently (ascending, descending, etc...,) complete with individual assembly instructions to deal with each implementation.

So what's the reasoning behind this technical decision?

  • 4
    you mean why the stack in 6502 grows downward? Then it's a duplicate of this question: [Why do stacks typically grow downwards?](http://stackoverflow.com/q/2035568/995714) – phuclv Dec 09 '16 at 02:33
  • 1
    Most architectures use a descending stack. Ascending stack architectures are much rarer. – Ross Ridge Dec 09 '16 at 02:33
  • [What is the direction of stack growth in most modern systems?](http://stackoverflow.com/q/664744/995714) – phuclv Dec 09 '16 at 02:34
  • With only 256 bytes available for the stack, there's little difference which way it grows. – Sergey Kalinichenko Dec 09 '16 at 02:39
  • 1
    I have nominated this question for reopening because it is not an exact duplicate of the referenced question. In particular, the usually given reason for why stacks grow downwards does not apply to the 6502 hardware stack. The 6502 stack has a dedicated page (addresses $0100 to $01FF) which means that the heap or program code growing upwards is not a valid reason in this case. – JeremyP Feb 16 '17 at 16:56

0 Answers0