Machine instructions and Addressing modes
1.

Machine instructions and addressing modes

A.  

Direct mode

B.  

Indirect mode

C.  

Relative mode

D.  

Indexed mode

2.

Relative mode of addressing is most relevant to writing

A.  

Co-routines

B.  

Position – independent code

C.  

Shareable code

D.  

Shareable code

E.  

Interrupt Handlers

3.

Which of the following addressing modes permits relocation without any change whatsoever in the code?

A.  

Indirect addressing

B.  

Indexed addressing

C.  

PC relative addressing

D.  

Base register addressing

4.

A certain processor supports only the immediate and the direct addressing modes. Which of the following programminglanguage features cannot be implemented on this processor?

A.  

Pointers

B.  

Array

C.  

Records

D.  

Recursive procedures with local variables

5.

Which of the following addressing modes are suitable for program relocation at run time?

A.  

i) Absolute addressing

ii) Based addressing

iii) Relative addressing

iv) Indirect addressing

B.  

i and iv

C.  

i and ii

D.  

ii and iii

E.  

i,ii and iv

6.

The instruction, Add #45,R1 does _______

A.  

Adds the value of 45 to the address of R1 and stores 45 in that address

B.  

Adds 45 to the value of R1 and stores it in R1

C.  

Finds the memory location 45 and adds that content to that of R1

D.  

None of the mentioned

7.

The instruction, Add #45,R1 does _______

A.  

Adds the value of 45 to the address of R1 and stores 45 in that address

B.  

Adds 45 to the value of R1 and stores it in R1

C.  

Finds the memory location 45 and adds that content to that of R1

D.  

None of the mentioned

8.

In the case of, Zero-address instruction method the operands are stored in _____

A.  

Registers

B.  

Accumulators

C.  

Push down stack

D.  

Cache

9.

Add #45, when this instruction is executed the following happen/s _______

A.  

The processor raises an error and requests for one more operand

B.  

The value stored in memory location 45 is retrieved and one more operand is requested

C.  

The value 45 gets added to the value on the stack and is pushed onto the stack

D.  

None of the mentioned

10.

The addressing mode which makes use of in-direction pointers is ______

A.  

Indirect addressing mode

B.  

Index addressing mode

C.  

Relative addressing mode

D.  

Offset addressing mode