Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>set set byte on condition (386) flags: o d i t s z a p c</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SET              Set Byte On Condition (386)         Flags: O D I T S Z A P C

SET destination

           Logic:        if condition then destination . 1
                         else destination . 0

     The SET instructions set the destination byte to 1 if the specified
     condition is true; 0 otherwise. Here are the SET instructions and the
     conditions they use:

     SET Instruction    Flags           Explanation
     ---------------    -------         ---------------------------------
     SETB/SETNAE        CF=1            Set if Below/Not Above or Equal
     SETAE/SETNB        CF=0            Set if Above or Equal/Not Below
     SETBE/SETNA        CF=1 or ZF=1    Set if Below or Equal/Not Above
     SETA/SETNBE        CF=0 and ZF=0   Set if Above/Not Below or Equal
     SETE/SETZ          ZF=1            Set if Equal/Zero
     SETNE/SETNZ        ZF=0            Set if Not Equal/Not Zero
     SETL/SETNGE        SF<>OF          Set if Less/Not Greater or Equal
     SETGE/SETNL        SF=OF           Set if Greater or Equal/Not Less
     SETLE/SETNG        ZF=1 or SF<>OF  Set if Less or Equal/Not Greater
     SETG/SETNLE        ZF=0 or SF=OF   Set if Greater/Not Less or Equal
     SETS               SF=1            Set if Sign
     SETNS              SF=0            Set if No Sign
     SETC               CF=1            Set if Carry
     SETNC              CF=0            Set if No Carry
     SETO               OF=1            Set if Overflow
     SETNO              OF=0            Set if No Overflow
     SETP/SETPE         PF=1            Set if Parity/Parity is Even
     SETNP/SETPO        PF=0            Set if No Parity/Parity Odd

     destination can be either a byte-long register or memory location.

  --------------------------------------------------------------------------
   Operands                   Clocks   Transfers  Bytes  Example
   SETxxx register8           4 (386)      -        3    SETNL AL
   SETxxx memory8             5 (386)      -        3    SETPE MEM_BYTE
  --------------------------------------------------------------------------

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson