
52 Assembly Language Programming for the 68000 Family
A symbol in the label field can be made to equal a numeric constant.
Anywhere this symbol appears in your program it is interpreted as if you
wrote the constant itself. For example, you could define the symbol MAX
to represent the constant 1000.
A symbol in the label field can also be used to specify the memory
location of an instruction. This is a true label. Although the first field is
called the label field, only the symbols that are present in the label field
of a source line that translates into a memory location are the true labels
of a 68000 assembly language program. Unless a label starts in column
1, it must be delimited with a semicolon. In the latter case, the label can
start in any column as long as it is the first thing on the line.
The Operation Field
The operation field contains either a machine instruction or an as
sembler directive. Each machine instruction has a special symbol or
mnemonic associated with it. If a particular machine instruction is de
sired, the proper mnemonic must be placed in the operation field. As
sembler directives have symbolic names that are different from the ma
chine instructions. The assembler is thus able to differentiate between a
machine instruction and a directive.
If a machine instruction is placed in the operation field, the assembler
will generate the appropriate words to be placed in memory correspond
ing to the translation of the source statement. Assembler directives may or
may not generate bytes to be stored in memory. Some directives merely
control the format of the assembly listing, or provide other information
about the program. Directives are also used to define symbols.
The Operand Field
Many machine instructions as well as assembler directives require one
or more operands. The operand field is used to provide these operands.
Individual operands can consist of constants, variables, or special sym
bols. Expressions made up of constants, variables, and special symbols
are also permitted. The rules for making up expressions vary slightly from
assembler to assembler. Standard arithmetic expressions such as
COUNT+5
Commenti su questo manuale