Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- iAPx86 - <b>and and operation 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             AND operation                        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. AND sets each bit of the
    result to one if both of the corresponding bits of the operands
    are one.

                          AND truth table
                        a       b    a AND b
                        0       0       0
                        0       1       0
                        1       0       0
                        1       1       1


    Opcode      Format
    20 /r       AND  r/m8,r8
    21 /r       AND  r/m16,r16
    21 /r       AND  r/m32,r32
    22 /r       AND  r8,r/m8
    23 /r       AND  r16,r/m16
    23 /r       AND  r32,r/m32
    24 ib       AND  AL,imm8
    25 iw       AND  AX,imm16
    25 id       AND  EAX,imm32
    80 /4 ib    AND  r/m8,imm8
    81 /4 iw    AND  r/m16,imm16
    81 /4 id    AND  r/m32,imm32
    83 /4 ib    AND  r/m16,imm8
    83 /4 ib    AND  r/m32,imm8


    Length and timing
    Operands    Bytes   8088    186     286     386     486     Pentium
    reg, reg     2       3       3       2       2       1       1   UV
    mem, reg  2+d(0,2)  24+EA   10       7       7       3       3   UV
    reg, mem  2+d(0,2)  13+EA   10       7       6       2       2   UV
    reg, imm  2+i(1,2)   4       4       3       2       1       1   UV
    mem, imm  2+d(0,2)  23+EA   16       7       7       3       3   UV*
               +i(1,2)
    acc, imm  1+i(1,2)   4       4       3       2       1       1   UV

        * = not pairable if there is a displacement and immediate

See Also: TEST NOT NEG OR XOR Flags

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