Instruction Formats
Each instruction consists of two parts:
OPCODE OPERAND
Opcode : specifies the operation to be performed . It is always 8 bits.
Operand : specifies the data or provides the data . It can be 8 bit or 16 bit.
1/30/2013 1
MOHIT VERMA
Length of Instructions
3 - byte instruction 2- byte instruction 1-byte instruction
MOHIT VERMA
1/30/2013
3- Byte instruction
First byte: specifies the opcode 2nd byte :specifies the operand 3rd byte : specifies the operand
Opcode Operand (lower order 8 bit) Operand (higher order 8 bit)
These instructions use to specify the 16 bit data or memory address. Example: STA 3000H Move the contents of Accumulator to 3000H memory
MOHIT VERMA
1/30/2013
2- Byte instruction
First byte: specifies the opcode 2nd byte :specifies the operand
Opcode Operand
These instructions used to specify 8 bit data or I/O port address. Example: MVI B, 57H Move the data 57H to register B.
MOHIT VERMA
1/30/2013
1- Byte instruction
1 byte instruction includes the opcode and operand in the 8 bit only .
Opcode
These instructions do not specify 8 bit /16 bit data/address explicitly. Example: MOV B,C Move the content of C register to B register.
MOHIT VERMA
1/30/2013
ADDRESSING MODES OF 8085
Addressing Modes of 8085
To perform any operation, we have to give the corresponding instructions to the microprocessor. In each instruction, programmer has to specify 3 things:
Operation to be performed.
Address of source of data.
Address of destination of result.
MOHIT VERMA 1/30/2013
Addressing Modes of 8085
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.
MOHIT VERMA
1/30/2013
Types of Addressing Modes
Intel 8085 uses the following addressing modes:
1. Direct Addressing Mode 2. Register Addressing Mode 3. Register Indirect Addressing Mode 4. Immediate Addressing Mode
5. Implicit Addressing Mode
MOHIT VERMA
1/30/2013
Direct Addressing Mode
In this mode, the address of the operand is given in the instruction itself.
LDA 2500 H Load the contents of memory location 2500 H in accumulator.
LDA is the operation. 2500 H is the address of source. Accumulator is the destination.
MOHIT VERMA 1/30/2013
10
Register Addressing Mode
In this mode, the operand is in general purpose register.
Move the contents of register B to A.
MOV A, B
MOV is the operation. B is the source of data. A is the destination.
1/30/2013
MOHIT VERMA
11
Register Indirect Addressing Mode
In this mode, the address of operand is specified by a register pair.
MOV A, M Move data from memory location specified by H-L pair to accumulator.
MOV is the operation. M is the memory location specified by H-L register pair. A is the destination.
1/30/2013
MOHIT VERMA
12
Immediate Addressing Mode
In this mode, the operand is specified within the instruction itself.
Move 05 H in accumulator.
MVI A, 05 H
MVI is the operation. 05 H is the immediate data (source). A is the destination.
1/30/2013
MOHIT VERMA
13
Implicit Addressing Mode
If address of source of data as well as address of destination of result is fixed, then there is no need to give any operand along with the instruction.
Complement accumulator.
CMA
CMA is the operation. A is the source. A is the destination.
MOHIT VERMA 1/30/2013
14
Review Questions ?
Q-1) Explain the classification of the instruction sets of 8085. Q-2) Explain the instruction sets of 8085 on the basis of the length of instructions . Q-3) Define & Explain various Addressing modes of 8085 with two example each. AND SO ON ..
MOHIT VERMA
1/30/2013
15