Program Structure
Symbols and Constants
Symbols and Constants
Both addresses and constants can be represented symbolically. Labels represent a symbolic address except when the label is on an .EQU, .REG, or .MACRO directive. If the label is on an .EQU or .REG directive, the label represents a symbolic constant. If the label is the .MACRO directive, the label represents a macro name.
Symbols are composed of uppercase and lowercase letters
The Assembler considers uppercase and lowercase letters in symbols to be distinct. The mnemonics for operation codes, directives, and
$START$ | _start | PROGRAM | M$3 | $global$ |
$$mulI | main | P_WRITE | loop1 | 1st_time |
The following are examples of illegal symbols:
LOOP1 Contains an illegal character
&st_time | Begins with & |
123Does not contain a nondigit
Integer constants can be written in decimal, octal, or hexadecimal notation, as in the C language. “Integer Constants” on page 22 lists the ranges of these integer constants.
Chapter 2 | 21 |