22-05-2012, 12:40 PM
ADDRESSING MODES OF 80386
addresing modes.pptx (Size: 87.99 KB / Downloads: 41)
REGISTER ADDRESSING MODE
In this addressing mode ,Data is in the registers and the instruction specifies the particular register.
In this mode execution of instruction is faster.
Example:MOV EAX,EDX
It will copy the content of EDX register to EAX register
IMMEDIATE ADDRESSING MODE
Immediate data is the constant data contained in an instruction.
It maybe 8,16 or 32bits in length
Source operand is the part of instruction
Example:
MOV ECX,20304050H
EA=20304050H
SOME BASIC DEFINATIONS
Effective address:te offset calculated for memory operand is called operand’s EA
it can be computed by adding any combinations of following four components.
Displacement:8 or 32 bit immediate data following the instruction.16 bit may also be used.
Base:the content of any general purpose register can be used.
REGISTER INDIRECT ADDRESSING MODE
In this mode ,a base or index register contains the operand’s effective address.
EA={base register}or{index register}
Example:
MOV EBX,[ECX]
EA=ECX
PA=DS:ECX
BASED SCALED INDEX
The contents of an index register are multiplied by a scaling factor and the result is added to base register to compute EA.
EA={base register}+{index register*scaling factor}
Example:
MOV ECX,[EDI*4][ESP]
EA=[EDI*4]+[ESP]
PA=DS: [EDI*4]+[ESP]