URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 1765 |
Rev 1782 |
#include <stdio.h>
|
#include <stdio.h>
|
|
|
|
|
int main()
|
int main()
|
{
|
{
|
int c;
|
int c;
|
int comma=0;
|
int comma=0;
|
int count=0;
|
int count=0;
|
while((c=getchar())!=EOF)
|
while((c=getchar())!=EOF)
|
{
|
{
|
unsigned char x=c;
|
unsigned char x=c;
|
if(comma)
|
if(comma)
|
printf(",");
|
printf(",");
|
else
|
else
|
comma=1;
|
comma=1;
|
if(count==8)
|
if(count==8)
|
{
|
{
|
count=0;
|
count=0;
|
printf("\n");
|
printf("\n");
|
}
|
}
|
if(count==0)
|
if(count==0)
|
printf("\t");
|
printf("\t");
|
printf("0x%02X",c);
|
printf("0x%02X",c);
|
count++;
|
count++;
|
}
|
}
|
if(count)
|
if(count)
|
printf("\n");
|
printf("\n");
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.