• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 38

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

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments