Asr - Omron SYSMAC CP Series Instruction & Reference Manual

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

Advertisement

2 Instructions

ASR

Instruction
ARITHMETIC SHIFT RIGHT
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
ASR(026) shifts the contents of Wd
one bit to the right (from leftmost bit to
rightmost bit). "0" will be placed in the
leftmost bit and the contents of the
rightmost bit will be shifted into the
Carry Flag (CY).
Sample program
When CIO 0.00 is ON, word CIO 100 will
shift one bit to the right. "0" will be placed in
CIO 100.15 and the contents of CIO 100.00
will be shifted to the Carry Flag (CY).
2-134
Mnemonic
Variations
ASR
@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
OFF
Function
code
026
Shifts the contents of Wd one bit to the right.
ASR
ASR(026)
Wd
Wd: Word
Subroutines
OK
Data type
UINT
Indirect DM addresses
Constants
@DM
*DM
OK
OK
---
Operation
15
0
0.00
ASR
Wd
100
15
1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
0
0
1 0 0 1 0 0 0 1 0 0 0 1 0 0 0
CP1E CPU Unit Instructions Reference Manual(W483)
Function
Interrupt tasks
OK
Size
1
CF
Pulse bits
TR bits
---
---
---
0
CY
Wd: 100CH
0
CY
1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents