Ascii Adjust for Subtraction                         
  
    | 
       86/88  | 
    
       Y  | 
    
       186  | 
    
       Y  | 
    
       286  | 
    
       Y  | 
    
       386  | 
    
       Y  | 
    
       486  | 
    
       Y  | 
    
       AAS  | 
   
  
    | 
       Ovfl  | 
    
       ?  | 
    
       Dir  | 
    
       N  | 
    
       Int  | 
    
       N  | 
    
       Trap  | 
    
       N  | 
    
       Sign  | 
    
       ?  | 
    
       Zero  | 
    
       ?  | 
    
       Aux  | 
    
       Y  | 
    
       Prty  | 
    
       ?  | 
    
       Carry  | 
    
       Y  | 
   
     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.
       Note:          Unpacked BCD stores one digit per byte; AH contains
                      the most-significant digit and AL the least-
                      significant digit.
------------------------------------ Timing ----------------------------------
OpCode          Instruction             386     286     86
3F              AAS                     4       3       8
------------------------------------ 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 and 0Fh
See Also AAA AAD AAM SUB SBB DAA DAS DEC NEG Flags |