Zilog Z86193 User Manual
Page 253

Z8
®
CPU
User Manual
UM001604-0108
Instruction Description
246
Example 1
If Working Register R3 contains
45h
(
01000101b
) and Working Register R7 contains the
value
02h
(
00000010b
) (bit 1 is being tested if it is 0), the statement:
TM R3, R7
Op Code: 72 37
sets the Z Flag indicating bit 1 in the destination operand is 0. The V and S Flags are
cleared.
Example 2
Working Register R14 contains the value
F3h
(
11110011b
), Working Register R5 con-
tains
CBh
, and Register
CBh
contains
88h
(
10001000b
) (bit 7 a bit 3 are being tested if
they are 0), the statement:
TM R14, @R5
Op Code: 73 E5
resets the Z Flag, because bit 7 in the destination operand is not a 0. The S Flag is set, and
the V Flag is cleared.
Example 3
If Register
D4h
contains the value
08h
(
00001000b
), and Working Register R0 contains
the value
04h
(
00000100b
) (bit 2 is being tested if it is 0), the statement:
TM D4h, R0
Op Code: 74 E0 D4
sets the Z Flag, because bit 2 in the destination operand is a 0. The S and V Flags is
cleared.
Example 4
If Register
DFh
contains the value
←
(
00000000b
), Register
07h
contains the value
1Fh
,
and Register
1Fh
contains the value
BDh
(
10111101b
) (bit 7, bit 5, bit 4, bit 3, bit 2, and
bit 0 are being tested if they are 0), the statement:
TM DFh, @07h
Op Code: 75 07 DF
sets the Z Flag indicating the tested bits in the destination operand are 0. The S is set, and
the V Flag is cleared.
Example 5
If Working Register R13 contains the value
F1h
(
11110001b
), the statement:
TM R13, #02h
Op Code: 76 ED, 02
- Z86233 Z86243 Z86733 Z86743 Z86C02 Z86C04 Z86C08 Z86C15 Z86C21 Z86C30 Z86C31 Z86C33 Z86C36 Z86C40 Z86C43 Z86C61 Z86C62 Z86C63 Z86C65 Z86C83 Z86C90 Z86C91 Z86C93 Z86C96 Z86E02 Z86E03 Z86E04 Z86E06 Z86E07 Z86E08 Z86E15 Z86E21 Z86E30 Z86E31 Z86E33 Z86E34 Z86E40 Z86E43 Z86E44 Z86E61 Z86E63 Z86E83 Z86K15 Z86L02 Z86L04 Z86L08 Z86L16 Z8E000 Z8E001 Z8PE003