INSTRUCTION SET DESCRIPTIONS

 

Table C-4. Instruction Set (Continued)

 

 

 

 

 

Name

Description

Operation

Flags

Affected

 

 

 

 

 

 

 

CWD

Convert Word to Doubleword:

if

AF –

 

CWD

(AX) < 8000H

CF –

 

then

DF –

 

Extends the sign of the word in register

 

(DX) 0

IF –

 

AX throughout register DX. Use to

 

else

OF –

 

produce a double-length (doubleword)

 

(DX) FFFFH

PF –

 

dividend from a word prior to

 

 

SF –

 

performing word division.

 

 

 

TF –

 

Instruction Operands:

 

 

 

ZF –

 

none

 

 

 

 

 

 

DAA

Decimal Adjust for Addition:

if

AF

 

DAA

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

CF

 

then

DF –

 

Corrects the result of previously

 

(AL) (AL) + 6

IF –

 

adding two valid packed decimal

 

(AF) 1

OF ?

 

operands (the destination operand

 

if

PF

 

must have been register AL). Changes

 

(AL) > 9FH or (CF) = 1

SF

 

the content of AL to a pair of valid

 

then

TF –

 

packed decimal digits.

 

(AL) (AL) + 60H

ZF

 

Instruction Operands:

 

(CF) 1

 

 

none

 

 

 

 

 

 

DAS

Decimal Adjust for Subtraction:

if

AF

 

DAS

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

CF

 

then

DF –

 

Corrects the result of a previous

 

(AL) (AL) – 6

IF –

 

subtraction of two valid packed

 

(AF) 1

OF ?

 

decimal operands (the destination

 

if

PF

 

operand must have been specified as

 

(AL) > 9FH or (CF) = 1

SF

 

register AL). Changes the content of

 

then

TF –

 

AL to a pair of valid packed decimal

 

(AL) (AL) – 60H

ZF ¸

 

digits.

(CF) 1

 

 

Instruction Operands:

 

 

 

 

 

none

 

 

 

 

 

 

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

Page 334
Image 334
Intel 80C188XL, 80C186XL user manual Convert Word to Doubleword, Decimal Adjust for Addition, Decimal Adjust for Subtraction