Splitting strings into words.

This commit is contained in:
Martin Haye 2014-07-20 15:52:51 -07:00
parent 02116fad3c
commit 45c0ccf6c3

View File

@ -369,18 +369,49 @@ end
; Display a string using the font engine ; Display a string using the font engine
asm displayStr ; (str) asm displayStr ; (str)
txa txa
pha pha
bit setROM bit setROM
txa txa
ldy evalStkL,x lda evalStkL,x
lda evalStkH,x sta pTmp
tax lda evalStkH,x
jsr printSTR sta pTmp+1
bit setLcRW+lcBank2 ldy #0
pla lda (pTmp),y
tax beq ++
rts inc pTmp
bne +
inc pTmp+1
+
-- tax
ldy #0
- lda (pTmp),y
dex
cmp #$20
beq +
sta $281,y
iny
cpx #0
bne -
+ sty $280
tya
sec
adc pTmp
sta pTmp
bcc +
inc pTmp+1
+ txa
pha
ldy #$80
ldx #2
jsr printSTR
pla
bne --
++ bit setLcRW+lcBank2
pla
tax
rts
end end
;================================================================================================== ;==================================================================================================