31.16.1.5 Explanation of the SUM and SUMP Instructions

The SUM and SUMP instructions both calculate sums. When the SUM instruction is executed, S2 array elements beginning at address S1 are totaled and the result is saved to D1. The SUM/SUMP instructions always pass power. If the variables designated to operands S1 and D1 are not the same type, an error will occur when using SUM/SUMP instructions. Designate the same variable type in operands S1 and D1.

Refer to the following for specifying a constant.

When operand D1 is an integer variable

When operand D1 is an integer variable and you want to input hexadecimal values in operand S2.

When 0x (zero and lower case "x") is input, the following values become hexadecimal values.

Confirming Execution Results