mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-12-26 04:32:05 +00:00
Splitting strings into words.
This commit is contained in:
parent
02116fad3c
commit
45c0ccf6c3
@ -369,18 +369,49 @@ end
|
||||
|
||||
; Display a string using the font engine
|
||||
asm displayStr ; (str)
|
||||
txa
|
||||
pha
|
||||
bit setROM
|
||||
txa
|
||||
ldy evalStkL,x
|
||||
lda evalStkH,x
|
||||
tax
|
||||
jsr printSTR
|
||||
bit setLcRW+lcBank2
|
||||
pla
|
||||
tax
|
||||
rts
|
||||
txa
|
||||
pha
|
||||
bit setROM
|
||||
txa
|
||||
lda evalStkL,x
|
||||
sta pTmp
|
||||
lda evalStkH,x
|
||||
sta pTmp+1
|
||||
ldy #0
|
||||
lda (pTmp),y
|
||||
beq ++
|
||||
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
|
||||
|
||||
;==================================================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user