Keil Logo

Symbols and Symbol Names

A symbol is a name that you define to represent a value, text block, address, or register name. You can also use symbols to represent numeric constants and expressions.

Symbol Names

Symbols are composed of up to 31 characters from the following list:

A Z, a z, 0 9, _, and ?

A symbol name can start with any of these characters except the digits 0 9.

Symbols can be defined in a number of ways. You may define a symbol to represent an expression using the EQU or SET control statements:

NUMBER_FIVE              EQU     5
TRUE_FLAG                SET     1
FALSE_FLAG               SET     0

You may define a symbol to be a label in your assembly program:

LABEL1:                  DJNZ    R0, LABEL1

You can define a symbol to refer to a variable location:

SERIAL_BUFFER            DATA    99h

Symbols are used throughout assembly programs. A symbolic name is much easier to understand and remember than an address or numeric constant. The following topics provide more information about how to use and define symbols.

  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.