On Mon, Apr 7, 2014 at 12:34 PM, cdb wrote: > > --True this is not C, but here I use Goto in the HLL to implement Peter > Hemsley's High Speed Binary to Decimal for Pics. > > > /************************************************************************= ** > ***** > *************************************************************************= ** > ***** > **There are two choices of using the code below. > **The assembler version > **Which takes 8 instructions less than the basic version, can be > uncommented if > **program space and speed is of paramount importance. > **The basic version generates an extra two "goto's" per test of STATUS > *************************************************************************= ** > ****/ > > //Basic version. This is a sort of do...while or do.....until loop > while (1) do > > asm_start > > LSD //Least Significant Digit > addwf units,F > decf tens,F > > asm_end > > if (STATUS & (1< > asm_start > LMD > addwf tens,F > decf hund,F > asm_end > > if (STATUS &(1< > asm_start > MMD > addwf > hund,F > decf thou= ,F > asm_end > > if (STATUS & (1< then > > asm_start > NSD > > addwf thou,F > > decf tthou,F > asm_end > > if (STATU= S > & (1< > > break > endif > > goto NSD > > endif > > goto MMD > > endif > > goto LMD > > endif > > done do { asm_start LSD //Least Significant Digit addwf units,F decf tens,F asm_end } while ((STATUS & (1<