Skip to main content

IAR Embedded Workbench for Arm 9.70.x

Summary of assembler operators

In this section:

The following tables give a summary of the operators, in order of precedence. Synonyms, where available, are shown after the operator name.

Note

The operator synonyms are enabled by the option -j. See also the chapter Migrating to the IAR Assembler for Arm.

Parenthesis operator

Precedence: 1

()

Parenthesis.

Unary operators

Precedence: 1

+

Unary plus

Unary minus

! , :LNOT:

Logical NOT

~ , :NOT:

Bitwise NOT

LOW

Low byte

HIGH

High byte

BYTE1

First byte

BYTE2

Second byte

BYTE3

Third byte

BYTE4

Fourth byte

LO12

Lower 12 bits of a symbol

LWRD

Low word

HWRD

High word

DATE

Current time/date

SBREL

The offset to a symbol from the addressing origin of its output segment.

SFB

Section begin

SFE

Section end

SIZEOF

Section size

Multiplicative arithmetic operators

Precedence: 2

*

Multiplication

/

Division

% , :MOD:

Modulo

Additive arithmetic operators

Precedence: 3

+

Addition

Subtraction

Shift operators

Precedence: 2.5-4

>>

Logical shift right (4)

:SHR:

Logical shift right (2.5)

<<

Logical shift left (4)

:SHL:

Logical shift left (2.5)

AND operators

Precedence: 3-8

&&

Logical AND (5)

:LAND:

Logical AND (8)

&

Bitwise AND (5)

:AND:

Bitwise AND (3)

OR operators

Precedence: 3-8

|| , :LOR:

Logical OR (6)

|

Bitwise OR (6)

:OR:

Bitwise OR (3)

XOR

Logical exclusive OR (6)

:LEOR:

Logical exclusive OR (8)

^

Bitwise exclusive OR (6)

:EOR:

Bitwise exclusive OR (3)

Comparison operators

Precedence: 7

=, ==

Equal to

<>, !=

Not equal to

>

Greater than

<

Less than

UGT

Unsigned greater than

ULT

Unsigned less than

>=

Greater than or equal to

<=

Less than or equal to