7 APPLICATION INSTRUCTIONS
7.5 Data Processing Instructions
437
7
Data dissociation in byte units, data linking in byte units
WTOB(P), BTOW(P)
■WTOB
• Dissociates n-bytes of the 16-bit data stored into the area starting from the device number designated by (S), and stores
them following the device designated by (D).
For example, if n=5, data through the lower 8 bits of (S) to ((S)+2) would be stored from ((D) to (D)+4).
• Setting the number of bytes with n automatically determines the range of the 16-bit data designated by (S) and the range of
the devices to store the byte data designated by (D).
• No processing will be conducted when the number of bytes designated by n is "0".
(S): Head number of the devices where data to be dissociated/linked in byte units is stored (BIN 16 bits)
(D): Head number of the devices where the result of dissociated/linking in byte units will be stored (BIN 16 bits)
n: Number of byte data to be dissociated/linked (BIN 16 bits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S)
(D)
n
Basic
Process
High
performance
Redundant
Universal
LCPU
n
n
WTOB, BTOW
WTOBP, BTOWP
D
D
Command
Command
S
SP
indicates an instruction symbol of WTOB/BTOW.
Upper byte Lower byte
Upper byte Lower byte
Upper byte Lower byte
Data of lower byte
00H
Data of upper byte
Data of lower byte
Data of upper byte
Data of lower byte
Data of upper byte
b15 b8b7 b0
b15 b8
b7
b0
D
S
S
D
D
D
D
D
S
n bytes
*1: Fractions that follow the decimal
point are rounded up.
n
2
+( -1)
*1
+1
00
H
00H
00H
00H
00H
+3
+2
+1
+(n-2)
+(n-1)
b15 b8b7 b0
b15 b8 b7 b0
D
S
S
D
D
D
39H
78H56H
39H00H
12H00H
78H00H
56H00H
DCH00H
DCH
FEH
When n=5
bytes
Ignored when n=5
D
S
12
H
+1
+2
+1
+2
+3
+4