5,589 views

The most appropriate matching for the following pairs$$\begin{array}{ll} \text{X: Indirect addressing} & \text{1: Loops } \\ \text{Y: Immediate addressing } & \text{2: Pointers} \\ \text{Z: Auto decrement addressing } & \text{3: Constants } \\ \end{array}$$ is

1. $X - 3, Y - 2, Z - 1$
2. $X - 1, Y - 3, Z - 2$
3. $X - 2, Y - 3, Z - 1$
4. $X - 3, Y - 1, Z - 2$

Register add mode :  access the local variables

Immediate add mode : access the  constant

Direct/Absolute add mode : access the static variables

Indirect add mode : implement pointer

indexed/ Base index : access the random array

Auto index: access the linear array

relative add mode and base register add mode : relocation at run time

base register add mode : best suit to write positions independent code

base register add mode : best suit to write positions independent code

@mohan123

Why not PC relative add mode is best suit ?

@Satbir

positions independent code means we can transfer control of statement  multiple segment  using diff diff base address

but pc relative control will be transfer  within the  segment

### Subscribe to GO Classes for GATE CSE 2022

(C) is the most appropriate one.

Pointer dereference $\rightarrow$ Indirect addressing, $E.A = M$ [Value stored in address field]
Operating with a constant $\rightarrow$ Immediate addressing, $E.A =$ Address field of the instruction.
Loop iteration counter check $\rightarrow$ Auto decrement addressing $R1=R1-1$; $E.A = R1$

E.A = Effective address, where the required operand will be found.

Operating with a constant -> immediate addressing
Loop iteration counter check -> auto decrement addressing
@barney ross

for(i=n; i<1000; )        // loop

{   i=i-1

}

Indirect addressing means that the address of the data is held in an intermediate location so that the address is first 'looked up' and then used to locate the data itself.

Immediate Addressing. An immediate operand has a constant value or an expression. When an instruction with two operands uses immediate addressing, the first operand may be a register or memory location, and the second operand is an immediate constant.

Auto increment or decrements: can be one by using loops.

by