Ax51 User's Guide

Expressions and Operators

An operand may be a numeric constant, a symbolic name, a character string or an expression.

Operators are used to combine and compare operands within your assembly program. Operators are not assembly language instructions nor do they generate A51 assembly code. They represent operations that are evaluated at assembly time. Therefore, operators can only handle calculations of values that are known when the program is assembled.

An expression is a combination of numbers, character string, symbols, and operators that evaluate to a single unsigned 32 bit binary number (for A51: 16-bit binary number). Expressions are evaluated at assembly time and can, therefore, be used to calculate values that would otherwise be difficult to determine beforehand. The assembler instantly converts negative decimal values to an internal unsigned binary representation.

The following topics describe operators and expressions and how they are used in A51 assembly programs.