addressing mode & data transfer instruction of 8085

30
ADDRESSING MODES & DATA TRANSFER INSTRUCTION OF 8085 MICROPROCESSOR Presented by : Vaibhavi K. Patel (140133103025) : Roshni M. Patel (140133103026) : Chinmayee N. Samal (140133103027)

Upload: chinu-samal

Post on 11-Apr-2017

4.132 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Addressing mode & data transfer instruction of 8085

ADDRESSING MODES & DATA TRANSFER INSTRUCTION OF 8085 MICROPROCESSOR Presented by : Vaibhavi K. Patel (140133103025) : Roshni M. Patel (140133103026)

: Chinmayee N. Samal (140133103027)

Page 2: Addressing mode & data transfer instruction of 8085

What is an instruction ?• An instruction is a command to the microprocessor to

perform a given operation on specified data.• An instruction consists of two parts:

operation code (opcode) which specifies what operation to be performed and data to be operated on called the operand .

example: MOV A,B MOV is opcode and A and B are operands.

opcode operand

Page 3: Addressing mode & data transfer instruction of 8085

Addressing modes of 8085 Definition:-

The various ways of specifying operands for an instruction are called addressing modes.

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.

Page 4: Addressing mode & data transfer instruction of 8085

Types of Addressing Modes• Intel 8085 uses the following addressing modes:

1. Direct Addressing Mode 2. Register Addressing Mode3. Indirect Addressing Mode4. Immediate Addressing Mode 5. Implied Addressing Mode

Page 5: Addressing mode & data transfer instruction of 8085

Addressing modes

ImmediateAddressing mode

RegisterAddressing mode

DirectAddressing mode

Register indirectAddressing mode

IndexedAddressing mode

Implied Addressing

mode

Addressing modes of 8085

Page 6: Addressing mode & data transfer instruction of 8085

Direct Addressing Mode • In this mode, the address of the operand is given in the

instruction itself.

Load the contents of memory location 2500 H in accumulator.

LDA 2500 HH

LDA is the operation. 2500 H is the address of source. Accumulator is the destination.

Page 7: Addressing mode & data transfer instruction of 8085

Register Addressing Mode• In this mode, the operand is in general purpose register.

MOV A, B Move the contents of register B to A.

• MOV is the operation. • B is the source of data.• A is the destination.

Page 8: Addressing mode & data transfer instruction of 8085

Indirect Addressing mode• In this mode, the address of operand is specified by a

register pair.

MOV A, MMove data from memory location

specified by H-L pair to accumulator.

• MOV is the operation.• M is the memiory location specified by H-L reg. pair.• A is the destination.

Page 9: Addressing mode & data transfer instruction of 8085

Immediate Addressing Mode • In this mode, the operand is specified within the

instruction itself.

MVI A, 05 H Move 05 H in accumulator

• MVI is the operation. • 05 H is the immediate data (source). • A is the destination.

Page 10: Addressing mode & data transfer instruction of 8085

Implied 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

CMA Complement accumulator.

• CMA is the operation.• A is the source.• A is the destination.

Page 11: Addressing mode & data transfer instruction of 8085

Classification of Instruction Set

• Data Transfer Instruction

• Arithmetic Instructions

• Logical Instructions

• Branching Instructions

• Control Instructions

Page 12: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions• These instructions move data between registers, or between memory and registers.

• The place from which data is copied is called source the place to which data is copied is called destination

• The data transfer operation is copy operation is it copied the data and doesn’t destroy the data from the source.

• These instructions copy data from source to Destination.

Page 13: Addressing mode & data transfer instruction of 8085

Data transfer instruction. Op-code operand Description

Copy from source to destinationMOV

Rd, RsM, RsRd, M

This instruction copies the contents of the source register into the destination register. The contents of the source register are not altered.

If one of the operands is a memory location, its location is specified by the contents of the HL registers.

