
<
2
.75
7UGT U/CPWCN
=L/2*
#FFTGUU5RCEG
7/<:
TCM
Test Complement Under Mask
Instruction Format:
TCM dst, src
Operation:
(NOT dst) AND src
This instruction tests selected bits in the destination operand for a logical
1
value. The bits to be tested are
specified by setting a
1
bit in the corresponding bit position in the source operand (the mask). The
TCM
instruction complements the destination operand, and then perforoms a logingal AND operation using
AND
s
with the mask (source operand). The Zero (
Z
) flag can then be read to check the result. If the
Z
flag is set,
then the tested bits were
1
. When the
TCM
operation is complete, the destination and source operands still
contain their previous values.
Flags:
When the instruction is executed, the flags are set as follows::
Example: Working register
R3
contains
45H
(
01000101B
). Working register
R7
contains the value
01H
(
00000001B
) (bit
0
is being tested if it is
1
). The following statement sets the
Z
flag indicating bit
0
in the
destination operand is
1
. The
V
and
S
flags are set to 0.
TCM R3, R7
Op Code: 62 37
C:
The value set by the preceding instruction.
Z:
1 if the result is
0
; otherwise, 0.
S:
1 if bit
7
of the result is 1; otherwise, 0.
V:
0
.
D:
The value set by the preceding instruction.
H:
The value set by the preceding instruction.
OPC
dst
src
OPC
src
dst
OPC
dst
src
OPC (Hex)
Address Mode
dst src
62
63
r
r
r
Ir
64
65
R
R
R
IR
66
67
R
IR
IM
IM