Skip to main content

IAR Embedded Workbench for RL78 5.20

Value assignment directives

In this section:
Syntax

label = expr

label ASSIGN expr

label DEFINE const_expr

label EQU expr

label SET expr

label VAR expr

Parameters

const_expr

Constant value assigned to symbol.

expr

Value assigned to symbol or value to be tested.

label

Symbol to be defined.

Operand modifiers

These prefixes can be used to modify operands:

Prefix

Usage

Description

no prefix

source/destination

The assembler uses SFR or 16-bit (near) addressing

S:

source/destination

Forces the assembler to use short addressing (saddr)

N:

source/destination

Forces the assembler to use 16-bit (near) addressing

F:, ES:

source/destination

Forces the assembler to use ES:16-bit (far) addressing

$:, S:, S:$

branch

Forces the assembler to use 8-bit relative addressing

no prefix, R:, R:$

branch

The assembler uses 16-bit relative addressing

N:

branch

Forces the assembler to use 16-bit absolute addressing

F:, ES:

branch

Forces the assembler to use 20-bit absolute addressing

R:, R:$

call

Forces the assembler to use 16-bit relative addressing

no prefix, N:

call

The assembler uses 16-bit absolute addressing

F:, ES:

call

Forces the assembler to use 20-bit absolute addressing

Table 126. Operand modifiers


Description

These directives are used for assigning values to symbols:

Directive

Description

=, EQU

Assigns a permanent value local to a module.

ASSIGN, SET, VAR

Assigns a temporary value.

DEFINE

Defines a file-wide value.

Table 127. Value assignment directives