#include
#include
#define N 32
int main(int argc, const char *argv[])
{
int i,j;
char ch[N * 4] =
{
0x06,0x40,0x38,0x50,0x08,0x48,0x08,0x48,
0x08,0x40,0xFF,0xFE,0x08,0x40,0x08,0x48,
0x0E,0x28,0x38,0x30,0xC8,0x20,0x08,0x50,
0x09,0x92,0x08,0x0A,0x28,0x06,0x10,0x02,
0x00,0xF8,0x3F,0x90,0x12,0x10,0x09,0x20,
0x3F,0xFE,0x22,0x02,0x42,0x00,0x3F,0xFC,
0x04,0x00,0x07,0xF0,0x0C,0x20,0x0B,0x40,
0x10,0xC0,0x63,0x30,0x8C,0x0E,0x30,0x04,
0x01,0x00,0x01,0x00,0x21,0x08,0x3F,0xFC,
0x21,0x08,0x21,0x08,0x21,0x08,0x21,0x08,
0x21,0x08,0x3F,0xF8,0x21,0x08,0x01,0x00,
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
0x00,0x00,0x7F,0xFC,0x40,0x04,0x5F,0xF4,
0x41,0x04,0x41,0x04,0x41,0x04,0x4F,0xE4,
0x41,0x44,0x41,0x24,0x41,0x24,0x5F,0xF4,
0x40,0x04,0x40,0x04,0x7F,0xFC,0x40,0x04,
};
#if 1
for(i = 0; i < sizeof(ch); i++)
{
for(j = 0; j < 8; j ++)
{
if(ch[i] & 0x80 >> j)
putchar('@');
else
putchar('.');
}
if( i % 2 )
putchar(10);
if(!((i + 1) % 32))
putchar(10);
}
#else
for(i = 0; i < sizeof(ch); i += 2)
{
for(j = 0; j < 8; j ++)
{
if(ch[i] & 0x80 >> j)
putchar('#');
else
putchar('.');
}
for(j = 0; j < 8; j ++)
{
if(ch[i + 1] & 0x80 >> j)
putchar('#');
else
putchar('.');
}
putchar(10);
if(i % 32)
putchar(10);
}
#endif
return 0;
}
测试结果