Omron CP1E-NA@@D@-@ Computer Hardware User Manual


 
2-103
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Comparison Instructions
2
BCMP
BCMP
Applicable Program Areas
Operands
Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
BLOCK COMPARE BCMP @BCMP 068
Compares the source data to 16 ranges (defined
by 16 lower limits and 16 upper limits) and turns
ON the corresponding bit in the result word when
the source data is within a range.
Symbol
BCMP
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description Data type Size
S Source data WORD 1
B First word of block WORD 32
R Result word UINT 1
B: First word of block 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
--- --- ---B
---
D
Name Label Operation
Error Flag P_ER OFF
Equals Flag P_EQ ON if the result word is 0000.
(S is not within any of the 16 ranges.)
OFF in all other cases.
BCMP(068)
S
B
R
S: Source data
B: First word of block
R: Result word
B
B+1
B+2
B+3
B+30
B+31
Lower limit value 0
Upper limit value 0
Lower limit value 1
Upper limit value 1
Lower limit value 15
Upper limit value 15
15 014
R
1
Comparison result for S and
range B B+1
Comparison result for S and
range B+2 B+3
Comparison result for S and
range B+28 B+29
Comparison result for S and
range B+30 B+31