On 2/17/25 08:02, Frank Leonhardt via cctalk wrote:
On 17/02/2025 05:12, ben via cctalk wrote:
Did any classic computers have a subroutine call as (S++)=PC, PC=(EFA)
as well as the standard call (--S)=PC,PC=(EFA) ?
One  could have a virtual stack machine, using helper functions without having to deal with return addresses on the stack.

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.

Yes, on the PDP11, any register could be used as an autoincrement/decrement indirect pointer.  So, the use of R6 was merely a convention, baked into the macros in the assembler.  R7 was firmly fixed in the CPU logic as the PC, however.

Jon

Reply via email to