Identify the operand addressing mode used in each of these i

Identify the operand addressing mode used in each of these instructions. And Explain why?

a) AND DX,AX

b) JMP JMPTAB[BX]

c) ADD DX,15

d) CMP WORD PTR [BX+DI],10

e) MOV IVAL[DI+4],CX

Solution

a) The operand addressing mode used in AND DX,AX is REGISTER mode. Here DX,AX are registers and ADD instruction is used to add the contents of the register AX and DX. So it is register mode.

b) The operand addressing mode used in JMP JMPTAB[BX] is BASE+DISPLACEMENT mode. Here BX is base register as it contains a pointer to memory location. And it is also in displacement mode.

c) The operand addressing mode used in AND DX,15 is IMMEDIATE mode. Here the add instruction adds immediate value 15 to DX, so it is in IMMEDIATE mode.

d) The operand addressing mode used in CMP WORD PTR [BX+DI],10 is BASE+INDEX mode. Here a constant value is added to the content of index register and compared with the base register, so it is in BASE+INDEX mode.

e) The operand addressing mode used in MOV IVAL[DI+4],CX is INDEX+DISPLACEMENT mode. Here an index register contents are added to a constant so it is in INDEX mode and an integer is used to represent aa a displacement. So it is INDEX+DISPLACEMENT mode.

Identify the operand addressing mode used in each of these instructions. And Explain why? a) AND DX,AX b) JMP JMPTAB[BX] c) ADD DX,15 d) CMP WORD PTR [BX+DI],10

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site