Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
70
Добавлен:
14.04.2015
Размер:
2.03 Mб
Скачать

72

Chapter 3. Writing Assembly Programs

 

 

Symbols

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.

Symbol Names

Symbols are composed of up to 31 characters from the following list:

3

A - Z, a - z,

0 - 9, _,

and ?

 

A symbol name can start with any of these characters except the digits 0 - 9.

 

Symbols can be defined in a number of ways. You can define a symbol to

 

represent an expression using the EQU or SET directives:

 

 

 

 

 

NUMBER_FIVE

EQU

5

 

TRUE_FLAG

SET

1

 

FALSE_FLAG

SET

0

You can 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 sections provide more information about how to use and define symbols.

Shaded directives and options are available only in AX51 and A251.

Соседние файлы в папке HLP