Added parse ASCII to Immediate

This commit is contained in:
Leeland Heins 2018-12-27 14:03:12 -06:00 committed by GitHub
parent ec8a503f5c
commit 9a6b8b73e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -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);