INSTRUCTION SET DESCRIPTIONS

Table C-4. Instruction Set

Name

Description

Operation

Flags

Affected

 

 

 

 

 

 

 

AAA

ASCII Adjust for Addition:

if

AF

 

AAA

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

CF ¸

 

Changes the contents of register AL to

then

DF –

 

(AL) (AL) + 6

IF –

 

a valid unpacked decimal number; the

 

(AH) (AH) + 1

OF ?

 

high-order half-byte is zeroed.

 

(AF) 1

PF ?

 

Instruction Operands:

 

(CF) (AF)

SF ?

 

none

(AL) (AL) and 0FH

TF –

 

 

 

ZF ?

 

 

 

 

AAD

ASCII Adjust for Division:

(AL) (AH) × 0AH + (AL)

AF ?

 

AAD

(AH) 0

CF ?

 

 

DF –

 

Modifies the numerator in AL before

 

 

 

IF –

 

dividing two valid unpacked decimal

 

 

 

OF ?

 

operands so that the quotient

 

 

 

PF

 

produced by the division will be a valid

 

 

 

SF

 

unpacked decimal number. AH must

 

 

 

TF –

 

be zero for the subsequent DIV to

 

 

 

ZF ¸

 

produce the correct result. The

 

 

 

quotient is returned in AL, and the

 

 

 

remainder is returned in AH; both high-

 

 

 

order half-bytes are zeroed.

 

 

 

Instruction Operands:

 

 

 

none

 

 

 

 

 

 

AAM

ASCII Adjust for Multiply:

(AH) (AL) / 0AH

AF ?

 

AAM

(AL) (AL) % 0AH

CF ?

 

 

DF –

 

Corrects the result of a previous multi-

 

 

 

IF –

 

plication of two valid unpacked

 

 

 

OF ?

 

decimal operands. A valid 2-digit

 

 

 

PF

 

unpacked decimal number is derived

 

 

from the content of AH and AL and is

 

SF

 

returned to AH and AL. The high-order

 

TF –

 

half-bytes of the multiplied operands

 

ZF ¸

 

must have been 0H for AAM to

 

 

 

produce a correct result.

 

 

 

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

Page 327
Image 327
Intel 80C186XL, 80C188XL user manual Table C-4. Instruction Set