TEST指令

In the x86 assembly language, the TEST instruction performs a bitwise AND on two operands. The flags SF, ZF, PF are modified while the result of the AND is discarded. 

 

; Conditional Jump
test cl, cl   ; set ZF to 1 if cl == 0
je 0x804f430  ; jump if ZF ==1

; or
test eax, eax  ; set SF to 1 if eax < 0 (negative)
js error      ; jump if SF == 1

 

 https://en.wikipedia.org/wiki/TEST_(x86_instruction)

 

posted @ 2016-05-27 16:50  庚武  Views(406)  Comments(0Edit  收藏  举报