2019-01-17 15:39:13 +00:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
#
|
|
|
|
# dos33copy.pl:
|
|
|
|
#
|
|
|
|
# Utility to copy a file on an Apple II DOS 3.3 disk image.
|
|
|
|
#
|
|
|
|
# 20190117 LSH
|
|
|
|
#
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
use DOS33;
|
|
|
|
|
|
|
|
my $debug = 0;
|
|
|
|
|
|
|
|
while (defined $ARGV[0] && $ARGV[0] =~ /^-/) {
|
|
|
|
# Debug
|
|
|
|
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-17 15:39:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
my $dskfile = shift or die "Must supply .dsk filename\n";
|
|
|
|
my $filename = shift or die "Must supply filename (on disk image)\n";
|
|
|
|
my $new_filename = shift or die "Must supply new filename\n";
|
|
|
|
|
|
|
|
copy_file($dskfile, $filename, $new_filename, $debug);
|
|
|
|
|
|
|
|
1;
|
|
|
|
|