OpenCores
URL https://opencores.org/ocsvn/1664/1664/trunk

Subversion Repositories 1664

[/] [1664/] [trunk/] [c/] [lista/] [cadena_asciidesimal__nN.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mrdmkg
#include "lista.h"
2
 
3
void cadena_asciidesimal__nN(void *scrive(char *, nN), nN binaria)
4
{
5
 #define cuantia 24
6
 char d[cuantia];
7
 n1 c;
8
 nN i=0;
9
 nN bdiv;
10
 
11
 do
12
 {
13
  bdiv=binaria/10;
14
  c=binaria-((bdiv<<3)+(bdiv<<1));
15
  d[(cuantia-1)-i++]=c|'0';
16
  binaria=bdiv;
17
 } while(bdiv!=0);
18
 
19
 scrive((d+(cuantia))-i, i);
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.