We used to use the BCD opcodes for this kind of thing. Masking off the 0x30, shift digits (if you want packed BCD)
I can't imagine that has been efficient for decades tho
I can't imagine that has been efficient for decades tho
in pocket calculators you have to display the result in decimal after performing a single arithmetic operation, so it's much more efficient to do the arithmetic in bcd than to convert from decimal to binary, perform the arithmetic operation, and then convert back