6F3B0250
7. Instructions
Arithmetic operations
FUN | Name |
|
|
| Expression | Function | Steps | Speed | Available | Page | ||
No. |
|
|
|
|
|
|
|
| (ms) | T1 | T1S |
|
027 | Addition | B ® C ]- | Adds data of A and B, and | 4 | 6.5 | Ö | Ö | 161 | ||||
|
|
|
|
|
|
| stores the result in C. |
|
|
|
|
|
028 | Subtraction | B ® C ]- | Subtracts data of B from A, | 4 | 6.5 | Ö | Ö | 162 | ||||
|
|
|
|
|
|
| and stores the result in C. |
|
|
|
|
|
029 | Multiplication | Multiplies data of A and B, | 4 | 8.8 | Ö | Ö | 163 | |||||
|
|
|
|
|
|
| and stores the result in |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
030 | Division | B ® C ]- | Divides data of A by B, and | 4 | 9.7 | Ö | Ö | 164 | ||||
|
|
|
|
|
|
| stores the quotient in C and |
|
|
|
|
|
|
|
|
|
|
|
| the reminder in C+1. |
|
|
|
|
|
031 | B+1×B ® C+1×C ]- | Adds data of A+1×A and | 4 | 11.6 | Ö | Ö | 165 | |||||
| addition |
|
|
|
|
| B+1×B, and stores the result in |
|
|
|
|
|
|
|
|
|
|
|
| C+1×C. |
|
|
|
|
|
032 | B+1×B ® C+1×C ]- | Subtracts data of B+1×B from | 4 | 11.7 | Ö | Ö | 166 | |||||
| subtraction |
|
|
|
|
| A+1×A, and stores the result |
|
|
|
|
|
|
|
|
|
|
|
| in C+1×C. |
|
|
|
|
|
035 | Addition with | B ® C ]- | Adds data of A, B and the | 4 | 9.7 | Ö | Ö | 167 | ||||
| carry |
|
|
|
|
| carry, and stores the result in |
|
|
|
|
|
|
|
|
|
|
|
| C. The carry flag changes |
|
|
|
|
|
|
|
|
|
|
|
| according to the result. |
|
|
|
|
|
036 | Subtraction | B ® C ]- | Subtracts data of B and the | 4 | 9.7 | Ö | Ö | 168 | ||||
| with carry |
|
|
|
|
| carry from A, and stores the |
|
|
|
|
|
|
|
|
|
|
|
| result in C. The carry flag |
|
|
|
|
|
|
|
|
|
|
|
| changes according to the |
|
|
|
|
|
|
|
|
|
|
|
| result. |
|
|
|
|
|
039 | Unsigned | Multiplies data of A and B, | 4 |
|
| Ö | 169 | |||||
| multiplication |
|
|
|
|
| and stores the result in |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
| (Unsigned integer operation) |
|
|
|
|
|
040 | Unsigned | B ® C ]- | Divides data of A by B, and | 4 |
|
| Ö | 170 | ||||
| division |
|
|
|
|
| stores the quotient in C and |
|
|
|
|
|
|
|
|
|
|
|
| the reminder in C+1. |
|
|
|
|
|
|
|
|
|
|
|
| (Unsigned integer operation) |
|
|
|
|
|
041 | Unsigned | Divides data of A+1×A by B, | 4 | 15.3 | Ö | Ö | 171 | |||||
| double/single |
|
|
|
|
| and stores the quotient in C |
|
|
|
|
|
| division |
|
|
|
|
| and the reminder in C+1. |
|
|
|
|
|
|
|
|
|
|
|
| (Unsigned integer operation) |
|
|
|
|
|
043 | Increment | A ]- |
| Increments data of A by 1. | 2 | 4.6 | Ö | Ö | 172 | |||
044 | Decrement | A ]- |
| Decrements data of A by 1. | 2 | 4.6 | Ö | Ö | 173 |
126 T1/T1S User’s Manual
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net