Hitachi HIDIC MICRO-EH Applications Manual page 122

Table of Contents

Advertisement

Item number
Application instructions-4
Ladder format
SHR (d, n)
Instruction format
SHR (d, n)
Usable I/O
d
I/O to be shifted
Number of bits to be
n
shifted
Function
Shifts the contents of d to the right (toward the lower digits) by n bits.
Sets n bits of SD (R7F2) contents starting with the most significant bit.
Sets the content of the nth bit from the least significant bit in C (R7F0).
Before execution
SD
SD (R7F2)
After execution
SD
SD SD
Most significant bit (MSB)
If d is a word:
Designates the shift amount, depending on the contents (0 to 15) of the lower 4 bits (b3 to b0) of n
(WX, WY, WR, WM, TC). (Upper bits are ignored and considered as "0.")
The n (constant) can be set to 0 to 15 (decimal).
If d is a double word:
Designates the shift amount, depending on the contents (0 to 31) of the lower 5 bits (b4 to b0) of n
(WX, WY, WR, WM, TC). (Upper bits are ignored and considered as "0.")
The n (constant) can be set to 0 to 31 (decimal).
Notes
If n is equal to "0," the shifting is not performed. The previous state is retained in C.
Name
Condition code
R7F4
R7F3
R7F2
DER
ERR
SD
Number of steps
Condition
Bit
R,
TD, SS,
X
Y
M
CU, CT
WX WY
d
SD
SD
n bits
5-72
Chapter 5 Instruction Specifications
Shift right
Processing time (µs)
R7F1
R7F0
Average Maximum
V
C
38
Steps
3
46
Word
Double word
WR,
DR,
WM TC DX DY
DM
n bits
B
Least significant bit (LSB)
Remark
Upper case: W
Lower case: DW
Other
The constant is set in
decimal.
C (R7F0)
B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents