Motorola CPU32 Reference Manual page 80

Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

ASL, ASR
Operation:
Assembler
Syntax:
Attributes:
Description:
specified. The carry bit receives the last bit shifted out of the operand. The shift count
for shifting a register may be specified in two ways:
1. Immediate — Shift count is specified by the instruction (shift range, 8–1).
2. Register — The shift count is the value in the data register specified by the in-
struction, modulo 64.
An operand in memory can be shifted one bit only, and the operand size is restricted
to a word.
For ASL, the operand is shifted left; the number of positions shifted is the shift count.
Bits shifted out of the high-order bit go to both the carry and the extend bits; zeros are
shifted into the low-order bit. The overflow bit indicates if any sign changes occur dur-
ing the shift.
For ASR, the operand is shifted right; the number of positions shifted is the shift count.
Bits shifted out of the low-order bit go to both the carry and the extend bits; the sign-
bit (MSB) is shifted into the high-order bit.
MOTOROLA
4-32
Arithmetic Shift
Destination Shifted by 〈count〉 → Destination
ASd Dx,Dy
ASd #〈data〉, Dy
ASd 〈ea〉
where d is direction, L or R
Size = (Byte, Word, Long)
Arithmetically shifts the bits of the operand in the direction (L or R)
ASL
ASR
INSTRUCTION SET
X/C
ASL, ASR
0
X/C
CPU32
REFERENCE MANUAL

Advertisement

Table of Contents
loading

Table of Contents