Delta AH500 — 6.2.2 Explanation of Arithmetic Instructions

Chapter 6 Applied Instructions Example: The 16-bit value in D0 is multiplied by the 16-bit value in D10, and the 16-bit product is stored in (D20). Whether the result is a positive value or a negative value depends on the state of the highest bit b15. When b15 is OFF, the result is a positive value. When b15 is ON, the result is a negative value. D0 Ч D10 = D20 16-bit value Ч 16-bit value = 16-bit value Additional remark: 1.

When the 16-bit product exceeds the range of what a16-bit singed value can be shown, for example a 16-bit product is either bigger than the maximum positive value (K32767) or smaller than the maximum negative value (K-32768), set the SM602 (carry flag) to ON and only write the lower 16-bit data. 2. Please use API0102*/*P instruction for a complete multiplication result of 16-bit values (recorded as 32-bit). Refer to API0102*/*P instruction for details. 3.

When the 32-bit product exceeds the range of what a 32-bit singed value can be shown, for example a 32-bit product is either bigger than the maximum positive value (K2147483647) or smaller than the maximum negative value (K-2147483648), set the SM602 (carry flag) to ON and only write the lower 32-bit data. 4. Please use API0102 D*/D*P instruction for a complete multiplication result of 32-bit values (recorded as 64-bit). Refer to API0102 D*/D*P instruction for details. 6-71