aboutsummaryrefslogtreecommitdiff
path: root/grepbytes.pl
blob: f35627885590cdaf38bce5d5d02a53eb5e1dde45 (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/perl -w

$regex = shift or die "no regex";
undef $/;
$_ = <>;

while($_ =~ /$regex/gc) {
	printf "match at \$%04X\n", $-[0] + 0x8000;
}