Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>aas ascii 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]
AAS              ASCII Adjust after Subtraction      Flags: O D I T S Z A P C
                                                            ?       ? ? * ? *
AAS

          Logic:    If (AL & 0Fh) > 9 or AF = 1 then
                        AL . AL - 6
                        AH . AH - 1
                        AF . 1;  CF . 1
                    else
                        AF . 0;  CF . 0
                    AL . AL & 0Fh

    AAS corrects the result of a previous subtraction of two valid
    unpacked BCD operands, changing the content of AL to a valid BCD
    number. The destination operand of the subtraction must have been
    specified as AL. The high-order nibble of AL is always set to 0.

  --------------------------------------------------------------------------
   Operands                  Clocks   Transfers  Bytes   Example
   no operands                 4          -        1     AAS
  --------------------------------------------------------------------------

       Note:          Unpacked BCD stores one digit per byte; AH contains
                      the most-significant digit and AL the least-
                      significant digit.

See Also: AAA AAD AAS SUB SBB DAS Flags

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