Wednesday, 25 July 2012

DIFFERENT ADDRESSING MODE

DIFFERENT ADDRESSING MODE

IMMEDIATE ADDRESSING MODE

Immediate addressing mode means that the value of a given instruction in assembly programming is directly specified . This means the value is constant and written immediately into the instruction .
Example :- OPERAND
The advantages of this mode is that no memory reference other than instruction fetch is required to obtain the operand .
Disadvantage is that the size of the address field which most instruction sets is small compare to word length .

DIRECT ADDRESSING MODE

In direct addressing mode effective address of the operand is given in the address field of the instruction . It requires one memory reference to read the operand from the given location and provides only a limited address space . Length of the address field is usually less than one word length .
Example :- MOV P, where is the address of operand .

INDIRECT ADDRESSING

In indirect addressing mode , the address field of the instruction refers to the address of a word in the memory , which in turns contains the full length address of the operand .
The advantage of this mode is that for the word length of N , an address space of 2N can be addressed .
Disadvantage i s that instruction execution requires two memory reference to fetch the operand .

REGISTER ADDRESSING

Register addressing mode is similar to direct addressing . The only difference is that the address field of the instruction refers to a register rather than a memory location of 3 or 4 bits are used as address field to refer 8 to 16 general purpose register s.
Advantage is that small address field is needed in the instruction LDA 100BH

RELATIVE MODE ADDRESSING

The relative mode addressing permits the writing positive independent code programs which will be properly executed by the processor regardless of where they are located in memory . The entire program can be picked up from one region of memory and moved to another region with no adverse effect .

INDEX MODE ADDRESSING

Instruction which use index addressing specify two registers , often by coding within the op word itself and known as index addressing . During program execution the processor temporarily adds the contents of these registers to generate the effective address . One of the registers is an address register and it is said to hold the base address . The other is commonly a data register, the displacement or index register .




Advertise

No comments:

Post a Comment