Siemens C500 User Manual page 44

Microcontroller family
Table of Contents

Advertisement

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
ANL
ANL
ANL
C,bit
Operation:
ANL
(C) ¬ (C) Ù (bit)
Encoding:
1 0 0 0
Bytes:
2
Cycles:
2
ANL
C,/bit
Operation:
ANL
(C) ¬ (C) Ù / (bit)
Encoding:
1 0 1 1
Bytes:
2
Cycles:
2
Semiconductor Group
C,P1.0
C,ACC.7
C,/OV
0 0 1 0
0 0 0 0
; Load carry with input pin state
; AND carry with accumulator bit 7
; AND with inverse of overflow flag
bit address
bit address
4-18
Instruction Set
C500 Family
1998-04-01

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents