Ok, so the PLA version works, but when I change the sequence back to the stack version:
; all regs 16 bit
TSX
LDA $0102,X
STA CALLER
I get $0000 in CALLER. $0100,X should be the next free stack byte, $0101,X is the PHP byte, so $0102,X ought to be the first byte of the return address. What am I missing here K, why am I not seeing $3C52 in the stack version ?
edit: NM, in changing the code up I made a mistake about the stack. Both versions work correctly now.