As far as I know the stack pointer points to the first free space in the stack. So when the stack pointer is set up like this:
Code:
LDX #$FF
TXS ; Set up stack
the first free space is in RAM address $00FF or is the stack always in page 1? that would mean the first free space is in $01FF. This also gets me thinking of the way the stack pointer works. is the pointer incremented/decremented first and the byte copied second or the other way around? and which one is it? is the pointer incremented or decremented when pushing a byte?TXS ; Set up stack