aboutsummaryrefslogtreecommitdiffstats
path: root/data/bin2bac.pl
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-09-10 08:09:03 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-09-10 08:09:03 -0700
commit5f7fee08686acdb4d726018afd914ec2b6797375 (patch)
tree91828c8a02bdd8c384d73502c7939e9ec0422001 /data/bin2bac.pl
parent8e5bfce70b8af0b2481de4c9c342556c8fb7c110 (diff)
downloadabc80-de1.tar.gz
abc80-de1.tar.xz
abc80-de1.zip
bin2bac: use GOSUB as a much cleaner way to hijack BASICHEADde1
Instead of doing self-modifying BASIC code, use a GOSUB statement to push the BASIC instruction pointer onto the stack, where it can be modified if the user so wishes. See updated bye800.asm for how to use it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'data/bin2bac.pl')
-rwxr-xr-xdata/bin2bac.pl12
1 files changed, 6 insertions, 6 deletions
diff --git a/data/bin2bac.pl b/data/bin2bac.pl
index 76904b8..ac02303 100755
--- a/data/bin2bac.pl
+++ b/data/bin2bac.pl
@@ -191,16 +191,16 @@ sub makebac800($$$$) {
my $bhdr;
# See bac800.asm
$bhdr = "\x8f\x00\x01\x00";
- $bhdr .= pack("v", 0x63 + length($relocs) + length($data));
+ $bhdr .= pack("v", 0x5e + length($relocs) + length($data));
$bhdr .= pack("v*", 0, 0, 0, $reserve, 0, 0, 0);
- $bhdr .= "\xe8\xd1\x19\xfd\x9c\xd1\x17\xb8\x80\x01\x00\x92";
- $bhdr .= "\x01" . pack("v", 0xffc4 - length($relocs));
- $bhdr .= "\xe5\x7d\x91\x4f\x7c\x98\x47\xb1\x28\x25\xe5\x11\x3a\x00";
+ $bhdr .= "\x82\x02\x00\x92\xe8\xd1\x19\xfe\x9c\xd1\x17\xb8\xa0";
+ $bhdr .= "\x01" . pack("v", 0xffca - length($relocs));
+ $bhdr .= "\x7d\x91\x4f\x7c\x98\x47\xb1\x28\x25\xe5\x11\x34\x00";
$bhdr .= "\x19\xd1\x7e\xfe\x80\x30\x10\x23\x83\x5f\x30\x01\x14";
$bhdr .= "\x1a\x81\x12\x13\x1a\x88\x12\x13\x18\xeb\xd6\x81\x38\x06";
- $bhdr .= "\x23\x82\x57\x7e\x18\xe6\xe1\x11\xfd\xff\x19";
+ $bhdr .= "\x23\x82\x57\x7e\x18\xe6";
$bhdr .= "\xc3" . pack("v", $entry);
- $bhdr .= "\x01\x35";
+ $bhdr .= "\x01\x2f";
$data = $bhdr . $relocs . $data;