higher, then the processor adds 6 to it and discards any overflow of the nibble, and stores it in the least significant byte. The most significant byte is incremented. Note that at this point the most significant byte may not contain a valid decimal number. Subtraction Only the decimal numbers 0 to 99 can be subtracted directly. First the numbers are subtracted as usual using sub (or sbb if you need the carry flag). The processor will set the adjust flag if a borrow occurred in the least significant nibble, and the carry flag if a borrow occurred in the most significant nibble. Packed The result is adjusted using das (decimal adjust after subtraction): If the least significant nibble of the result is 10 or higher, or if the adjust flag is set, then the processor subtracts 6 from the result. Then, if the most significant nibble of the result is 10 or higher, or if the carry flag is set, then the processor subtracts 96 (6 times 16) from the result and sets the carry flag. Unpacked The result is adjusted using aas (ASCII adjust after subtraction): If the least significant nibble of the result is 10 or higher, then the processor subtracts 6 from it and stores it in the least significant byte. The most significant byte is decremented. Note that at this point the most significant byte may not contain a valid decimal number. Multiplication Only unpacked representation is supported. Only two single digit numbers can be multiplied. First the digits are multiplied as usual using mul. Then the result is adjusted using aam (ASCII adjust for multiplication): The processor divides the result by ten, storing the quotient (just the integral part) in the most significant byte of the result and the remainder in the least significant byte of the result. Division Only unpacked representation is supported. Operands must fall in the range 0 to 99. First the operands are converted to normal binary representation using aad (ASCII adjust before division): The processor converts numbers by multiplying the most significant byte by 10 and adding the least significant byte. The quotient and remainder of the division are obtained as usual using div, and will be present in normal binary representation. In x87 The x87 coprocessor has BCD support in the form of a pair of load (FBLD) and store-and-pop (FBSTP) instructions. The former loads a 80-bit BCD