mirror of
https://github.com/softwarejanitor/as65.git
synced 2024-11-24 20:32:54 +00:00
Fixed bug in DFB
This commit is contained in:
parent
d354fdd36c
commit
efe0502705
6
as65.pl
6
as65.pl
@ -897,6 +897,7 @@ sub handle_16_bit_symbol {
|
||||
$opval1 = hex(lc($1));
|
||||
$opval2 = hex(lc($2));
|
||||
} else {
|
||||
$symval =~ s/^\$//;
|
||||
my $opval = sprintf("%04x", $symval);
|
||||
$opval1 = hex(substr($opval, 0, 2));
|
||||
$opval2 = hex(substr($opval, 2, 2));
|
||||
@ -2218,6 +2219,8 @@ if (open($ifh, "<$input_file")) {
|
||||
} elsif ($ucmnemonic =~ /DFB/i) {
|
||||
if ($operand =~ /^%([01]{8})/) {
|
||||
$addr++;
|
||||
} elsif ($operand =~ /^\$([0-9a-fA-F][0-9a-fA-F])/) {
|
||||
$addr++;
|
||||
} else {
|
||||
my @symbols = split(',', $operand);
|
||||
my @bytes;
|
||||
@ -2345,6 +2348,9 @@ if (open($ifh, "<$input_file")) {
|
||||
my $byte = unpack('C', pack("B8", $1));
|
||||
generate_8($ofh, $addr, $byte, $lineno, $line);
|
||||
$addr++;
|
||||
} elsif ($operand =~ /^\$([0-9a-fA-F][0-9a-fA-F])/) {
|
||||
generate_8($ofh, $addr, $1, $lineno, $line);
|
||||
$addr++;
|
||||
} elsif ($operand =~ /[0-9a-fA-F][0-9a-fA-F],*/) {
|
||||
#my @bytes = split(',', $operand);
|
||||
my @symbols = split(',', $operand);
|
||||
|
Loading…
Reference in New Issue
Block a user