Propeller Manual

Table Of Contents
CALL – Assembly Language Reference
Page 270 · Propeller Manual v1.1
This nature of the CALL instruction dictates the following:
The referenced routine must have only one
RET instruction associated with it. If a
routine needs more than one exit point, make one of those exit points the
RET
instruction and make all other exit points branch (i.e.,
JMP) to that RET instruction.
The referenced routine can not be recursive. Making a nested call to the routine will
overwrite the return address of the previous call.
CALL is really a subset of the JMPRET instruction; in fact, it is the same opcode as JMPRET but
with the i-field set (since
CALL uses an immediate value only) and the d-field set by the
assembler to the address of the label named Symbol_ret.
The return address (PC + 1) is written to the source (s-field) of the Symbol_ret register unless
the NR effect is specified. Of course, specifying NR is not recommended for the CALL
instruction since that turns it into a
JMP, or RET, instruction.