<s>
In	O
the	O
x86	B-Language
assembly	I-Language
language	I-Language
,	O
the	O
TEST	O
instruction	B-General_Concept
performs	O
a	O
bitwise	O
AND	O
on	O
two	O
operands	O
.	O
</s>
<s>
The	O
flags	B-General_Concept
SF	B-Algorithm
,	O
ZF	B-Algorithm
,	O
PF	B-General_Concept
are	O
modified	O
while	O
the	O
result	O
of	O
the	O
AND	O
is	O
discarded	O
.	O
</s>
<s>
The	O
OF	O
and	O
CF	O
flags	B-General_Concept
are	O
set	O
to	O
0	O
,	O
while	O
AF	O
flag	B-General_Concept
is	O
undefined	O
.	O
</s>
<s>
There	O
are	O
9	O
different	O
opcodes	B-Language
for	O
the	O
TEST	O
instruction	B-General_Concept
depending	O
on	O
the	O
type	O
and	O
size	O
of	O
the	O
operands	O
.	O
</s>
<s>
It	O
can	O
also	O
compare	O
registers	B-General_Concept
,	O
immediate	O
values	O
and	O
register	O
indirect	O
values	O
.	O
</s>
<s>
The	O
TEST	O
operation	O
clears	O
the	O
flags	B-General_Concept
CF	O
and	O
OF	O
to	O
zero	O
.	O
</s>
<s>
The	O
SF	B-Algorithm
is	O
set	O
to	O
the	O
most	O
significant	O
bit	O
of	O
the	O
result	O
of	O
the	O
AND	O
.	O
</s>
<s>
If	O
the	O
result	O
is	O
0	O
,	O
the	O
ZF	B-Algorithm
is	O
set	O
to	O
1	O
,	O
otherwise	O
set	O
to	O
0	O
.	O
</s>
<s>
The	O
parity	B-General_Concept
flag	I-General_Concept
is	O
set	O
to	O
the	O
bitwise	O
XNOR	O
of	O
the	O
least	O
significant	O
byte	O
of	O
the	O
result	O
,	O
1	O
if	O
the	O
number	O
of	O
ones	O
in	O
that	O
byte	O
is	O
even	O
,	O
0	O
otherwise	O
.	O
</s>
