mirror of
https://github.com/softwarejanitor/as65.git
synced 2024-11-21 17:32:10 +00:00
Fixed bug in binary parsing
This commit is contained in:
parent
39268a0a64
commit
8857cddc31
4
as65.pl
4
as65.pl
@ -2309,10 +2309,10 @@ if (open($ifh, "<$input_file")) {
|
||||
$symbols{$symbol} = lc($operand);
|
||||
# 8 bit binary
|
||||
} elsif ($operand =~ /^%([01]{8})$/) {
|
||||
$symbols{$symbol} = '$' . sprintf("%02x", pack("B8", $1));
|
||||
$symbols{$symbol} = '$' . sprintf("%02x", unpack('C', pack("B8", $1)));
|
||||
# 16 bit binary
|
||||
} elsif ($operand =~ /^%([01]{8})([01]{8})$/) {
|
||||
$symbols{$symbol} = '$' . sprintf("%02x", pack("B8", $1)) . sprintf("%02x", pack("B8", $2));
|
||||
$symbols{$symbol} = '$' . sprintf("%02x", unpack('C', pack("B8", $1))) . sprintf("%02x", unpack('C', pack("B8", $2)));
|
||||
# Handle symbol
|
||||
} elsif ($operand =~ /^([<>]*)([A-Za-z\.\?:][A-Za-z0-9_\.\?:]*)$/) {
|
||||
##FIXME -- need to handle < and > here
|
||||
|
Loading…
Reference in New Issue
Block a user