3 ms·
Subroutines are usually not done with self-modifying code on the PDP-8. Instead the JMS instruction stores the next PC in the addressed location E and transfers
by aap_ 4y ago
Subroutines are usually not done with self-modifying code on the PDP-8. Instead the JMS instruction stores the next PC in the addressed location E and transfers control to E+1. The return is done with an indirect jump through E.
...
JMS FOO
... <- return here
FOO, 0
... <- first instruction executed
...
JMP I FOO