The no_rts instruction pops the subroutine stack.
Synopsis
no_rts()
Description
The no_rts instruction is the mechanism for popping the subroutine stack without returning from a subroutine call. The values for all registers are unaffected by no_rts().
Example
In the following example, TSM pops the stack but continues with the next instruction instead of returning from the subroutine. The register tracing shows that register values remain unchanged with no_rts(), but they are restored, except for r.0, with rts().
trace(1, "begin")
load(r.0, 100)
load(r.15, 115)
trace(1000, r.0)
trace(1015, r.15)
SUBR()
trace(2, "returned from SUBR")
trace(6000, r.0)
trace(6015, r.15)
rts() /* should fail, stack is empty */
quit()
NORETURN:
trace(3, "no return from SUBR")
rts() /* should fail, stack is empty */
quit()
SUBR:
trace(2000, r.0)
trace(2015, r.15)
load(r.0, 200)
load(r.15, 215)
trace(4000, r.0)
trace(4015, r.15)
no_rts() /* replace with no_rts() to see different result */
trace(5000, r.0)
trace(5015, r.15)
goto(NORETURN)