6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
487
6
• These instructions separate the 16-bit binary data in the device specified by (s) and later into (n) bytes, and store the
separated data in the device specified by (d) and later.
*1 Values after the decimal point are rounded up.
When (n) is 5, the data in the device specified by (s) (upper 8 bits) to (s)+2 (lower 8 bits) are stored in the device specified by
(d) to (d)+4.
• Setting the number of bytes for (n) automatically determines the range of 16-bit binary data specified by (s) and the range
of the device specified by (d) for storing the separated data.
• If (n) is 0, no processing is performed.
• The upper 8 bits of the device specified by (d) are automatically filled with 00Hs.
When the byte data in D12 to D14 are stored in the lower 8 bits of D11 to D16
• Even when the ranges of the device where the separation target data is stored and the device for storing the separated
data overlap, the processing is performed normally.
There is no operation error.
(1) Upper byte
(2) Lower byte
(3) Upper byte data
(4) Lower byte data
(1) The data, FEH, is ignored when (n) is 5.
(2) (n)=5
(1) 00H is automatically stored.
Range of the device where the separation target data is stored Range of the device for storing the separated data
(d)+0 to (d)+(n)-1
(s)+1
(s)
(s)+( -1)
*1
2
(n)
b0b7
b8b15
b0b7
b8b15
(d)
(d)+1
(d)+2
(d)+3
(d)+(n)-2
(d)+(n)-1
00H
00H
00H
00H
00H
00H
(n)
(4)
(3)
(4)
(3)
(4)
(3)
(1)
(1)
(1)
(2)
(2)
(2)
(d)+1
(d)+2
(d)+3
(d)+4
(d)
b0b7
b8b15
b0b7
b8b15
(s)
(s)+1
(s)+2
00H
00H
00H
00H
00H
39H
12H
78H
56H
DCH
39H
78H
DCH
12H
56H
FEH
(2)
(1)
D13
D14
D12
b0b7
b8b15
b0b7
b8b15
D11
D12
D13
D14
D15
D16
00H
00H
00H
00H
00H
31H
32H
33H
34H
00H 35H
36H
32H
34H
36H
31H
33H
35H
(1)