Omron CP1E-E@@D@-@ Computer Hardware User Manual


 
2-133
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Data Shift Instructions
2
ASL
ASL
Applicable Program Areas
Operands
Operand Specifications
Flags
Function
Sample program
Instruction Mnemonic Variations
Function
code
Function
ARITHMETIC SHIFT LEFT ASL @ASL 025 Shifts the contents of Wd one bit to the left.
Symbol
ASL
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description Data type Size
Wd Word UINT 1
Area
Word addresses Indirect DM addresses
Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
Wd OK OK OK OK OK OK OK OK OK --- --- --- ---
Name Label Operation
Error Flag P_ER OFF
Equals Flag P_EQ ON when the shift result is 0.
OFF in all other cases.
Carry Flag P_CY ON when 1 is shifted into the Carry Flag (CY).
OFF in all other cases.
Negative Flag P_N ON when the leftmost bit is 1 as a result of the shift.
OFF in all other cases.
ASL(025) shifts the contents of Wd one bit to
the left (from rightmost bit to leftmost bit). “0”
is placed in the rightmost bit and the data
from the leftmost bit is shifted into the Carry
Flag (CY).
When CIO 0.00 is ON, CIO 100 will be
shifted one bit to the left. “0” will be placed in
CIO 100.00 and the contents of CIO 100.15
will be shifted to the Carry Flag (CY).
ASL(025)
Wd
Wd: Word
0
0
15
015
CY
ASL
100
0.00
Wd
015
1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
0
CY
0 0 11 0 0 0 1 0 0 0 1 0 0 0 01
Wd: 100CH