,

ROR

ROTATE RIGHT ROR

Operation:

Flags Affected:

(temp)- COUNT

CF,.OF

do while (temp) "* 0

 

(CF) - low-order bit of (EA)

 

,(EA) - (EA) I 2

high-order bit of (EA) - (CF)

(temp) - (temp)-1 if COU NT = 1 then

if high-order bit of (EA) "* next- to-high-order bit of (EA)

then (OF)-1 else (OF) - 0

else (OF) undefined

Description:

ROR destination, count

ROR (Rotate Right) operates similar to ROL except that the bits in the destination byte or word are rotated right instead of left.

Encoding:

11101 00 v w 1mod 001 rIm 1

if v = 0 then COUNT = 1 else COUNT = (CL)

ROR Operand

Clocks*

Transfers

Bytes

ROR Coding Example

register, 1

2

-

2

ROR AL, 1

register, CL

8+ 4/bit

-

2

ROR BX, CL

memory, 1

15(23) +EA

2

2-4

ROR PORT_STATUS, 1

memory, CL

20(28) +EA +41 bit

2

2-4

ROR CMD_WORD, CL

*b(w): where b denotes the number of clock cycles for byte operands and w denotes the number of clock cycles for word operands.

2-141

Page 176
Image 176
Intel 210200-002 manual Rotate Right ROR, ROR destination, count