beautypg.com

Callf (call far) – Echelon Neuron User Manual

Page 89

background image

CALLF (Call Far)

The CALLF instruction calls a function at the specified absolute address. The

CALLF instruction uses the absolute addressing mode. The address expression

can resolve at link time to any value within the 64 KB address space.
Recommendation: For calls to addresses in the lower 8 KB of the address

space, use the near-address CALL instruction. For calls to nearby functions, use

the CALLR instruction.
The CALLF instruction applies to Series 3100, 5000, and 6000 devices.

Syntax:
The CALLF instruction requires a single operand to specify the far address:

CALLF address

Table 24 describes the attributes of the CALLF instruction.

Table 24. CALLF Instruction

Instruction

Hexadecimal

Opcode

Instruction

Size (Bytes)

CPU Cycles

Required

Affect on

Carry Flag

CALLF

77

3

7

None


Example:
The following example calls a function named %PTRINC. This example assumes

that the called function resides at a high memory address.

callf %PTRINC ; calculate next ptr bytes

...

%PTRINC APEXP ; function body

...

ret ; return to caller

Neuron Assembly Language Reference

79