INSTRUCTION SET DESCRIPTIONS

Table C-4. Instruction Set (Continued)

Name

Description

Operation

Flags

Affected

 

 

 

 

 

 

 

ROR

Rotate Right:

(temp) count

AF –

 

ROR dest, count

do while (temp) 0

CF

 

(CF) low-order bit of (dest)

DF –

 

Operates similar to ROL except that

 

(dest) (dest) / 2

IF –

 

the bits in the destination byte or word

 

high-order bit of (dest) (CF)

OF ¸

 

are rotated right instead of left.

(temp) (temp) – 1

PF –

 

Instruction Operands:

 

if

SF –

 

ROR reg, n

count = 1

TF –

 

ROR mem, n

then

ZF –

 

ROR reg, CL

if

 

 

ROR mem, CL

high-order bit of (dest)

 

 

 

next-to-high-order bit of (dest)

 

 

 

then

 

 

 

(OF) 1

 

 

 

else

 

 

 

(OF) 0

 

 

 

else

 

 

 

(OF) undefined

 

 

 

 

 

SAHF

Store Register AH Into Flags:

(SF):(ZF):X:(AF):X:(PF):X:(CF) (AH)

AF

 

SAHF

 

CF

 

 

DF –

 

Transfers bits 7, 6, 4, 2, and 0 from

 

 

 

IF –

 

register AH into SF, ZF, AF, PF, and CF,

 

 

 

OF –

 

respectively, replacing whatever

 

 

 

PF

 

values these flags previously had.

 

 

 

SF

 

Instruction Operands:

 

 

 

TF –

 

none

 

ZF ¸

 

 

 

 

NOTE: The three symbols used in the Flags Affected column are defined as follows:

the contents of the flag remain unchanged after the instruction is executed ¸? the contents of the flag is undefined after the instruction is executed

the flag is updated after the instruction is executed

C-39

Page 362
Image 362
Intel 80C188XL, 80C186XL user manual Rotate Right, ROR dest, count, Store Register AH Into Flags