6 BASIC INSTRUCTIONS
6.4 Data Transfer Instructions
319
6
Shift
SMOV(P)
• When SM719 (SMOV Instruction BCD conversion inhibit flag) is off: The values of (S) and (D) are converted into a four-digit
BCD (0000 to 9999), and the values of the n1-th digit to the lower n2 digits are transferred with the n3-th digit of (D) being
placed at the start, converted into BIN, and then stored in (D).
• When SM719 is on: BIN BCD conversion is not conducted and data is shifted in units of 4 bits.
• LCPU: The serial number (first five digits) is "16042" or later.
• QnUDVCPU: The serial number (first five digits) is "16043" or later.
(S): Start number of the devices where the data of the specified digit is stored (Device name)
n1: Start position where data to be moved is stored (BIN 16 bits)
n2: Number of digit to be shifted (BIN 16-bit)
(D): Head number of device where data, which was shifted by digit units, is stored (device name)
n3: Position of head line of the shift destination (BIN 16-bit)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S)
n1
n2
(D)
n3
Basic
High
performance
Process
Redundant
Universal
Ver.
LCPU
Ver.
n2n1S
SMOVP
SMOV
SMOVP
SMOV
n2
n3
n3n1S
D
D
Command
Command
4th digit 3rd digit
Do not change
2nd digit 1st digit When n1 = 4, n2 = 2, and n3 = 3
Convert from BIN data to BCD data.
Transfer n2 digits of data from the n1th digit
to the n3th and n2th digits to compose
data. 103 and 100 of data remain
the same.
(16 bit binary data)
(BCD 4-digit data)
(BCD 4-digit data)
Conversion
Shifting digits
Conversion
(1)
(2)
(3)
(1)
(2)
(3)
(16 bit binary data)
10
3
10
2
10
1
10
0
10
3
10
2
10
1
10
0
S
S
S'
D'
Covert the composed data from BCD to BIN,
and store it in .
D
S'
D'
D'
D
Transfer (n2 × 4 bits) of data from n1th digit
to the n3th and n2th digits to compose data.
Bit 16 to 13 and 4 to 1 of data remain the same.
4th digit 3rd digit 2nd digit 1st digit When n1 = 4, n2 = 2, and n3 = 3
(16 bit binary data)
(16 bit binary data)
Shifting digits (1)
(1)
S
D
S D
D