Intel 80287, 80286 manual I 1I 1I 0 1I 1 1I o I o I 1 o I 1I 1111010rrG

Models: 80287 80286

1 515
Download 515 pages 45.04 Kb
Page 70
Image 70

BASIC INSTRUCTION SET

111 o 11l'11o 1o 111o 1111111o I o I o I 0

BEFORE RDR

[I o I 1I 1I 0 1I 1 1I o I o I 1 o I 1I 1111010rrG

AFTER RDR BY 1 BIT

rl1 o 11I 1l'o 1o 1o 1111 o 111111101°'TD

AFTER RCR BY 8 BITS_

OPERAND

CF

ROR shifts the bits In the memory or register operand to the right by the specified number of bit positions. It caples each bit shifted out of the right of the operand Into the left of the operand. The last bit shifted Into the most significant bit of the operand also appears

In CF. This instruction also operates on byte operands.

G30108

Figure 3-10. ROR

Example: ROR WORDOPRND, CL. Rotates the contents of the memory word labeled WORDOPRND by the number of bits specified by the value contained in CL. CF reflects the value of the last bit rotated from the right to the left side of the operand.

RCL (Rotate Through Carry Left) rotates bits in the byte or word destination operand left by one or by the number of bits specified in the count operand (an immediate value or the value contained in CL).

This instruction differs from ROL in that it treats CF as a high-order I-bit extension of the destination operand. Each high-order bit that exits from the left side of the operand moves to CF before it returns to the operand as the low-order bit on the next rotation cycle. See figure 3-11.

Example: RCL BX,l. Rotates the contents of BX left by one bit. The high-order bit of the operand moves to CF, the remaining 15 bits move left one position, and the original value of CF becomes the new low-order bit.

RCR (Rotate Through Carry Right) rotates bits in the byte or word destination operand right by one or by the number of bits specified in the count operand (an immediate value or the value contained in

CL).

This instruction differs from ROR in that it treats CF as a low-order I-bit extension of the destination operand. Each low-order bit that exits from the right side of the operand moves to CF before it returns to the operand as the high-order bit on the next rotation cycle. See figure 3-12.

Example: RCR BYTEOPRND,3. Rotates the contents of the memory byte labeled BYTEOPRND to the right by 3 bits. Following the execution of this instruction, CF reflects the original value of bit number 5 of BYTEOPRND, and the original value of CF becomes bit 2.

3-14

Page 70
Image 70
Intel 80287, 80286 manual I 1I 1I 0 1I 1 1I o I o I 1 o I 1I 1111010rrG