Chapter 10 XGATE (S12XGATEV3)
MC9S12XE-Family Reference Manual , Rev. 1.19
394
Freescale Semiconductor
Operation
n
= RS or IMM4
Shifts the bits in register RD
n
positions to the right. The higher
n
bits of the register RD become filled
with the sign bit (RD[15]). The carry flag will be updated to the bit contained in RD[n-1] before the shift
for
n
> 0.
n
can range from 0 to 16.
In immediate address mode,
n
is determined by the operand IMM4.
n
is considered to be 16 if IMM4 is
equal to 0.
In dyadic address mode,
n
is determined by the content of RS.
n
is considered to be 16 if the content of RS
is greater than 15.
CCR Effects
Code and CPU Cycles
ASR
Arithmetic Shift Right
ASR
N
Z
V
C
∆
∆
∆
∆
N:
Set if bit 15 of the result is set; cleared otherwise.
Z:
Set if the result is $0000; cleared otherwise.
V:
Set if a two´s complement overflow resulted from the operation; cleared otherwise.
RD[15]
old
^ RD[15]
new
C:
Set if
n
> 0 and RD[n-1] = 1; if n = 0 unaffected.
Source Form
Address
Mode
Machine Code
Cycles
ASR RD, #IMM4
IMM4
0
0
0
0
1
RD
IMM4
1
0
0
1
P
ASR RD, RS
DYA
0
0
0
0
1
RD
RS
1
0
0
0
1
P
b15
RD
C
n
Because
of
an
order
from
the
United
States
International
Trade
Commission,
BGA-packaged
product
lines
and
part
numbers
indicated
here
currently
are
not
available
from
Freescale
for
import
or
sale
in
the
United
States
prior
to
September
2010:
S12XE
products
in
208
MAPBGA
packages