Latest posts:

**Four_Bytes_To_Unpacked-BCD_V1.asm AVG 164.08 Cycles and 146 words length**

**Three_Bytes_To_Unpacked-BCD_V5.asm **** ****AVG 102.45 Cycles and 92 words length**

** ****Two_Bytes_To_Unpacked-BCD_v4.asm **** ****AVG 47.86 Cycles and 43 words length**

Divide by 10 is time consuming.

I'm using divide by 1000. That is a divide by 4,

*followed by* a divide by 250. (a)

Divide by 250 starts with a divide by 256.

The Quotient on divide by 256 is multiplied by 6; (256-250)=6.

Next, we add the division remainder (a), and divide again; same way.

The **main.asm** attachment is a **AVG=146 **Clks **Three Bytes conversion to BCD**. <-- this was first posted

Long program, but may be shortened (with lose of speed).

Four bytes(or many) can be similarly converted, but I will not upload untested cumbersome work.

Added Two_Bytes_BCD.asm, better comments, and hope a better way to understand the algorithm; AVG=72.3 Cycles

Added Two_Bytes_BCD_v2.asm, 52 to 66clk as MACRO and not counted INPUT; AVG. from 0 to 65535 = 54.53 Cycles

Added Two_Bytes_BCD_v3.asm tested min 49 to max 52 clks AVG=49.86 Cycles

Added **Two_Bytes_BCD_v4.asm** **tested** **min 47 to max 50 clks AVG= 48 Cycles**

Added **Three_Bytes**_To_Unpacked-BCD_V2.asm **tested** **min 110 to max 135 clks AVG=119 Cycles; ** 135 Words(cseg)

Added **Three_Bytes**_To_Unpacked-BCD_V4.asm **tested** **min 121 to max 127 clks AVG=122.5 Cycles; 110 Words**(cseg)

Added **Three_Bytes_To_Unpacked-BCD_V5.asm** **tested** **min 102 to max 105 clks AVG=102.5 Cycles; 92 Words**(cseg) <-- last modified on 02/24/21

Added **Four_Bytes_To_Unpacked-BCD_V1.asm** **tested** **min 164 to max 167 clks AVG=164.08 Cycles; 146 Words**(cseg)