Instruction:
In
computer science, an instruction is a single operation of a processor defined
by the processor instruction set.
Instruction
format:
Label
field
|
Op-code
field
|
Operand
field
|
Comment
field
|
NEXT
|
ADD
|
AL
07H
|
ADD
CORRECTION FACTOR
|
Figure: Instruction format
Instruction
format has four fields, as shown in figure.
The
first field in an assembly language statement in the label field, a label is a
symbol or group of symbols used to represent an address which is not
specifically known at the time the statement is written. Labels are usually
followed by a colon. Labels are not required in a statement; they are just
inserted where they are needed.
The
op-code field of the instruction contains the mnemonic for the instruction to
be performed. Instruction mnemonics are sometimes called operation codes or
op-codes. The ADD mnemonic in the example statement in the figure indicates
that we want the instruction to do an addition.
The
operand field of the statement contains the data, the memory address, the port
address, or the name of the register on which the instruction is to be
performed. In the example instruction in figure there are two operands, AL and
07H. Specified in the operand field; AL represents the number 07H. This
assembly language statement thus says, “ADD the number 07H to the contents of
the AL register. ” The final field in an assembly language statement such as
that in figure is the comment field, which starts with a semicolon. Comments do
not become part of the machine language program, but they are very important.
No comments:
Post a Comment