<<< Encoding Eight, Sixteen, and Thirty-Two Bit Operands | Index | x86 Instruction Prefix Bytes >>> |
|
|
There is nothing programmer has to do explicitly to put an operand size prefix byte in front of a 16-bit instruction:
the assembler does this automatically as soon as 16-bit operand is found in the instruction.
However, keep in mind that whenever you use a 16-bit operand in a 32-bit program, the instruction is longer by one byte:
Opcode Instruction -------- ------------ 41h INC ECX 66h 41h INC CX
Be careful about using 16-bit instructions if size (and to a lesser extent, speed) are important, because
instructions are longer, and
slower because of their effect on the instruction cache.
<<< Encoding Eight, Sixteen, and Thirty-Two Bit Operands | Index | x86 Instruction Prefix Bytes >>> |