2-101
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Comparison Instructions
2
TCMP
TCMP
Applicable Program Areas
Operands
Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
TABLE COMPARE TCMP @TCMP 085
Compares the source data to the contents of 16
consecutive words and turns ON the correspond-
ing bit in the result word when the contents of the
words are equal.
Symbol
TCMP
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description Data type Size
S Source data WORD 1
T First word of table WORD 16
R Result word UINT 1
T: First word of table R: Result word
Area
Word addresses Indirect DM addresses
Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
S
OK OK OK OK OK OK OK OK OK
OK
--- --- ---
T, R ---
Name Label Operation
Error Flag P_ER OFF
Equals Flag P_EQ • ON if the result word is 0000.
(The two 16-word sets contain the same data.)
• OFF in all other cases.
TCMP(085)
S
T
R
S: Source data
T: First word of table
R: Result word
T
T+1
T+15
to
to
Comparison data 0
Comparison data 1
Comparison data 15
15 014
R
1
Comparison result for S and T
Comparison result for S and T+1
Comparison result for S and T+14
Com
p
arison result for S and T+15