ADDRESSING MODE8051                           WWW.USTUDY.IN
Out lineIntroductionImmediate addressing modeDirect addressing modeRegister addressing modeIndirect addressing mode                           WWW.USTUDY.IN
IntroductionAddressing modes are an aspect of the instruction set architecture in most central processing unit (CPU) designs. The various addressing modes that are defined in a given instruction set architecture define how machine language instructions in that architecture identify the operand (or operands) of each instruction. An addressing mode specifies how to calculate the effective memory address of an operand by using information held in registers and/or constants contained within a machine instruction or elsewhere.                           WWW.USTUDY.IN
The most common addressing modes are:Immediate addressing modeDirect addressing modeIndirect addressing modeRegister addressing modeRegister indirect addressing modeDisplacement addressing modeStack addressing mode                           WWW.USTUDY.IN
Immediate Addressing ModesThe simplest way to get data to a destination is to make the source of the data part of the opcode. The data source is then immediately available as part of the instruction itself.When the 8051 executes an immediate data move, the program counter is automatically incremented to point to the bytes  following the opcode byte in the program memory. Whatever data is found there is copied to the destination address.                           WWW.USTUDY.IN
Immediate Mode – specify data by its valuemov a, #0		;put 0 in the accumulatora = 00000000mov a, #0x11	; put 11hex in the accumulatora = 00010001mova, #77h		; put 77 hex in accumulatora = 01110111Immediate Addressing Modes                           WWW.USTUDY.IN
Direct addressing modeDirect addressing is so-named because the value to be stored in memory is obtained by directly retrieving it from another memory location. Example:MOV	R0, 40HMOV	56H,AMOV	A, 4		; ≡ MOV A, R4MOV	6, 2		; copy R2 to R6				; MOV  R6,R2 is invalid !                           WWW.USTUDY.IN
Register Addressing ModeCertain register names may be used as part of the opcode mnemonic as sources or destinations of data. Registers A, DPTR, and R0 to R7 may be named as part of the opcode mnemonic. Other registers in the 8051 may be addressed using the direct  addressing mode.Example: ADD A,R7The opcode is 00101111. 00101 indicates the instruction and the three lower bits, 111, specify the register  Some instructions are specific to a certain register, such as  the accumulator, data pointer etc.                           WWW.USTUDY.IN
Indirect addressing modeIndirect addressing is a very powerful addressing mode which in many cases provides an exceptional level of flexibility. Indirect addressing is also the only way to access the extra 128 bytes of Internal RAM found on an 8052. Example		MOV A,@R0                           WWW.USTUDY.IN
The End… Thank u….                           WWW.USTUDY.IN