Intel i86W Manual page 76

Table of Contents

Advertisement

CORE INSTRUCTIONS
5.10 LOGICAL INSTRUCTIONS
and isrc1, isrc2, idest
(Logical AND)
idest (- isrc1 AND isrc2
CC 15et if result is zero, cleared otherwise
andh #const, isrc2, idest
(Logical AND high)
idest (- (#const shifted left 16 bits) AND isrc2
CC set if result is zero, cleared otherwise
and not isrc1, isrc2, idest
(Logical AND NOT)
idest (- NOT isrc1 AND isrc2
CC set if result is zero, cleared otherwise
andnoth #const, isrc2, idest
(Logical AND NOT high)
idest (- NOT (#const shifted left 16 bits) AND isrc2
CC set if result is zero, cleared otherwise
or isrc1, isrc2, idest
(Logical OR)
idest (- isrc1 OR isrc2
~C
set if result is zero, cleared
othe~ise
orh #const, isrc2, idest
(Logical OR high)
idest (- (#const shifted left 16 bits) OR isrc2
CC set if result is zero, cleared otherwise
xor isrc1, isrc2, idest
(Logical XOR)
idest (- isrc1 XOR isrc2
CC set if result is zero, cleared otherwise
xorh #const, isrc2, idest
(Logical XOR high)
idest (- (#const shifted left 16 bits)
XOR isrc2
CC set if result is zero, cleared otherwise
The operation is performed bitwise on all 32 bits of isrcl and isrc2. When isrcl is an
immediate constant, it is zero-extended to 32 bits.
The "H" variant signifies "high" and forms one operand by using the immediate con-
stant as the high-order 16 bits and zeros as the low-order 16 bits. The resulting 32-bit
value is then used to operate on the isrc2 operand.
Flags Affected
CC is set if the result is zero, cleared otherwise.
Programming Notes
Bit operations can be implemented using logical operations. Isrcl is an immediate con-
stant which contains a one in the bit position to be operated on and zeros elsewhere.
5-14

Advertisement

Table of Contents
loading

Table of Contents