Page 14: Addressing mode & data transfer instruction of 8085

Data transfer instruction• . Op-code operand Description

Move immediate 8 bitMVIRd,DataM, Data

The 8-bit data is stored in the destination register or memory.

• If the operand is a memory location, its location is specified by the contents of the H-L registers

Example:MVI B, 57H or MVI M, 57H

Page 15: Addressing mode & data transfer instruction of 8085

Data transfer instruction• . Op-code operand Description

Load AccumulatorLDA

16-bit address

• The contents of a memory location, specified by a 16-bit address in the operand, are copied to the accumulator.

• The contents of the source are not altered.

• Example: LDA 2034H

Page 16: Addressing mode & data transfer instruction of 8085

Data transfer instruction. Op-code operand Description

Load accumulator indirectLDAX B/D Register

Pair

• The contents of the designated register pair point to a memory location.

• This instruction copies the contents of that memory location into the accumulator.

• The contents of either the register pair or the memory location are not altered.

• Example: LDAX B

Page 17: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

• . Op-code operand Description

Load register pair immediateLXI Reg.pair, 16-bit

data

This instruction loads 16-bit data in the register pair.

Example:LXI H, 2034 H

Page 18: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

Load H-L register directLHLD 16-bit address

This instruction copies the contents of memorylocation pointed out by 16-bit address into register L.

Its copies the content of next memory location into registers H.

Example: LHLD 2040 H

Page 19: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

Store accumulator directSTA 16-bit address

The contents of accumulator are copied into thememory location specified by the operand.

Example:STA 2500 H

Page 20: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

Store accumulator indirectSTAX Reg. pair

The contents of accumulator are copied into thememory location specified by the contents of theregister pair.

Example:STAX B

Page 21: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

Store HL regiters directSHLD 16 bit address

The contents of register L are stored into memory • location specified by the 16bit address.

• The contents of register H are stored into the next • memory location.

• Example:• SHLD 2550 H

Page 22: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

Exchange H-L with D-EXCHG None

The contents of register H are exchanged with thecontents of register D.

The contents of register L are exchanged with thecontents of register E.

Example:XCHG

Page 23: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

Copy H-L pair to the stack pointer SPHL None

This instruction loads the contents of H-L pair into SP.

Example: SPHL

Page 24: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

Exchange H-L with top of stackXTHL None

The contents of L register are exchanged with the location pointed out by the contents of the SP.

The contents of H register are exchanged with the next location (SP + 1).

Example:XTHL

Page 25: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

Load program counter H-L contentsPCHL None

The contents of registers H and L are copied into the program counter (PC).

The contents of H are placed as the high-order byte and the contents of L as the low-order byte.

Example:PCHL

Page 26: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

Push register pair onto stack

PUSH Reg.pair

The contents of register pair are copied onto stack.

SP is decremented and the contents of high-order registers (B, D, H, A) are copied into stack.

SP is again decremented and the contents of low-order registers (C, E, L, Flags) are copied into stack.Example PUSH B

Page 27: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

POP stack to register pair.POP Reg.pair

The contents of top of stack are copied into register pair.

The contents of location pointed out by SP are copied to the low-order register (C, E, L, Flags).

SP is incremented and the contents of location are copied to the high-order register (B, D, H, A).Example: POP H

Page 28: Addressing mode & data transfer instruction of 8085

Data Transfer Instructions

Op-code operand Description

Copy data from accumulator to a port with 8-bit addressout

8-bit port address

The contents of accumulator are copied into the I/O port.Example: OUT 78H

Page 29: Addressing mode & data transfer instruction of 8085

Data Transfer InstructionsData Transfer Instructions

Op-code operand Description

Copy data to accumulator from a port with 8-bit addressIN 8-bit port address

The contents of I/O port are copied into accumulator.Example: IN 8CH

Page 30: Addressing mode & data transfer instruction of 8085

THANK YOU HAVE A NICE DAY