178k views
3 votes
Which of the following instructions are not valid? a) MOV ESI, AL b) MOV AX, [EDI] c) MOV 5, AL d) MOV CX, 5 1. a and c 2.a, b and c 3. All are not valid

1 Answer

3 votes

Final answer:

Among the provided assembly language instructions, a) MOV ESI, AL and c) MOV 5, AL are not valid due to improper operand types and instruction format respectively. Instruction b) and d) are valid assembly commands.

Step-by-step explanation:

The student's question relates to the validity of certain assembly language instructions. Assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices.

Here is an evaluation of each instruction:

  • a) MOV ESI, AL: This instruction is not valid because the MOV command cannot move a value from an 8-bit register (AL) directly into a 32-bit register (ESI) without proper operand size matching.
  • b) MOV AX, [EDI]: This instruction is valid as it moves the data from the memory location pointed to by EDI into the 16-bit register AX.
  • c) MOV 5, AL: This instruction is not valid as the source operand cannot be an immediate value in a MOV instruction to an 8-bit register AL. Instead, it should be MOV AL, 5 to be valid.
  • d) MOV CX, 5: This instruction is valid as it moves the immediate value 5 into the 16-bit register CX.

Therefore, instructions a) and c) are not valid.

User KasparTr
by
7.8k points