New answers tagged


To adjust a value, one needs to know how many carries there were out of each decimal digit. When adding two 8-bit numbers, there can be at most one carry out of each 4-bit chunk, which will fit in two flags which are devoted to that purpose. Multiplication of two decimal digits, however, may yield up to eight carries--far too many to fit into two one-bit ...


AAM is needed because the result of multiplying two unpacked BCD is a 'strange' value that needs to be 'normalized' again. The whole mechanic of using the binary multiply with BCD only woks with 'unpacked' values. Using two packed BCD values will return a result that can't be decoded as easy. To allow multiplication with packed BCD would have required the ...


It does not have an opcode to perform packed BCD multiplication, so there is no point having an adjust opcode for that either.

Top 50 recent answers are included