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:
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.
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
OPC
dst
Address Mode
OPC (Hex)
60
61
.75
P
Â
COM
Complement
dst
R
IR
Need help?
Do you have a question about the Z8 PLUS and is the answer not in the manual?
Questions and answers