beautypg.com

3 extended addition instruction (addx) – Yaskawa Ladder Works Programming Manual User Manual

Page 23

background image

2.3 EXTENDED ADDITION Instruction (ADDX)

2-6

2.3 EXTENDED ADDITION Instruction (ADDX)

[Outline]

The ADDX instruction adds integer values. Source B is added to Source A and stored in the Dest. No
operation error occurs, even if the operation results in an overflow. Otherwise, the ADDX is much the
same as the ADD.

[Format]

Symbol : ADDX
Full Name : Expanded Add
Category : MATH

Icon :

[Parameter]

Parameter Name

Setting

Source A

· Any integer type and double-length integer type register
· Any integer type and double-length integer type register with subscript
· Subscript register
· Constant

Source B

· Any integer type and double-length integer type register
· Any integer type and double-length integer type register with subscript
· Subscript register
· Constant

Dest

· Any integer type and double-length integer type register (except for # and

C registers)

· Any integer type and double-length integer type register with subscript

(except for # and C registers)

· Subscript register

[Program Example]

This instruction is used in cases where it is desirable that operation errors do not occur in the addition
of integer type values.

Notes: In the case of double-length integer type values, an operation using addition and

subtraction instructions (+, –, ++, --) will be a 32-bit operation. However, when an
addition or subtraction instruction is used in a remainder correction operation (where a
multiplication instruction (×) is the immediately preceding instruction and a division
instruction (÷) is the immediately subsequent instruction), the operation will be a 64-bit
operation.