mirror of
https://github.com/softwarejanitor/as65.git
synced 2025-01-28 04:32:26 +00:00
Fixed bug in EQU processing
This commit is contained in:
parent
74ea8cfaa4
commit
802a189b14
12
as65.pl
12
as65.pl
@ -1587,12 +1587,12 @@ sub generate_Indirect_Zero_Page_X {
|
|||||||
# STA (Zpg),Y 91
|
# STA (Zpg),Y 91
|
||||||
sub is_Indirect_Zero_Page_Y {
|
sub is_Indirect_Zero_Page_Y {
|
||||||
my ($operand, $lineno) = @_;
|
my ($operand, $lineno) = @_;
|
||||||
if ($operand =~ /^\(\$([0-9a-fA-F][0-9a-fA-F])\),[Yy]/) {
|
if ($operand =~ /^\(\$([0-9a-fA-F][0-9a-fA-F])\),[Yy]$/) {
|
||||||
return 2;
|
return 2;
|
||||||
} elsif ($operand =~ /^\((\d+)\),[Yy]/) {
|
} elsif ($operand =~ /^\((\d+)\),[Yy]/) {
|
||||||
return 0 if $1 > 255;
|
return 0 if $1 > 255;
|
||||||
return 2;
|
return 2;
|
||||||
} elsif ($operand =~ /^\(([A-Za-z\.][A-Za-z0-9_\.]+)\),[Yy]/) {
|
} elsif ($operand =~ /^\(([A-Za-z\.][A-Za-z0-9_\.]+)\),[Yy]$/) {
|
||||||
# Not Indirect Zero Page,Y if the symbol is not 8 bits.
|
# Not Indirect Zero Page,Y if the symbol is not 8 bits.
|
||||||
my $symval = $symbols{$1};
|
my $symval = $symbols{$1};
|
||||||
if (defined $symval) {
|
if (defined $symval) {
|
||||||
@ -2054,13 +2054,7 @@ if (open($ifh, "<$input_file")) {
|
|||||||
my $symbol = $label;
|
my $symbol = $label;
|
||||||
$symbol =~ s/:$//;
|
$symbol =~ s/:$//;
|
||||||
print "%%%% Saving Symbol $symbol $operand\n" if $verbose;
|
print "%%%% Saving Symbol $symbol $operand\n" if $verbose;
|
||||||
if ($operand =~ /^\$([0-8a-fA-F]+)$/) {
|
$symbols{$symbol} = $operand;
|
||||||
$symbols{$symbol} = sprintf("\$%04x", hex(lc($1)));
|
|
||||||
} elsif ($operand =~ /^\$(\d+)$/) {
|
|
||||||
$symbols{$symbol} = sprintf("%d", $1);
|
|
||||||
} else {
|
|
||||||
$symbols{$symbol} = $operand;
|
|
||||||
}
|
|
||||||
# Mnemonic Addressing mode Form Opcode Size Timing
|
# Mnemonic Addressing mode Form Opcode Size Timing
|
||||||
} elsif (defined $mnemonics{$ucmnemonic}) {
|
} elsif (defined $mnemonics{$ucmnemonic}) {
|
||||||
my $foundit = 0;
|
my $foundit = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user