What is difference between relative file and indexed sequential file?

Answer:
Relative:-

1. In this mode the content of the program counter is added to the address part of the instruction to obtain the effective addressed.

2. Effective Address = Contents of the program counter + contents of address field.

3. No extra index bit is used.

4. Example:-
EA = [ BX ] + [ SI ] + disp.
EA = [ BX ] + [ DI ] + disp.

Indexed:-
1. In this mode of addressing an attempt is made to avoid the use of two addressed for an operand.

2. Effective Address = Address field + contents of the specified - index registers.

3. In this extra index bit is used.

4. Example:-
EA = [ BX ] + [ SI ]
EA = [ BX ] + [ DI ]
First answer by Pbdl. Last edit by Pbdl. Contributor trust: 0 [recommend contributor recommended]. Question popularity: 2 [recommend question].