Instruction Set
C500 Family
Semiconductor Group
4-18
1998-04-01
ANL
C, <src-bit>
Function:
Logical AND for bit variables
Description:
If the Boolean value of the source bit is a logic 0 then clear the carry flag; otherwise
leave 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 bit 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:
MOV
C,P1.0
; Load carry with input pin state
ANL
C,ACC.7
; AND carry with accumulator bit 7
ANL
C,/OV
; AND with inverse of overflow flag
ANL
C,bit
Operation:
ANL
(C)
¬
(C)
Ù
(bit)
Bytes:
2
Cycles:
2
ANL
C,/bit
Operation:
ANL
(C)
¬
(C)
Ù /
(bit)
Bytes:
2
Cycles:
2
Encoding:
1 0 0 0
0 0 1 0
bit address
Encoding:
1 0 1 1
0 0 0 0
bit address