The assembler can manipulate constants and relocatable values at assembly time.  If the assembler cannot resolve these to a constant value (for example, an expression involving the value of an external symbol cannot be resolved at assembly time), the expression is passed onto the linker to resolve.

Each operator has a precedence, and the following table lists the precedence of the operators from highest to lowest:

Operator Group
[] . :: Postfix operators
DEFINED HBYTE LBYTE HWORD LWORD SIZEOF STARTOF ENDOF SFB SFE NOT ! LNOT !! THIS $ Monadic prefix operators
* / % Multiplicative operators
+ - Additive operators
SHL SHR ASHR << >> Shifting operators
LT GT LE GE < > <= >= Relational operators
EQ NE == != Equality operators
AND & Bit-wise and
XOR ^ Bit-wise exclusive or
OR | Bit-wise inclusive or
LAND && Logical and
LOR || Logical or