2. INSTRUCTION
An instruction is a command to the microprocessor to
perform a given task on specified data. It may include
8-bit (or 16-bit) data, an internal register, a memory
location. The entire group of instructions that a
microprocessor supports is called Instruction Set.
3. OPCODE & OPERAND
Opcode is a part of the
instruction that tells the
processor what should be
done.
Operand is a part of the
instruction that contains
the data to be acted on, or
the memory location of
the data in a register
4. CLASSIFICATION OF INSTRUCTION BASED
ON WORD SIZE
The 8085 instruction set is classified into the following three
groups according to word size:
One-word or 1-byte instructions
Two-word or 2-byte instructions
Three-word or 3-byte instructions
5. ONE BYTE INSTRUCTION
A 1-byte instruction includes the opcode and operand in the same byte.
Operand(s) are internal register and are coded into the instruction.
Mnemonic- ADD B
Task- Add the contents of accumulator to the contents of register B.
Opcode- ADD
Operand- B
Hex Code- 80H
Binary code- 1000 0000
6. TWO BYTE INSTRUCTIONS
In a two-byte instruction, the first byte specifies the operation code and
the second byte specifies the operand. Source operand is a data byte
immediately following the opcode. For example:
OPCODE
FIRST BYTE
SECOND BYTE
MVI A,Data
0011 1110(3E)
7. THREE BYTE INSTRUCTIONS
In a three-byte instruction, the first byte specifies the opcode, and
the following two bytes specify the 16-bit address. Note that the
second byte is the low-order address and the third byte is the high-
order address.
Three byte instructions = opcode + data byte +
data byte
9. What is addressing ?
Every instruction of a program has to operate on a data.
The method of specifying the data to be operated by the
instruction is called Addressing.
The 8085 has 5 different types of addressing modes.
10. ADDRESSING MODES
To perform any operation, we have to give the corresponding instructions to the
microprocessor.
In each instruction, programmer has to specify 3 things:
1. Operation to be performed.
2. Address of source of data. MOV B,A
3. Address of destination of result.
The method by which the address of source of data or the address of destination
of result is given in the instruction is called Addressing Modes.
The term addressing mode refers to the way in which the operand of the
instruction is specified.
11. ADDRESSING MODES OF 8085
8085 uses the following addressing modes
1. Immediate addressing mode
2. Register addressing mode
3. Direct addressing mode
4. Indirect addressing mode
5. Implicit addressing mode
12. 1.Immediate addressing mode
• In this mode of addressing ,the data is specified in the
instruction itself.
• The data will be a part of the program instruction.
MVI is the operation.
03 H is the immediate data (source).
B is the destination.
MVI B, 03H Move the data 03H to B register.
13. 2. Register Addressing mode
In register addressing mode, the instruction specifies the
name of the register in which the data is available.
MOV is the operation. B=08
B is the source of data. A=08
A is the destination.
MOV A, B Move the content of B register to A register.
14. 3.Direct addressing mode
• In direct addressing mode, the address of the data is specified in the
instruction. The data will be in memory.
• In this addressing mode, the program instructions and data can be
stored in different memory.
.
LDA is the operation.
2500 H is the address of source.
Accumulator is the destination.
LDA 2500H Load the data available in memory location 2500H in to
accumulator.
15. 4.Indirect addressing mode
• In indirect addressing mode, the instruction specifies the name of the
register in which the address of the data is available.
• Here the data will be in memory and the address will be in the register
pair.
MOV is the operation. HL-2085H
M is the memory location specified by H-L register pair.
A is the destination
MOV A, M The memory data addressed by H L pair is moved to A
register.
16. 5.Implicit addressing mode
In implicit addressing mode, the instruction itself
specifies the data to be operated.
CMA is the operation.
A is the source.
A is the destination.
CMA Complement the content of accumulator