وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

SETcc

SETcc 

Usage:  SETcc  dest                                 Modifies flags:none

Sets the 'dest' operand to 0 or 1 depending on the state of the EFLAGS register (CF, SF, OF, ZF, and PF flags).

Set Byte on Condition


SETcc r/m8                    ; 0F 90+cc /2          [386]


SETcc sets the given 8-bit operand to zero if its condition is not satisfied, and to 1 if it is. The 'dest' operand points to a byte register or a byte in memory. The condition code suffix (cc) indicates the condition being tested for. 


The terms 'above' and 'below' are associated with the CF flag and refer to the relationship between two unsigned integer values. The terms 'greater' and 'less' are associated with the SF and OF flags and refer to the relationship between two signed integer values.


Many of the SETcc instruction opcodes have alternate mnemonics. For example, SETG (set byte if greater) and SETNLE (set if not less or equal) have the same opcode and test for the same condition: ZF equals 0 and SF equals OF. 


These alternate mnemonics are provided to make code more intelligible. 

   SETE/SETZ               Set byte if equal/Set byte if zero

   SETNE/SETNZ           Set byte if not equal/Set byte if not zero

   SETA/SETNBE           Set byte if above/Set byte if not below or equal

   SETAE/SETNB/SETNC Set byte if above or equal/Set byte if not below/Set byte if not carry

   SETB/SETNAE/SETC   Set byte if below/Set byte if not above or equal/Set byte if carry


   SETBE/SETNA           Set byte if below or equal/Set byte if not above

   SETG/SETNLE           Set byte if greater/Set byte if not less or equal

   SETGE/SETNL           Set byte if greater or equal/Set byte if not less

   SETL/SETNGE           Set byte if less/Set byte if not greater or equal

   SETLE/SETNG           Set byte if less or equal/Set byte if not greater


   SETS                      Set byte if sign (negative)

   SETNS                    Set byte if not sign (non-negative)

   SETO                      Set byte if overflow

   SETNO                    Set byte if not overflow

   SETPE/SETP             Set byte if parity even/Set byte if parity

            SETPO/SETNP           Set byte if parity odd/Set byte if not parity 


EXAMPLE:

setna Label | sete Label | setz Label | setc Label | setne Label | setnc Label