Keil Logo

LIT Assembler Statement

Arguments
symbol LIT 'string'
symbol LIT "string"
Description

The LIT statement defines a symbol to be replaced by the specified text. Each time symbol is encountered in the source file it is replaced with the literal text string. To use the symbol name as a sub-string, it must be enclosed within curly braces ('{}'). For example:

        JMP     replace{this}

The assembler listing file shows the expanded lines where literals are substituted.

Note

  • This directive is supported in the AX51 Assembler only.
See Also

EQU, SET

Example
REG     LIT     'R1'
NUM     LIT     'A1'
NAME    LIT     "KEIL"
.
.
.
        NOP
        JMP      L{NUM}
        NOP
L{NUM}: RET
  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.