News for hackers. Stuff that matters.
Re:Ask HN: How does 6502 stack pointer store addr 0x10FF bei... by Someone on Saturday January 06, 2024 @02:06AM (#38889189)
There are only 256 different values for the stack pointer. That’s low enough to fit in a 8-bit register.

See it as a digital display with two hex digits and the value “0x01” painted in front of it:

    0x0142
        ^^ two hex digits: the value in the register
    ^^^^ painted on the front plate of the display
The cpu, similarly, hard-wires those 8 bits (seven zeros and a single one) in front of the register value when accessing the stack.
Re:Ask HN: How does 6502 stack pointer store addr 0x10FF bei... by SairajK19 on Saturday January 06, 2024 @02:21AM (#38889256)
That explains it well, thankyou!