<s>
The	O
direction	B-Device
flag	I-Device
is	O
a	O
flag	B-General_Concept
that	O
controls	O
the	O
left-to-right	O
or	O
right-to-left	O
direction	O
of	O
string	O
processing	O
,	O
stored	O
in	O
the	O
FLAGS	B-General_Concept
register	I-General_Concept
on	O
all	O
x86-compatible	O
CPUs	B-Device
.	O
</s>
<s>
It	O
is	O
bit	B-Language
number	I-Language
10	O
.	O
</s>
<s>
This	O
flag	B-General_Concept
is	O
used	O
to	O
determine	O
the	O
direction	O
( 	O
 '	O
forward	O
 '	O
or	O
'	O
backward	O
 '	O
)	O
in	O
which	O
several	O
bytes	O
of	O
data	O
will	O
be	O
copied	O
from	O
one	O
place	O
in	O
the	O
memory	B-Architecture
,	O
to	O
another	O
.	O
</s>
<s>
The	O
direction	O
is	O
important	O
mainly	O
when	O
the	O
original	O
data	O
position	O
in	O
memory	B-Architecture
and	O
the	O
target	O
data	O
position	O
overlap	O
.	O
</s>
<s>
If	O
it	O
is	O
set	O
to	O
0	O
(	O
using	O
the	O
clear-direction-flag	O
instruction	B-Device
CLD	O
)	O
—	O
it	O
means	O
that	O
string	O
is	O
processed	O
beginning	O
from	O
lowest	O
to	O
highest	O
address	B-General_Concept
;	O
such	O
instructions	O
mode	O
is	O
called	O
auto-incrementing	O
mode	O
.	O
</s>
<s>
In	O
case	O
it	O
is	O
set	O
to	O
1	O
(	O
using	O
the	O
set-direction-flag	O
instruction	B-Device
STD	O
)	O
—	O
the	O
string	O
is	O
processed	O
from	O
highest	O
to	O
lowest	O
address	B-General_Concept
.	O
</s>
