Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- iAPx86 - <b>das decimal adjust after subtraction flags: o d i t s z a p c</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DAS             Decimal Adjust after Subtraction     Flags: O D I T S Z A P C
                                                            ? - - - * * * * *
DAS

        Logic   if ((AL AND 0Fh) > 9) OR (AF = 1)
                   AL . AL - 6
                   AF . 1
                else AF . 0
                endif
                if (AL > 9Fh) OR (CF = 1)
                   AL . AL - 60h
                   CF . 1
                else CF . 0
                endif

    Execute DAS after executing a SUB or SBB instruction on two packed
    BCD operands. The subtraction leaves a two-digit byte result in
    the AL register. The DAS instruction adjusts AL to contain the
    correct two-digit packed decimal result.


    Opcode      Format
    2F          DAS


    Length and timing
    Operands    Bytes   8088    186     286     386     486     Pentium
    -            1       4       4       3       4       2       3   NP

See Also: DAA SBB Flags

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson