basic: don't choke on ':' in '"' literals

This commit is contained in:
Virgil Dupras 2019-12-12 12:22:38 -05:00
parent 5b155a5c15
commit 43f4c5200e
2 changed files with 18 additions and 0 deletions

View File

@ -56,6 +56,7 @@ toEnd:
cp ':'
jr z, .havesep
inc hl
call skipQuoted
jr toEnd
.havesep:
inc a ; unset Z

View File

@ -11,5 +11,22 @@ spitQuoted:
inc hl
cp '"'
ret z
or a
ret z
call stdioPutC
jr .loop
; Same as spitQuoted, but without the spitting
skipQuoted:
ld a, (hl)
cp '"'
ret nz
inc hl
.loop:
ld a, (hl)
inc hl
cp '"'
ret z
or a
ret z
jr .loop