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 />

Flags<br />

Affected<br />

CWD<br />

DAA<br />

DAS<br />

NOTE:<br />

Convert Word to Doubleword:<br />

CWD<br />

Extends the sign of the word in register<br />

AX throughout register DX. Use to<br />

produce a double-length (doubleword)<br />

dividend from a word prior to<br />

performing word division.<br />

Instruction Operands:<br />

none<br />

Decimal Adjust for Addition:<br />

DAA<br />

Corrects the result of previously<br />

adding two valid packed decimal<br />

operands (the destination operand<br />

must have been register AL). Changes<br />

the content of AL to a pair of valid<br />

packed decimal digits.<br />

Instruction Operands:<br />

none<br />

Decimal Adjust for Subtraction:<br />

DAS<br />

Corrects the result of a previous<br />

subtraction of two valid packed<br />

decimal operands (the destination<br />

operand must have been specified as<br />

register AL). Changes the content of<br />

AL to a pair of valid packed decimal<br />

digits.<br />

Instruction Operands:<br />

none<br />

if<br />

(AX) < 8000H<br />

then<br />

(DX) ← 0<br />

else<br />

(DX) ← FFFFH<br />

if<br />

((AL) and 0FH) > 9 or (AF) = 1<br />

then<br />

(AL) ← (AL) + 6<br />

(AF) ← 1<br />

if<br />

(AL) > 9FH or (CF) = 1<br />

then<br />

(AL) ← (AL) + 60H<br />

(CF) ← 1<br />

if<br />

((AL) and 0FH) > 9 or (AF) = 1<br />

then<br />

(AL) ← (AL) – 6<br />

(AF) ← 1<br />

if<br />

(AL) > 9FH or (CF) = 1<br />

then<br />

(AL) ← (AL) – 60H<br />

(CF) ← 1<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 />

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 />

AF ü<br />

CF ü<br />

DF –<br />

IF –<br />

OF <br />

PF ü<br />

SF ü<br />

TF –<br />

ZF ü<br />

C-11

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

Saved successfully!

Ooh no, something went wrong!