03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INSTRUCTION SET DESCRIPTIONS<br />

Table C-4. Instruction Set (Continued)<br />

Name Description Operation<br />

RCL<br />

RCR<br />

NOTE:<br />

Rotate Through Carry Left:<br />

RCL dest, count<br />

Rotates the bits in the byte or word<br />

destination operand to the left by the<br />

number of bits specified in the count<br />

operand. The carry flag (CF) is treated<br />

as "part of" the destination operand;<br />

that is, its value is rotated into the loworder<br />

bit of the destination, and itself is<br />

replaced by the high-order bit of the<br />

destination.<br />

Instruction Operands:<br />

RCL reg, n<br />

RCL mem, n<br />

RCL reg, CL<br />

RCL mem, CL<br />

Rotate Through Carry Right:<br />

RCR dest, count<br />

Operates exactly like RCL except that<br />

the bits are rotated right instead of left.<br />

Instruction Operands:<br />

RCR reg, n<br />

RCR mem, n<br />

RCR reg, CL<br />

RCR mem, CL<br />

(temp) ← count<br />

do while (temp) ≠ 0<br />

(tmpcf) ← (CF)<br />

(CF) ← high-order bit of (dest)<br />

(dest) ← (dest) × 2 + (tmpcf)<br />

(temp) ← (temp) – 1<br />

if<br />

count = 1<br />

then<br />

if<br />

high-order bit of (dest) ≠ (CF)<br />

then<br />

(OF) ← 1<br />

else<br />

(OF) ← 0<br />

else<br />

(OF) undefined<br />

(temp) ← count<br />

do while (temp) ≠ 0<br />

(tmpcf) ← (CF)<br />

(CF) ← low-order bit of (dest)<br />

(dest) ← (dest) / 2<br />

high-order bit of (dest) ← (tmpcf)<br />

(temp) ← (temp) – 1<br />

if<br />

count = 1<br />

then<br />

if<br />

high-order bit of (dest) ≠<br />

next-to-high-order bit of (dest)<br />

then<br />

(OF) ← 1<br />

else<br />

(OF) ← 0<br />

else<br />

(OF) undefined<br />

The three symbols used in the Flags Affected column are defined as follows:<br />

– the contents of the flag remain unchanged after the instruction is executed<br />

the contents of the flag is undefined after the instruction is executed<br />

üthe flag is updated after the instruction is executed<br />

Flags<br />

Affected<br />

AF –<br />

CF ü<br />

DF –<br />

IF –<br />

OF ü<br />

PF –<br />

SF –<br />

TF –<br />

ZF –<br />

AF –<br />

CF ü<br />

DF –<br />

IF –<br />

OF ü<br />

PF –<br />

SF –<br />

TF –<br />

ZF –<br />

C-36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!