1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-07-23 09:40:20 +10:00
collapseos/apps/basic/util.asm
2019-12-12 12:22:38 -05:00

33 lines
449 B
NASM

; Is (HL) a double-quoted string? If yes, spit what's inside and place (HL)
; at char after the closing quote.
; Set Z if there was a string, unset otherwise.
spitQuoted:
ld a, (hl)
cp '"'
ret nz
inc hl
.loop:
ld a, (hl)
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