beautypg.com

Texas Instruments MSC1210 User Manual

Page 219

background image

Bit-Wise Logical Instructions (ANL, ORL, XRL)

16-25

8052 Assembly Language

Most of the logical bit-wise instructions affect entire 8-bit memory registers.
However, the following instructions are available to perform logical operations
on the carry bit. The result of these instructions is always left in the carry bit
and the other bit is left unchanged.

ANL C,bit—this instruction will perform a logical AND between the carry bit
and the specified bit. If both bits are set, the carry bit remains set. Otherwise,
the carry bit is cleared.

ANL C,bit—this instruction performs a logical AND between the carry bit and
the complement of the specified bit. That means if the specified bit is set, the
carry bit is ANDed as if it were clear. If the specified bit is clear, it is ANDed with
the carry bit as if it were set.

ORL C,bit—This instruction will perform a logical OR between the carry bit and
the specified bit. If either the carry bit or the specified bit is set, the carry bit is
set. If neither bit is set, the carry bit is cleared.

ORL C,bit—This instruction performs a logical OR between the carry bit and
the complement of the specified bit. That means if the specified bit is set, the
carry bit is ORed as if it were clear. If the specified bit is clear, it is ORed with
the carry bit as if it were set.

Note:

There is no XRL that operates on the carry bit and another bit. Only the ANL
and ORL logical instructions are supported with the carry bit.