Toshiba 6F3B0250 Video Gaming Accessories User Manual


 
6F3B0250
Basic Hardware and Function
245
7. Instructions
FUN 163 MIN Minimum value
Expression
Input
-
[
A
MIN (
n
)
B
]
-
Output
Function
When the input is ON, this instruction searches for the minimum value from the table of size
n
words
starting with
A
, and stores the minimum value in
B
and the pointer indicating the position of the
minimum value in
B+1
. The allowable range of the table size
n
is 1 to 64.
Execution condition
Input Operation Output
OFF No execution OFF
ON Execution ON
Operand
Name Device Re
g
ister Constant Index
X Y R S T. C. XW YW RW SW T C D I J K
A
Start of table
ÖÖÖÖÖÖÖ
n
Table size 1 - 64
B
Result
ÖÖÖÖÖÖÖÖÖ
Example
When R011 is ON, the minimum value is found from the register table D0200 to D0209 (10
words), and the minimum value is stored in D0510 and the pointer is stored in D0511.
Pointer
D0200 100 0
D0201 10000 1
D0202 -1000 2 D0510 -1000 (Minimum value)
D0203 10 3 D0511 2 (Pointer)
D0204 0 4
D0205 200 5
D0206 -300 6
D0207 20000 7
D0208 -30 8
D0209 20 9
Note
·
This instruction deals with the data as signed integer (-32768 to 32767).
·
If there are two or more minimum value in the table, the lowest pointer is stored.
·
If Index register K is used as operand
B
, the pointer data is discarded.
T1S only
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net