Ax51 User's GuideAx51 Introduction Assembling Programs Writing Assembly Programs Assembly Statements Controls Instructions Comments Symbols and Symbol Names Labels Using Operands and Expressions Special Assembler Symbols Immediate Data Memory Access DATA BIT IDATA EDATA XDATA CODE Program Addresses Expressions and Operators Numbers Characters Character Strings Location Counter Operators ( ) * + - / < <= <> == > >= AND BYTEx EQ GT GTE HIGH LOW LT LTE MBYTE MOD NE NOT OR SHL SHR WORDx XOR Class Operators Expressions Expression Classes Relocatable Expressions Simple Relocatable Expressions Extended Relocatable Expressions Expressions Example Control Statements Macro Processor Error Messages Appendix
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.
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.
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.
of your data.