6. BASIC INSTRUCTIONS
6 − 27
MELSEC-A
Program Examples DB+
Program which performs the addition of BCD data 98765400 and 123456, and
stores the result to D888 and D887, and at the same time, outputs it to Y30 to 4F.
• Coding
0 LD M9036
1 DMOVP H98765400 D887
8 DB+P H00123456 D887
17 DMOVP D887 K8Y030
24 END
0
M9036
P H
DB+ 00123456 D887
P H
DMOV 98765400 D887
P K8
DMOV D887 Y030
98765400 is stored into D888 and D887 in BCD.
BCD data 98765400 and 123456 are added and
the result is stored into D888 and D887.
Data of D888 and D887 is output to Y30 to 4F.