This is the opposite prob from what most folks want.
I need to convert a BCD number -- 6 digit -- into its binary/ hex equivalent. The BCD can be packed/ not packed. I prefer not-packed for now.
Can someone provide pointers to an 8-bit assembly implementation for an efficient algorithm ? Its for an AVR project, using Atmega48 as of now. Fair amount of RAM is available if required.
Yes, of course. Unfortunately the least significant digit can overflow to any result bit, so you have to implement a full 24 Bit (or 32, when using standard number formats) adder.
Any reasons against utilizing a standard C compiler to implement the calculations?
Oh ? How would it overflow ? Max for 6-digit is 999,999 which fits in 20 bits. Anyhow I have to use 3x 8-bit regs so no troubles there. This project is very tight on time/ real-time, and its somehow just easier to use assembly, where i can SEE everything. But other than that just force of habit.
Though i admit I sometimes copy bits of code output by gcc with optimisation set ;-)