This flag is used in string operations and indicates whether strings start at a low address and go to higher addresses or vice versa.
For string instructions, it ECXhas a number of iterations, DS:ESIhas a source address, and ES:EDIa destination (therefore, s in ESIand d in EDI).
After each iteration, it ECXdecreases by one, and ESIit EDIeither increases or decreases by the size of the element (1 for operations with bytes, 2 for operations with text, etc.) in accordance with EFLAGS.DF.
If EFLAGS.DF 0, ESIand EDIincrease, otherwise they decrease.
source
share