beautypg.com

Callr (call relative) – Echelon Neuron User Manual

Page 90

background image

CALLR (Call Relative)

The CALLR instruction calls a function at the specified forward or backward

signed relative displacement of -126 to +129 bytes. The CALLR instruction uses

the (long) relative addressing mode. The displacement expression must resolve

at link time to a value in the range -128 to +127 (two less than the actual

displacement because the displacement calculation includes the size of the

CALLR operation itself).
The Neuron Assembler also supports the use of a label for the displacement

expression; manual calculation of the displacement value is not required.
The CALLR instruction applies to Series 3100, 5000, and 6000 devices.

Syntax:
The CALLR instruction requires a single operand to specify the displacement:

CALLR displacement

Table 25 describes the attributes of the CALLR instruction.

Table 25. CALLR Instruction

Instruction

Hexadecimal

Opcode

Instruction

Size (Bytes)

CPU Cycles

Required

Affect on

Carry Flag

CALLR

74

2

5

None


Example:
The following example calls a local function named myFilter. This example

assumes that the called function is a nearby function.

callr myFilter

...

myFilter ...

ret ; return to caller

80

Neuron Assembly Language Instruction Statements