Post by bilsch01test al,al sets ZF only if al = 0
TIA. Bill S.
testb %al, %al
internally performs
andb %al, %al
without writing the result to the destination. Hence,
andb %al, %al
sets ZF if %al is zero. in all other cases, ZF is cleared. PF and
SF are set according to %al's content. CF and OF are set to zero,
no matter, what %al currently holds.
"AMD64 Architecture Programmers Manual Volume 3: General-Purpose
and System Instructions" [PDF 24594, page 342]
Greetings from Augburg
Bernhard Schornak