wip, most of my SD static bins work
[ginge.git] / loader / tools / mcut.c
1 #include <stdio.h>
2
3 int main(int argc, char *argv[])
4 {
5         FILE *fi;
6         int c, t;
7
8         if (argc < 4) {
9                 printf("usage:\n%s <file> <offs> <count>\n", argv[0]);
10                 return 1;
11         }
12
13         fi = fopen(argv[1], "rb");
14         fseek(fi, strtoul(argv[2], NULL, 0), SEEK_SET);
15         c = atoi(argv[3]);
16
17         while (c--) {
18                 fread(&t, 1, 4, fi);
19                 printf("0x%08x, ", t);
20         }
21         printf("\n");
22
23         return 0;
24 }
25