Keil Logo

EQU Assembler Statement

symbol EQU expression

The EQU statement creates a new symbol named symbol with the value of the expression. Symbols created with EQU may not be redefined. The expression may be a register name (A, R0-R7) or a simple relocatable expression with no forward references.

Symbols defined with EQU may be used anywhere in operands, addresses, or expressions. Symbols defined as registers may be used anywhere a register is allowed.

If a symbol defined with EQU is made PUBLIC, the expression must evaluate to a constant. Exported symbols include a name and a value but may not include fix-up methods.

See Also


VAL     EQU     45+3       ; Simple definition
PUBLIC  VAL                ; Public definition

REG1    EQU     R1         ; Register symbol definition
VAR     EQU     PUTCHAR    ; Relocatable symbol definition
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.