X86-assembly/Instructions/cld

From aldeid
Jump to navigation Jump to search
You are here:
cld

Description

  • The cld instruction clears the direction flag: DF = 0
  • The direction flag (DF) is used to influence the direction in which some of the instructions work when used with the REP* prefix.
  • There is a number of instructions that are influenced by this flag directly, for example MOVS, LODS, SCAS, ...
  • If the direction flag is 0 (DF=0), the instructions work by incrementing the pointer to the data after every iteration (until ECX = 0
  • If the flag is 1 (DF=1), the pointer is decremented.

Syntax

cld

Comments