What is instruction? Describe the instruction formats.


Instruction: In computer science, an instruction is a single operation of a processor define 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 know at the time statement is written. Labels are usually followed by a colon. Labels are not required in a statement, thay 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 thet 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

Dear Members, Thanks for Your Comments. We must be reply your comment answer as soon as possible. Please Stay with us.....

Theme images by ideabug. Powered by Blogger.