
<
2
.75
7UGT U/CPWCN
=L/2*
#FFTGUU5RCEG
7/<:
CP
Compare
Example: Working register
R3
contains
16H
. Working register
R11
contains
20H
. The following statement
sets the
C
and
S
flags to 1, and the
Z
and
V
flags are set to 0.
CP R3, R1
Op Code: A2 3B
Example: Working register
R15
contains
16H
. Working register
R10
contains
20H
. Register
20H
contains
11H
. The following statement sets the
C
,
Z
,
S
, and
V
flags to 0.
CP R16, @R10
Op Code: A3 FA
Example: Register
34H
contains
2EH
. Register
12H
contains
1BH
. The following statement sets the
C
,
Z
,
S
,
and
V
flags to 0.
CP 34H,12H
Op Code: A4 12 34
Example: Register
4BH
contains
82H
. Working register
R3
contains
10H
. Register
10H
contains
01H
. The
following statement sets the
S
flag to 1, and the
C
,
Z
, and
V
flags are set to 0.
CP 4BH, @R3
Op Code: A5 E3 4B
Example: Register
6CH
contains
2AH
. The following statement sets the
Z
flag to 1, and the
C
,
S
, and
V
flags
are se to 0.
CP 6CH, #2AH
Op Code: A6 6C 2A
Example: Register
D4H
contains
FCH
. Register
FCH
contains
8FH
. The following statement sets the
V
flag
to 1, and the
C
,
Z
, and
S
flags are set to 0.
CP @D4H, 7FH
Op Code: A7 D4 FF