git.ucc.asn.au
/
uccvend-snackrom.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
More versatile CRC function ... planned for auth
[uccvend-snackrom.git]
/
ROM2
/
src2c.pl
1
#!/usr/bin/perl -w
2
3
print "#include \"types.h\"\n";
4
print "const char _rom_src_data[] = {\n\t";
5
my $size = 0;
6
my $a;
7
while (read STDIN,$a,1) {
8
printf "0x%02x,", ord($a);
9
$size++;
10
if ($size%8 == 0) { print "\n\t"; }
11
}
12
print <<EOT;
13
};
14
15
const u16 _rom_src_len = $size;
16
17
EOT
UCC
git Repository :: git.ucc.asn.au