Go to the first, previous, next, last section, table of contents.
Opcode prefixes are used to modify the following opcode. They are used
to repeat string instructions, to provide section overrides, to perform
bus lock operations, and to give operand and address size (16-bit
operands are specified in an instruction by prefixing what would
normally be 32-bit operands with a "operand size" opcode prefix).
Opcode prefixes are usually given as single-line instructions with no
operands, and must directly precede the instruction they act upon. For
example, the `scas' (scan string) instruction is repeated with:
repne
scas
Here is a list of opcode prefixes:
-
Section override prefixes `cs', `ds', `ss', `es',
`fs', `gs'. These are automatically added by specifying
using the section:memory-operand form for memory references.
-
Operand/Address size prefixes `data16' and `addr16'
change 32-bit operands/addresses into 16-bit operands/addresses. Note
that 16-bit addressing modes (i.e. 8086 and 80286 addressing modes)
are not supported (yet).
-
The bus lock prefix `lock' inhibits interrupts during
execution of the instruction it precedes. (This is only valid with
certain instructions; see a 80386 manual for details).
-
The wait for coprocessor prefix `wait' waits for the
coprocessor to complete the current instruction. This should never be
needed for the 80386/80387 combination.
-
The `rep', `repe', and `repne' prefixes are added
to string instructions to make them repeat `%ecx' times.
Go to the first, previous, next, last section, table of contents.