31.21.1.3 Explanation of the BCD and BCDP Instructions

The BCD/BCDP instructions convert values to binary coded decimal. The value in S1 is converted to a binary coded decimal and stored in D1.

BCD and BCDP instructions always pass power. The maximum value you can convert in operand S1 is 0x5F5E0FF.

If you try to convert a value that cannot be converted, the value in D1 becomes undefined.

When using BCD/BCDP instructions, an error will occur if the variables specified in operands S1 and D1 are not the same type.

Designate the same variable type in all 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 S1.

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

When Converting 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 and D1 specify the entire array, an error will occur even if the specified variables are the same type.