Keil Logo Arm Logo

A251 User's Guide

EQU Assembler Statement

Arguments
symbol EQU expression
Description

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 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.

Note

  • The A251 Assembler replaces each occurrence of the defined symbol name with the specified expression.
See Also

LIT, PUBLIC, SET

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

REG1    EQU     R1         ; Register symbol definition
VAR     EQU     PUTCHAR    ; Relocatable symbol definition

Keil logo

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.