Shal (Shift Arithmetic Left) - Renesas H8/300 Series Programming Manual

Table of Contents

Advertisement

SHAL (SHift Arithmetic Left)

<Operation>
Rd (shifted arithmetic left ) → Rd
<Assembly-Language Format>
SHAL Rd
<Examples>
SHAL R5H
<Operand Size>
Byte
<Description>
This instruction shifts an 8-bit general register one bit to the left. The most significant bit
shifts into the carry flag, and the least significant bit is cleared to "0."
The operation is shown schematically below.
MSB
C
Bit 7
The SHAL instruction is identical to the SHLL instruction except for its effect on the overflow
(V) flag.
<Instruction Formats>
Addressing
mode
Register direct
LSB
Bit 0
Mnem.
Operands
SHAL
Rd
<Condition Code>
I
— — — —
I: Previous value remains unchanged.
H: Previous value remains unchanged.
N: Set to "1" if the result is negative;
otherwise cleared to "0."
Z: Set to "1" if the result is zero; otherwise
cleared to "0."
V: Set to "1" if an overflow occurs;
otherwise cleared to "0."
C: Receives the previous value in bit 7.
0
Instruction code
1st byte
2nd byte
1
0
8
rd
104
H
N
Z
3rd byte
4th byte
SHAL
V
C
No. of
states
2

Advertisement

Table of Contents
loading

Table of Contents