
Instruction Set
4-187
RCL*
Rotate through Carry Left
RCL
What It Does
RCL shifts the bits of a component to the left, copies the Carry Flag (CF) to the lowest bit
of the component, and then overwrites CF with the bit shifted out of the component.
Syntax
Description
RCL shifts CF into the bottom bit and shifts the top bit into CF. The second operand (
count)
indicates the number of rotations. The operand is either an immediate number or the CL
register contents. The microcontroller does not allow rotation counts greater than 31. If the
count is greater than 31, only the bottom 5 bits of the operand are rotated.
Operation It Performs
* – Rotate immediates were not available on the original 8086/8088 systems.
Form
Opcode
Description
Clocks
Am186 Am188
RCL
r/m8,1
D0
/2
Rotate 9 bits of CF and r/m byte left once
2/15
2/15
RCL
r/m8,CL
D2
/2
Rotate 9 bits of CF and r/m byte left CL times
5+
n/17+n
5+
n/17+n
RCL
r/m8,imm8
C0
/2 ib
Rotate 9 bits of CF and r/m byte left imm8 times
5+
n/17+n
5+
n/17+n
RCL
r/m16,1
D1
/2
Rotate 17 bits of CF and r/m word left once
2/15
2/15
RCL
r/m16,CL
D3
/2
Rotate 17 bits of CF and r/m word left CL times
5+
n/17+n
5+
n/17+n
RCL
r/m16,imm8
C1
/2 ib
Rotate 17 bits of CF and r/m word left imm8 times
5+
n/17+n
5+
n/17+n
RCL
component,count
while (i =
count; i != 0; i--)
/* perform shifts */
{
/* save highest bit */
temp = mostSignificantBit(
component);
/* shift left and fill vacancy with carry flag */
component = (component << 1) + CF;
/* replace carry flag with saved bit */
CF = temp;
}
if (
count == 1)
/* single shift */
if (mostSignificantBit(
component) != CF)
/* set overflow flag */
OF = 1;
else
/* clear overflow flag */
OF = 0;
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...