mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 06:25:17 +00:00
Fixed handling of expressions in .word and .addr instructions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3562 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -687,23 +687,21 @@ sub Process2 {
|
|||||||
$OutLine .= $&;
|
$OutLine .= $&;
|
||||||
|
|
||||||
# Print all identifiers if there are any
|
# Print all identifiers if there are any
|
||||||
while ($Line =~ /^([_a-zA-Z]\w*)(.*)$/) {
|
while ($Line =~ /^([^_a-zA-Z]*)([_a-zA-Z]\w*)(.*)$/) {
|
||||||
if (exists ($Labels{$OutName}{$1})) {
|
# Add the non label stuff
|
||||||
$Label = $Labels{$OutName}{$1};
|
$OutLine .= Cleanup ($1);
|
||||||
$OutLine .= sprintf ("<a href=\"#%s\">%s</a>", $Label, $1);
|
|
||||||
} else {
|
|
||||||
$OutLine .= $1;
|
|
||||||
}
|
|
||||||
$Line = $2;
|
|
||||||
if ($Line =~ s/^\s*,\s*//) {
|
|
||||||
$OutLine .= $&;
|
|
||||||
} else {
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add an remainder if there is one
|
# If the identifier is a known label, add a link
|
||||||
$OutLine .= Cleanup ($Line);
|
if (exists ($Labels{$OutName}{$2})) {
|
||||||
|
$Label = $Labels{$OutName}{$2};
|
||||||
|
$OutLine .= sprintf ("<a href=\"#%s\">%s</a>", $Label, $2);
|
||||||
|
} else {
|
||||||
|
$OutLine .= $2;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Proceed with the remainder of the line
|
||||||
|
$Line = $3;
|
||||||
|
}
|
||||||
|
|
||||||
# Handle .proc
|
# Handle .proc
|
||||||
} elsif ($Line =~ /^(\.proc)(\s+)([_a-zA-Z]\w*)?(.*)$/) {
|
} elsif ($Line =~ /^(\.proc)(\s+)([_a-zA-Z]\w*)?(.*)$/) {
|
||||||
|
Reference in New Issue
Block a user