<<< Encoding Sixteen Bit Operands | Index | Alternate Encodings for Instructions >>> |
x86 instruction can have up to 4 prefixes.
Each prefix adjusts interpretation of the opcode:
Repeat/lock prefix byte guarantees that instruction will have exclusive use of all shared memory, until the instruction completes execution:
F0h = LOCK
String manipulation instruction prefixes
F3h = REP, REPE F2h = REPNE
where
REP repeats instruction the number of times specified by iteration count ECX.
REPE and REPNE prefixes allow to terminate loop on the value of ZF CPU flag.
Related string manipulation instructions are:
MOVS, move string
STOS, store string
SCAS, scan string
CMPS, compare string, etc.
See also string manipulation sample program: rep_movsb.asm
Segment override prefix causes memory access to use specified segment instead of default segment designated for instruction operand.
2Eh = CS 36h = SS 3Eh = DS 26h = ES 64h = FS 65h = GS
Operand override, 66h. Changes size of data expected by default mode of the instruction e.g. 16-bit to 32-bit and vice versa.
Address override, 67h. Changes size of address expected by the instruction. 32-bit address could switch to 16-bit and vice versa.
<<< Encoding Sixteen Bit Operands | Index | Alternate Encodings for Instructions >>> |