07-11-2012, 01:11 PM
Addressing Mode
1Addressing.ppt (Size: 1.01 MB / Downloads: 23)
Instruction Pointer Register (IP)
Register which stores instruction address to be executed
Each time instruction is fetch from memory to be executed in processor, IP content will be added so that it always show to the next instruction
If branch instruction, the IP content will be loaded with new value which is the branch address
Index Register and Pointer
This registers is used for storing relative shifting value for memory address location
There are 2 pointer register:
Stack Pointer (SP) – point to the top stack
Base Pointer (BP) – used for fetch data in data segment
There are 2 index register:
Source Index (SI) – contains offset address for source operand in data segment
Destination Index (DI) - contains offset value for destination operand in DS
Addressing Mode
Addressing Mode is a technique to determine which operand to be fetched. (Operand = argument for an operator or for machine language instruction)
Addressing mode is used for:
Give flexible programming to user using pointers to memory, counter for loop control, index for data and program replacement
Reduce bit numbers in address field for an instruction
There are 7 types of addressing mode in 8086 register:
Register addressing mode
Immediate addressing mode
Direct addressing mode
Indirect addressing mode
Base relative addressing mode
Index relative addressing mode
Base index relative addressing mode
Register Addressing Mode
Simplest mode and often used
Involved register usage
Data obtained from operation is stored in other register
EA = R
EA = Effective Address (EA) for one location which contain reference operand
R = Address field content in instruction which refer to register ®
Base Relative Addressing Mode
Operand located in address obtained from addition of 8 or 16 bit displacement into one of BX or BP and the result is then combined with segment data (DS/SS)
This 8 or 16- bit displacement must be specified in operand field and translated as signed two’s compliment
For 8-bit, displacement must in the range of -128 to +127
For 16-bit, displacement must in the range of -32768 to +32767
Effective Address = [Base register] + displacement
Physical Address = DS/SS = [Base register] + displacement