You are on page 1of 7

EI7504 – MICROPROCESSORS,

MICROCONTROLLERS AND APPLICATIONS

PPT - 3
Addressing Modes
• Techniques to specify data in instructions

• Immediate addressing mode


• Register addressing mode
• Direct addressing mode
• Register indirect addressing mode
• Implicit addressing mode
Addressing Modes(Contd…)
Immediate addressing mode
– The operand is specified within the instruction itself.
– Example: MVI A, 05H
ADI 06H
Register addressing mode
– Operands are general purpose registers
– Example:
MOV A,B
MOV C,D
Addressing Modes(Contd…)
• Direct addressing mode
– Address of the operand is given in the instruction itself.
– Example:
STA 2400H
IN 40H
• Register indirect addressing mode
– Address of the operand is specified by a register pair.
STAX rp
MOV A,M
Addressing Modes(Contd…)
• Implicit addressing mode
• There are certain Instructions which operates on the
content of the accumulator.
• Such instructions do not require the address of the
operand
• Example:
• CMA
• RAL
• RAR
Types of Instructions
• One – byte instructions
Opcode and Operand in the same byte
(e-g) MOV A,B (78)
ADD B (80)
• Two – byte instructions
First byte specifies the opcode and second byte specifies the
operand
(e-g) MVI A, 68H (3E, 68)
SUI 45H (D6, 45)
• Three – byte instructions
First byte specifies the opcode and the following two bytes specify
the operand.
JMP 5556H (C3,56,55)
LXI H,1234H (21, 34, 12)
ASSEMBLY LANGUAGE PROGRAMMING

Example:1
Place 08H in register B.
Example:2
Get 05H in register A; then move it to register D.
Example:3
Load the content of the memory location 4550H directly to the
accumulator, then transfer it to register C. The content of the memory
location 4550H is 09H.
Example:4
Transfer the content of the memory location FC50H to reg.E
Example:5
Place the content of the memory location 5500H in reg.B and that of
5501H in reg.C.

You might also like