Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
13 Applied Instructions (Handy Instruction)
13.2 SER / Search a Data Stack
325
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
11
Applied Instructions
(Data Operation)
12
Applied Instructions
(High Speed
Processing)
13
Applied Instructions
(Handy
Instruction)
14
Applied Instructions
(External FX I/O
Device)
15
Applied Instructions
(External Device
(optional device))
16
Applied Instructions
(External Device)
17
Applied Instructions
(Data Transfer 2)
18
Applied Instructions
(Floating Point)
19
Applied Instructions
(Data Operation 2)
20
Applied Instructions
(Positioning
Control)
2. 32-bit operation(DSER, DSERP)
In n pieces of data beginning from the device designated in , same data as the device designated in
is searched, and the result is stored in the device designated in .
1) Content and result of searched data
a) When same data is found
In five points of 32-bit data beginning from the device designated in , the number of same data,
initial/final position, and positions of maximum value and minimum value are stored.
b) When same data is not found
In five points of 32-bit data beginning from the device designated in , the number of same data,
initial/final position, and positions of maximum value and minimum value are stored.
However, 0 is stored in three points of 32-bit data beginning from the device designated in
(number of same data, initial/final position).
2) Operation examples
a) Examples of composition of search result table and data
b) Search result table
Searched device
+1
Value of of
searched data
(ex.)
Comparative
data
Position
of data
Search result
Maximum
value +4
Coincide Minimum
value +3
[+1,]
K100000
K100000
0 3(Initial)
[ +3, +2]
K110100 1
[ +5, +4]
K100000 2 3
[ +7, +6]
K 98000 3
[ +9, +8]
K123000 4
[+11,+10]
K 66000 5 3
[+13,+12]
K100000 6 3(Final)
[+15,+14]
K 95000 7
[+17,+16]
K910000 8 3
[+19,+18]
K910000 9 3
Device No. Content Search result item
[+1,]
3 Number of same data
[ +3, +2]
0 Position of same data (initial)
[ +5, +4]
6 Position of same data (final)
[ +7, +6]
5 Final position of minimum value
[ +9, +8]
9 Final position of maximum value
Command input
DSER
EN
s1
s2
ENO
d
n
Beginning device for storing the numbers after
searching same data, maximum value, minimum value
The number for searching same data,
maximum value, minimum value
Beginning device for searching same
data, maximum value, minimum value
Value for searching same data,
maximum value, minimum value,
or its storage destination device