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>and logical and 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]
AND              Logical AND                         Flags: O D I T S Z A P C
                                                            0       * * ? * 0
AND destination,source

          Logic:    destination . destination AND source

    AND performs a bit-by-bit logical AND operation on its operands and
    stores the result in destination. The operands may be words or bytes.

                        AND Instruction Logic
                     Destination  Source    Result
                          0         0         0
                          0         1         0
                          1         0         0
                          1         1         1

    AND sets each bit of the result to 1 if both of the corresponding bits
    of the operands are 1.

  --------------------------------------------------------------------------
   Operands                  Clocks   Transfers  Bytes   Example
                           byte(word)
   register, register          3          -        2     AND AL,DL
   register, immediate         4          -       3-4    AND CX,0FFh
   accumulator, immediate      4          -       2-3    AND AX,01000010b
   register, memory        9(13) + EA     1       2-4    AND CX,MASK
   memory, register       16(24) + EA     2       2-4    AND VALUE,BL
   memory, immediate      17(25) + EA     2       3-6    AND STATUS,01h
  --------------------------------------------------------------------------

See Also: NOT OR XOR EA Flags

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