Asl - Omron SYSMAC CP Series Instruction & Reference Manual

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

Advertisement

ASL

Instruction
ARITHMETIC SHIFT LEFT
Symbol
Applicable Program Areas
Area
Step program areas
Usage
OK
Operands
Operand
Wd
Word
Operand Specifications
Word addresses
Area
CIO
WR
HR
Wd
OK
OK
OK
Flags
Name
Error Flag
Equals Flag
Carry Flag
Negative Flag
Function
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).
Sample program
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).
CP1E CPU Unit Instructions Reference Manual(W483)
Mnemonic
Variations
ASL
@ASL
Description
AR
T
C
DM
OK
OK
OK
OK
Label
P_ER
OFF
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.
Function
code
025
Shifts the contents of Wd one bit to the left.
ASL
ASL(025)
Wd
Wd: Word
Subroutines
OK
Data type
UINT
Indirect DM addresses
Constants
@DM
*DM
OK
OK
---
Operation
15
15
CY
0.00
ASL
Wd
100
15
1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
CY
1
0 0 1
0 0 0 1 0 0 0 1 0 0 0
2 Instructions
Function
Interrupt tasks
OK
Size
1
CF
Pulse bits
TR bits
---
---
0
0
0
Wd: 100CH
0
0
1
0
2
---
2-133

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents