2019-01-11 14:07:33 +00:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
2019-01-15 18:53:14 +00:00
|
|
|
#
|
|
|
|
# freemap.pl:
|
|
|
|
#
|
|
|
|
# Utility to get a free sector map of an Apple II DOS 3.3 disk image.
|
|
|
|
#
|
|
|
|
# 20190115 LSH
|
|
|
|
#
|
|
|
|
|
2019-01-11 14:07:33 +00:00
|
|
|
use strict;
|
|
|
|
|
|
|
|
use DOS33;
|
|
|
|
|
|
|
|
my $debug = 0;
|
|
|
|
|
|
|
|
while (defined $ARGV[0] && $ARGV[0] =~ /^-/) {
|
|
|
|
if ($ARGV[0] eq '-d') {
|
|
|
|
$debug = 1;
|
|
|
|
shift;
|
2019-01-17 19:01:34 +00:00
|
|
|
} else {
|
|
|
|
die "Unknown command line argument $ARGV[0]\n";
|
2019-01-11 14:07:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-17 13:50:09 +00:00
|
|
|
my $dskfile = shift or die "Must supply .dsk filename\n";
|
2019-01-11 14:07:33 +00:00
|
|
|
|
|
|
|
freemap($dskfile, $debug);
|
|
|
|
|
|
|
|
1;
|
|
|
|
|