aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-09-10 03:38:50 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-09-10 03:38:50 -0700
commitfbb2a47f3580d6481927a201e00de5a263f9d826 (patch)
treeb73474103ac5070d30e5e0e8fce4c1310ff3a062
parentb6b006dbe53bd6de0bd0acda58695c3bccfd42a5 (diff)
downloadabc80-fbb2a47f3580d6481927a201e00de5a263f9d826.tar.gz
abc80-fbb2a47f3580d6481927a201e00de5a263f9d826.tar.xz
abc80-fbb2a47f3580d6481927a201e00de5a263f9d826.zip
bin2bac.pl: don't require a 0 entry point argument, ABC800 fixes
- If no entry point argument is given, entry point is 0 - Minor fixes to the ABC800 file generation (header size, padding) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rwxr-xr-xdata/bin2bac.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/data/bin2bac.pl b/data/bin2bac.pl
index 818fb4f..c68d85f 100755
--- a/data/bin2bac.pl
+++ b/data/bin2bac.pl
@@ -192,7 +192,7 @@ sub makebac800($$$) {
# See bac800.asm
$bhdr = "\x8f\x00\x21\x00";
$bhdr .= pack("v", 0x5a + length($relocs) + length($data));
- $bhdr .= "\0\0\0\0\0\0\0\0\0\0";
+ $bhdr .= ("\0" x 14);
$bhdr .= "\xe8\xd1\x19\xfa\x9c\xd1\x17\xb8\x92";
$bhdr .= "\x01" . pack("v", 0xffca - length($relocs));
$bhdr .= "\x7d\x91\x4f\x7c\x98\x47\xb1\x28\x25\xe5\x11\x34\x00";
@@ -208,7 +208,7 @@ sub makebac800($$$) {
$data .= "\x00\x00\x00\x00\xff\xfb\xff";
# Pad to the end of a binary sector
- $data .= ("\0" x (253 - (((length($data)+1) % 253) + 1)));
+ $data .= ("\0" x (253 - (((length($data)-1) % 253) + 1)));
return $data;
}
@@ -238,7 +238,7 @@ if ($org !~ /^[0-9]/) {
$org = oct $org if ( $org =~ /^0/ );
}
-if ($entry !~ /^[0-9]/) {
+if ($entry !~ /^[\s0-9x]*$/) {
$entryfile = $entry;
$entryname = '_start' unless(defined($entryname));
undef $entry;