Keil Logo


12.27 EQU

The EQU directive gives a symbolic name to a numeric constant, a register-relative value or a PC-relative value.


name EQU expr{, type}
is the symbolic name to assign to the value.
is a register-relative address, a PC-relative address, an absolute address, or a 32-bit integer constant.
is optional. type can be any one of:
  • ARM.
  • THUMB.
  • CODE32.
  • CODE16.
  • DATA.
You can use type only if expr is an absolute address. If name is exported, the name entry in the symbol table in the object file is marked as ARM, THUMB, CODE32, CODE16, or DATA, according to type. This can be used by the linker.


Use EQU to define constants. This is similar to the use of #define to define a constant in C.
* is a synonym for EQU.


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.
Non-ConfidentialPDF file icon PDF versionARM DUI0379H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  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.