Keil Logo

Character Strings

The A166 Assembler allows ASCII character strings in expressions. An expression can have up to two ASCII characters enclosed in single quotes (''). However, when character strings are used outside of expressions, such as in the DB directive, the two-character limit does not apply.

NOTE

  • Character strings are not permitted to have a null length

A null character string consists of two single quotes that enclose no other characters (''). The list below shows various character strings:

'A' Evaluates to 0041H.
'AB' Evaluates to 4142H.
'a' Evaluates to 0061H.
'ab' Evaluates to 6162H.
'' The null string is not valid.
'abc' ERROR resulting from more than two characters.
TEST: MOV      RL0, # 'A'
SUB       RL0, # '0'
TABLE: DB         'ENTER ANY KEY TO CONTINUE' , 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.