Addressing Modes of 8051

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

Addressing Modes of

8051
Addressing Modes

 8051 provides a total of five addressing modes.


 The way in which the instruction is specified.
 Addressing Modes are
 Immediate Addressing Mode
 Direct Addressing Mode
 Register Addressing Mode
 Register Indirect Addressing Mode
 Indexed Addressing Mode
Immediate Addressing Mode

 In this addressing mode the source operand is Constant


 Immediate data must be preceded by the sign “#”
 This addressing mode can be used to load information into any of the registers.

e.g. Mov A, #25H


Direct Addressing Mode

 There is 128 Bytes of RAM in 8051.


 This mode most often used to Access RAM location from 30 to 7FH

 e.g. MOV R0, 40H


Register Addressing Mode

 It involves the use of register to hold the data to be manipulated


 In this mode source and destination both should be Register

e.g. MOV A, Ri
ADD A, Ri
Register Indirect Mode

 In this mode register used as pointer to the data


 If data is inside the CPU only register R0 & R1 are used.
Indexed Addressing Mode

 This mode is used in accessing the data elements of look up table entries located
in program code ROM at 8051

MOVC A, @A+DPTR

You might also like