Toshiba 6F3B0250 Video Gaming Accessories User Manual


 
6F3B0250
164
T1/T1S User’s Manual
7. Instructions
FUN 030 / Division
Expression
Input
-
[
A
/
B
®
C
]
-
Output
Function
When the input is ON, the data of
A
is divided by the data of
B
, and the quotient is stored in
C
and the
remainder in
C+1.
Execution condition
Input Operation Output ERF
OFF No execution OFF
-
ON
Normal execution (
B
¹
0)
ON
-
No execution (
B
=
0)
OFF Set
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
Dividend
ÖÖÖÖÖÖÖÖÖÖ Ö Ö
B
Divisor
ÖÖÖÖÖÖÖÖÖÖ Ö Ö
C
Quotient
ÖÖÖÖÖÖÖÖÖ Ö
Example
When R005 is ON, the data of RW22 is divided by the constant data 325, and the quotient is
stored in RW27 and the remainder is stored in RW28.
If the data of RW22 is 2894, the quotient 8 is stored in RW27 and the remainder 294 is stored in
RW28.
RW22 2894
¸
RW27 8 (quotient)
Constant 325 RW28 294 (remainder)
Note
·
If divisor (operand
B
) is 0, ERF (instruction error flag = S051) is set to ON.
The ERF (S051) can be reset to OFF by user program, e.g.
Ä
[ RST S051 ]
Ä
.
·
If the index register K is used as operand
C
, the remainder is ignored.
·
If operand
A
is -32768 and operand
B
is -1, the data -32768 is stored in
C
and 0 is stored in
C+1
.
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net