Mercurial > hg > Members > kono > nitros9-code
view scripts/list2crc.pl @ 3257:987f995993c3
co80: Use HW port address from descriptor (via SCF and VTIO)
Change the driver code to not use a hardcoded address.
Change the value in the descriptor to the previously
hardcoded value in the driver. Looks like someone was debugging
a WordPak prototype using the cartridge ROM enable output...
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Wed, 29 Aug 2018 08:49:13 +0200 |
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"; }