BASIC INSTRUCTION SET
01,
I,
I a I a
1,1,
I, I, I a 1,1,1, I a I alai' I
BEFORE
SHR
01
a
I,
I, I a I a I, I, I, I, I a I, I,
1,1
a I a I a
I--Q~~;~:Y
OF
OPERAND
CF
AFTER
SHR
BY
10
BITS
SHR
shilts
the bits
In
the register
or
memory operand
to
the right
by
the specified number
of
bit
positions.
CF
receives the
last
bit
shifted out
of
the right
of
the operand.
SHR
shifts in zeros
to
fill the vacated
bit
locations. This instruction operates on byte operands
as
well as word operands.
Figure 3-7.
SHR
Dlalalalalalalalalalalalalalalal'l
c:J
I a I a I a I a I a
la
I a I a I a I a I a I a I a I a I a I a I--Q
01,
I a I a I a I, I, I, I, I a I a I a
I,
I, I a
I,
I a 1--0
D
I,
I, I,
I, I,
I, I, 1 a 1 a 1 a I,
I,
I, I,
OF
OPERAND
CF
BEFORE
SAR
WITH
A
POSITIVE
OPERAND
AFTER
SAR
WITH
A
POSITIVE
OPERAND
SHIFTED
1
BIT
iii:;r=Cn::'
SARWITH
A
NEGATIVE
OPERAND
AFTER
SAR
WITHA
NEGATIVE
OPERAND
SHIFTED
6DITS
G30108
SAR
preserves the Sign
01
the register
or
memory operand as
It
shifts the operand
to
the right the specified number
of
bit
positions.
CF
receives the last
bit
shifted out
of
the right
of
the operand. This instruction also operates on byte operands.
G30108
Figure 3-8.
SAR
3-12