beautypg.com

Intel 253666-024US User Manual

Page 304

background image

3-258 Vol. 2A

DAA—Decimal Adjust AL after Addition

INSTRUCTION SET REFERENCE, A-M

Example

ADD

AL, BL Before: AL=79H BL=35H EFLAGS(OSZAPC)=XXXXXX

After: AL=AEH BL=35H EFLAGS(0SZAPC)=110000

DAA

Before: AL=AEH BL=35H EFLAGS(OSZAPC)=110000

After: AL=14H BL=35H EFLAGS(0SZAPC)=X00111

DAA

Before: AL=2EH BL=35H EFLAGS(OSZAPC)=110000

After: AL=34H BL=35H EFLAGS(0SZAPC)=X00101

Flags Affected

The CF and AF flags are set if the adjustment of the value results in a decimal carry
in either digit of the result (see the “Operation” section above). The SF, ZF, and PF
flags are set according to the result. The OF flag is undefined.

Protected Mode Exceptions

#UD

If the LOCK prefix is used.

Real-Address Mode Exceptions

#UD

If the LOCK prefix is used.

Virtual-8086 Mode Exceptions

#UD

If the LOCK prefix is used.

Compatibility Mode Exceptions

#UD

If the LOCK prefix is used.

64-Bit Mode Exceptions

#UD

If in 64-bit mode.