Keil Logo Arm Logo

Ax51 User's Guide

Characters

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

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.