1)
Register Addressing mode
2)
Immediate Addressing mode
3)
Register Indirect Addressing mode
4)
Direct Addressing mode
5)
Indexed Addressing mode
6)
Base Relative Addressing mode
7)
Base Indexed Addressing mode
Register
Addressing Mode
Data transfer using registers is
called register addressing mode. Here operand value is present in register. For
example
MOV
AL,BL;
MOV
AX,BX;
|
Immediate
Addressing mode
When data is stored in code segment instead of data
segment immediate addressing mode is used. Here operand value is present in
the instruction. For example
MOV AX, 12345;
|
Direct
Addressing mode
When direct memory address is
supplied as part of the instruction is called direct addressing mode. Operand
offset value with respect to data segment is given in instruction. For
example
MOV
AX, [1234];
ADD
AX, [1234];
|
Register Indirect
Addressing mode
Here operand offset is given in a cpu register. Register
used are BX, SI(source index), DI(destination index), or BP(base pointer). BP holds offset w.r.t
Stack segment, but SI,DI and BX refer to data segment. For example
MOV [BX],AX;
ADD AX, [SI];
|
Indexed
Addressing mode
Here operand offset is given by a
sum of a value held in either SI, or DI register and a constant displacement
specified as an operand. For example
Lets take arrays as an example. This
is very efficient way of accessing arrays.
My_array
DB ‘1’, ‘2’, ‘3’,’4,’5’;
MOV
SI, 3;
MOV
AL, My_array[3];
So AL holds value 4.
|
Base Relative
Addressing mode
Operand offset given by a sum of a value held either in
BP, or BX and a constant offset sepecified as an operand. For example
MOV AX,[BP+1];
JMP [BX+1];
|
Base
Indexed
Here operand offset is given by sum
of either BX or BP with either SI or DI. For example
MOV AX, [BX+SI]
JMP [BP+DI]
|
Helpful... thanks a lot.
ReplyDeletenytime... jus keep visiting..:)
DeleteHi, this is good. Helped me very much
ReplyDeletethank u..:)
Deletekeep visiting..:)
What about I/O port addressing modes?
ReplyDeleteWell I/O port addressed using direct addressing modes and indirect addressing modes.
DeleteDirect mode example:
IN AX, PORTA
IN AX, PORTB
OUT PORTA, AX
OUT PORTB, AX
etc.
Indirect example
IN AX, DX
inputs 16 bit data "addressed" by DX
IN AL, DX
inputs 8 bit data "addressed" by DX
OUT DX, AX
outputs 16 bit data to the port addressed by DX
OUT DX, AL
outputs 8 bit data to the port addressed by DX
thank....ssssssss
ReplyDeleteYou are most welcome....
Deletealah babah
ReplyDeletethanks Mr Blogger
ReplyDeleteits really helpful....
You are welcome keep visiting....
DeleteMast h bhai
ReplyDeleteThanks keep visiting...
DeleteWhy to add different offset values in addressing mode of 8086 ?
ReplyDeletebokous hai
ReplyDeleteThanks
ReplyDeleteIn alp8086 we do not end line by ';'. Please make sure you correct it. For imp programs on alp must see alpmp9.blogspot.com
ReplyDeleteIn alp8086 we do not end line by ';'. Please make sure you correct it. For imp programs on alp must see alpmp9.blogspot.com
ReplyDeleteIsn't there some more classification like I/O addressing ,string,Implied ?
ReplyDeleteIsn't there some more classification like I/O addressing ,string,Implied ?
ReplyDeleteTq .. So much..helpfull
ReplyDeleteThanks Helped mE in Cheating In online papersđź–¤
ReplyDelete