STD

Set Direction Flag

OpcodeInstructionOp/En64-bit ModeCompat/Leg ModeDescription
FDSTDZOValidValidSet DF flag.

Instruction Operand Encoding

Op/EnOperand 1Operand 2Operand 3Operand 4
ZON/AN/AN/AN/A

Description

Sets the DF flag in the EFLAGS register. When the DF flag is set to 1, string operations decrement the index registers (ESI and/or EDI). Operation is the same in all modes.

Operation

DF := 1;

Flags Affected

The DF flag is set. The CF, OF, ZF, SF, AF, and PF flags are unaffected.

Exceptions (All Operating Modes)

#​​​UD If the LOCK prefix is used.

This UNOFFICIAL, mechanically-separated, non-verified reference is provided for convenience, but it may be incomplete or broken in various obvious or non-obvious ways. Refer to Intel® 64 and IA-32 Architectures Software Developer’s Manual for anything serious.