6. BASIC INSTRUCTIONS
6 − 30
MELSEC-A
B/
Program which performs the division of BCD data 5678 and 1234, and stores the
result to D502 and 503, and at the same time, outputs the quotient to Y30 to 3F.
Division of BCD data 5678 and 1234 is performed
and the remainder is stored into D502 and D503.
PH H
B/ 5678 1234 D502
P K4
MOV D502 Y030
0
M9036
The quotient (D502) is output to the Y30 to 3F.
• Coding
0 LD M9036
1 B/P H5678 H1234 D502
10 MOVP D502 K4Y030
15 END