7 Applied Instructions
7.13 Data Operation 2
520
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
Function and operation explanation
1. 16-bit operation (BTOW/BTOWP)
1) This instruction stores the 16-bit data coupling lower byte (8 bit) of 16-bit data of n points from the device
specified by , into n/2 devices starting from as follows.
2) Higher byte (8 bits) of 16-bit data (after ) in the coupling source is ignored.
3) When n is an odd number, as shown below, higher byte (8 bits) of the data coupled in the last place is set
to 00H. For example, in the case of n=5, data of lower byte (8 bits) of to +4 is stored in
to +2. Higher byte (8 bits) of +2 is 00H.
4) Instruction is not processed in the case of n=0.
Related instructions
Instruction Content
WTOB This instruction separates continuous 16-bit data in byte (8-bit) unit.
BTOWP
EN
s
n
ENO
d
Head device for storing the coupled result in byte unit.
Command
input
Head device of data to be coupled
Number of byte data to be coupled
b15 b8 b7 b0
+0
+1
Higher bytes are ignored.
+2
+n-1
n bytes
First byte data
Second byte data
Third byte data
n-th byte data
+0
+1
+n/2
*
Second byte
Fourth byte
n-th byte
First byte
Third bytes
n-1-th byte
b15 b8 b7 b0
* If n is an odd number, refer to 3).
ds
00H
b15 b8 b7 b0
+0
+1
Higher bytes are ignored.
+2
In the case
of n=5
+0
+1
+2
34H
78H
12H
56H
9AH
ABH
CDH
ABH
12H
34H
78H
EFH 56H
CDH
9AH
+3
+4
In the case of n=5, "H00" is set.
b15 b8 b7 b0
s d