AAS: ASCII Adjust AL After Subtraction AAS instruction correct the result in the AL register after subtracting operation of two unpacked ASCII operands. The result is in unpacked decimal format. If the lower 4 bits of the AL register are higher than value 9 or if the AF flag is set to 1, the AL is decremented by the value 6 and AH register is decremented by value 1, the CF and AF are set to 1. Or else, the CF and AF are set to 0, the result required no correction. As a conclusion, the upper nibble of AL is set 00 and the lower nibble might be any number from the range 0 to 9.
The process is same to the AAA instruction. AH is modified as difference of the past contents (Typically zero) of AH and the borrow for adjustment.