RL78 Dependent Features
***********************

RL78 Options
============

relax
     Enable support for link-time relaxation.

mg10
     Mark the generated binary as targeting the G10 variant of the RL78 architecture.

Symbolic Operand Modifiers
==========================

The RL78 has three modifiers that adjust the relocations used by the linker:

%lo16()

     When loading a 20-bit (or wider) address into registers, this modifier selects the 16 least significant bits.

            movw ax,#%lo16(_sym)

%hi16()

     When loading a 20-bit (or wider) address into registers, this modifier selects the 16 most significant bits.

            movw ax,#%hi16(_sym)

%hi8()

     When loading a 20-bit (or wider) address into registers, this modifier selects the 8 bits that would go into CS or ES (i.e. bits 23..16).

            mov es, #%hi8(_sym)

Assembler Directives
====================

In addition to the common directives, the RL78 adds these:

.double
     Output a constant in ``double'' format, which is a 32-bit floating point value on RL78.

.bss
     Select the BSS section.

.3byte
     Output a constant value in a three byte format.

.int
.word
     Output a constant value in a four byte format.

Syntax for the RL78
===================

Special Characters
------------------

The presence of a ; appearing anywhere on a line indicates the start of a comment that extends to the end of that line.

If a # appears as the first character of a line then the whole line is treated as a comment, but in this case the line can also be a logical line number directive (see Comments) or a preprocessor control command (see Preprocessing).

The | character can be used to separate statements on the same line.