Re: Why is pulling from the stack slower than pushing?
Posted: Mon Nov 21, 2022 11:58 am
jeffythedragonslayer on Sun 7 Aug 2022 wrote:
quite symmetric
While on the topic of hardware stack, the timings annoy me. Some people write 6502 assembly to use zero page when they could use stack. It is easier to prototype an algorithm using zero page and ordering operations to use stack is an extra step in an already complicated process. However, the result allows recursive algorithms - or use of subroutines within interrupt. Even if stack usage were no faster than using zero page, a program which uses stack is smaller because it omits the one byte address operands. However, we are in a situation where stack timings are asymmetrical, there is minimal advantage to using stack, legacy software greatly neglects stack and therefore there is minimal advantage to improving stack timing.