171
4
4 Instructions 4.5.2 Data Transfer
SMOV: Shifted transfer
◆
Overview
The SMOV instruction transfers m2 bits starting from the m1th bit in S to m2 bits starting from the nth bit in D.
SMOV S m1 m2 D n
Shifted transfer Applicable model:
H3U
S Data source
Address of the word element that stores
the bits to be transferred
16-bit instruction
(11 steps)
SMOV: Continuous
execution
SMOVP: Pulse
execution
m1 Initial bit to be transferred
Position of the initial bit in S to be
transferred
m2 Transferred bit count Number of bits in S to be transferred
D Destination operand
Address of the word element that stores
the bits transferred to a destination
n Initial bit at the destination Position of the initial bit transferred to D
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
m1 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
m2 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
n X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
The SMOV instruction requires contact driving and has a maximum of ve operands, which are described
as follows:
S is the data source from which bits will be transferred. When M8168 = OFF, the BCD mode (decimal bits)
is enabled. The M operand is in the range 0000 to 9999 and cannot be a negative number. When M8168 =
ON, the BIN mode is enabled. The S operand can be a negative number.
m1 is the number of the initial bit to be transferred. The value range is 1 to 4.
m2 is the number of bits to be transferred. The value range is 1 to m1.
D is the destination variable to which bits are transferred.
n is the initial bit of the destination variable that stores a transferred bit. The value range is m2 to 4.
The data bit transfer process is related to the status of the special ag M8168. When M8168 = OFF, the
BCD mode (decimal bits) is enabled When M8168 = ON, the BIN mode is enabled, whereby every four bits
(hexadecimal) are transferred at a time as a whole unit.