Wed, 02 Jan 2002 16:39:20 +0000
Initial revision
br.c | file | annotate | diff | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/br.c Wed Jan 02 16:39:20 2002 +0000 1.3 @@ -0,0 +1,31 @@ 1.4 +#include <stdio.h> 1.5 + 1.6 +int main (int argc, char *argv[]) 1.7 +{ 1.8 + int i, j; 1.9 + 1.10 + printf ("static const u8 bit_reverse_byte [0x100] =\n"); 1.11 + printf ("{\n"); 1.12 + for (i = 0; i < 0x100; i++) 1.13 + { 1.14 + if ((i & 7) == 0) 1.15 + printf (" "); 1.16 + j = (((i & 0x01) << 7) | 1.17 + ((i & 0x02) << 5) | 1.18 + ((i & 0x04) << 3) | 1.19 + ((i & 0x08) << 1) | 1.20 + ((i & 0x10) >> 1) | 1.21 + ((i & 0x20) >> 3) | 1.22 + ((i & 0x40) >> 5) | 1.23 + ((i & 0x80) >> 7)); 1.24 + printf ("0x%02x", j); 1.25 + if (i != 0xff) 1.26 + printf (","); 1.27 + if ((i & 7) == 7) 1.28 + printf ("\n"); 1.29 + else 1.30 + printf (" "); 1.31 + } 1.32 + printf ("};\n"); 1.33 + return (0); 1.34 +}