On Tue, 18 Feb 2025 12:00:10 -0600 [email protected] wrote: > On the more than "one stack pointer" in the subject, it was a bit > arbitrary on the PDP-11 (or VAX) as the pre/post indexed indirect > addressing made every register a stack pointer. But this is where I > get hazy between DEC and 68K, and I did a lot more 68K. I'm pretty > sure you could do a move.l PC, An and you could certainly do an > indirect jmp (An), so effectively you could have multiple call stacks > if you wanted.
Almost, kinda-sorta. The JSR and RTS instructions are hard-wired to use R6/SP, and there's nothing you can do about that. You *can* implement a return off another "stack" by doing e.g. MOV @(Rn)+, PC as long as you save the return address by hand, first - but this affects the flags, unlike JSR/RTS.
