
<
2
.75
7UGT U/CPWCN
=L/2*
#FFTGUU5RCEG
7/<:
COM
Complement
Instruction Format:
COM dst
Operation:
dst
←
NOT dst
The contents of the destination operand are complemented (one’s complement). All
1
bits are changed to
0
,
and all
0
bits are changed to
1
.
Flags:
When the instruction is executed, the flags are set as follows:
Example: Register
08H
contains
24H
(
00100100B
). The following statement leaves the value
DBH
(
11011011
) in register
08H
. The
S
flag is set to 1, and the
Z
and
V
flags are set to 0.
COM 08
Op Code: 60 08
Example: Register
08H
contains
24H
, and register
24H
contains
FFH
(
11111111B
). The following state-
ment leaves the value
00H
(
00000000B
) in register
24H
. The
Z
flag is set to 1, and the
V
and
S
flags are
set to 0.
COM @08H
Op Code: 61 08
C:
The value set by the preceding instruction.
Z:
1 if the result is
0
; otherwise, 0.
S:
1 if result bit
7
is set; otherwise, 0.
V:
0
D:
The value set by the preceding instruction.
H:
The value set by the preceding instruction.
OPC
dst
OPC (Hex)
Address Mode
dst
60
61
R
IR