beautypg.com

Zilog Z8F0130 User Manual

Page 254

background image

eZ8

CPU Core

User Manual

UM012820-0810

TCM Instruction

239

TCM

Definition

Test Complement Under Mask.

Syntax

TCM dst, src

Operation

(NOT dst) AND src

Description

This instruction tests selected bits in the destination operand for a logical
1 value. Specify the bits to be tested by setting a 1 bit in the corresponding
bit position in the source operand (the mask). The TCM instruction com-
plements the destination operand and AND’s it with the source mask
(operand). Check the Zero flag to determine the result. If the Z flag is set,
the tested bits were 1. When a TCM operation is completed, the destina-
tion and source operands retain their original values.

Flags

C

Unaffected

Z

Set if the result is zero; reset otherwise

S

Set if Bit 7 of the result is set; reset otherwise

V

Reset to 0

D

Unaffected

H

Unaffected