Skip to main content

IAR Embedded Workbench for RL78 5.20

Using function memory attributes

In this section:

It is possible to override the default placement for individual functions. Use the appropriate function memory attribute to specify this.

These attributes are available:

Function memory attribute

Address range

Pointer size

Description

__callt

0-0xFFFF

2 bytes

The function can be called from anywhere in memory, using a vectored CALLT instruction.

__near_func

0-0xFFFF

2 bytes

The function can be called from anywhere in memory. This is the default attribute in the Near code model.

__far_func

0-0xFFFF

3 bytes

The function can be called from anywhere in memory. This is the default attribute in the Far code model.

Table 57. Function memory attributes


Pointers with function memory attributes have restrictions in implicit and explicit casts between pointers and between pointers and integer types. For information about the restrictions, see Casting.

For syntax information and for more information about each attribute, see Extended keywords.