Translate

Visit to www.mrmcse.com

04 March 2018

Discuss about the direct relative and register addressing mode





To reference a large range of locations in main memory a variety of addressing technique are used. The direct, relative and register addressing modes are discuss below:

Direct addressing mode:

Direct addressing mode

(i) Address field contains address of operand.

(ii) Effective address (EA) = address field (A)

(iii) e. g ADD A
-Add contents of cell A to accumulator
-Look in memory at address A for operand.

(iv) Single memory reference to access data.

(v) No additional calculations to work out effective address.

(vi) Limited address space.

Relative addressing mode:

Relative addressing mode

A = contents of an address field in the instruction
R = contents of an address field in the instruction that refers to a register

Relative addressing, also called pc-relative addressing, the implicitly referenced register is the program counter pc. That is, the next instruction address is added to the address field to produce the EA. typically, the address field is treated as a two’s complement number for this operation. Thus, the effective address is a displacement relative to the address of the instruction.

Register addressing mode:

Register addressing mode

Register Addressing is similar to direct addressing. The only difference is that the address field refers to a register rather than a main memory address:
EA = R

The advantages of register addressing are-

(i) Only a small address field is needed in the instruction.

(ii) No time consuming memory references are required. The memory access time for a register internal to the processor is much less than that for a main memory address. The disadvantage of register addressing is that the address space is very limited.



No comments:

Post a Comment