Last Updated : 19 Nov, 2018

Consider the following assembly codes :
(P1) :

BYTE_VALUE  DB  150    // A byte value is defined
WORD_VALUE  DW  300    // A word value is defined
ADD  BYTE_VALUE, 65    // An immediate operand 65 is added
MOV  AX, 45H           // Immediate constant 45H is transferred to AX

(P2) :

MY_TABLE TIMES 10 DW 0  // Allocates 10 words (2 bytes) each initialized to 0
MOV EBX, [MY_TABLE]     // Effective Address of MY_TABLE in EBX
MOV [EBX], 110          // MY_TABLE[0] = 110
ADD EBX, 2              // EBX = EBX +2
MOV [EBX], 123          // MY_TABLE[1] = 123

Which of the following option is correct?
(A) P1 uses immediate Addressing, and P2 uses Indirect Memory Addressing mode.
(B) P1 uses immediate Addressing, and P2 uses Direct Memory Addressing mode.
(C) P1 uses Direct Memory Addressing, and P2 uses Direct Memory Addressing mode.
(D) None of these


Answer: (A)

Explanation: An immediate operand has a constant value or an expression.
The effective address of the operand is the contents of a register or main memory location, location whose address appears in the instruction of indirect addressing modes.
Option (A) is correct.

Quiz of this Question


Share your thoughts in the comments