6. ANLC
ANLC, <src-bit>
Function: Logical-AND for bit variables
Description: If the Boolean value of the source bit is a logical 0, then ANL C clears the carry flag; otherwise, this instruction leaves the carry flag in its current state. A slash ( / ) preceding the operand in the assembly language indicates that the logical complement of the addressed bit is used as the source value, but the source bit itself is not affected. No other flags are affected. Only direct addressing is allowed for the source operand.
Example: Set the carry flag if, and only if, P1.0 = 1, ACC.7 = 1, and OV = 0:
MOVC, P1.0 ; LOAD CARRY WITH INPUT PIN STATE ANLC, ACC.7 ; AND CARRY WITH ACCUM. BIT 7 ANL C, /OV ; AND WITH INVERSE OF OVERFLOW FLAG ANL C, bit
Bytes: 2
Cycles: 2
ANL C, /bit
Bytes: 2
Cycles: 2