| |||
| Home > Directives Reference > Miscellaneous directives > EQU | |||
The EQU directive gives a symbolic name to a
numeric constant, a register-relative value or a PC-relative value. * is
a synonym for EQU.
nameEQUexpr{,type}
where:
nameis the symbolic name to assign to the value.
expris a register-relative address, a PC-relative address, an absolute address, or a 32-bit integer constant.
typeis optional. can
be any one of:type
ARM
THUMB
CODE32
CODE16
DATA
You can use only
if type is an
absolute address. If expr is
exported, the name entry
in the symbol table in the object file will be marked as nameARM, THUMB, CODE32, CODE16,
or DATA, according to .
This can be used by the linker.type
abc EQU 2 ; assigns the value 2 to the symbol abc.
xyz EQU label+8 ; assigns the address (label+8) to the
; symbol xyz.
fiq EQU 0x1C, CODE32 ; assigns the absolute address 0x1C to
; the symbol fiq, and marks it as code