Expressions

An expression is formed by one or more terms.

A term is the smallest element that the assembler parser can recognize when processing an expression. Each term has a value and a type. An expression is formed by one or more terms. The assembler evaluates each expression into a single value, and uses that value as an operand. Each expression also has a type. If an expression is formed by one term, the expression has the same type as the type of the term. If an expression consists of more than one term, the type is determined by the expression handler according to certain rules applied to all the types of terms contained in the expression. Expression types are important because:

  • Some pseudo-ops and instructions require expressions with a particular type.
  • Only certain operators are allowed in certain types of expressions.