It was thus said that the Great Don Y once stated:
And I totally agree with your point about packing
bits and loss of
carry. The things I've done to get carry in C.
Particularly frustrating when dealing with multiple precision
arithmetic. You just *know* that if you were writing it in
ASM, the carry would be there "for free". Yet, you have
to add a separate step to deliberately synthesize it in C
(or, change the fundamental algorithm that you use -- which
just obfuscates that little detail)
Sort of like converting to decimal:
digit = value % 10;
value /= 10;
C has the div() function, which returns both the quotient and remainder.
Most modern compilers should inline this function.
But yes, I do miss having access to the carry bit, but the level of code
I'm writing nowadays has made that less of an issue.
-spc (Besides, there's the Gnu Multiprecision Math library, which has
assembly support for a large number of architectures ... )