br.c

Tue, 22 Jan 2002 09:42:42 +0000

author
eric
date
Tue, 22 Jan 2002 09:42:42 +0000
changeset 43
b80cb5a4282a
parent 41
2350a4b7393c
permissions
-rw-r--r--

*** empty log message ***

eric@41 1 #include <stdio.h>
eric@41 2
eric@41 3 int main (int argc, char *argv[])
eric@41 4 {
eric@41 5 int i, j;
eric@41 6
eric@41 7 printf ("static const u8 bit_reverse_byte [0x100] =\n");
eric@41 8 printf ("{\n");
eric@41 9 for (i = 0; i < 0x100; i++)
eric@41 10 {
eric@41 11 if ((i & 7) == 0)
eric@41 12 printf (" ");
eric@41 13 j = (((i & 0x01) << 7) |
eric@41 14 ((i & 0x02) << 5) |
eric@41 15 ((i & 0x04) << 3) |
eric@41 16 ((i & 0x08) << 1) |
eric@41 17 ((i & 0x10) >> 1) |
eric@41 18 ((i & 0x20) >> 3) |
eric@41 19 ((i & 0x40) >> 5) |
eric@41 20 ((i & 0x80) >> 7));
eric@41 21 printf ("0x%02x", j);
eric@41 22 if (i != 0xff)
eric@41 23 printf (",");
eric@41 24 if ((i & 7) == 7)
eric@41 25 printf ("\n");
eric@41 26 else
eric@41 27 printf (" ");
eric@41 28 }
eric@41 29 printf ("};\n");
eric@41 30 return (0);
eric@41 31 }