From 9a6b8b73e0e4cf7c8533eedd6f625c7584d5ec97 Mon Sep 17 00:00:00 2001 From: Leeland Heins Date: Thu, 27 Dec 2018 14:03:12 -0600 Subject: [PATCH] Added parse ASCII to Immediate --- as65.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/as65.pl b/as65.pl index 44c5665..7632a5a 100644 --- a/as65.pl +++ b/as65.pl @@ -1031,7 +1031,10 @@ sub is_Immediate { return 2; # Parse decimal } elsif ($operand =~ /^#(\d)+$/) { - return 0 if ($1 > 255); + #return 0 if ($1 > 255); + return 2; + # Parse ASCII + } elsif ($operand =~ /^#"(.)$/) { return 2; # Handle symbols. } elsif ($operand =~ /^#[<>]*([A-Za-z\.\?:][A-Za-z0-9_\.\?:]*)$/) { @@ -1061,6 +1064,9 @@ sub generate_Immediate { # Parse decimal } elsif ($operand =~ /^#(\d+)$/) { generate_16($ofh, $addr, $opcode, $1, $lineno, $line); + # Parse ASCII + } elsif ($operand =~ /^#"(.)$/) { + generate_16($ofh, $addr, $opcode, ord($1), $lineno, $line); # Handle symbol } elsif ($operand =~ /^#([<>]*[A-Za-z\.\?:][A-Za-z0-9_\.\?:]*)/) { handle_8_bit_symbol($ofh, $lineno, $addr, $opcode, $1, $line);