Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Assembly Language - <b>xor exclusive or 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]
XOR              Exclusive OR                        Flags: O D I T S Z A P C
                                                            0       * * * * 0
XOR destination,source

          Logic:    destination . destination XOR source

    XOR performs a bit-by-bit "exclusive or" on its two operands, and
    returns the result in the destination operand.  The operands may be
    bytes or words.

                      XOR Instruction Logic

                   Destination  Source    Result
                        0         0         0
                        0         1         1
                        1         0         1
                        1         1         0

    XOR sets each bit of the result to 1 only one of the corresponding
    bits is set to one.

  --------------------------------------------------------------------------
   Operands                  Clocks   Transfers  Bytes   Example
   register, register          3          -        2     XOR CX,BX
   register, memory        9(13) + EA     1       2-4    XOR CL,MASK_BYTE
   memory, register       16(24) + EA     2       2-4    XOR ALPHA[SI],DX
   accumulator, immediate      4          -       2-3    XOR AL,01000001b
   register, immediate         4          -       3-4    XOR SI,00C2h
   memory, immediate      17(25) + EA     2       3-6    XOR RETURN_CODE,0D2h
  --------------------------------------------------------------------------

See Also: OR AND NOT EA Flags

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