7 Applied Instructions
7.19 Block Data Operation
626
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
2. 32-bit operation
(DBKCMP=, DBKCMP>, DBKCMP<, DBKCMP<>, DBKCMP<=, DBKCMP>=, DBKCMP=P, DBKCMP>P,
DBKCMP<P, DBKCMP<>P, DBKCMP<=P, DBKCMP>=P)
1) "2n" 32-bit binary data starting from the device specified by are compared with "2n" 32-bit binary
data starting from the device specified by , and the comparison result is stored in "2n" points starting
from the device specified by .
2) A constant can be directly specified in the device specified by .
3) The table below shows the comparison result for each instruction.
4) When the comparison result is ON (1) in all of "n" points starting from the device specified by , the
M8090 (block comparison signal) turns ON.
Instruction Comparison result ON (1) condition Comparison result OFF (0) condition
DBKCMP=
[ +1, ] = [ +1, ]
[ +1, ] ≠ [ +1, ]
DBKCMP>
[ +1, ] > [ +1, ] [ +1, ] ≤ [ +1, ]
DBKCMP<
[
+1, ] < [ +1, ]
[ +1, ] ≥ [ +1, ]
DBKCMP<>
+1, ] ≠ [ +1, ]
[ +1, ] = [ +1, ]
DBKCMP<=
[ +1, ] ≤ [ +1, ] [ +1, ] > [ +1, ]
DBKCMP>=
[ +1, ] ≥ [ +1, ]
[ +1, ] < [ +1, ]
DBKCMP=, DBKCMP>, DBKCMP<, DBKCMP<>, DBKCMP<=, DBKCMP>=, DBKCMP=P,
DBKCMP>P, DBKCMP<P, DBKCMP<>P, DBKCMP<=P, and DBKCMP>=P are put in.
*1.
*2. This defines the comparison value or the device storing the comparison value.
*3. This defines the head of the device that stores the comparison source data.
*4. This defines the number of pieces of comparison data
EN ENO
d
s1
s2
n
Command
input
Label 1
*2
Label 2
*3
Label 3
*4
Head device storing comparison result
DBKCMP=
*1
"n"
points
K1234
K5678
K40000
K5000
K4321
"n"
points
K5321
K3399
K6543
K5678
K1200
s1
]+1,[
s1
s1
]+3,[
s1
s1
]+2n-3,[
s1
+2
s1
]+5,[
s1
+4
+2n-4
s1
]+2n-1,[
s1
+2n-2
s2
]+1,[
s2
s2
]+3,[
s2
s2
]+2n-3,[
s2
+2
s2
]+5,[
s2
+4
+2n-4
s2
]+2n-1,[
s2
+2n-2
+0
Comparison result
+1
+2
+n-2
+n-1
"n"
points
OFF(0)
ON(1)
ON(1)
OFF(0)
ON(1)
d
>
*5
*5 An example of DBKCMP>.
K32000
"n"
points
K32000
K4321
K1234
K32000
K5678
+3,
+0
Comparison result
"n"
points
ON(1)
OFF(0)
OFF(0)
ON(1)
OFF(0)
=
*1
*1 An operation example of DBKCMP=
instruction is shown here.
+1
+2
+n-2
s1
[
+1,
]
s1
+2]
s2s2
[
s2
[
+1,
]
s2
+2n-3,
+4]
s2s2
[
+2n-4]
s2s2
[
+5,
+2n-1, +2n-2]
s2s2
[
d