FreeCalypso > hg > fc-usbser-tools
comparison fteeprom/ftee-mkblank.c @ 0:11b8a30333b3
fteeprom: initial import from freecalypso-hwlab
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 03 Sep 2023 18:08:22 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:11b8a30333b3 |
---|---|
1 #include <stdio.h> | |
2 #include <stdlib.h> | |
3 #include <string.h> | |
4 #include <strings.h> | |
5 | |
6 main(argc, argv) | |
7 char **argv; | |
8 { | |
9 unsigned size; | |
10 unsigned n, col; | |
11 | |
12 if (argc == 1) | |
13 size = 64; | |
14 else if (argc == 2 && !strcmp(argv[1], "-b")) | |
15 size = 128; | |
16 else if (argc == 2 && !strcmp(argv[1], "-B")) | |
17 size = 256; | |
18 else { | |
19 fprintf(stderr, "usage: %s [-b|-B]\n", argv[0]); | |
20 exit(1); | |
21 } | |
22 for (n = 0; n < size; n++) { | |
23 col = n & 7; | |
24 if (col == 0) | |
25 printf("%02X:", n * 2); | |
26 printf(" %04X", 0xFFFF); | |
27 if (col == 7) | |
28 putchar('\n'); | |
29 } | |
30 exit(0); | |
31 } |