Seal of Good Local Governance (SGLG) 2024Final.pptx
Â
Addressing mode & data transfer instruction of 8085
1. ADDRESSING MODES &
DATA TRANSFER
INSTRUCTION OF 8085
MICROPROCESSOR
Presented by : Vaibhavi K. Patel (140133103025)
: Roshni M. Patel (140133103026)
: Chinmayee N. Samal (140133103027)
2. 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.
3. 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.
4. Types of Addressing Modes
⢠Intel 8085 uses the following addressing
modes:
1. Direct Addressing Mode
2. Register Addressing Mode
3. Indirect Addressing Mode
4. Immediate Addressing Mode
5. Implied Addressing Mode
6. 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.
H
ď§ LDA is the operation.
ď§ 2500 H is the address of source.
ď§ Accumulator is the destination.
7. 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.
8. 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 memiory location specified by H-L reg. pair.
⢠A is the destination.
9. 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.
10. 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.
11. Classification of Instruction Set
⢠Data Transfer Instruction
⢠Arithmetic Instructions
⢠Logical Instructions
⢠Branching Instructions
⢠Control Instructions
12. 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.
13. Data transfer instruction
. Op-code operand Description
Copy from source to
destination
MOV
Rd, Rs
M, Rs
Rd, 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.
14. Data transfer instruction
⢠. Op-code operand Description
Move immediate 8 bit
MVI
Rd,Data
M, 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
15. Data transfer instruction
⢠. Op-code operand Description
Load Accumulator
LDA
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
16. Data transfer instruction
. Op-code operand Description
Load accumulator
indirect
LDAX
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
17. 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
18. Data Transfer Instructions
Op-code operand Description
Load H-L register direct
LHLD 16-bit address
This instruction copies the contents of memory
location pointed out by 16-bit address into register L.
Its copies the content of next memory location into registers H.
Example: LHLD 2040 H
19. Data Transfer Instructions
Op-code operand Description
Store accumulator direct
STA 16-bit address
The contents of accumulator are copied into the
memory location specified by the operand.
Example:STA 2500 H
20. Data Transfer Instructions
Op-code operand Description
Store accumulator
indirectSTAX Reg. pair
The contents of accumulator are copied into the
memory location specified by the contents of the
register pair.
Example:
STAX B
21. Data Transfer Instructions
Op-code operand Description
Store HL regiters direct
SHLD 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
22. Data Transfer Instructions
Op-code operand Description
Exchange H-L with D-E
XCHG None
The contents of register H are exchanged with the
contents of register D.
The contents of register L are exchanged with the
contents of register E.
Example:
XCHG
23. 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
24. Data Transfer Instructions
Op-code operand Description
Exchange H-L with top of
stack
XTHL 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
25. 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
26. 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
27. 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
28. 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
29. Data Transfer InstructionsData Transfer Instructions
Op-code operand Description
Copy data to accumulator
from a port with 8-bit
address
IN
8-bit port address
The contents of I/O port are copied into accumulator.
Example: IN 8CH