Omron SYSMAC CP Series Instruction & Reference Manual page 178

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

2 Instructions
Flags
Name
Error Flag
Equals Flag
Carry Flag
Negative Flag
Function
NASL
NASL(580) shifts D (the shift word) by the specified number of binary bits (specified in C) to the left
(from the rightmost bit to the leftmost bit). Either zeros or the value of the rightmost bit will be placed
into the specified number of bits of the shift word starting from the rightmost bit.
D
CY
Lost
D
NSLL
NSLL(582) shifts D and D+1 (the shift words) by the specified number of binary bits (specified in C) to
the left (from the rightmost bit to the leftmost bit). Either zeros or the value of the rightmost bit will be
placed into the specified number of bits of the shift word starting from the rightmost bit.
D+1
CY
Lost
Precautions
• For any bits which are shifted outside the specified word, the contents of the last bit is shifted to the
Carry Flag (CY), and all other data is lost.
• When the number of bits to shift (specified in C) is "0," the data will not be shifted. The appropriate
flags will turn ON and OFF, however, according to data in the specified word.
2-142
Label
P_ER
• ON when the control word C (the number of bits to shift) is not within range.
• OFF in all other cases.
P_EQ
• ON when the shift result is 0.
• OFF in all other cases.
P_CY
• ON when 1 is shifted into the Carry Flag (CY).
• OFF in all other cases.
P_N
• ON when the leftmost bit is 1 as a result of the shift.
• OFF in all other cases.
15
12
11
8
7
C
0
Shift n-bits
a
Contents of "a" or "0" shifted in
a
N bits
15
11
8
7
4
3
12
C
0
Shift n-bits
D
a
N bits
Operation
4
3
0
0
a
Contents of "a"
or "0" shifted in
CP1E CPU Unit Instructions Reference Manual(W483)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents