Mercurial > hg > Members > kono > nitros9-code
view scripts/list2crc.pl @ 3027:32a23a8c3332
Fix for all ide rbsuper descripters being set for drive 0
author | chawks4 |
---|---|
date | Fri, 12 Dec 2014 20:48:42 -0600 |
parents | a0b770fab355 |
children |
line wrap: on
line source
#!/usr/bin/perl # Copyright 2014 Tormod Volden # # Digests assembly listings generated by lwasm, and stores the # module body listing in a file named by the module CRC. # Example: for f in *.lst; do ../scripts/list2crc.pl $f; done open(CRCFILE, ">", "crc.tmp") or die "cannot create crc.tmp: $!"; while (<>) { ($hoffset, $opbytes, $filepath, $lineno, $label, $opcode, $operand, $comment) = ( $_ =~ /^(\w+) (\w+)\s+\((.*)\):(\d+) (\S+)?\s+(\w+)\s*(\S+)?\s*(.*)?/ ); # print $hoffset, "\t", $opcode, "\t", $comment, "\n"; if (lc($opcode) eq "mod") { $in_module = 1; } if (lc($opcode) eq "emod") { die "double emod" if $found_emod; $found_emod = 1; $crc = $opbytes; $in_module = 0; } # if ($in_module && $hoffset) { # $offset = hex($hoffset); # print CRCFILE "$offset\t$filepath\t$lineno\n"; # } if ($in_module) { print CRCFILE $_ } } close(CRCFILE); if ($crc) { print "writing $crc.crc\n"; rename "crc.tmp", $crc . ".crc"; }