Skip to main content

IAR Embedded Workbench for RL78 5.20

Source format

In this section:

The format of an assembler source line is as follows:

[label [:]] [operation] [operands] [; comment]

where the components are as follows:

label

A definition of a label, which is a symbol that represents an address. If the label starts in the first column—that is, at the far left on the line—the :(colon) is optional.

operation

An assembler instruction or directive. This must not start in the first column—there must be some whitespace to the left of it.

operands

An assembler instruction or directive can have zero, one, or more operands. The operands are separated by commas. An operand can be:

• a symbolic name representing a numeric value or an address (where the latter also is referred to as a label)

• a register

• a predefined symbol

• the program location counter (PLC)

• an expression.

comment

Comment, preceded by a ; (semicolon)

C or C++ comments are also allowed.

Table 113. Assembler source line components


The components are separated by spaces or tabs.

A source line cannot exceed 2,047 characters.

Tab characters, ASCII 09H, are expanded according to the most common practice, that is, to columns 8, 16, 24 etc. This affects the source code output in list files and debug information. Because tabs might be set up differently in different editors, do not use tabs in your source files.