PUSHJ and PUSHGO

Name:

PUSHJ $X,$Y,Z
PUSHGO $X,$Y,Z

Specification: assignment to $X. If X < rG, registers $0 to $X - 1 are pushed to the register stack. If $X is a marginal register, it is automatically made local as in an Finally, the value X is pushed on the register stack.

If X ≥ rG, registers $0 to $rL-1 are pushed to the register stack Finally, the value rL is pushed on the register stack and rL ← 0.

Further:
rJ ← @ + 4
@ ← @ + 4YZ (PUSHJ) or
@ ← @ + 4(YZ - 216) (PUSHJB) or
@ ← $Y + $Z (PUSHGO) or
@ ← $Y + Z (PUSHGOI)

The PUSHJ-Operation of x + 1 registers to the register stack S[0],…,S[τ - 1] entails the following:
S[τ] ← $0
S[τ + 1] ← $1
S[τ + x - 1] ← $(X - 1),
S[τ + x] ← x,
τ ← τ + x + 1,
$0 ← $(x + 1)
$(rL - x - 2) ← $(rL - 1),
rL ← rL - x - 1.

Timing:

PUSHJ: 1υ

PUSHGO: 3υ

Description:

The PUSHJ and PUSHGO instructions are used to link subroutines. The only difference between the two is the computation of the target address. PUSHJ uses a 16-bit relative address, like branch instructions, while PUSHGO uses an absolute address $Y+$Z (or $Y+Z) like the GO instruction.

See also:

POP and
GO