31.10.5.4 Explanation of the MOD and MODP Instructions

MOD and MODP instructions are modulus operations. When a MOD instruction is executed, S1 will be divided by S2 and the value of the remainder is stored in D1. The MOD and MODP instructions are always conducted. When using the MOD and MODP instructions, if the types of variables specified in operands S1, S2, and D1 are not the same, an error will occur. Designate the same variable type in all operands S1, S2, 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 operands S1 and S2.

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

When Performing Modules Operation on Data in a Specified Array (Integer Variable Array)

Specify the array using Data [0] or Data [N] (N indicates an integer variable).

When operands S1, S2, and D1 specify the entire array, an error will occur even if the specified variables are the same type.