aboutsummaryrefslogtreecommitdiffstats
path: root/asm/ext_string_io.py
diff options
context:
space:
mode:
Diffstat (limited to 'asm/ext_string_io.py')
-rw-r--r--asm/ext_string_io.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/asm/ext_string_io.py b/asm/ext_string_io.py
index cf7d598..7b026ba 100644
--- a/asm/ext_string_io.py
+++ b/asm/ext_string_io.py
@@ -13,6 +13,7 @@ def get_unique_name(prefix: str):
return ret
def expand_put_char(cursor_reg: str, scratch_reg: str, c: str) -> ExpandResult:
+ c = c.strip("\"")
return [
["ldi", str(to_char_code(c)), scratch_reg],
["str", scratch_reg, cursor_reg],
@@ -21,6 +22,7 @@ def expand_put_char(cursor_reg: str, scratch_reg: str, c: str) -> ExpandResult:
def expand_put_string(cursor_reg: str, scratch_reg: str, *rest: str) -> ExpandResult:
string = " ".join(rest)
+ string = string.strip("\"")
result: ExpandResult = []
for c in string:
result += expand_put_char(cursor_reg, scratch_reg, c)