THE 80286 INSTRUCTION SET

DAA-Decimal Adjust AL After Addition

OpcodeInstruction ClocksDescription

27

DAA

3

Decimal adjust AL after addition

FLAGS MODIFIED

Sign, zero, auxiliary carry, parity, carry

FLAGS UNDEFINED

Overflow

OPERATION

DAA should be executed only after an ADD instruction which leaves a two-BCD-digit byte result in the AL register. The ADD operands should consist of two packed BCD digits. In this case, the DAA instruction will adjust AL to contain the correct two-digit packed decimal result.

The precise definition of DAA is as follows:

1.If the lower 4 bits of ~L are greater than nine, or if the auxiliary carry flag is 1, then increment

AL by 6, and set the)l.uxiliary carry flag. Otherwise, reset the auxiliary carry flag.

I

.

.

2.If AL is now greater than 9FH, or if the carry flag is set, then increment AL by 60H, and set the carry flag. Otherwise, clear the carry flag.

PROTECTED MODE EXCEPTIONS

None

REAL ADDRESS MODE EXCEPTIONS

None

8-36

Page 246
Image 246
Intel 80287, 80286 manual DAA-Decimal Adjust AL After Addition, Daa