
<
2
.75
7UGT U/CPWCN
#FFTGUU5RCEG
=L/2*
7/<:
AND
Logical AND
Example: Working register
R4
contains
F9H
(
11111001B
). Working register
R13
contains
7BH
. Register
7BH
contains
6AH
(
01101010B
). The following statement leaves the value
68H
(
01101000B
) in
working register
R4
. The
Z
,
V
, and
S
flags are set to 0.
AND R4, @R13
Op Code: 53 4D
Example: Register
3AH
contains the value
F5H
(
11110101B
). Register
42H
contains the value
0AH
(
00001010
). The following statement leaves the value
00H
(
00000000B
) in register
3AH
. The
Z
flag is
setto 1, and the
V
and
S
flags are cleared.
AND 3AH, 42H
Op Code: 54 42 3A
Example: If working register
R5
contains
F0H
(
11110000B
). Register
45H
contains
3AH
. Register
3AH
contains
7FH
(
01111111B
). The following statement leaves the value
70H
(
01110000B
) in working
register
R5
. The
Z
,
V
, and
S
flags are set to 0.
AND R5, @45H
Op Code: 55 45 E5
Example: Register
7AH
contains the value
F7H
(
11110111B
). The following statement leaves the value
F0H
(
11110000B
) in register
7AH
. The
S
flag is set to 1, and the
Z
and
V
flags are set to 0.
AND 7AH, #F0H
Op Code: 56 7A F0
Example: Working register
R3
contains the value
3EH
. Register
3EH
contains the value
ECH
(
11101100B
). The following statement leaves the value
04H
(
00000100B
) in register
3EH
. The
Z
,
V
, and
S
flags are set to 0.
AND @R3, #05H
Op Code: 57 E3 05