On 24 Oct 2011 at 9:07, Fred Cisin wrote:
I will admit to sometimes using some of the BCD
instructions in the
80x86 family, such as AAM, DAA, etc. 'course, other than my sales tax
program, I usually use them for stuff other than BCD.
It's still hard to beat COBOL for money-handling. Explicit decimal-
radix storage, with variable precision called out, ROUNDED as an
optional part of several arithmetic operations... I think the EU
missed the boat by not denoting the fractional parts of the Euro in
(negative) powers of 2.
There's some cute code here on this Univac 1100-series page that we
used in CDC COBOL as well for handling decimal numbers on word-
addressable systems. In particular, items 5, 6, 7, 18 and 21.
--Chuck
(who really does like ones' complement)