Example
STL Explanation
L IW10 //Load the value of IW10 into ACCU 1-L.
L MW14 //Load the contents of ACCU 1-L into ACCU 2-L. Load the value of MW14 into ACCU 1-L.
/I //Divide ACCU 2-L by ACCU 1-L; store the result in ACCU 1: ACCU 1-L: quotient, ACCU 1-H: remainder
T MD20 //The contents of ACCU 1 (result) are transferred to MD20.
Example: 13 divided by 4
Contents of ACCU 2-L before instruction (IW10): "13"
Contents of ACCU 1-L before instruction (MW14): "4"
Instruction /I (ACCU 2-L / ACCU 1-L): "13/4"
Contents of ACCU 1-L after instruction (quotient): "3"
Contents of ACCU 1-H after instruction (remainder): "1"
对于D:1.求商Example
STL Explanation
L ID10 //Load the value of ID10 into ACCU 1.
L MD14 //Load the contents of ACCU 1 into ACCU 2. Load the value of MD14 into ACCU 1.
/D //Divide ACCU 2 by ACCU 1; store the result (quotient) in ACCU 1.
T MD20 //The contents of ACCU 1 (result) are transferred to MD20.
Example: 13 divided by 4
Contents of ACCU 2 before instruction (ID10): "13"
Contents of ACCU 1 before instruction (MD14): "4"
Instruction /D (ACCU 2 / ACCU 1): "13/4"
Contents of ACCU 1 after instruction (quotient): "3"
2.求余数 Explanation
L ID10 //Load the value of ID10 into ACCU 1.
L MD14 //Load the contents of ACCU 1 into ACCU 2. Load the value of MD14 into ACCU 1.
MOD //Divide ACCU 2 by ACCU 1, store the result (remainder) in ACCU 1.
T MD20 //The contents of ACCU 1 (result) are transferred to MD20.
Example: 13 divided by 4
Contents of ACCU 2 before instruction (ID10): "13"
Contents of ACCU 1 before instruction (MD14): "4"
Instruction MOD (ACCU 2 / ACCU 1): "13/4"
Contents of ACCU 1 after instruction (remainder): "1"