Skip to main content

IAR Embedded Workbench for RL78 5.20

__far

In this section:
Syntax

See Syntax for type attributes used on data objects.

Description

The __far memory attribute overrides the default storage of variables given by the selected data model and places individual variables and constants in far memory.

You can also use the __far attribute to create a pointer explicitly pointing to an object located in the far memory.

Storage
  • Address range: 0–0xFFFFF (1 Mbyte)

  • Maximum object size: 65535 bytes. An object cannot cross a 64-Kbyte boundary.

  • Pointer size: 3 bytes. Arithmetics is only performed on the two lower bytes, except equality comparison which is always performed on the entire 24-bit address.

Example
__far int x;
See also

Memory types.