Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
27 Applied Instructions (Data Operation 3)
27.4 SFR / Bit Shift Right with Carry
664
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
27.4 SFR / Bit Shift Right with Carry
Outline
This instruction shifts 16 bits stored in a word device rightward by "n" bits.
1. Format and operation, execution form
2. Set data
3. Applicable devices
Function and operation explanation
1. 16-bit operation (SFR/SFRP)
1) 16 bits stored in a word device specified by are shifted rightward by "n" bits.
Specify a value in the range from "0" to "15" as "n".
If "16" or larger value is specified as "n", 16 bits are shifted rightward by the remainder of "(n) divided by
(16)".
For example, when "n" is set to "18", 16 bits are shifted rightward by 2 bits as "2" remains when "18" is
divided by "16".
2) The ON (1) or OFF (0) status of the "n"th bit (bit "n-1") in the word device specified by is transferred
to the carry flag M8022.
FX3U(C) FX3G(C) FX3S FX2N(C) FX1N(C) FX1S FXU/FX2C FX0N FX0(S)
Instruction
name
Operation
Execution
form
Expression in each language
Structured ladder/FBD ST
SFR 16 bits Continuous SFR(EN,n,d);
SFRP 16 bits Pulse SFRP(EN,n,d);
Variable Description Data type
Input
variable
EN Execution condition Bit
Number of times of shift (0 n 15) ANY16
Output
variable
ENO Execution state Bit
Device storing data to be shifted. ANY16
Operand
type
Bit Devices Word Devices Others
System user Digit specification
System
user
Special
unit
Index
Cons
tant
Real
Number
Character
String
Pointer
XYMTCS
D.b
KnX KnY KnM KnS T C D R
U\G
V Z Modifier K H E
""
P
z z z z zzzz z zz zz
zzzzzzz z zz z
SFR
EN
n
ENO
d
SFRP
EN
n
ENO
d
SFR
EN
n
ENO
d
Number of times
of shift
Command
input
Device storing data to be shifted.