Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
13 Applied Instructions (Handy Instruction)
13.2 SER / Search a Data Stack
324
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 16-bit operation
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 devices 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 devices 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 devices 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
Value of of
searched data
(ex.)
Value of of
comparative data
(ex.)
Position of
data
Search result
Maximum
value +4
Coincide Minimum
value +3
K100
K100
0 3(Initial)
+1
K111 1
+2
K100 2 3
+3
K 98 3
+4
K123 4
+5
K 66 5 3
+6
K100 6 3(Final)
+7
K 95 7
+8
K210 8 3
+9
K 88 9
Device No. Content Search result item
3 Number of same data
+1
0 Position of same data (initial)
+2
6 Position of same data (final)
+3
5 Final position of minimum value
+4
8 Final position of maximum value
Command input
SER
EN
s1
s2
ENO
d
n
Beginning device for searching same
data, maximum value, minimum value
Value for searching same data,
maximum value, minimum value,
or its storage destination device
The number for searching same data,
maximum value, minimum value
Beginning device for storing the numbers after
searching same data, maximum value, minimum value