I'm writing a little program in H316 assembler, running it in simh
(3.8-1). The usual idiom for returning from a subroutine seems to be an
indirect jump through a pointer. But my indirect jump halts at the
location where the pointer is stored.
The code looks something like this:
...
from jst subr call the subroutine
...
subr dac **
... do some stuff
jmp* subr
The jst is supposed to drop the address of from+1 into location subr,
and execution continues at subr+1.
The indirect jmp (jmp*) should be the return, getting the target address
from location subr. There are even examples in some of
the H316 docs
showing this kind of thing.
Best I can tell, the assembled code has all the correct bits set -- the
indirect bit is the high order bit in the word, and is set, opcode looks
correct, etc. The correct target address is indeed stored at subr by
the jst.
Obviously this isn't re-entrant, etc. Don't care about that at this
point.
What am I doing wrong?
Thanks,
De