Keil Logo


ASCII characters may be used in an expression to generate numeric values. Expressions may have up to two ASCII characters enclosed in single quotes ('). More than two characters in an expression causes an error. Following are several examples:

Expression Value
'A' 0041h
'AB' 4142h
'a' 0061h
'ab' 6162h
'' Error: Null string is invalid.
'ABC' Error: More than 2 characters.

Characters may be used anywhere in your program as a immediate data operand. For example:

LETTER_A           EQU     'A'

TEST:              MOV     @R0, #'F'
                   SUBB    A, #'0'
  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.